2004-08-03 08:54:39 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.19 2004/08/03 12:54:40 espie Exp $
|
2003-05-23 16:06:22 -04:00
|
|
|
|
|
|
|
MULTI_PACKAGES= -pear
|
|
|
|
SUBPACKAGE?=
|
2002-06-24 15:23:41 -04:00
|
|
|
|
|
|
|
COMMENT= "server-side HTML-embedded scripting language"
|
2003-05-23 16:06:22 -04:00
|
|
|
COMMENT-pear= "base classes for common PHP tasks"
|
2003-04-03 05:26:25 -05:00
|
|
|
PKGNAME= php4-core-${V}
|
2003-05-23 16:06:22 -04:00
|
|
|
FULLPKGNAME-pear= php4-pear-${V}
|
2002-06-24 15:23:41 -04:00
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --with-apxs=/usr/sbin/apxs \
|
2002-07-12 06:13:56 -04:00
|
|
|
--without-mysql \
|
2003-04-03 05:26:25 -05:00
|
|
|
--enable-xml \
|
2003-05-07 10:13:01 -04:00
|
|
|
--enable-wddx \
|
2002-07-12 06:13:56 -04:00
|
|
|
--enable-cli \
|
|
|
|
--with-iconv=${LOCALBASE} \
|
|
|
|
--with-gettext=${LOCALBASE} \
|
|
|
|
--enable-dio \
|
2003-04-03 05:26:25 -05:00
|
|
|
--with-pear=${PEAR_DIR} \
|
2002-07-12 06:13:56 -04:00
|
|
|
--enable-bcmath \
|
|
|
|
--enable-session \
|
|
|
|
--enable-trans-sid \
|
|
|
|
--enable-calendar \
|
|
|
|
--enable-ctype \
|
|
|
|
--enable-ftp \
|
|
|
|
--with-pcre-regex \
|
|
|
|
--with-posix \
|
|
|
|
--enable-sockets \
|
|
|
|
--enable-sysvsem \
|
|
|
|
--enable-sysvshm \
|
2004-01-05 12:51:29 -05:00
|
|
|
--enable-yp \
|
|
|
|
--enable-exif
|
2002-06-24 15:23:41 -04:00
|
|
|
|
2004-08-03 08:54:39 -04:00
|
|
|
MODULES= devel/gettext
|
2002-06-24 15:23:41 -04:00
|
|
|
|
2002-08-12 00:27:41 -04:00
|
|
|
# some variables to substitute
|
|
|
|
SUBST_VARS= PHP_CONFIG_FILE
|
|
|
|
PHP_VERSION= ${V}
|
|
|
|
|
2003-05-02 15:49:00 -04:00
|
|
|
.for i in TRUEPREFIX PHP_CONFIG_FILE MODULES_DIR PHP_VERSION APACHE_MODULE_DIR
|
2002-08-12 00:27:41 -04:00
|
|
|
PHPXS_SUBST+= -e 's,${i},${${i}},'
|
|
|
|
.endfor
|
|
|
|
|
2003-05-23 16:06:22 -04:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
|
|
LIB_DEPENDS+= recode.0::converters/recode
|
|
|
|
CONFIGURE_ARGS+= --with-recode=${LOCALBASE}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(PACKAGING) && !empty(SUBPACKAGE)
|
2003-05-27 18:10:59 -04:00
|
|
|
PREFIX= ${CHROOT_DIR}
|
|
|
|
RUN_DEPENDS= :php4-core-${V}:www/php4/core
|
2003-05-23 16:06:22 -04:00
|
|
|
.endif
|
|
|
|
|
2002-08-12 00:27:41 -04:00
|
|
|
pre-fake:
|
2003-05-02 15:49:00 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/${APACHE_MODULE_SUBDIR}
|
2002-08-12 00:27:41 -04:00
|
|
|
|
2003-05-23 16:06:22 -04:00
|
|
|
INSTALL_TARGET= install-pear install-headers install-build install-programs
|
2003-05-02 15:49:00 -04:00
|
|
|
FAKE_FLAGS= INSTALL_ROOT=${DESTDIR}
|
|
|
|
|
2003-05-23 16:06:22 -04:00
|
|
|
post-patch:
|
|
|
|
@perl -p -i.orig -e "s,OPENBSD_PEAR_ROOT,'${CHROOT_DIR}/pear',g" ${WRKSRC}/pear/PEAR/Config.php
|
|
|
|
|
2003-05-02 15:49:00 -04:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/.libs/libphp4.so ${PREFIX}/${APACHE_MODULE_SUBDIR}
|
2002-06-24 15:23:41 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/php4
|
|
|
|
${INSTALL_PROGRAM} ${WRKBUILD}/sapi/cli/php ${PREFIX}/bin
|
2002-08-12 00:27:41 -04:00
|
|
|
.for i in dist recommended
|
2003-05-02 15:49:00 -04:00
|
|
|
@sed -e 's,MODULES_DIR,${MODULES_DIR},' \
|
|
|
|
-e 's,OPENBSD_INCLUDE_PATH,/pear/lib:${CHROOT_DIR}/pear/lib,' \
|
2002-08-12 00:27:41 -04:00
|
|
|
<${WRKSRC}/php.ini-${i} \
|
|
|
|
>${PREFIX}/share/doc/php4/php.ini-${i}
|
|
|
|
.endfor
|
|
|
|
@sed ${PHPXS_SUBST} <${FILESDIR}/phpxs >${PREFIX}/sbin/phpxs
|
|
|
|
@chown ${BINOWN}:${BINGRP} ${PREFIX}/sbin/phpxs
|
|
|
|
@chmod ${BINMODE} ${PREFIX}/sbin/phpxs
|
2003-05-30 19:46:16 -04:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/sapi/cli/php.1 ${PREFIX}/man/man1
|
2002-06-24 15:23:41 -04:00
|
|
|
|
2002-07-12 06:13:56 -04:00
|
|
|
.include <bsd.port.mk>
|