View | Details | Raw Unified | Return to bug 89896
Collapse All | Expand All

(-)bsd.php.mk (-11 / +18 lines)
Lines 29-42 Link Here
29
# WANT_PHP_WEB=yes  - Want the Apache Module or the CGI version of PHP.
29
# WANT_PHP_WEB=yes  - Want the Apache Module or the CGI version of PHP.
30
# WANT_PHP_PEAR=yes - Want the PEAR framework.
30
# WANT_PHP_PEAR=yes - Want the PEAR framework.
31
#
31
#
32
# User tunable:
33
# PHP_PREFIX        - Prefix for the used version of php. Defaults to $LOCALBASE
34
# APACHE_PREFIX     - Prefix for apache. Defaults to $PHP_PREFIX
35
#
32
# You may combine multiple WANT_PHP_* knobs.
36
# You may combine multiple WANT_PHP_* knobs.
33
# Don't specify any WANT_PHP_* knob if your port will work with every PHP SAPI.
37
# Don't specify any WANT_PHP_* knob if your port will work with every PHP SAPI.
34
#
38
#
35
39
36
PHP_Include_MAINTAINER=	ale@FreeBSD.org
40
PHP_Include_MAINTAINER=	ale@FreeBSD.org
41
PHP_PREFIX?=${LOCALBASE}
42
APACHE_PREFIX?=${PHP_PREFIX}
37
43
38
.if exists(${LOCALBASE}/etc/php.conf)
44
.if exists(${PHP_PREFIX}/etc/php.conf)
39
.include "${LOCALBASE}/etc/php.conf"
45
.include "${PHP_PREFIX}/etc/php.conf"
40
.endif
46
.endif
41
47
42
DEFAULT_PHP_VER?=	4
48
DEFAULT_PHP_VER?=	4
Lines 48-55 Link Here
48
.else
54
.else
49
PHP_EXT_DIR=	20041030
55
PHP_EXT_DIR=	20041030
50
.endif
56
.endif
51
.if exists(${LOCALBASE}/include/apache2/httpd.h)
57
.if exists(${APACHE_PREFIX}/include/apache2/httpd.h)
52
APXS?=		${LOCALBASE}/sbin/apxs
58
APXS?=		${APACHE_PREFIX}/sbin/apxs
53
APACHE_MPM!=	${APXS} -q MPM_NAME
59
APACHE_MPM!=	${APXS} -q MPM_NAME
54
.if ${APACHE_MPM} == "worker"
60
.if ${APACHE_MPM} == "worker"
55
PHP_EXT_DIR:=	${PHP_EXT_DIR}-zts
61
PHP_EXT_DIR:=	${PHP_EXT_DIR}-zts
Lines 160-177 Link Here
160
.endif
166
.endif
161
167
162
.if defined(USE_PHP_BUILD)
168
.if defined(USE_PHP_BUILD)
163
BUILD_DEPENDS+=	${LOCALBASE}/include/php/main/php.h:${PHP_PORT}
169
BUILD_DEPENDS+=	${PHP_PREFIX}/include/php/main/php.h:${PHP_PORT}
164
.endif
170
.endif
165
RUN_DEPENDS+=	${LOCALBASE}/include/php/main/php.h:${PHP_PORT}
171
RUN_DEPENDS+=	${PHP_PREFIX}/include/php/main/php.h:${PHP_PORT}
166
172
167
PLIST_SUB+=	PHP_EXT_DIR=${PHP_EXT_DIR}
173
PLIST_SUB+=	PHP_EXT_DIR=${PHP_EXT_DIR}
168
SUB_LIST+=	PHP_EXT_DIR=${PHP_EXT_DIR}
174
SUB_LIST+=	PHP_EXT_DIR=${PHP_EXT_DIR}
169
175
170
.if defined(USE_PHPIZE) || defined(USE_PHPEXT)
176
.if defined(USE_PHPIZE) || defined(USE_PHPEXT)
171
BUILD_DEPENDS+=	phpize:${PHP_PORT}
177
BUILD_DEPENDS+=	${PHP_PREFIX}/bin/phpize:${PHP_PORT}
172
GNU_CONFIGURE=	YES
178
GNU_CONFIGURE=	YES
173
USE_AUTOTOOLS+=	autoconf:259:env
179
USE_AUTOTOOLS+=	autoconf:259:env
174
CONFIGURE_ARGS+=--with-php-config=${LOCALBASE}/bin/php-config
180
CONFIGURE_ARGS+=--with-php-config=${PHP_PREFIX}/bin/php-config
175
181
176
configure-message: phpize-message do-phpize
182
configure-message: phpize-message do-phpize
177
183
Lines 179-190 Link Here
179
	@${ECHO_MSG} "===>  PHPizing for ${PKGNAME}"
185
	@${ECHO_MSG} "===>  PHPizing for ${PKGNAME}"
180
186
181
do-phpize:
187
do-phpize:
182
	@(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${LOCALBASE}/bin/phpize)
188
	@(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${PHP_PREFIX}/bin/phpize)
183
.endif
189
.endif
184
190
185
.if defined(USE_PHPEXT)
191
.if defined(USE_PHPEXT)
186
PHP_MODNAME?=	${PORTNAME}
192
PHP_MODNAME?=	${PORTNAME}
187
PHP_HEADER_DIRS?=	""
193
PHP_HEADER_DIRS?=	""
194
PREFIX=${PHP_PREFIX}
188
195
189
do-install:
196
do-install:
190
	@${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}
197
	@${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}
Lines 341-349 Link Here
341
.		if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
348
.		if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
342
.			if ${PHP_EXT_INC:M${extension}} == ""
349
.			if ${PHP_EXT_INC:M${extension}} == ""
343
.				if defined(USE_PHP_BUILD)
350
.				if defined(USE_PHP_BUILD)
344
BUILD_DEPENDS+=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
351
BUILD_DEPENDS+=	${PHP_PREFIX}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
345
.				endif
352
.				endif
346
RUN_DEPENDS+=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
353
RUN_DEPENDS+=	${PHP_PREFIX}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
347
.			endif
354
.			endif
348
.		else
355
.		else
349
isyes=		${extension}
356
isyes=		${extension}

Return to bug 89896