From b79863177f855802eb14dfa5eac07d1c6fa17321 Mon Sep 17 00:00:00 2001 From: jlam Date: Thu, 10 Jan 2002 13:17:11 +0000 Subject: Implement new framework to handle PHP3 modules, based on the way PHP4 modules are handled. Also buildlinkify, honor ${PKG_SYSCONFDIR}, and use the general INSTALL scripts to handle the php3.ini config file. Become the maintainer since the changes to the package structure are fairly large. The new framework should make creating new PHP3 modules simpler, and makes buildlinkifying those modules simpler as well. --- www/php3/Makefile | 91 +++++++++++++++++-------------------------------------- 1 file changed, 27 insertions(+), 64 deletions(-) (limited to 'www/php3/Makefile') diff --git a/www/php3/Makefile b/www/php3/Makefile index d650b80155b..cb7b4de195c 100644 --- a/www/php3/Makefile +++ b/www/php3/Makefile @@ -1,79 +1,42 @@ -# $NetBSD: Makefile,v 1.31 2001/11/09 17:26:27 hubertf Exp $ -# +# $NetBSD: Makefile,v 1.32 2002/01/10 13:17:11 jlam Exp $ -DISTNAME= php-${PHP_VERSION} -CATEGORIES= www -MASTER_SITES= ftp://ftp.php.net/pub/distributions/ -# This is needed because other pkgs .include this Makefile -DISTFILES+= ${DISTNAME}.tar.gz +PKGNAME= php-${BASE_VERS} +PKGREVISION?= # empty +CATEGORIES+= lang +COMMENT= HTML-embedded programming language -MAINTAINER= cjs@netbsd.org -HOMEPAGE= http://www.php.net/ -COMMENT= PHP3 HTML-embedded programming language with database connectivity +USE_BUILDLINK_ONLY= yes -BUILD_DEPENDS+= perl>=${PERL5_REQD}:../../lang/perl5 +.include "Makefile.common" -.include "../../mk/bsd.prefs.mk" +BUILD_DEPENDS+= perl>=${PERL5_REQD}:../../lang/perl5 -.if ${OPSYS} == "SunOS" -DEPENDS+= zlib-[0-9]*:../../devel/zlib -.endif +CPPFLAGS+= -DPHP_INTERNAL_FUNCS +FILES_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} -PHP_VERSION= 3.0.18 +CGIDIR= ${PREFIX}/libexec/cgi-bin +EGDIR= ${PREFIX}/share/examples/php3 +DATADIR= ${PREFIX}/share/php3 -.if defined(BUILDING_EXTENSION_MODULE) || defined(BUILDING_SERVER_MODULE) -DEPENDS+= php-${PHP_VERSION}:../../www/php3 -DISTINFO_FILE= ${.CURDIR}/../../www/php3/distinfo -FILESDIR?= ${.CURDIR}/../../www/php3/files -PATCHDIR?= ${.CURDIR}/../../www/php3/patches -.endif +OWN_DIRS= ${PREFIX}/${PHP_EXTENSION_DIR} +CONF_FILES= ${EGDIR}/php3.ini.example ${PKG_SYSCONFDIR}/php3.ini -# Here we configure only for what NetBSD ships. We add the rest via modules. -GNU_CONFIGURE= # defined -CONFIGURE_ARGS+=--with-system-regex --without-gd \ - --with-gdbm=${PREFIX} \ - --with-yp --with-zlib --with-dbase --with-filepro \ - --with-config-file-path=${PREFIX}/etc \ - --with-exec-dir=${PREFIX}/libexec/php3 \ - --enable-track-vars --enable-force-cgi-redirect \ - --enable-discard-path --enable-memory-limit \ - --enable-sysvsem --enable-sysvshm -CONFIGURE_ENV+= PERL_PATH=${PERL5} -CONFIGURE_ENV+= PREFIX=${PREFIX} - -.if !defined(BUILDING_EXTENSION_MODULE) -CPPFLAGS+= -DPHP_INTERNAL_FUNCS - -post-extract: - @${CP} ${FILESDIR}/abstractions.c ${WRKSRC} - -.if !defined(BUILDING_SERVER_MODULE) post-build: - @cd ${WRKSRC}/convertor && ${MAKE} + cd ${WRKSRC}/convertor; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} -# The PHP includes are not easily detachable from the source tree in this -# release, so we extract the PHP sources with every module. -# This should improve in PHP 3.1 or 4.0. +pre-install: + @${SED} ${FILES_SUBST_SED} ${FILESDIR}/php3.ini.example \ + > ${WRKDIR}/php3.ini.example do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/php ${PREFIX}/bin/ - ${INSTALL_PROGRAM} ${WRKSRC}/convertor/convertor \ + ${INSTALL_PROGRAM} ${WRKSRC}/php ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/convertor/convertor \ ${PREFIX}/bin/php2convert - if [ ! -d ${PREFIX}/libexec/cgi-bin ]; then \ - ${INSTALL_PROGRAM_DIR} ${PREFIX}/libexec/cgi-bin ; fi - ${LN} -sf ../../bin/php ${PREFIX}/libexec/cgi-bin/php - ${INSTALL_DATA_DIR} ${PREFIX}/lib/php3 - ${INSTALL_DATA_DIR} ${PREFIX}/share/php3 - ${INSTALL_DATA} ${WRKSRC}/extra/icons/* ${PREFIX}/share/php3/ - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/php3 - ${INSTALL_DATA} ${WRKSRC}/examples/README* ${WRKSRC}/examples/*.php3 \ - ${PREFIX}/share/examples/php3/ - @${SED} s,@PREFIX@,${PREFIX}, ${FILESDIR}/php3.ini.example \ - > ${WRKDIR}/php3.ini.example - ${INSTALL_DATA} ${WRKDIR}/php3.ini.example ${PREFIX}/etc/ - @[ -f ${PREFIX}/etc/php3.ini ] || ${CP} ${PREFIX}/etc/php3.ini.example ${PREFIX}/etc/php3.ini -.endif -.endif + ${LN} -sf ../../bin/php ${CGIDIR}/php + ${INSTALL_DATA_DIR} ${DATADIR} ${EGDIR} + cd ${WRKSRC}/extra/icons; ${INSTALL_DATA} * ${DATADIR} + cd ${WRKSRC}/examples; ${INSTALL_DATA} README* *.php3 ${EGDIR} + ${INSTALL_DATA} ${WRKDIR}/php3.ini.example ${EGDIR} -.include "../../databases/gdbm/buildlink.mk" +.include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk" -- cgit v1.2.3