Lines 2-91
Link Here
|
2 |
# |
2 |
# |
3 |
# The user/port can now set this options in the makefiles. |
3 |
# The user/port can now set this options in the makefiles. |
4 |
# |
4 |
# |
5 |
# USE_PHPIZE=yes - Use to build a php extension. |
5 |
# USE_PHPIZE=yes - Use to build a PHP extension. |
6 |
# WANT_PHP_CLI=yes - Want the CLI version of PHP. |
6 |
# WANT_PHP_CLI=yes - Want the CLI version of PHP. |
7 |
# WANT_PHP_CGI=yes - Want the CGI version of PHP. |
7 |
# WANT_PHP_CGI=yes - Want the CGI version of PHP. |
8 |
# WANT_PHP_MOD=yes - Want the Apache Module for PHP. |
8 |
# WANT_PHP_MOD=yes - Want the Apache Module for PHP. |
9 |
# WANT_PHP_WEB=yes - Want the Apache Module or the CGI version of PHP. |
9 |
# WANT_PHP_WEB=yes - Want the Apache Module or the CGI version of PHP. |
|
|
10 |
# WANT_PHP_PEAR=yes - Want the PEAR framework. |
10 |
# |
11 |
# |
11 |
# You may combine multiple WANT_PHP_* knobs. |
12 |
# You may combine multiple WANT_PHP_* knobs. |
12 |
# Don't specify any WANT_PHP_* knob if your port will work with every PHP SAPI. |
13 |
# Don't specify any WANT_PHP_* knob if your port will work with every PHP SAPI. |
13 |
# |
14 |
# |
14 |
|
15 |
|
15 |
.if exists(${LOCALBASE}/bin/php) && exists(${LOCALBASE}/bin/pear) |
16 |
.if exists(${LOCALBASE}/etc/php.conf) |
16 |
HAVE_PHP_CLI= yes |
17 |
.include "${LOCALBASE}/etc/php.conf" |
17 |
HAVE_PHP= yes |
|
|
18 |
PHP_PORT= ${PORTSDIR}/lang/php4-cli |
19 |
.endif |
20 |
.if exists(${LOCALBASE}/bin/php) && !exists(${LOCALBASE}/bin/pear) |
21 |
HAVE_PHP_CGI= yes |
22 |
HAVE_PHP= yes |
23 |
PHP_PORT= ${PORTSDIR}/www/php4-cgi |
24 |
.endif |
25 |
.if exists(${LOCALBASE}/libexec/apache/libphp4.so) || exists(${LOCALBASE}/libexec/apache2/libphp4.so) |
26 |
HAVE_PHP_MOD= yes |
27 |
HAVE_PHP= yes |
28 |
PHP_PORT= ${PORTSDIR}/www/mod_php4 |
29 |
.endif |
30 |
.if defined(HAVE_PHP_CLI) && defined(HAVE_PHP_MOD) |
31 |
PHP_PORT= ${PORTSDIR}/lang/php4 |
32 |
.endif |
33 |
|
34 |
.if defined(WANT_PHP_CGI) && (defined(WANT_PHP_CLI) || defined(WANT_PHP_MOD)) |
35 |
.BEGIN: |
36 |
@${ECHO_CMD} "The CGI version of PHP avoids the installation of other SAPIs." |
37 |
@${ECHO_CMD} "Do not use WANT_PHP_CGI with other WANT_PHP_* knobs." |
38 |
@${FALSE} |
39 |
.endif |
18 |
.endif |
40 |
|
19 |
|
41 |
.if defined(WANT_PHP_CLI) && !defined(WANT_PHP_MOD) |
20 |
PHP_VER?= 4 |
42 |
.if defined(HAVE_PHP) && !defined(HAVE_PHP_CLI) |
21 |
.if !defined(WITH_DEBUG) |
43 |
.BEGIN: |
22 |
PHP_EXT_DIR?= 20020429 |
44 |
@${ECHO_CMD} "This port requires the CLI version of PHP, but you have already" |
|
|
45 |
@${ECHO_CMD} "installed a conflicting PHP port without CLI." |
46 |
@${FALSE} |
47 |
.else |
23 |
.else |
48 |
PHP_PORT?= ${PORTSDIR}/lang/php4-cli |
24 |
PHP_EXT_DIR?= 20020429-debug |
49 |
.endif |
25 |
.endif |
|
|
26 |
.if !defined(WITHOUT_PEAR) |
27 |
PHP_PEAR?= yes |
28 |
.else |
29 |
PHP_PEAR?= no |
30 |
.endif |
31 |
PHP_SAPI?= "" |
32 |
|
33 |
.if defined(BROKEN_WITH_PHP) |
34 |
. for VER in ${BROKEN_WITH_PHP} |
35 |
. if (${PHP_VER} == "${VER}") |
36 |
BROKEN= "Doesn't work with PHP version : ${PHP_VER} (Doesn't support PHP ${BROKEN_WITH_PHP})" |
37 |
. endif |
38 |
. endfor |
50 |
.endif |
39 |
.endif |
51 |
|
40 |
|
52 |
.if defined(WANT_PHP_WEB) |
41 |
.if defined(WANT_PHP_WEB) |
53 |
.if defined(HAVE_PHP) && !defined(HAVE_PHP_CGI) && !defined(HAVE_PHP_MOD) |
42 |
. if defined(WANT_PHP_CGI) || defined(WANT_PHP_MOD) |
|
|
43 |
.BEGIN: |
44 |
@${ECHO_CMD} "If you define WANT_PHP_WEB you cannot set also WANT_PHP_CGI" |
45 |
@${ECHO_CMD} "or WANT_PHP_MOD. Use only one of them." |
46 |
@${FALSE} |
47 |
. else |
48 |
. if defined(PHP_VERSION) && ${PHP_SAPI} == "cli" |
54 |
.BEGIN: |
49 |
.BEGIN: |
55 |
@${ECHO_CMD} "This port requires the Apache Module or the CGI version of PHP, but you have" |
50 |
@${ECHO_CMD} "This port requires the Apache Module or the CGI version of PHP, but you have" |
56 |
@${ECHO_CMD} "already installed a conflicting PHP port without them." |
51 |
@${ECHO_CMD} "already installed a conflicting PHP port without them." |
57 |
@${FALSE} |
52 |
@${FALSE} |
|
|
53 |
. else |
54 |
. if defined(WANT_PHP_CLI) || defined(WANT_PHP_PEAR) |
55 |
PHP_PORT?= ${PORTSDIR}/lang/php${PHP_VER} |
56 |
. else |
57 |
PHP_PORT?= ${PORTSDIR}/www/mod_php${PHP_VER} |
58 |
PHP_PEAR?= no |
59 |
. endif |
60 |
. endif |
61 |
. endif |
58 |
.else |
62 |
.else |
59 |
PHP_PORT?= ${PORTSDIR}/www/mod_php4 |
|
|
60 |
.endif |
61 |
.endif |
62 |
|
63 |
|
63 |
.if defined(WANT_PHP_CGI) |
64 |
.if defined(WANT_PHP_CGI) |
64 |
.if defined(HAVE_PHP) && !defined(HAVE_PHP_CGI) |
65 |
. if defined(WANT_PHP_CLI) || defined(WANT_PHP_MOD) |
|
|
66 |
.BEGIN: |
67 |
@${ECHO_CMD} "The CGI version of PHP avoids the installation of other SAPIs." |
68 |
@${ECHO_CMD} "Do not use WANT_PHP_CGI with other WANT_PHP_* knobs." |
69 |
@${FALSE} |
70 |
. else |
71 |
. if defined(PHP_VERSION) && ${PHP_SAPI} != "cgi" |
65 |
.BEGIN: |
72 |
.BEGIN: |
66 |
@${ECHO_CMD} "This port requires the CGI version of PHP, but you have already" |
73 |
@${ECHO_CMD} "This port requires the CGI version of PHP, but you have already" |
67 |
@${ECHO_CMD} "installed a conflicting PHP port without CGI." |
74 |
@${ECHO_CMD} "installed a conflicting PHP port without CGI." |
68 |
@${FALSE} |
75 |
@${FALSE} |
|
|
76 |
. else |
77 |
PHP_PORT?= ${PORTSDIR}/www/php${PHP_VER}-cgi |
78 |
PHP_PEAR?= no |
79 |
. endif |
80 |
. endif |
81 |
.else |
82 |
|
83 |
.if defined(WANT_PHP_CLI) && !defined(WANT_PHP_MOD) |
84 |
. if defined(PHP_VERSION) && ${PHP_SAPI} != "full" && ${PHP_SAPI} != "cli" |
85 |
.BEGIN: |
86 |
@${ECHO_CMD} "This port requires the CLI version of PHP, but you have already" |
87 |
@${ECHO_CMD} "installed a conflicting PHP port without CLI." |
88 |
@${FALSE} |
89 |
. else |
90 |
PHP_PORT?= ${PORTSDIR}/lang/php${PHP_VER}-cli |
91 |
. endif |
69 |
.else |
92 |
.else |
70 |
PHP_PORT?= ${PORTSDIR}/www/php4-cgi |
|
|
71 |
.endif |
72 |
.endif |
73 |
|
93 |
|
74 |
.if defined(WANT_PHP_MOD) && !defined(WANT_PHP_CLI) |
94 |
.if !defined(WANT_PHP_CLI) && defined(WANT_PHP_MOD) |
75 |
.if defined(HAVE_PHP) && !defined(HAVE_PHP_MOD) |
95 |
. if defined(PHP_VERSION) && (${PHP_SAPI} != "full" && ${PHP_SAPI} != "mod") |
76 |
.BEGIN: |
96 |
.BEGIN: |
77 |
@${ECHO_CMD} "This port requires the Apache Module for PHP, but you have already" |
97 |
@${ECHO_CMD} "This port requires the Apache Module for PHP, but you have already" |
78 |
@${ECHO_CMD} "installed a conflicting PHP port without the Apache Module." |
98 |
@${ECHO_CMD} "installed a conflicting PHP port without the Apache Module." |
79 |
@${FALSE} |
99 |
@${FALSE} |
|
|
100 |
. else |
101 |
. if defined(WANT_PHP_PEAR) |
102 |
PHP_PORT?= ${PORTSDIR}/lang/php${PHP_VER} |
103 |
. else |
104 |
PHP_PORT?= ${PORTSDIR}/www/mod_php${PHP_VER} |
105 |
PHP_PEAR?= no |
106 |
. endif |
107 |
. endif |
80 |
.else |
108 |
.else |
81 |
PHP_PORT?= ${PORTSDIR}/www/mod_php4 |
109 |
|
|
|
110 |
PHP_PORT?= ${PORTSDIR}/lang/php${PHP_VER} |
111 |
|
82 |
.endif |
112 |
.endif |
|
|
113 |
|
114 |
.endif |
115 |
|
116 |
.endif |
117 |
|
118 |
.endif |
119 |
|
120 |
.if defined(WANT_PHP_PEAR) && ${PHP_PEAR} == "no" |
121 |
BROKEN= "This port requires the PEAR framework, but you have already" \ |
122 |
"installed a PHP port without PEAR" |
83 |
.endif |
123 |
.endif |
84 |
|
124 |
|
85 |
PHP_PORT?= ${PORTSDIR}/lang/php4 |
|
|
86 |
RUN_DEPENDS+= ${LOCALBASE}/include/php/main/php.h:${PHP_PORT} |
125 |
RUN_DEPENDS+= ${LOCALBASE}/include/php/main/php.h:${PHP_PORT} |
87 |
|
126 |
|
88 |
PHP_EXT_DIR?= 20020429 |
|
|
89 |
PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR} |
127 |
PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR} |
90 |
|
128 |
|
91 |
.if defined(USE_PHPIZE) |
129 |
.if defined(USE_PHPIZE) |