diff options
author | jdolecek <jdolecek@pkgsrc.org> | 2004-11-01 19:55:57 +0000 |
---|---|---|
committer | jdolecek <jdolecek@pkgsrc.org> | 2004-11-01 19:55:57 +0000 |
commit | 7b5228a60f3566dad28e37e7d6e47721866b6d1c (patch) | |
tree | 1508499c23c75b13b3d4909b3b79bf912e9507d7 | |
parent | b7fe8d73e2b73be56972399a91392d4e92eaf105 (diff) | |
download | pkgsrc-7b5228a60f3566dad28e37e7d6e47721866b6d1c.tar.gz |
use shared pear package support framework for both php4 & php5; based on
the former php4 version
-rw-r--r-- | lang/php/pear.mk (renamed from www/php4/pear.mk) | 9 | ||||
-rw-r--r-- | lang/php/pear_plist.php (renamed from www/php4/pear_plist.php) | 2 | ||||
-rw-r--r-- | lang/php5/pear.mk | 55 |
3 files changed, 6 insertions, 60 deletions
diff --git a/www/php4/pear.mk b/lang/php/pear.mk index 3b0da82b87f..1c075a1fff7 100644 --- a/www/php4/pear.mk +++ b/lang/php/pear.mk @@ -1,4 +1,4 @@ -# $NetBSD: pear.mk,v 1.9 2004/07/14 07:06:05 jdolecek Exp $ +# $NetBSD: pear.mk,v 1.1 2004/11/01 19:55:57 jdolecek Exp $ # # This Makefile fragment is intended to be included by packages that build # and install pear packages. @@ -16,8 +16,6 @@ _PEAR_PACKAGE_MK= # defined USE_BUILDLINK3= YES -.include "../../www/php4/buildlink3.mk" - .include "../../mk/bsd.prefs.mk" EXTRACT_SUFX= .tgz @@ -41,7 +39,7 @@ PEAR_GENERATE_PLIST= \ ${ECHO} "@comment The following lines are automatically generated"; \ PEAR_LIB="${PEAR_LIB}" WRKSRC="${WRKSRC}" \ PEAR_DIRRM_BASEDIR="${PEAR_DIRRM_BASEDIR}" \ - ${PREFIX}/bin/php ${PKGDIR}/../../www/php4/pear_plist.php; + ${PREFIX}/bin/php ${PKGDIR}/../../lang/php/pear_plist.php; GENERATE_PLIST+= ${PEAR_GENERATE_PLIST} NO_BUILD= # defined @@ -52,4 +50,7 @@ post-extract: do-install: cd ${WRKSRC} && ${PEAR_CMD} install package.xml +.include "../../lang/php/phpversion.mk" +.include "${PHPPKGSRCDIR}/buildlink3.mk" + .endif # _PEAR_PACKAGE_MK diff --git a/www/php4/pear_plist.php b/lang/php/pear_plist.php index fc23bc99336..682a6a22ec4 100644 --- a/www/php4/pear_plist.php +++ b/lang/php/pear_plist.php @@ -1,5 +1,5 @@ <?php -# $NetBSD: pear_plist.php,v 1.1 2004/04/03 04:39:47 jdolecek Exp $ +# $NetBSD: pear_plist.php,v 1.1 2004/11/01 19:55:57 jdolecek Exp $ # Parses package XML file and outputs appropriate PLIST $PEAR_LIB = getenv('PEAR_LIB'); diff --git a/lang/php5/pear.mk b/lang/php5/pear.mk deleted file mode 100644 index 3d0be51e661..00000000000 --- a/lang/php5/pear.mk +++ /dev/null @@ -1,55 +0,0 @@ -# $NetBSD: pear.mk,v 1.2 2004/10/30 05:46:21 grant Exp $ -# -# This Makefile fragment is intended to be included by packages that build -# and install pear packages. -# -# If you don't know what pear is, you can visit: http://pear.php.net/ -# -# PEAR_CMD this is the actual script to execute to install the -# package. -# -# PEAR_LIB directory under ${PREFIX} where Pear modules are installed -# - -.if !defined(_PEAR_PACKAGE_MK) -_PEAR_PACKAGE_MK= # defined - -USE_BUILDLINK3= YES -BUILDLINK_DEPMETHOD.php5= full - -.include "../../lang/php5/buildlink3.mk" - -EXTRACT_SUFX= .tgz - -PKGNAME= pear-${DISTNAME} -CATEGORIES+= www - -MASTER_SITE_PEAR_PACKAGE+= \ - http://pear.php.net/get/ -MASTER_SITES+= ${MASTER_SITE_PEAR_PACKAGE} - -PEAR_CMD= ${PREFIX}/bin/pear -PEAR_LIB= lib/php - -_PEAR_PKG= ${DISTNAME:C/-.*//:tl} - -# Dynamic PLIST -# The package.xml 'parsing' is a bit crude, but enough for now. Eventually -# should write a small PHP script for this, using real XML parser. -PEAR_GENERATE_PLIST= \ - ${ECHO} "@comment The following lines are automatically generated"; \ - ${ECHO} "${PEAR_LIB}/.registry/${_PEAR_PKG}.reg"; \ - ${FGREP} '<file role="php"' ${WRKDIR}/package.xml | ${SED} -e 's,.*<file role="php",<,' -e 's,<.*baseinstalldir="\([^"]*\)",\1/<,' -e 's,<.* name=",,' -e 's,".*,,' -e "s,^/*,${PEAR_LIB}/,"; \ - ${FGREP} '<file role="php"' ${WRKDIR}/package.xml | ${SED} -e 's,.*<file role="php",<,' -e 's,<.*baseinstalldir="\([^"]*\)",\1/<,' -e 's,<.* name=",,' -e 's,".*,,' -e 's,//*,/,g' -e 's,/[^/]*$$,,' | ${FGREP} '/' | ${SORT} -ru | ${SED} -e "s,^,@dirrm ${PEAR_LIB}/,"; -GENERATE_PLIST+= ${PEAR_GENERATE_PLIST} - -NO_BUILD= # defined - -post-extract: - @cd ${WRKSRC} && ${LN} -s ${WRKDIR}/package.xml - cd ${WRKSRC} && ${PEAR_CMD} package-validate package.xml - -do-install: - cd ${WRKSRC} && ${PEAR_CMD} install package.xml - -.endif # _PEAR_PACKAGE_MK |