openbsd-ports/www/php4/Makefile

187 lines
4.3 KiB
Makefile
Raw Normal View History

2000-12-15 16:36:09 -05:00
# $OpenBSD: Makefile,v 1.13 2000/12/15 21:36:09 brad Exp $
2000-10-15 10:50:16 -04:00
DISTNAME= php-4.0.3pl1
2000-12-15 16:36:09 -05:00
PKGNAME= php4-4.0.3pl1p1
CATEGORIES= www lang
NEED_VERSION= 1.319
2000-10-04 17:53:59 -04:00
MAINTAINER= Jakob Schlyter <jakob@openbsd.org>
HOMEPAGE= http://www.php.net/
MASTER_SITES= http://www.php.net/distributions/ \
http://us.php.net/distributions/ \
http://se.php.net/distributions/ \
http://no.php.net/distributions/
MASTER_SITES0= http://www.php.net/extra/ \
http://us.php.net/extra/ \
http://se.php.net/extra/ \
http://no.php.net/extra/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} number4.tar.gz:0
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
DIST_SUBDIR= php4
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
# This port current only works with archs supporting dynamic loading
ONLY_FOR_ARCHS= i386 m68k sparc mips
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= --with-apxs=/usr/sbin/apxs \
--with-config-file-path=/var/www/conf \
--enable-calendar \
--enable-bcmath \
--enable-trans-sid \
--enable-versioning \
--with-yp \
--with-pcre-regex \
--with-xml \
--with-zlib
2000-10-05 17:25:36 -04:00
FLAVORS+= gdbm gettext ftp imap ldap mhash mm recode snmp
FLAVORS+= gd no_x11 pdflib
2000-09-25 16:03:49 -04:00
FLAVORS+= dbase filepro mysql mysql_bundled postgresql
2000-12-14 10:25:20 -05:00
FLAVOR?=
2000-09-25 16:03:49 -04:00
.if ${FLAVOR:L:Mgdbm}
CONFIGURE_ARGS+= --with-gdbm
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= gdbm.2::databases/gdbm
2000-09-25 16:03:49 -04:00
.else
CONFIGURE_ARGS+= --without-gdbm
.endif
2000-09-25 16:03:49 -04:00
.if ${FLAVOR:L:Mgettext}
CONFIGURE_ARGS+= --with-gettext
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= intl.1::devel/gettext
2000-09-25 16:03:49 -04:00
.else
CONFIGURE_ARGS+= --without-gettext
.endif
2000-09-25 16:03:49 -04:00
.if ${FLAVOR:L:Mftp}
CONFIGURE_ARGS+= --enable-ftp
.else
CONFIGURE_ARGS+= --disable-ftp
.endif
.if ${FLAVOR:L:Mimap}
CONFIGURE_ARGS+= --with-imap=${PREFIX}
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= c-client.2::mail/c-client
2000-09-25 16:03:49 -04:00
.else
CONFIGURE_ARGS+= --without-imap
.endif
2000-10-05 17:25:36 -04:00
.if ${FLAVOR:L:Mldap}
CONFIGURE_ARGS+= --with-ldap=${PREFIX}
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= ldap.2::databases/openldap
2000-10-05 17:25:36 -04:00
.else
CONFIGURE_ARGS+= --without-ldap
.endif
2000-10-04 17:19:13 -04:00
.if ${FLAVOR:L:Mmhash}
CONFIGURE_ARGS+= --with-mhash
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= mhash.2::security/mhash
2000-10-04 17:19:13 -04:00
.else
CONFIGURE_ARGS+= --without-mhash
.endif
2000-09-25 16:03:49 -04:00
.if ${FLAVOR:L:Mmm}
CONFIGURE_ARGS+= --with-mm
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= mm.11::devel/mm
2000-09-25 16:03:49 -04:00
.else
CONFIGURE_ARGS+= --without-mm
.endif
2000-09-25 16:03:49 -04:00
.if ${FLAVOR:L:Mrecode}
CONFIGURE_ARGS+= --with-recode
BUILD_DEPENDS+= ${PREFIX}/lib/librecode.a::converters/recode
2000-09-25 16:03:49 -04:00
.else
CONFIGURE_ARGS+= --without-recode
.endif
2000-09-25 16:03:49 -04:00
.if ${FLAVOR:L:Msnmp}
CONFIGURE_ARGS+= --with-snmp --enable-ucd-snmp-hack --with-openssl
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= snmp.41::net/ucd-snmp
2000-09-25 16:03:49 -04:00
.else
CONFIGURE_ARGS+= --without-snmp --without-openssl
.endif
2000-09-25 16:03:49 -04:00
.if ${FLAVOR:L:Mgd}
MAKE_FLAGS+= CFLAGS='${CFLAGS} -I${LOCALBASE}/include'
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= gd.18::graphics/gd
.if ${FLAVOR:L:Mno_x11}
CONFIGURE_ARGS+= --with-gd \
2000-12-14 10:25:20 -05:00
--with-jpeg-dir=${PREFIX} \
--with-ttf
.else
USE_X11= yes
CONFIGURE_ARGS+= --with-gd \
--with-jpeg-dir=${PREFIX} \
--with-xpm-dir=${X11BASE} \
--with-ttf
.endif
2000-09-25 16:03:49 -04:00
.else
CONFIGURE_ARGS+= --without-gd
.endif
2000-09-28 16:39:24 -04:00
.if ${FLAVOR:L:Mpdflib}
CONFIGURE_ARGS+= --with-pdflib=${PREFIX}
BUILD_DEPENDS+= ${PREFIX}/lib/libpdf.a::print/pdflib
.else
CONFIGURE_ARGS+= --without-pdflib
.endif
.if ${FLAVOR:L:Mdbase}
CONFIGURE_ARGS+= --enable-dbase
.else
CONFIGURE_ARGS+= --disable-dbase
.endif
.if ${FLAVOR:L:Mfilepro}
CONFIGURE_ARGS+= --enable-filepro
.else
CONFIGURE_ARGS+= --disable-filepro
.endif
.if ${FLAVOR:L:Mmysql}
CONFIGURE_ARGS+= --with-mysql=${PREFIX}
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= mysqlclient.6::databases/mysql
.if ${FLAVOR:L:Mmysql_bundled}
.BEGIN:
@echo "Conflicting flavor: ${FLAVOR}"
@exit 1
.endif
.elif ${FLAVOR:L:Mmysql_bundled}
CONFIGURE_ARGS+= --with-mysql
.else
CONFIGURE_ARGS+= --without-mysql
.endif
.if ${FLAVOR:L:Mpostgresql}
CONFIGURE_ARGS+= --with-pgsql=${PREFIX}/pgsql
2000-12-14 10:25:20 -05:00
LIB_DEPENDS+= pq.2::databases/postgresql
.else
CONFIGURE_ARGS+= --without-pgsql
.endif
post-extract:
@(cd ${WRKSRC}; tar xzf ${FULLDISTDIR}/number4.tar.gz)
do-install:
${INSTALL_DATA} ${WRKBUILD}/.libs/libphp4.so.0.0 \
${PREFIX}/lib/libphp4.so
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/php4
${INSTALL_DATA} ${WRKSRC}/php.ini-dist ${PREFIX}/share/doc/php4
${INSTALL_DATA} ${WRKSRC}/php.ini-optimized ${PREFIX}/share/doc/php4
sed 's,y0y0y0,${TRUEPREFIX},' \
<${FILESDIR}/php4-enable >${PREFIX}/sbin/php4-enable
chown ${BINOWN}:${BINGRP} ${PREFIX}/sbin/php4-enable
chmod ${BINMODE} ${PREFIX}/sbin/php4-enable
.include <bsd.port.mk>