summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron>2013-08-25 16:56:44 +0000
committertron <tron>2013-08-25 16:56:44 +0000
commit61e7caff4b8035b6858f7e99d65764150e225c39 (patch)
tree34c17b8ae0b39a9abe77077ddc7914cfcdcde90a
parent0f9b669ffe5532df95507495143ae23019e22ec0 (diff)
downloadpkgsrc-61e7caff4b8035b6858f7e99d65764150e225c39.tar.gz
Pullup ticket #4221 - requested by taca
lang/php*: apply framework changes to make pullup requests possible Revisions pulled up: - lang/php/common.mk 1.1 - lang/php/ext.mk 1.30 - lang/php/phpversion.mk 1.37-1.39 - lang/php53/DESCR 1.2 - lang/php53/Makefile 1.40-1.42 - lang/php53/Makefile.common 1.28-1.29 - lang/php53/Makefile.php 1.37 - lang/php54/DESCR 1.2 - lang/php54/MESSAGE.suhosin deleted - lang/php54/Makefile 1.9-1.10,1.12 - lang/php54/Makefile.common 1.15-1.16 - lang/php54/Makefile.php 1.6 - lang/php54/PLIST 1.4 --- Module Name: pkgsrc Committed By: taca Date: Sun Jul 21 17:29:47 UTC 2013 Modified Files: pkgsrc/lang/php: ext.mk phpversion.mk pkgsrc/lang/php53: Makefile.common Makefile.php pkgsrc/lang/php54: Makefile.common Makefile.php PLIST Added Files: pkgsrc/lang/php: common.mk Removed Files: pkgsrc/lang/php54: MESSAGE.suhosin Log Message: 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. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 03:59:44 UTC 2013 Modified Files: pkgsrc/lang/php53: Makefile Makefile.common Log Message: Move PHP_CHECK_INSTALLED to before including Makefile.php since it should be defined before including lang/php/phpversion.mk. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 04:20:55 UTC 2013 Modified Files: pkgsrc/lang/php54: Makefile Makefile.common Log Message: Move PHP_CHECK_INSTALLED to before including Makefile.php since it should be defined before including lang/php/phpversion.mk. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 16:19:24 UTC 2013 Modified Files: pkgsrc/lang/php53: DESCR Makefile Log Message: Explicitly note it is PHP 5.3.x pacakge in COMMENT of Makefile and DESCR file. Bump PKGREVISION. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 16:21:07 UTC 2013 Modified Files: pkgsrc/lang/php54: DESCR Makefile Log Message: Explicitly note it is PHP 5.4.x pacakge in COMMENT of Makefile and DESCR file. --- Module Name: pkgsrc Committed By: taca Date: Mon Jul 29 16:38:12 UTC 2013 Modified Files: pkgsrc/lang/php: phpversion.mk Log Message: * Add php55 support. * Make PKG_PHP's value as description in comment. --- Module Name: pkgsrc Committed By: joerg Date: Tue Aug 13 10:22:26 UTC 2013 Modified Files: pkgsrc/lang/php53: Makefile pkgsrc/lang/php54: Makefile pkgsrc/lang/php55: Makefile Log Message: Allow only the PHP version itself, otherwise the multi-version logic will trigger with failing distinfo entries. --- Module Name: pkgsrc Committed By: taca Date: Wed Aug 14 14:53:03 UTC 2013 Modified Files: pkgsrc/lang/php: phpversion.mk Log Message: Correct checking condition of PHP_CHECK_INSTALLED.
-rw-r--r--lang/php/common.mk24
-rw-r--r--lang/php/ext.mk6
-rw-r--r--lang/php/phpversion.mk38
-rw-r--r--lang/php53/Makefile3
-rw-r--r--lang/php53/Makefile.common37
-rw-r--r--lang/php53/Makefile.php11
-rw-r--r--lang/php54/MESSAGE.suhosin7
7 files changed, 71 insertions, 55 deletions
diff --git a/lang/php/common.mk b/lang/php/common.mk
new file mode 100644
index 00000000000..340bf4d7928
--- /dev/null
+++ b/lang/php/common.mk
@@ -0,0 +1,24 @@
+# $NetBSD: common.mk,v 1.1.2.2 2013/08/25 16:56:44 tron 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..71914409de9 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.29.8.1 2013/08/25 16:56:44 tron 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 9a47f292275..580c0acb490 100644
--- a/lang/php/phpversion.mk
+++ b/lang/php/phpversion.mk
@@ -1,4 +1,4 @@
-# $NetBSD: phpversion.mk,v 1.34.2.1 2013/07/15 22:32:24 tron Exp $
+# $NetBSD: phpversion.mk,v 1.34.2.2 2013/08/25 16:56:44 tron 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,26 @@
#
# 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
+
+# Define initial release of major version.
+PHP53_RELDATE= 20090630
+PHP54_RELDATE= 20120301
+
_VARGROUPS+= php
_USER_VARS.php= PHP_VERSION_DEFAULT
_PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD
@@ -75,9 +96,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.16
-
PHP_VERSION_DEFAULT?= 54
PHP_VERSIONS_ACCEPTED?= 54 53
@@ -135,15 +153,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 +183,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 +197,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 b/lang/php53/Makefile
index d6fb10295c2..90f5b4ace22 100644
--- a/lang/php53/Makefile
+++ b/lang/php53/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39.4.1 2013/08/25 16:52:09 tron Exp $
+# $NetBSD: Makefile,v 1.39.4.2 2013/08/25 16:56:44 tron Exp $
#
# We can't omit PKGNAME here to handle PKG_OPTIONS.
@@ -15,6 +15,7 @@ TEST_TARGET= test
USE_TOOLS+= gmake lex pkg-config
LIBTOOL_OVERRIDE= # empty
+PHP_CHECK_INSTALLED= No
.include "Makefile.php"
diff --git a/lang/php53/Makefile.common b/lang/php53/Makefile.common
index 0302b624521..31a4b4e53da 100644
--- a/lang/php53/Makefile.common
+++ b/lang/php53/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.26.2.1 2013/07/15 22:32:24 tron Exp $
+# $NetBSD: Makefile.common,v 1.26.2.2 2013/08/25 16:56:44 tron 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 9eee8923c01..e57f76e7212 100644
--- a/lang/php53/Makefile.php
+++ b/lang/php53/Makefile.php
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile.php,v 1.34.2.1 2013/07/15 22:32:24 tron Exp $
+# $NetBSD: Makefile.php,v 1.34.2.2 2013/08/25 16:56:44 tron 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.
-
-===========================================================================