summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2013-07-21 17:29:47 +0000
committertaca <taca@pkgsrc.org>2013-07-21 17:29:47 +0000
commit07e0bbb10318c49657aaf952173bd9ae94672e28 (patch)
tree8659004723fcc8e45a7c4e09ba29004214f11f24 /lang
parent7b9e6798ac6e08bbc9a053d867e1581c7c44ae88 (diff)
downloadpkgsrc-07e0bbb10318c49657aaf952173bd9ae94672e28.tar.gz
Clean up php's framework.
* Define PHP's version at one place. * Remove obsolete description in comments. * Add "used by www/php-fpm/Makefile" in php5[34]/Makefile.php. * Remove commented out support for suhosin extension from php54. * Add PHP_CHECK_INSTALLED and PHP_EXTENSION_DIR to php/phpversion.mk. No functional should be made.
Diffstat (limited to 'lang')
-rw-r--r--lang/php/common.mk24
-rw-r--r--lang/php/ext.mk6
-rw-r--r--lang/php/phpversion.mk40
-rw-r--r--lang/php53/Makefile.common37
-rw-r--r--lang/php53/Makefile.php11
-rw-r--r--lang/php54/MESSAGE.suhosin7
-rw-r--r--lang/php54/Makefile.common45
-rw-r--r--lang/php54/Makefile.php32
-rw-r--r--lang/php54/PLIST5
9 files changed, 83 insertions, 124 deletions
diff --git a/lang/php/common.mk b/lang/php/common.mk
new file mode 100644
index 00000000000..118224ea475
--- /dev/null
+++ b/lang/php/common.mk
@@ -0,0 +1,24 @@
+# $NetBSD: common.mk,v 1.1 2013/07/21 17:29:47 taca Exp $
+# used by lang/php53/Makefile.common
+# used by lang/php54/Makefile.common
+#
+.if !defined(PHPCOMMON_MK)
+PHPCOMMON_MK= defined
+
+DISTNAME?= php-${PHP_BASE_VERS}
+
+.if !defined(PECL_VERSION)
+MASTER_SITES?= http://www.php.net/distributions/ \
+ http://uk.php.net/distributions/ \
+ http://de.php.net/distributions/ \
+ http://us.php.net/distributions/
+EXTRACT_SUFX?= .tar.bz2
+.endif
+
+HOMEPAGE?= http://www.php.net/
+
+PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
+PKG_SYSCONFVAR?= php
+
+.include "../../lang/php/phpversion.mk"
+.endif # PHPCOMMON_MK
diff --git a/lang/php/ext.mk b/lang/php/ext.mk
index d9646514f4a..523d76eb4fa 100644
--- a/lang/php/ext.mk
+++ b/lang/php/ext.mk
@@ -1,4 +1,4 @@
-# $NetBSD: ext.mk,v 1.29 2012/08/17 15:38:19 taca Exp $
+# $NetBSD: ext.mk,v 1.30 2013/07/21 17:29:47 taca Exp $
#
# PHP extension package framework, for both PECL and bundled PHP extensions.
#
@@ -21,7 +21,9 @@ HOMEPAGE?= http://pecl.php.net/package/${MODNAME}
.include "../../lang/php/phpversion.mk"
+.if defined(PHPPKGSRCDIR)
.include "${PHPPKGSRCDIR}/Makefile.common"
+.endif
PKGMODNAME?= ${MODNAME:S/-/_/}
PHPSETUPSUBDIR?= #empty
@@ -112,6 +114,8 @@ do-patch:
done || ${TRUE}
.endif
+.if defined(PHPPKGSRCDIR)
.include "${PHPPKGSRCDIR}/buildlink3.mk"
+.endif
.endif # PHPEXT_MK
diff --git a/lang/php/phpversion.mk b/lang/php/phpversion.mk
index 87c4b82febb..3bc877e2e6e 100644
--- a/lang/php/phpversion.mk
+++ b/lang/php/phpversion.mk
@@ -1,4 +1,4 @@
-# $NetBSD: phpversion.mk,v 1.36 2013/07/12 00:09:14 taca Exp $
+# $NetBSD: phpversion.mk,v 1.37 2013/07/21 17:29:47 taca Exp $
#
# This file selects a PHP version, based on the user's preferences and
# the installed packages. It does not add a dependency on the PHP
@@ -30,6 +30,13 @@
# Possible: 53 54
# Default: 54 53
#
+# PHP_CHECK_INSTALLED
+# Check installed version of PHP. Should be used lang/php53,
+# and lang/php54 only.
+#
+# Possible: Yes No
+# Default: Yes
+#
# === Variables defined by this file ===
#
# PKG_PHP_VERSION
@@ -61,12 +68,28 @@
#
# Example: php53, php54
#
+# PHP_EXTENSION_DIR
+# Relative path to ${PREFIX} for PHP's extensions. It is derived from
+# initial release of major version.
+#
+# Example: lib/php/20090630
+#
# Keywords: php
#
.if !defined(PHPVERSION_MK)
PHPVERSION_MK= defined
+# Define each PHP's version.
+PHP53_VERSION= 5.3.27
+PHP54_VERSION= 5.4.17
+PHP55_VERSION= 5.5.1
+
+# Define initial release of major version.
+PHP53_RELDATE= 20090630
+PHP54_RELDATE= 20120301
+PHP55_RELDATE= 20130620
+
_VARGROUPS+= php
_USER_VARS.php= PHP_VERSION_DEFAULT
_PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD
@@ -75,9 +98,6 @@ _SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \
.include "../../mk/bsd.prefs.mk"
-PHP53_VERSION= 5.3.27
-PHP54_VERSION= 5.4.17
-
PHP_VERSION_DEFAULT?= 54
PHP_VERSIONS_ACCEPTED?= 54 53
@@ -135,15 +155,19 @@ MULTI+= PHP_VERSION_REQD=${_PHP_VERSION}
# export some of internal variables
PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//}
-PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/}
+PKG_PHP:= php-${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/}
# currently we have only PHP 5.x packages.
PKG_PHP_MAJOR_VERS:= 5
+PHP_CHECK_INSTALLED?= Yes
+
# if installed PHP isn't compatible with required PHP, bail out
+.if !empty(PHP_CHECK_INSTALLED:M[nN][oO])
.if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED)
PKG_SKIP_REASON+= "Package accepts ${PKG_PHP}, but different version is installed"
.endif
+.endif
MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
PKG_PHP=${PKG_PHP}
@@ -161,10 +185,12 @@ PHP_VERSION_REQD:= ${PKG_PHP_VERSION}
PHPPKGSRCDIR= ../../lang/php53
PHP_BASE_VERS= ${PHP53_VERSION}
PHP_PKG_PREFIX= php53
+PHP_EXTENSION_DIR= lib/php/${PHP53_RELDATE}
.elif ${_PHP_VERSION} == "54"
PHPPKGSRCDIR= ../../lang/php54
PHP_BASE_VERS= ${PHP54_VERSION}
PHP_PKG_PREFIX= php54
+PHP_EXTENSION_DIR= lib/php/${PHP54_RELDATE}
.else
# force an error
PKG_SKIP_REASON+= "${PKG_PHP} is not a valid package"
@@ -173,8 +199,8 @@ PKG_SKIP_REASON+= "${PKG_PHP} is not a valid package"
#
# check installed version aginst required:
#
-.if defined(_PHP_VERSION_INSTALLED)
-.if ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED}
+.if !empty(PHP_CHECK_INSTALLED:M[nN][oO])
+.if defined(_PHP_VERSION_INSTALLED) && ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED}
PKG_SKIP_REASON+= "${PKGBASE} requires ${PKG_PHP}, but php-${_PHP_VERSION_INSTALLED} is already installed."
.endif
.endif
diff --git a/lang/php53/Makefile.common b/lang/php53/Makefile.common
index 48f7b532177..5f7f1ca4b8c 100644
--- a/lang/php53/Makefile.common
+++ b/lang/php53/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.27 2013/07/12 00:07:04 taca Exp $
+# $NetBSD: Makefile.common,v 1.28 2013/07/21 17:29:47 taca Exp $
# used by lang/php53/Makefile.php
# used by lang/php/ext.mk
# used by meta-pkgs/php53-extensions/Makefile
@@ -10,40 +10,15 @@
# in the patch which can leave the option broken until an updated patch
# is released. When updating PHP please don't forget to update the
# distnfo with the details of the suhosin patch as well.
-#
-# Check these packages when update to new release of PHP and consider to
-# reset PKG_REVISION:
-#
-# databases/php-mysqlnd (not yet packaged)
-# misc/php-intl
-# textproc/php-enchant
-#
-# Since other PHP extensions are shared between www/php5, we can't reset
-# PKGREVSION.
-#
-.if !defined(DISTNAME)
-DISTNAME= php-${PHP_BASE_VERS}
-.endif
-CATEGORIES+= www
+PHP_VERSION_REQD= 53
+PHP_BASE_VERS= ${PHP53_VERSION}
+PHP_CHECK_INSTALLED= No
-.if !defined(PECL_VERSION)
-MASTER_SITES?= http://www.php.net/distributions/ \
- http://uk.php.net/distributions/ \
- http://de.php.net/distributions/ \
- http://us.php.net/distributions/
-EXTRACT_SUFX?= .tar.bz2
-.endif
+.include "../../lang/php/common.mk"
+CATEGORIES+= www
MAINTAINER?= pkgsrc-users@NetBSD.org
-HOMEPAGE?= http://www.php.net/
-
-PHP_BASE_VERS= 5.3.27
-
-PHP_EXTENSION_DIR= lib/php/20090630
-PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
-
-PKG_SYSCONFVAR?= php
# needed due to (broken?) configure checks in php-xmlrpc and php5-dom
CONFIGURE_ENV+= PHP_LIBXML_SHARED="1"
diff --git a/lang/php53/Makefile.php b/lang/php53/Makefile.php
index c727c194911..f7eab1380e6 100644
--- a/lang/php53/Makefile.php
+++ b/lang/php53/Makefile.php
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile.php,v 1.36 2013/07/15 02:02:24 ryoon Exp $
+# $NetBSD: Makefile.php,v 1.37 2013/07/21 17:29:47 taca Exp $
# used by lang/php53/Makefile
# used by www/ap-php/Makefile
+# used by www/php-fpm/Makefile
.include "../../lang/php53/Makefile.common"
@@ -39,6 +40,7 @@ CONFIGURE_ARGS+= --disable-json
CONFIGURE_ARGS+= --enable-cgi
CONFIGURE_ARGS+= --enable-xml
CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX}
+
.include "../../textproc/libxml2/buildlink3.mk"
# Note: This expression is the same as ${PKGBASE}, but the latter is
@@ -47,13 +49,6 @@ PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts suhosin readline
PKG_SUGGESTED_OPTIONS+= inet6 ssl
-#SUBST_CLASSES+= ini
-#SUBST_STAGE.ini= post-patch
-#SUBST_FILES.ini= php.ini-development
-#SUBST_FILES.ini+= php.ini-production
-#SUBST_SED.ini= -e "s|\\;include_path = \".:/php/includes\"|include_path = \".:${PREFIX}/lib/php\"|g"
-#SUBST_MESSAGE.ini= Fixing default ini files.
-
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Msuhosin)
diff --git a/lang/php54/MESSAGE.suhosin b/lang/php54/MESSAGE.suhosin
deleted file mode 100644
index 884861d1e5e..00000000000
--- a/lang/php54/MESSAGE.suhosin
+++ /dev/null
@@ -1,7 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE.suhosin,v 1.1 2012/06/16 05:21:55 taca Exp $
-
-As you have chosen to install the Suhosin patch you may also want to
-install the Suhosin extension which can be found in security/php-suhosin.
-
-===========================================================================
diff --git a/lang/php54/Makefile.common b/lang/php54/Makefile.common
index a71a501ae35..6b102469f4f 100644
--- a/lang/php54/Makefile.common
+++ b/lang/php54/Makefile.common
@@ -1,49 +1,16 @@
-# $NetBSD: Makefile.common,v 1.14 2013/07/07 13:37:53 taca Exp $
+# $NetBSD: Makefile.common,v 1.15 2013/07/21 17:29:47 taca Exp $
# used by lang/php54/Makefile.php
# used by lang/php/ext.mk
# used by meta-pkgs/php54-extensions/Makefile
-#
-# NOTE:
-# The suhosin option includes a patch from http://www.hardened-php.net/
-# Which tracks with the exact version number of PHP. There may be a delay
-# in the patch which can leave the option broken until an updated patch
-# is released. When updating PHP please don't forget to update the
-# distnfo with the details of the suhosin patch as well.
-#
-# Check these packages when update to new release of PHP and consider to
-# reset PKG_REVISION:
-#
-# databases/php-mysqlnd (not yet packaged)
-# misc/php-intl
-# textproc/php-enchant
-#
-# Since other PHP extensions are shared between www/php5, we can't reset
-# PKGREVSION.
-#
+PHP_VERSION_REQD= 54
+PHP_BASE_VERS= ${PHP54_VERSION}
+PHP_CHECK_INSTALLED= No
-.if !defined(DISTNAME)
-DISTNAME= php-${PHP_BASE_VERS}
-.endif
-CATEGORIES+= www
-
-.if !defined(PECL_VERSION)
-MASTER_SITES?= http://www.php.net/distributions/ \
- http://uk.php.net/distributions/ \
- http://de.php.net/distributions/ \
- http://us.php.net/distributions/
-EXTRACT_SUFX?= .tar.bz2
-.endif
+.include "../../lang/php/common.mk"
+CATEGORIES+= www
MAINTAINER?= pkgsrc-users@NetBSD.org
-HOMEPAGE?= http://www.php.net/
-
-PHP_BASE_VERS= 5.4.17
-
-PHP_EXTENSION_DIR= lib/php/20120301
-PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
-
-PKG_SYSCONFVAR?= php
# needed due to (broken?) configure checks in php-xmlrpc and php5-dom
CONFIGURE_ENV+= PHP_LIBXML_SHARED="1"
diff --git a/lang/php54/Makefile.php b/lang/php54/Makefile.php
index b03e67df47b..63b79bbf6e9 100644
--- a/lang/php54/Makefile.php
+++ b/lang/php54/Makefile.php
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile.php,v 1.5 2013/07/15 02:02:24 ryoon Exp $
+# $NetBSD: Makefile.php,v 1.6 2013/07/21 17:29:47 taca Exp $
# used by lang/php54/Makefile
# used by www/ap-php/Makefile
+# used by www/php-fpm/Makefile
.include "../../lang/php54/Makefile.common"
@@ -11,7 +12,7 @@ USE_LIBTOOL= YES
USE_LANGUAGES= c c++
GNU_CONFIGURE= YES
BUILD_DEFS+= VARBASE
-PLIST_VARS+= suhosin dtrace
+PLIST_VARS+= dtrace
CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
@@ -38,44 +39,21 @@ CONFIGURE_ARGS+= --disable-json
CONFIGURE_ARGS+= --enable-cgi
CONFIGURE_ARGS+= --enable-xml
CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX}
+
.include "../../textproc/libxml2/buildlink3.mk"
# Note: This expression is the same as ${PKGBASE}, but the latter is
# not defined yet, so we cannot use it here.
PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
-PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline # suhosin
+PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline
PKG_SUGGESTED_OPTIONS+= inet6 ssl
.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
PKG_SUPPORTED_OPTIONS+= dtrace
.endif
-#SUBST_CLASSES+= ini
-#SUBST_STAGE.ini= post-patch
-#SUBST_FILES.ini= php.ini-development
-#SUBST_FILES.ini+= php.ini-production
-#SUBST_SED.ini= -e "s|\\;include_path = \".:/php/includes\"|include_path = \".:${PREFIX}/lib/php\"|g"
-#SUBST_MESSAGE.ini= Fixing default ini files.
-
.include "../../mk/bsd.options.mk"
-#.if !empty(PKG_OPTIONS:Msuhosin)
-#SUHOSIN_PHPVER= 5.4.0
-#. if ${SUHOSIN_PHPVER} != ${PHP_BASE_VERS}
-#PKG_FAIL_REASON+= "The suhosin patch is currently not available for"
-#PKG_FAIL_REASON+= "this version of PHP. You may have to wait until"
-#PKG_FAIL_REASON+= "an updated patch is released or temporarily"
-#PKG_FAIL_REASON+= "build this package without the suhosin option."
-#. else
-#PATCH_SITES= http://download.suhosin.org/
-#PATCHFILES+= suhosin-patch-${SUHOSIN_PHPVER}-0.9.10.patch.gz
-#PATCH_DIST_STRIP= -p1
-#PLIST.suhosin= yes
-#MESSAGE_SRC= ${.CURDIR}/../../lang/php54/MESSAGE
-#MESSAGE_SRC+= ${.CURDIR}/../../lang/php54/MESSAGE.suhosin
-#. endif
-#.endif
-
.if !empty(PKG_OPTIONS:Minet6)
CONFIGURE_ARGS+= --enable-ipv6
.else
diff --git a/lang/php54/PLIST b/lang/php54/PLIST
index 6646f4e949b..3dda1bbaf97 100644
--- a/lang/php54/PLIST
+++ b/lang/php54/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2012/08/17 15:34:01 taca Exp $
+@comment $NetBSD: PLIST,v 1.4 2013/07/21 17:29:47 taca Exp $
bin/phar
bin/phar.phar
bin/php
@@ -213,9 +213,6 @@ include/php/main/streams/php_stream_plain_wrapper.h
include/php/main/streams/php_stream_transport.h
include/php/main/streams/php_stream_userspace.h
include/php/main/streams/php_streams_int.h
-${PLIST.suhosin}include/php/main/suhosin_globals.h
-${PLIST.suhosin}include/php/main/suhosin_logo.h
-${PLIST.suhosin}include/php/main/suhosin_patch.h
include/php/main/win32_internal_function_disabled.h
include/php/main/win95nt.h
include/php/sapi/cli/cli.h