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