2010-08-24 05:14:43 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.59 2010/08/24 09:14:43 robert Exp $
|
2010-03-20 13:00:21 -04:00
|
|
|
|
|
|
|
# doesn't set USE_LIBTOOL but use the bundled one because it needs some
|
|
|
|
# specific options we don't have.
|
2007-04-01 17:37:27 -04:00
|
|
|
|
2007-09-15 16:38:20 -04:00
|
|
|
COMMENT-main= server-side HTML-embedded scripting language
|
|
|
|
COMMENT-fastcgi=stand-alone FastCGI version of PHP
|
2007-04-01 17:37:27 -04:00
|
|
|
|
2009-09-21 16:04:24 -04:00
|
|
|
PKGNAME= php5-core-${V}
|
2010-03-21 05:05:55 -04:00
|
|
|
PKGNAME-main= php5-core-${V}
|
2009-09-21 16:04:24 -04:00
|
|
|
PKGNAME-fastcgi=php5-fastcgi-${V}
|
2004-10-02 08:36:49 -04:00
|
|
|
|
2007-03-22 18:43:20 -04:00
|
|
|
DISTFILES= php-${V}.tar.gz
|
2004-10-02 08:36:49 -04:00
|
|
|
|
2007-04-01 17:37:27 -04:00
|
|
|
MULTI_PACKAGES= -main -fastcgi
|
|
|
|
|
2006-05-09 10:15:40 -04:00
|
|
|
CONFIGURE_ARGS+=--with-apxs=/usr/sbin/apxs \
|
2004-10-02 08:36:49 -04:00
|
|
|
--without-mysql \
|
|
|
|
--enable-xml \
|
|
|
|
--enable-wddx \
|
|
|
|
--enable-cli \
|
|
|
|
--with-iconv=${LOCALBASE} \
|
|
|
|
--with-gettext=${LOCALBASE} \
|
|
|
|
--enable-bcmath \
|
|
|
|
--enable-session \
|
|
|
|
--enable-calendar \
|
|
|
|
--enable-ctype \
|
|
|
|
--enable-ftp \
|
|
|
|
--with-pcre-regex \
|
|
|
|
--enable-sockets \
|
2009-07-20 14:48:29 -04:00
|
|
|
--enable-sysvmsg \
|
2004-10-02 08:36:49 -04:00
|
|
|
--enable-sysvsem \
|
|
|
|
--enable-sysvshm \
|
|
|
|
--enable-exif \
|
2009-08-17 16:13:27 -04:00
|
|
|
--enable-zend-multibyte \
|
2007-03-22 18:43:20 -04:00
|
|
|
--without-sqlite \
|
2007-04-01 17:37:27 -04:00
|
|
|
--without-pdo-sqlite \
|
|
|
|
--with-pear=${LOCALBASE}/share/php5 \
|
|
|
|
--enable-fastcgi \
|
2007-11-05 05:11:09 -05:00
|
|
|
--enable-force-cgi-redirect \
|
|
|
|
--with-config-file-scan-dir=${PHP_CONFIG_PATH}/php5
|
2006-05-09 10:15:40 -04:00
|
|
|
|
2004-10-02 08:36:49 -04:00
|
|
|
MODULES= devel/gettext
|
|
|
|
|
2005-03-16 15:09:41 -05:00
|
|
|
# some variables to substitute
|
2007-11-05 05:11:09 -05:00
|
|
|
SUBST_VARS= PHP_CONFIG_FILE PHP_CONFIG_PATH
|
2004-10-02 08:36:49 -04:00
|
|
|
PHP_VERSION= ${V}
|
|
|
|
|
|
|
|
.for i in TRUEPREFIX PHP_CONFIG_FILE MODULES_DIR PHP_VERSION APACHE_MODULE_DIR
|
|
|
|
PHPXS_SUBST+= -e 's,${i},${${i}},'
|
|
|
|
.endfor
|
|
|
|
|
2010-08-24 05:14:43 -04:00
|
|
|
WANTLIB= c crypto m ssl z pthread
|
2006-08-03 20:10:42 -04:00
|
|
|
LIB_DEPENDS= xml2.>=8::textproc/libxml
|
2006-11-25 06:09:04 -05:00
|
|
|
|
2004-10-02 08:36:49 -04:00
|
|
|
pre-fake:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/${APACHE_MODULE_SUBDIR}
|
2006-05-09 10:15:40 -04:00
|
|
|
INSTALL_TARGET= install-headers install-build install-programs
|
2008-01-04 12:48:33 -05:00
|
|
|
DESTDIRNAME= INSTALL_ROOT
|
2004-10-02 08:36:49 -04:00
|
|
|
|
2006-02-07 23:54:48 -05:00
|
|
|
pre-configure:
|
2006-05-09 10:15:40 -04:00
|
|
|
@perl -pi -e "s,OPENBSD_PEAR_ROOT,'${CHROOT_DIR}/pear',g" \
|
2007-03-22 18:43:20 -04:00
|
|
|
${WRKSRC}/scripts/phpize.in \
|
2005-12-29 18:03:29 -05:00
|
|
|
${WRKSRC}/scripts/php-config.in
|
2004-10-02 08:36:49 -04:00
|
|
|
|
|
|
|
post-install:
|
2006-05-09 10:15:40 -04:00
|
|
|
${INSTALL_DATA} ${WRKBUILD}/.libs/libphp5.so \
|
|
|
|
${PREFIX}/${APACHE_MODULE_SUBDIR}
|
2004-11-24 12:37:49 -05:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/php5
|
2004-10-02 08:36:49 -04:00
|
|
|
${INSTALL_PROGRAM} ${WRKBUILD}/sapi/cli/php ${PREFIX}/bin
|
2007-07-02 04:53:17 -04:00
|
|
|
${INSTALL_PROGRAM} ${WRKBUILD}/sapi/cgi/php-cgi ${PREFIX}/bin/php-fastcgi
|
2007-11-05 05:11:09 -05:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/php5.conf \
|
|
|
|
${PREFIX}/share/examples/php5/php5.conf
|
2008-08-21 11:51:51 -04:00
|
|
|
@perl -pi -e "s,!!PREFIX!!,${TRUEPREFIX},g" \
|
2007-11-15 15:24:02 -05:00
|
|
|
${PREFIX}/share/examples/php5/php5.conf
|
2006-05-09 10:15:40 -04:00
|
|
|
|
2004-10-02 08:36:49 -04:00
|
|
|
.for i in dist recommended
|
|
|
|
@sed -e 's,MODULES_DIR,${MODULES_DIR},' \
|
|
|
|
-e 's,OPENBSD_INCLUDE_PATH,/pear/lib:${CHROOT_DIR}/pear/lib,' \
|
|
|
|
<${WRKSRC}/php.ini-${i} \
|
2004-11-24 12:37:49 -05:00
|
|
|
>${PREFIX}/share/examples/php5/php.ini-${i}
|
2004-10-02 08:36:49 -04:00
|
|
|
.endfor
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/sapi/cli/php.1 ${PREFIX}/man/man1
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|