aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.php.mk
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2004-02-04 04:27:04 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2004-02-04 04:27:04 +0000
commit742adcabd74aa0adc91246bae79c97658a078415 (patch)
tree909044a5c2de4cbaeeccb4b9e792547ac5791b86 /Mk/bsd.php.mk
parenta00e77567c7938e3b9f3018d031dbbae7a5e57c9 (diff)
downloadports-742adcabd74aa0adc91246bae79c97658a078415.tar.gz
ports-742adcabd74aa0adc91246bae79c97658a078415.zip
* Add a new bsd.php.mk that takes the place of lang/php4/bsd.php.mk [1]
* Remove trailing whitespace from bsd.port.mk [2] * Enhanced OPTIONS handling [3] * Add a USE_ICONV macro [4] * Add a USE_GETTEXT macro [5] * Add support for p5-Module::Build [6] * Enhance bsd.sdl.mk with WANT_SDL [7] * Remove NetBSD and OpenBSD bits from bsd.port.mk [8] * Correct a type in PKGDIR description in bsd.port.mk [9] * Add new DIRNAME macro [10] * Cleanup bsd.port.mk [11] * The default Perl for -CURRENT has been updated to 5.8.2 [12] * Optimize recursive operations on the ports tree [13] * Do not attempt to remove _CPUCFLAGS from CFLAGS if _CPUCFLAGS is not defined [14] * Remove sysutils/rc_subr dependency on -CURRENT [15] * Add MySQL 5.X support to the ports system [16] * Fix a comment typo related to MySQL [17] * Change PTHREAD_{CFLAGS,LIBS} behavior [18] * Do not check distfile size on FreeBSD < 4.8 [19] * Do not install ports with security vulnerabilities [20] * Use ${LOCALBASE}/sbin/pkg_* tools if found [21] * A new net-mgmt physical category has been added [22] * Stop relying on port.mkversion [23] * Fix a regression in checksum processing [24] * Allow PLIST_{DIRS,FILES} to make use of PLIST_SUB [25] * Switch to root to run config and rmconfig targets [26] * Add SIZE attributes for distfiles by default [27] PR: 61683 [3] 62131 [4] 61992 [5] 61621 [6] 61877 [7] 61401 [8] 61684 [10] 61684 61955 [11] 61857 [12] 61757 [14] 61454 [15] 60559 [16] 62039 [20] 62039 [21] 61856 [23] 61972 [27] Submitted by: ale [1] marcus [2] eik [3] trevor [4] trevor [5] skv [6] edwin [7] Markus Brueffer <brueffer@phoenix-systems.de> [8] trevor [9] eik [10] eik des [11] des [12] kris [13] marcus [14] Sergey Matveychuk <sem@ciam.ru> [15] ale [16] linimon [17] eischen netchild [18] marcus netchild [20] eik [21] wollman [22] des [23] marcus eik [24] marcus [25] marcus [26] trevor [27]
Notes
Notes: svn path=/head/; revision=99913
Diffstat (limited to 'Mk/bsd.php.mk')
-rw-r--r--Mk/bsd.php.mk165
1 files changed, 165 insertions, 0 deletions
diff --git a/Mk/bsd.php.mk b/Mk/bsd.php.mk
new file mode 100644
index 000000000000..1b562552d5fe
--- /dev/null
+++ b/Mk/bsd.php.mk
@@ -0,0 +1,165 @@
+#
+# bsd.php.mk - Support for PHP-based ports.
+#
+# Created by: Alex Dupre <ale@FreeBSD.org>
+#
+# For FreeBSD committers:
+# Please send all suggested changes to the maintainer instead of committing
+# them to CVS yourself.
+#
+# $FreeBSD$
+#
+# Adding 'USE_PHP=yes' to a port includes this Makefile after bsd.ports.pre.mk.
+#
+# The port can set these options in its Makefile before bsd.ports.pre.mk:
+#
+# USE_PHPIZE=yes - Use to build a PHP extension.
+# WANT_PHP_CLI=yes - Want the CLI version of PHP.
+# WANT_PHP_CGI=yes - Want the CGI version of PHP.
+# WANT_PHP_MOD=yes - Want the Apache Module for PHP.
+# WANT_PHP_WEB=yes - Want the Apache Module or the CGI version of PHP.
+# WANT_PHP_PEAR=yes - Want the PEAR framework.
+#
+# You may combine multiple WANT_PHP_* knobs.
+# Don't specify any WANT_PHP_* knob if your port will work with every PHP SAPI.
+#
+
+PHP_Include_MAINTAINER= ale@FreeBSD.org
+
+.if exists(${LOCALBASE}/etc/php.conf)
+.include "${LOCALBASE}/etc/php.conf"
+.endif
+
+PHP_VER?= 4
+.if !defined(PHP_EXT_DIR)
+PHP_EXT_DIR= 20020429
+.if exists(${LOCALBASE}/include/apache2/apr.h)
+APACHE_MPM!= ${APXS} -q MPM_NAME
+.if ${APACHE_MPM} == "worker"
+PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
+.endif
+.else
+.if defined(WITH_APACHE2) && defined(WITH_MPM) && ${WITH_MPM} == "worker"
+PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
+.endif
+.endif
+.if defined(WITH_DEBUG)
+PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug
+.endif
+.endif
+.if !defined(WITHOUT_PEAR)
+PHP_PEAR?= yes
+.else
+PHP_PEAR?= no
+.endif
+PHP_SAPI?= ""
+
+.if defined(BROKEN_WITH_PHP)
+. for VER in ${BROKEN_WITH_PHP}
+. if ${PHP_VER} == "${VER}"
+BROKEN= "Doesn't work with PHP version : ${PHP_VER} (Doesn't support PHP ${BROKEN_WITH_PHP})"
+. endif
+. endfor
+.endif
+
+.if defined(WANT_PHP_WEB)
+. if defined(WANT_PHP_CGI) || defined(WANT_PHP_MOD)
+check-makevars::
+ @${ECHO_CMD} "If you define WANT_PHP_WEB you cannot set also WANT_PHP_CGI"
+ @${ECHO_CMD} "or WANT_PHP_MOD. Use only one of them."
+ @${FALSE}
+. else
+. if defined(PHP_VERSION) && ${PHP_SAPI} == "cli"
+check-makevars::
+ @${ECHO_CMD} "This port requires the Apache Module or the CGI version of PHP, but you have"
+ @${ECHO_CMD} "already installed a conflicting PHP port without them."
+ @${FALSE}
+. else
+. if defined(WANT_PHP_CLI) || defined(WANT_PHP_PEAR)
+PHP_PORT?= ${PORTSDIR}/lang/php${PHP_VER}
+. else
+PHP_PORT?= ${PORTSDIR}/www/mod_php${PHP_VER}
+PHP_PEAR?= no
+. endif
+. endif
+. endif
+.else
+
+.if defined(WANT_PHP_CGI)
+. if defined(WANT_PHP_CLI) || defined(WANT_PHP_MOD)
+check-makevars::
+ @${ECHO_CMD} "The CGI version of PHP avoids the installation of other SAPIs."
+ @${ECHO_CMD} "Do not use WANT_PHP_CGI with other WANT_PHP_* knobs."
+ @${FALSE}
+. else
+. if defined(PHP_VERSION) && ${PHP_SAPI} != "cgi"
+check-makevars::
+ @${ECHO_CMD} "This port requires the CGI version of PHP, but you have already"
+ @${ECHO_CMD} "installed a conflicting PHP port without CGI."
+ @${FALSE}
+. else
+PHP_PORT?= ${PORTSDIR}/www/php${PHP_VER}-cgi
+PHP_PEAR?= no
+. endif
+. endif
+.else
+
+.if defined(WANT_PHP_CLI) && !defined(WANT_PHP_MOD)
+. if defined(PHP_VERSION) && ${PHP_SAPI} != "full" && ${PHP_SAPI} != "cli"
+check-makevars::
+ @${ECHO_CMD} "This port requires the CLI version of PHP, but you have already"
+ @${ECHO_CMD} "installed a conflicting PHP port without CLI."
+ @${FALSE}
+. else
+PHP_PORT?= ${PORTSDIR}/lang/php${PHP_VER}-cli
+. endif
+.else
+
+.if !defined(WANT_PHP_CLI) && defined(WANT_PHP_MOD)
+. if defined(PHP_VERSION) && (${PHP_SAPI} != "full" && ${PHP_SAPI} != "mod")
+check-makevars::
+ @${ECHO_CMD} "This port requires the Apache Module for PHP, but you have already"
+ @${ECHO_CMD} "installed a conflicting PHP port without the Apache Module."
+ @${FALSE}
+. else
+. if defined(WANT_PHP_PEAR)
+PHP_PORT?= ${PORTSDIR}/lang/php${PHP_VER}
+. else
+PHP_PORT?= ${PORTSDIR}/www/mod_php${PHP_VER}
+PHP_PEAR?= no
+. endif
+. endif
+.else
+
+PHP_PORT?= ${PORTSDIR}/lang/php${PHP_VER}
+
+.endif
+
+.endif
+
+.endif
+
+.endif
+
+.if defined(WANT_PHP_PEAR) && ${PHP_PEAR} == "no"
+BROKEN= "This port requires the PEAR framework, but you have already" \
+ "installed a PHP port without PEAR"
+.endif
+
+RUN_DEPENDS+= ${LOCALBASE}/include/php/main/php.h:${PHP_PORT}
+
+PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR}
+
+.if defined(USE_PHPIZE)
+BUILD_DEPENDS+= phpize:${PHP_PORT}
+USE_LIBTOOL= yes
+WANT_AUTOMAKE_VER= 15
+WANT_AUTOCONF_VER= 253
+CONFIGURE_ARGS+=--with-php-config=${LOCALBASE}/bin/php-config
+
+configure-message: phpize
+
+phpize:
+ @${ECHO_MSG} "===> PHPizing for ${DISTNAME}"
+ @(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${LOCALBASE}/bin/phpize)
+.endif