Date: Thu, 19 Jul 2012 10:26:50 -0500 From: "Bryan Drewery" <bryan@shatow.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ale@FreeBSD.org Subject: ports/170002: [PATCH] [exp-run] bsd.php.mk: Fix missing PHP_VERSION/PHP_SAPI when building in clean jail / package building Message-ID: <20120719152704.6D854106567C@hub.freebsd.org> Resent-Message-ID: <201207191530.q6JFUH5O068128@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 170002 >Category: ports >Synopsis: [PATCH] [exp-run] bsd.php.mk: Fix missing PHP_VERSION/PHP_SAPI when building in clean jail / package building >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Jul 19 15:30:17 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Bryan Drewery >Release: FreeBSD 8.3-RELEASE i386 >Organization: >Environment: >Description: Similar to ports/167984, when running 'make install' on some ports in a clean jail, some PHP variables are not properly set in the MAKE environment, even after depends are installed. Once PHP is installed, it sets these variables in PREFIX/etc/php.conf, which is then later included, when building subsequent ports. One example of PHP_SAPI / PHP_VERSION missing causing issues is when installing devel/ioncube. The port is trying to install using ${PHP_VERSION}, which is not set, due to php.conf not being included yet. See http://www.shatow.net/freebsd/82i386-default-ioncube-4.2.1.txt ===> Checking if devel/ioncube already installed install -o root -g wheel -m 444 /wrkdirs/usr/ports/devel/ioncube/work/ioncube/ioncube_loader_fre_.so /usr/local/lib/php/20090626/ioncube/ioncube_loader.so install: /wrkdirs/usr/ports/devel/ioncube/work/ioncube/ioncube_loader_fre_.so: No such file or directory *** Error code 71 >How-To-Repeat: 1. Create a fresh jail. 2. make -C /usr/ports/devel/ioncube install >Fix: The fix is to use the default PHP_PORT to grab the PHP_VERSION/PHP_SAPI, that will be used in the php.conf creation. Once PHP is installed, the php.conf will continue to be used as before. With patch devel/ioncube installs correctly: ===> Checking if devel/ioncube already installed install -o root -g wheel -m 444 /wrkdirs/usr/ports/devel/ioncube/work/ioncube/ioncube_loader_fre_5.3.so /usr/local/lib/php/20090626/ioncube/ioncube_loader.so install -o root -g wheel -m 444 /wrkdirs/usr/ports/devel/ioncube/work/ioncube/ioncube_loader_fre_5.3_ts.so /usr/local/lib/php/20090626/ioncube/ioncube_loader_ts.so --- patch-php-missing-vars-when-pkg-building.txt begins here --- --- bsd.php.mk.orig 2012-07-19 09:10:27.000000000 -0500 +++ bsd.php.mk 2012-07-19 10:09:03.000000000 -0500 @@ -39,6 +39,8 @@ _PHPMKINCLUDED= yes PHPBASE?= ${LOCALBASE} +PHP_PORT?= lang/php${PHP_VER} + .if exists(${PHPBASE}/etc/php.conf) .include "${PHPBASE}/etc/php.conf" PHP_EXT_DIR!= ${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p' @@ -57,6 +59,9 @@ PHP_EXT_INC= pcre spl .endif +PHP_VERSION!= ${MAKE} -C ${PORTSDIR}/${PHP_PORT} -V PORTVERSION +PHP_SAPI!= ${MAKE} -C ${PORTSDIR}/${PHP_PORT} -V PHP_SAPI + HTTPD?= ${LOCALBASE}/sbin/httpd .if exists(${HTTPD}) APACHE_VERSION!= ${HTTPD} -V | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p' @@ -77,7 +82,6 @@ .if defined(WITH_DEBUG) PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug .endif -PHP_SAPI?= "" .endif # .if exists(${PHPBASE}/etc/php.conf) PHP_EXT_INC?= "" @@ -139,8 +143,6 @@ . endif .endif -PHP_PORT?= lang/php${PHP_VER} - .if defined(USE_PHP_BUILD) BUILD_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PORTSDIR}/${PHP_PORT} .endif --- patch-php-missing-vars-when-pkg-building.txt ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120719152704.6D854106567C>