pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc merge extension module handling for PHP4 and PHP5 into...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8387b9f12524
branches: trunk
changeset: 483048:8387b9f12524
user: jdolecek <jdolecek%pkgsrc.org@localhost>
date: Sat Nov 06 18:24:40 2004 +0000
description:
merge extension module handling for PHP4 and PHP5 into lang/php/ext.mk,
g/c no longer needed Makefile.module
add support for building extensions off PECL; version for PECL packages
is built as ${PHP_BASE_VERS}.${PECL_VERSION}, i.e. PECL pkg version 1.0
would become php-pkg-4.3.9.1.0 or php-pkg-5.0.2.1.0 respectively
diffstat:
lang/php/ext.mk | 80 ++++++++++++++++++++++++++++++++++++++++++++--
lang/php5/Makefile.module | 65 --------------------------------------
www/php4/Makefile.module | 72 ------------------------------------------
3 files changed, 76 insertions(+), 141 deletions(-)
diffs (238 lines):
diff -r 3bc2f78a61f8 -r 8387b9f12524 lang/php/ext.mk
--- a/lang/php/ext.mk Sat Nov 06 18:08:48 2004 +0000
+++ b/lang/php/ext.mk Sat Nov 06 18:24:40 2004 +0000
@@ -1,13 +1,85 @@
-# $NetBSD: ext.mk,v 1.1.1.1 2004/10/31 19:30:30 jdolecek Exp $
-# PHP wrapper, for module builds
+# $NetBSD: ext.mk,v 1.2 2004/11/06 18:24:40 jdolecek Exp $
+#
+# PHP extension package framework, for both PECL and bundled PHP extensions.
+#
+# Just include this file, define MODNAME, define PKGREVISION if necessary,
+# add dependencies, and add the appropriate --with-configure-arg, then include
+# bsd.pkg.mk.
.if !defined(PHPEXT_MK)
PHPEXT_MK= defined
.include "../../lang/php/phpversion.mk"
-.if (defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[nN][oO]))
-. include "${PHPPKGSRCDIR}/Makefile.module"
+.include "${PHPPKGSRCDIR}/Makefile.common"
+
+PKGMODNAME?= ${MODNAME:S/-/_/}
+MODULESDIR?= ${WRKSRC}/modules
+PLIST_SUBST+= MODNAME=${PKGMODNAME}
+
+.if !defined(PECL_VERSION)
+# bundled extension
+PKGNAME?= php-${MODNAME}-${PHP_BASE_VERS}
+EXTRACT_ELEMENTS?= ${DISTNAME}/ext/${PKGMODNAME}
+WRKSRC?= ${WRKDIR}/${EXTRACT_ELEMENTS}
+.else
+# PECL extension
+PKGNAME?= php-${MODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}
+MASTER_SITES= http://pecl.php.net/get/
+DISTNAME= ${MODNAME}-${PECL_VERSION}
+DIST_SUBDIR+= php-${MODNAME}
+DISTINFO_FILE= ${PKGDIR}/distinfo
+EXTRACT_SUFX= .tgz
.endif
+PHPIZE?= ${BUILDLINK_PREFIX.php}/bin/phpize
+PHP_CONFIG?= ${BUILDLINK_PREFIX.php}/bin/php-config
+
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS+= --with-php-config=${PHP_CONFIG}
+
+USE_CONFIG_WRAPPER= YES
+USE_LIBTOOL= YES
+
+# Ensure we export symbols in the linked shared object.
+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_SUBST+= MODNAME=${PKGMODNAME}
+MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
+
+pre-configure: phpize-module
+
+phpize-module:
+ @cookie=${WRKDIR}/.phpize_module_done; \
+ if [ ! -f $${cookie} ]; then \
+ cd ${WRKSRC} && \
+ ${SETENV} AUTOCONF=${AUTOCONF} AUTOHEADER=${AUTOHEADER} \
+ ACLOCAL=${ACLOCAL} \
+ LIBTOOLIZE=${LOCALBASE}/bin/libtoolize \
+ ${PHPIZE} && \
+ ${TOUCH} ${TOUCH_FLAGS} $${cookie}; \
+ fi
+
+do-install: do-module-install
+
+do-module-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/${PHP_EXTENSION_DIR}
+ ${INSTALL_DATA} ${MODULESDIR}/${PKGMODNAME}.so \
+ ${PREFIX}/${PHP_EXTENSION_DIR}
+
+.if defined(USE_PHP_EXT_PATCHES)
+PATCHDIR= ${.CURDIR}/${PHPPKGSRCDIR}/patches
+do-patch:
+ cd ${WRKSRC}; \
+ for p in `${EGREP} -l '^\+\+\+ ext/${MODNAME}/' ${PATCHDIR}/patch-*`;do\
+ ${SED} -e 's,^+++ ext/${MODNAME}/,+++ ,' $$p | ${PATCH}; \
+ done
+.endif
+
+.include "../../mk/automake.mk"
+.include "${PHPPKGSRCDIR}/buildlink3.mk"
+
.endif # PHPEXT_MK
diff -r 3bc2f78a61f8 -r 8387b9f12524 lang/php5/Makefile.module
--- a/lang/php5/Makefile.module Sat Nov 06 18:08:48 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-# $NetBSD: Makefile.module,v 1.5 2004/11/05 21:40:25 jdolecek Exp $
-
-.include "../../lang/php5/Makefile.common"
-
-PKGNAME?= php-${MODNAME}-${PHP_BASE_VERS}
-PKGREVISION?= # empty
-
-.include "../../mk/automake.mk"
-
-PKGMODNAME?= ${MODNAME:S/-/_/}
-MODULESDIR?= ${WRKSRC}/modules
-PLIST_SUBST+= MODNAME=${PKGMODNAME}
-
-EXTRACT_ELEMENTS?= ${DISTNAME}/ext/${PKGMODNAME}
-WRKSRC?= ${WRKDIR}/${EXTRACT_ELEMENTS}
-DISTINFO_FILE?= ${PKGDIR}/../../lang/php5/distinfo
-
-PHPIZE?= ${BUILDLINK_PREFIX.php}/bin/phpize
-PHP_CONFIG?= ${BUILDLINK_PREFIX.php}/bin/php-config
-
-GNU_CONFIGURE= YES
-CONFIGURE_ARGS+= --with-php-config=${PHP_CONFIG}
-
-USE_CONFIG_WRAPPER= YES
-USE_LIBTOOL= YES
-
-# Ensure we export symbols in the linked shared object.
-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_SUBST+= MODNAME=${PKGMODNAME}
-MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
-
-pre-configure: phpize-module
-
-phpize-module:
- @cookie=${WRKDIR}/.phpize_module_done; \
- if [ ! -f $${cookie} ]; then \
- cd ${WRKSRC} && \
- ${SETENV} AUTOCONF=${AUTOCONF} AUTOHEADER=${AUTOHEADER} \
- ACLOCAL=${ACLOCAL} \
- LIBTOOLIZE=${LOCALBASE}/bin/libtoolize \
- ${PHPIZE} && \
- ${TOUCH} ${TOUCH_FLAGS} $${cookie}; \
- fi
-
-do-install: do-module-install
-
-do-module-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/${PHP_EXTENSION_DIR}
- ${INSTALL_DATA} ${MODULESDIR}/${PKGMODNAME}.so \
- ${PREFIX}/${PHP_EXTENSION_DIR}
-
-.if defined(USE_PHP_EXT_PATCHES)
-PATCHDIR= ${PKGDIR}/../../lang/php5/patches
-do-patch:
- cd ${WRKSRC}; \
- for p in `${EGREP} -l '^\+\+\+ ext/${MODNAME}/' ${PATCHDIR}/patch-*`;do\
- ${SED} -e 's,^+++ ext/${MODNAME}/,+++ ,' $$p | ${PATCH}; \
- done
-.endif
-
-.include "../../lang/php5/buildlink3.mk"
diff -r 3bc2f78a61f8 -r 8387b9f12524 www/php4/Makefile.module
--- a/www/php4/Makefile.module Sat Nov 06 18:08:48 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-# $NetBSD: Makefile.module,v 1.29 2004/11/05 21:40:25 jdolecek Exp $
-#
-# This Makefile is provided to ease creating PHP4 packages for the extension
-# modules distributed in the PHP4 sources.
-#
-# Just include this file, define MODNAME, define PKGREVISION if necessary,
-# add dependencies, and add the appropriate --with-configure-arg, then include
-# bsd.pkg.mk.
-
-.include "../../www/php4/Makefile.common"
-
-PKGNAME?= php-${MODNAME}-${PHP_BASE_VERS}
-PKGREVISION?= # empty
-
-.include "../../mk/automake.mk"
-
-PKGMODNAME?= ${MODNAME:S/-/_/}
-MODULESDIR?= ${WRKSRC}/modules
-PLIST_SUBST+= MODNAME=${PKGMODNAME}
-
-EXTRACT_ELEMENTS?= ${DISTNAME}/ext/${PKGMODNAME}
-WRKSRC?= ${WRKDIR}/${EXTRACT_ELEMENTS}
-DISTINFO_FILE?= ${PKGDIR}/../../www/php4/distinfo
-
-PHPIZE?= ${BUILDLINK_PREFIX.php}/bin/phpize
-PHP_CONFIG?= ${BUILDLINK_PREFIX.php}/bin/php-config
-
-GNU_CONFIGURE= YES
-CONFIGURE_ARGS+= --with-php-config=${PHP_CONFIG}
-
-USE_CONFIG_WRAPPER= YES
-USE_LIBTOOL= YES
-
-# Ensure we export symbols in the linked shared object.
-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_SUBST+= MODNAME=${PKGMODNAME}
-MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
-
-pre-configure: phpize-module
-
-phpize-module:
- @cookie=${WRKDIR}/.phpize_module_done; \
- if [ ! -f $${cookie} ]; then \
- cd ${WRKSRC} && \
- ${SETENV} AUTOCONF=${AUTOCONF} AUTOHEADER=${AUTOHEADER} \
- ACLOCAL=${ACLOCAL} \
- LIBTOOLIZE=${LOCALBASE}/bin/libtoolize \
- ${PHPIZE} && \
- ${TOUCH} ${TOUCH_FLAGS} $${cookie}; \
- fi
-
-do-install: do-module-install
-
-do-module-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/${PHP_EXTENSION_DIR}
- ${INSTALL_DATA} ${MODULESDIR}/${PKGMODNAME}.so \
- ${PREFIX}/${PHP_EXTENSION_DIR}
-
-.if defined(USE_PHP_EXT_PATCHES)
-PATCHDIR= ${PKGDIR}/../../www/php4/patches
-do-patch:
- cd ${WRKSRC}; \
- for p in `${EGREP} -l '^\+\+\+ ext/${MODNAME}/' ${PATCHDIR}/patch-*`;do\
- ${SED} -e 's,^+++ ext/${MODNAME}/,+++ ,' $$p | ${PATCH}; \
- done
-.endif
-
-.include "../../www/php4/buildlink3.mk"
Home |
Main Index |
Thread Index |
Old Index