1 # $NetBSD: Makefile,v 1.14 2000/05/26 14:07:31 veego Exp $
4 DISTNAME= php-${PHP_VERSION}
6 MASTER_SITES= ftp://ftp.php.net/pub/distributions/
7 # This is needed because other pkgs .include this Makefile
8 DISTFILES+= ${DISTNAME}.tar.gz
10 MAINTAINER= cjs@netbsd.org
11 HOMEPAGE= http://www.php.net/
13 BUILD_DEPENDS+= ${LOCALBASE}/bin/perl:../../lang/perl5
14 DEPENDS+= gdbm-1.7.3:../../databases/gdbm
16 .include "../../mk/bsd.prefs.mk"
18 .if ${OPSYS} == "SunOS"
19 DEPENDS+= zlib-*:../../devel/zlib
25 .if defined(BUILDING_EXTENSION_MODULE) || defined(BUILDING_SERVER_MODULE)
26 DEPENDS+= php-${PHP_VERSION}:../../www/php3
27 FILESDIR?= ${PKGSRCDIR}/www/php3/files
28 PATCHDIR?= ${PKGSRCDIR}/www/php3/patches
31 # Here we configure only for what NetBSD ships. We add the rest via modules.
33 CONFIGURE_ARGS+=--with-system-regex --without-gd \
34 --with-gdbm=${PREFIX} \
35 --with-yp --with-zlib --with-dbase --with-filepro \
36 --with-config-file-path=${PREFIX}/etc \
37 --with-exec-dir=${PREFIX}/libexec/php3 \
38 --enable-track-vars --enable-force-cgi-redirect \
39 --enable-discard-path --enable-memory-limit \
40 --enable-sysvsem --enable-sysvshm
41 CONFIGURE_ENV+= PERL_PATH=${LOCALBASE}/bin/perl
43 .if !defined(BUILDING_EXTENSION_MODULE)
44 CONFIGURE_ENV+= CPPFLAGS="-DPHP_INTERNAL_FUNCS"
47 @${CP} ${FILESDIR}/abstractions.c ${WRKSRC}
49 .if !defined(BUILDING_SERVER_MODULE)
51 @cd ${WRKSRC}/convertor && ${MAKE}
53 # The PHP includes are not easily detachable from the source tree in this
54 # release, so we extract the PHP sources with every module.
55 # This should improve in PHP 3.1 or 4.0.
58 ${INSTALL_PROGRAM} ${WRKSRC}/php ${PREFIX}/bin/
59 ${INSTALL_PROGRAM} ${WRKSRC}/convertor/convertor \
60 ${PREFIX}/bin/php2convert
61 if [ ! -d ${PREFIX}/libexec/cgi-bin ]; then \
62 ${MKDIR} ${PREFIX}/libexec/cgi-bin ; fi
63 ${LN} -sf ../../bin/php ${PREFIX}/libexec/cgi-bin/php
64 ${INSTALL_DATA_DIR} ${PREFIX}/lib/php3
65 ${INSTALL_DATA_DIR} ${PREFIX}/share/php3
66 ${INSTALL_DATA} ${WRKSRC}/extra/icons/* ${PREFIX}/share/php3/
67 ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/php3
68 ${INSTALL_DATA} ${WRKSRC}/examples/README* ${WRKSRC}/examples/*.php3 \
69 ${PREFIX}/share/examples/php3/
70 @${SED} s,@PREFIX@,${PREFIX}, ${FILESDIR}/php3.ini.example \
71 > ${WRKDIR}/php3.ini.example
72 ${INSTALL_DATA} ${WRKDIR}/php3.ini.example ${PREFIX}/etc/
73 @[ -f ${PREFIX}/etc/php3.ini ] || ${CP} ${PREFIX}/etc/php3.ini.example ${PREFIX}/etc/php3.ini
77 .include "../../mk/bsd.pkg.mk"