2002-03-16 23:55:03 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.65 2002/03/17 04:55:03 brad Exp $
|
2001-06-12 11:07:29 -04:00
|
|
|
|
|
|
|
MULTI_PACKAGES= -pear
|
2001-06-18 12:27:41 -04:00
|
|
|
SUBPACKAGE?=
|
2001-05-06 00:22:45 -04:00
|
|
|
|
|
|
|
COMMENT= "server-side HTML-embedded scripting language"
|
2001-06-12 11:07:29 -04:00
|
|
|
COMMENT-pear= "collection of base classes for common PHP tasks"
|
2001-01-03 19:51:23 -05:00
|
|
|
|
2001-08-17 15:34:51 -04:00
|
|
|
# This port currently only works with archs supporting dynamic loading
|
|
|
|
# and has Apache that supports DSO's.
|
2002-03-16 23:55:03 -05:00
|
|
|
ONLY_FOR_ARCHS= alpha i386 m68k powerpc sparc sparc64
|
2000-09-03 07:55:00 -04:00
|
|
|
|
2002-03-03 07:13:29 -05:00
|
|
|
V= 4.1.2
|
2001-06-12 11:07:29 -04:00
|
|
|
DISTNAME= php-${V}
|
2001-12-17 20:40:48 -05:00
|
|
|
PKGNAME= php4-${V}
|
|
|
|
FULLPKGNAME-pear= php4-pear-${V}
|
2001-06-12 11:07:29 -04:00
|
|
|
|
2000-09-03 07:55:00 -04:00
|
|
|
CATEGORIES= www lang
|
2001-12-17 20:40:48 -05:00
|
|
|
NEED_VERSION= 1.502
|
2000-09-03 07:55:00 -04:00
|
|
|
|
2001-08-29 03:03:48 -04:00
|
|
|
MAINTAINER= Anil Madhavapeddy <avsm@openbsd.org>
|
2000-09-03 07:55:00 -04:00
|
|
|
|
|
|
|
HOMEPAGE= http://www.php.net/
|
|
|
|
|
2001-12-17 20:40:48 -05:00
|
|
|
MASTER_SITES= http://www.php.net/distributions/ \
|
2000-09-03 07:55:00 -04:00
|
|
|
http://se.php.net/distributions/ \
|
2000-12-28 18:37:22 -05:00
|
|
|
http://no.php.net/distributions/ \
|
2001-05-10 18:58:06 -04:00
|
|
|
http://uk.php.net/distributions/
|
2000-09-03 07:55:00 -04:00
|
|
|
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
|
|
|
|
CONFIGURE_STYLE= gnu
|
|
|
|
CONFIGURE_ARGS+= --with-apxs=/usr/sbin/apxs \
|
|
|
|
--with-config-file-path=/var/www/conf \
|
|
|
|
--enable-calendar \
|
|
|
|
--enable-bcmath \
|
|
|
|
--enable-trans-sid \
|
|
|
|
--with-yp \
|
|
|
|
--with-pcre-regex \
|
2001-01-28 09:54:59 -05:00
|
|
|
--enable-ftp \
|
2000-09-03 07:55:00 -04:00
|
|
|
--with-xml \
|
2001-01-07 16:08:11 -05:00
|
|
|
--with-openssl \
|
2001-03-08 22:44:26 -05:00
|
|
|
--with-zlib \
|
|
|
|
--enable-sysvsem \
|
2001-06-23 19:36:35 -04:00
|
|
|
--enable-sysvshm \
|
|
|
|
--enable-inline-optimization \
|
2001-12-18 07:48:32 -05:00
|
|
|
--enable-sockets \
|
2001-06-23 19:36:35 -04:00
|
|
|
--disable-debug
|
2000-09-03 07:55:00 -04:00
|
|
|
|
2001-03-28 16:32:24 -05:00
|
|
|
USE_LIBTOOL= Yes
|
|
|
|
|
2001-01-28 09:54:59 -05:00
|
|
|
FLAVORS+= gdbm gettext imap ldap mhash mm recode snmp
|
2001-01-06 09:17:33 -05:00
|
|
|
FLAVORS+= gd no_x11 pdflib mcrypt curl
|
2002-03-03 07:13:29 -05:00
|
|
|
FLAVORS+= dbase filepro mysql mysql_bundled postgresql iodbc
|
|
|
|
# FLAVORS+= freetds
|
|
|
|
|
2000-12-14 10:25:20 -05:00
|
|
|
FLAVOR?=
|
2000-09-25 16:03:49 -04:00
|
|
|
|
2001-01-06 09:17:33 -05:00
|
|
|
.if ${FLAVOR:L:Mcurl}
|
2001-10-04 17:27:44 -04:00
|
|
|
CONFIGURE_ARGS+= --with-curl=${LOCALBASE}
|
2001-04-23 19:58:52 -04:00
|
|
|
LIB_DEPENDS+= curl.2::net/curl
|
2001-01-06 09:17:33 -05:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-curl
|
|
|
|
.endif
|
|
|
|
|
2000-09-25 16:03:49 -04:00
|
|
|
.if ${FLAVOR:L:Mgdbm}
|
2001-10-04 17:27:44 -04:00
|
|
|
CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE}
|
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-03 07:55:00 -04:00
|
|
|
|
2000-09-25 16:03:49 -04:00
|
|
|
.if ${FLAVOR:L:Mgettext}
|
2001-10-04 17:27:44 -04:00
|
|
|
CONFIGURE_ARGS+= --with-gettext=${LOCALBASE}
|
2001-10-24 22:34:11 -04:00
|
|
|
MODULES= gettext
|
2000-09-25 16:03:49 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-gettext
|
|
|
|
.endif
|
2000-09-03 07:55:00 -04:00
|
|
|
|
2000-09-25 16:03:49 -04:00
|
|
|
.if ${FLAVOR:L:Mimap}
|
2001-10-04 17:27:44 -04:00
|
|
|
CONFIGURE_ARGS+= --with-imap=${LOCALBASE} --with-imap-ssl=${LOCALBASE} --with-kerberos
|
2001-11-18 20:50:34 -05:00
|
|
|
LIB_DEPENDS+= c-client.3:c-client->=4.40p1:mail/c-client
|
2000-09-25 16:03:49 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-imap
|
|
|
|
.endif
|
2000-09-03 07:55:00 -04:00
|
|
|
|
2000-10-05 17:25:36 -04:00
|
|
|
.if ${FLAVOR:L:Mldap}
|
2001-03-06 04:04:30 -05:00
|
|
|
CONFIGURE_ARGS+= --with-ldap=${LOCALBASE}
|
2001-10-24 08:38:46 -04:00
|
|
|
LIB_DEPENDS+= ldap.2,lber:openldap-client-2.*:databases/openldap
|
2000-10-05 17:25:36 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-ldap
|
|
|
|
.endif
|
|
|
|
|
2000-12-28 12:53:16 -05:00
|
|
|
.if ${FLAVOR:L:Mmcrypt}
|
2001-10-04 17:27:44 -04:00
|
|
|
CONFIGURE_ARGS+= --with-mcrypt=${LOCALBASE}
|
2001-02-27 15:01:07 -05:00
|
|
|
LIB_DEPENDS+= mcrypt::security/libmcrypt
|
2000-12-28 12:53:16 -05:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-mcrypt
|
|
|
|
.endif
|
|
|
|
|
2000-10-04 17:19:13 -04:00
|
|
|
.if ${FLAVOR:L:Mmhash}
|
2001-10-04 17:27:44 -04:00
|
|
|
CONFIGURE_ARGS+= --with-mhash=${LOCALBASE}
|
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}
|
2001-10-04 17:27:44 -04:00
|
|
|
CONFIGURE_ARGS+= --with-mm=${LOCALBASE}
|
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-03 07:55:00 -04:00
|
|
|
|
2000-09-25 16:03:49 -04:00
|
|
|
.if ${FLAVOR:L:Mrecode}
|
2001-10-04 17:27:44 -04:00
|
|
|
CONFIGURE_ARGS+= --with-recode=${LOCALBASE}
|
2001-10-14 20:56:53 -04:00
|
|
|
LIB_DEPENDS+= recode::converters/recode
|
2000-09-25 16:03:49 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-recode
|
|
|
|
.endif
|
2000-09-03 07:55:00 -04:00
|
|
|
|
2000-09-25 16:03:49 -04:00
|
|
|
.if ${FLAVOR:L:Msnmp}
|
2001-10-04 17:27:44 -04:00
|
|
|
CONFIGURE_ARGS+= --with-snmp=${LOCALBASE} --enable-ucd-snmp-hack
|
2001-10-13 19:22:29 -04:00
|
|
|
LIB_DEPENDS+= snmp.42::net/ucd-snmp
|
2000-09-25 16:03:49 -04:00
|
|
|
.else
|
2001-01-28 09:38:30 -05:00
|
|
|
CONFIGURE_ARGS+= --without-snmp
|
2000-09-25 16:03:49 -04:00
|
|
|
.endif
|
2000-09-03 07:55:00 -04:00
|
|
|
|
2000-09-25 16:03:49 -04:00
|
|
|
.if ${FLAVOR:L:Mgd}
|
2001-10-04 17:27:44 -04:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include
|
|
|
|
MAKE_FLAGS+= CFLAGS='${CFLAGS}'
|
2001-07-16 05:35:57 -04:00
|
|
|
LIB_DEPENDS+= gd.18::graphics/gd \
|
2001-07-17 11:32:04 -04:00
|
|
|
tiff.35::graphics/tiff \
|
|
|
|
png.2::graphics/png
|
2000-09-03 07:55:00 -04:00
|
|
|
CONFIGURE_ARGS+= --with-gd \
|
2001-03-06 04:04:30 -05:00
|
|
|
--with-jpeg-dir=${LOCALBASE} \
|
2001-07-16 05:35:57 -04:00
|
|
|
--with-tiff-dir=${LOCALBASE} \
|
2001-07-17 11:32:04 -04:00
|
|
|
--with-png-dir=${LOCALBASE} \
|
2000-12-14 10:25:20 -05:00
|
|
|
--with-ttf
|
2001-07-16 05:35:57 -04:00
|
|
|
.if !${FLAVOR:L:Mno_x11}
|
2000-09-03 07:55:00 -04:00
|
|
|
USE_X11= yes
|
2001-07-16 05:35:57 -04:00
|
|
|
CONFIGURE_ARGS+= --with-xpm-dir=${X11BASE}
|
2000-09-03 07:55:00 -04:00
|
|
|
.endif
|
2000-09-25 16:03:49 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-gd
|
|
|
|
.endif
|
2000-09-03 07:55:00 -04:00
|
|
|
|
2000-09-28 16:39:24 -04:00
|
|
|
.if ${FLAVOR:L:Mpdflib}
|
2001-07-16 05:35:57 -04:00
|
|
|
.if !${FLAVOR:L:Mgd}
|
2001-07-18 06:59:00 -04:00
|
|
|
ERRORS+= "Fatal: pdflib flavor requires the gd flavor also"
|
2001-07-16 05:35:57 -04:00
|
|
|
.endif
|
2001-03-06 04:04:30 -05:00
|
|
|
CONFIGURE_ARGS+= --with-pdflib=${LOCALBASE}
|
2001-10-14 20:56:53 -04:00
|
|
|
LIB_DEPENDS+= pdf.2::print/pdflib
|
2000-09-28 16:39:24 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-pdflib
|
|
|
|
.endif
|
|
|
|
|
2000-09-03 07:55:00 -04:00
|
|
|
.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}
|
2001-03-06 04:04:30 -05:00
|
|
|
CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
|
2001-11-16 19:12:23 -05:00
|
|
|
LIB_DEPENDS+= lib/mysql/mysqlclient.10:mysql-client-3.23.*:databases/mysql
|
2000-09-03 07:55:00 -04:00
|
|
|
.if ${FLAVOR:L:Mmysql_bundled}
|
2001-07-18 06:59:00 -04:00
|
|
|
ERRORS+= "Fatal: Conflicting flavor: ${FLAVOR}"
|
2000-09-03 07:55:00 -04:00
|
|
|
.endif
|
|
|
|
.elif ${FLAVOR:L:Mmysql_bundled}
|
|
|
|
CONFIGURE_ARGS+= --with-mysql
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-mysql
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mpostgresql}
|
2001-04-22 12:07:12 -04:00
|
|
|
CONFIGURE_ARGS+= --with-pgsql=${LOCALBASE}/lib
|
2001-10-04 17:27:44 -04:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include/postgresql
|
|
|
|
MAKE_FLAGS+= CFLAGS='${CFLAGS}'
|
2000-12-14 10:25:20 -05:00
|
|
|
LIB_DEPENDS+= pq.2::databases/postgresql
|
2000-09-03 07:55:00 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-pgsql
|
|
|
|
.endif
|
|
|
|
|
2000-12-18 15:29:25 -05:00
|
|
|
.if ${FLAVOR:L:Miodbc}
|
|
|
|
CONFIGURE_ARGS+= --with-iodbc
|
2001-10-14 20:56:53 -04:00
|
|
|
LIB_DEPENDS+= iodbc.2::databases/iodbc
|
2000-12-18 15:29:25 -05:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-iodbc
|
|
|
|
.endif
|
2000-09-03 07:55:00 -04:00
|
|
|
|
2002-03-03 07:13:29 -05:00
|
|
|
# .if ${FLAVOR:L:Mfreetds}
|
|
|
|
# CONFIGURE_ARGS+= --with-sybase-ct=${LOCALBASE}
|
|
|
|
# LIB_DEPENDS+= tds.0,ct.0::databases/freetds
|
|
|
|
# .else
|
|
|
|
# CONFIGURE_ARGS+= --without-sybase-ct
|
|
|
|
# .endif
|
2002-01-09 11:00:51 -05:00
|
|
|
|
2001-06-18 12:27:41 -04:00
|
|
|
.if ${SUBPACKAGE} == "-pear"
|
|
|
|
LIB_DEPENDS=
|
|
|
|
RUN_DEPENDS=
|
|
|
|
.endif
|
|
|
|
|
2000-09-03 07:55:00 -04:00
|
|
|
do-install:
|
2001-09-16 16:48:15 -04:00
|
|
|
${INSTALL_DATA} ${WRKBUILD}/.libs/libphp4.so \
|
2000-09-03 07:55:00 -04:00
|
|
|
${PREFIX}/lib/libphp4.so
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/php4
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/php.ini-dist ${PREFIX}/share/doc/php4
|
2001-12-17 20:40:48 -05:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/php.ini-recommended ${PREFIX}/share/doc/php4
|
2001-01-03 19:51:23 -05:00
|
|
|
@sed 's,y0y0y0,${TRUEPREFIX},' \
|
2000-09-03 07:55:00 -04:00
|
|
|
<${FILESDIR}/php4-enable >${PREFIX}/sbin/php4-enable
|
2001-01-03 19:51:23 -05:00
|
|
|
@chown ${BINOWN}:${BINGRP} ${PREFIX}/sbin/php4-enable
|
|
|
|
@chmod ${BINMODE} ${PREFIX}/sbin/php4-enable
|
2001-07-05 18:55:38 -04:00
|
|
|
cd ${WRKSRC}/pear && env INSTALL_ROOT=${DESTDIR} make install
|
2000-09-03 07:55:00 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|