pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/php
Module Name: pkgsrc
Committed By: jdolecek
Date: Sun Jul 17 15:49:44 UTC 2016
Modified Files:
pkgsrc/lang/php: MESSAGE.module PLIST.module ext.mk
Added Files:
pkgsrc/lang/php: ext.ini
Log Message:
Automatically enable PHP module or Zend extension when it's installed instead of requiring manual configuration of ${PKG_SYSCONFDIR}/php.ini - put a module-specific .ini file for this into
${PKG_SYSCONFDIR}/php.d
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/php/MESSAGE.module
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/php/PLIST.module
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/php/ext.ini
cvs rdiff -u -r1.39 -r1.40 pkgsrc/lang/php/ext.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/php/MESSAGE.module
diff -u pkgsrc/lang/php/MESSAGE.module:1.3 pkgsrc/lang/php/MESSAGE.module:1.4
--- pkgsrc/lang/php/MESSAGE.module:1.3 Sun Feb 15 09:00:33 2015
+++ pkgsrc/lang/php/MESSAGE.module Sun Jul 17 15:49:44 2016
@@ -1,11 +1,12 @@
===========================================================================
-$NetBSD: MESSAGE.module,v 1.3 2015/02/15 09:00:33 taca Exp $
+$NetBSD: MESSAGE.module,v 1.4 2016/07/17 15:49:44 jdolecek Exp $
-To enable this module, add the following to ${PKG_SYSCONFDIR}/php.ini:
+Module configuration file was created and module should be autoloaded:
+${EXT_CONF_DIR}/${MODNAME}.ini
- ${EXTENSION_DIRECTIVE}=${MODNAME}.so
+Make sure to update your ${PKG_SYSCONFDIR}/php.ini to not load this
+extension explicitely, remove:
+${EXTENSION_DIRECTIVE}=${EXTENSION_FILE}
-and make sure extension_dir points to the dir where ${MODNAME}.so is.
-
-Then restart your ${PKG_PHP}-enabled HTTP server to load this module.
+Restart your ${PKG_PHP}-enabled HTTP server to load this module.
===========================================================================
Index: pkgsrc/lang/php/PLIST.module
diff -u pkgsrc/lang/php/PLIST.module:1.1 pkgsrc/lang/php/PLIST.module:1.2
--- pkgsrc/lang/php/PLIST.module:1.1 Fri Nov 5 21:40:25 2004
+++ pkgsrc/lang/php/PLIST.module Sun Jul 17 15:49:44 2016
@@ -1,2 +1,3 @@
-@comment $NetBSD: PLIST.module,v 1.1 2004/11/05 21:40:25 jdolecek Exp $
-${PHP_EXTENSION_DIR}/${MODNAME}.so
+@comment $NetBSD: PLIST.module,v 1.2 2016/07/17 15:49:44 jdolecek Exp $
+share/examples/php/${MODNAME}.ini
+${PHP_EXTENSION_DIR}/${MODNAME}.${SHLIB_SUFFIX}
Index: pkgsrc/lang/php/ext.mk
diff -u pkgsrc/lang/php/ext.mk:1.39 pkgsrc/lang/php/ext.mk:1.40
--- pkgsrc/lang/php/ext.mk:1.39 Mon Mar 16 09:21:11 2015
+++ pkgsrc/lang/php/ext.mk Sun Jul 17 15:49:44 2016
@@ -1,4 +1,4 @@
-# $NetBSD: ext.mk,v 1.39 2015/03/16 09:21:11 taca Exp $
+# $NetBSD: ext.mk,v 1.40 2016/07/17 15:49:44 jdolecek Exp $
#
# PHP extension package framework, for both PECL and bundled PHP extensions.
#
@@ -29,6 +29,8 @@ PKGMODNAME?= ${MODNAME:S/-/_/}
PHPSETUPSUBDIR?= #empty
MODULESDIR?= ${WRKSRC}/modules
PLIST_SUBST+= MODNAME=${PKGMODNAME}
+PLIST_SUBST+= SHLIB_SUFFIX=${SHLIB_SUFFIX}
+PLIST_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
.if !defined(PECL_VERSION)
# bundled extension
@@ -46,6 +48,21 @@ DIST_SUBDIR?= php-${MODNAME}
EXTRACT_SUFX?= .tgz
.endif
+EGDIR= ${PREFIX}/share/examples/php
+CONF_FILES= ${EGDIR}/${MODNAME}.ini ${EXT_CONF_DIR}/${MODNAME}.ini
+
+EXT_CONF_DIR= ${PKG_SYSCONFDIR}/php.d
+MAKE_DIRS+= ${EXT_CONF_DIR}
+MAKE_DIRS+= ${EGDIR}
+
+SUBST_CLASSES+= ext-ini
+SUBST_FILES.ext-ini= ${MODNAME}.ini
+SUBST_MESSAGE.ext-ini=Creating module ini file
+SUBST_SED.ext-ini+= -e 's,@MODNAME@,${MODNAME},g'
+SUBST_SED.ext-ini+= -e 's,@EXTENSION_FILE@,${EXTENSION_FILE},g'
+SUBST_SED.ext-ini+= -e 's,@EXTENSION_DIRECTIVE@,${EXTENSION_DIRECTIVE},g'
+SUBST_STAGE.ext-ini= post-build
+
PHPIZE?= ${BUILDLINK_PREFIX.php}/bin/phpize
PHP_CONFIG?= ${BUILDLINK_PREFIX.php}/bin/php-config
@@ -62,14 +79,18 @@ LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS}
MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS="${EXPORT_SYMBOLS_LDFLAGS}"
PLIST_SRC+= ${.CURDIR}/../../lang/php/PLIST.module
-MESSAGE_SRC= ${.CURDIR}/../../lang/php/MESSAGE.module
+MESSAGE_SRC+= ${.CURDIR}/../../lang/php/MESSAGE.module
MESSAGE_SUBST+= MODNAME=${PKGMODNAME}
-MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
+MESSAGE_SUBST+= EXT_CONF_DIR=${EXT_CONF_DIR}
.if !empty(PHP_ZEND_EXTENSION:U:M[Yy][Ye][Ss])
-MESSAGE_SUBST+= EXTENSION_DIRECTIVE=zend_extension
+EXTENSION_DIRECTIVE= zend_extension
+EXTENSION_FILE= ${PREFIX}/${PHP_EXTENSION_DIR}/${MODNAME}.${SHLIB_SUFFIX}
.else
-MESSAGE_SUBST+= EXTENSION_DIRECTIVE=extension
+EXTENSION_DIRECTIVE= extension
+EXTENSION_FILE= ${MODNAME}.${SHLIB_SUFFIX}
.endif
+MESSAGE_SUBST+= EXTENSION_DIRECTIVE=${EXTENSION_DIRECTIVE}
+MESSAGE_SUBST+= EXTENSION_FILE=${EXTENSION_FILE}
# Also include extension-specific message
.if exists(${.CURDIR}/MESSAGE)
@@ -97,6 +118,9 @@ phpize-module:
${TOUCH} ${TOUCH_FLAGS} $${cookie}; \
fi
+pre-build:
+ ${CP} ${.CURDIR}/../../lang/php/ext.ini ${WRKSRC}/${MODNAME}.ini
+
do-install: do-module-install
do-module-install:
@@ -104,6 +128,9 @@ do-module-install:
${INSTALL_LIB} ${MODULESDIR}/${PKGMODNAME}.${SHLIB_SUFFIX} \
${DESTDIR}${PREFIX}/${PHP_EXTENSION_DIR}
+ ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${MODNAME}.ini ${DESTDIR}${EGDIR}
+
.if defined(USE_PHP_EXT_PATCHES)
PATCHDIR= ${.CURDIR}/${PHPPKGSRCDIR}/patches
do-patch:
Added files:
Index: pkgsrc/lang/php/ext.ini
diff -u /dev/null pkgsrc/lang/php/ext.ini:1.1
--- /dev/null Sun Jul 17 15:49:44 2016
+++ pkgsrc/lang/php/ext.ini Sun Jul 17 15:49:44 2016
@@ -0,0 +1,2 @@
+;; enable @MODNAME@
+@EXTENSION_DIRECTIVE@= @EXTENSION_FILE@
Home |
Main Index |
Thread Index |
Old Index