pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc use shared pear package support framework for both php...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0d585814d9b8
branches: trunk
changeset: 482688:0d585814d9b8
user: jdolecek <jdolecek%pkgsrc.org@localhost>
date: Mon Nov 01 19:55:57 2004 +0000
description:
use shared pear package support framework for both php4 & php5; based on
the former php4 version
diffstat:
lang/php/pear.mk | 56 +++++++++++++++++++++++++++++++++++++++++++++++++
lang/php/pear_plist.php | 50 +++++++++++++++++++++++++++++++++++++++++++
lang/php5/pear.mk | 55 ------------------------------------------------
www/php4/pear.mk | 55 ------------------------------------------------
www/php4/pear_plist.php | 50 -------------------------------------------
5 files changed, 106 insertions(+), 160 deletions(-)
diffs (286 lines):
diff -r ef07721bd36a -r 0d585814d9b8 lang/php/pear.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php/pear.mk Mon Nov 01 19:55:57 2004 +0000
@@ -0,0 +1,56 @@
+# $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.
+#
+# 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
+
+.include "../../mk/bsd.prefs.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
+
+# whether @dirrm for baseinstalldir should be included in PLIST
+PEAR_DIRRM_BASEDIR?= # empty
+
+# Dynamic PLIST, generated via a helper PHP script, which parses the package
+# XML config file.
+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}/../../lang/php/pear_plist.php;
+GENERATE_PLIST+= ${PEAR_GENERATE_PLIST}
+
+NO_BUILD= # defined
+
+post-extract:
+ @cd ${WRKSRC} && ${LN} -s ${WRKDIR}/package.xml
+
+do-install:
+ cd ${WRKSRC} && ${PEAR_CMD} install package.xml
+
+.include "../../lang/php/phpversion.mk"
+.include "${PHPPKGSRCDIR}/buildlink3.mk"
+
+.endif # _PEAR_PACKAGE_MK
diff -r ef07721bd36a -r 0d585814d9b8 lang/php/pear_plist.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php/pear_plist.php Mon Nov 01 19:55:57 2004 +0000
@@ -0,0 +1,50 @@
+<?php
+# $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');
+$WRKSRC = getenv('WRKSRC');
+$PEAR_DIRRM_BASEDIR = getenv('PEAR_DIRRM_BASEDIR');
+$dirrm = array();
+
+include_once "PEAR/Common.php";
+$obj = &new PEAR_Common;
+$info = $obj->infoFromAny("$WRKSRC/package.xml");
+$pkg = $info['package'];
+
+// output list of package files, in same order as specified in package
+echo "$PEAR_LIB/.registry/".strtolower($pkg).".reg\n";
+foreach($info['filelist'] as $f => $v) {
+ switch($v['role']) {
+ case 'test':
+ case 'doc':
+ $prefix = "$v[role]/$pkg/";
+ $dirrm["$v[role]/$pkg"] = true;
+ break;
+
+ case 'php':
+ default:
+ if (!empty($v['baseinstalldir']) && $v['baseinstalldir'] != '/') {
+ $prefix = $v['baseinstalldir'] . '/';
+
+ if ($PEAR_DIRRM_BASEDIR)
+ $dirrm[$v['baseinstalldir']] = true;
+ } else
+ $prefix = '';
+ break;
+ }
+
+
+ echo "{$PEAR_LIB}/{$prefix}{$f}\n";
+
+ while(($f = dirname($f)) && $f != '.')
+ $dirrm["{$prefix}{$f}"] = true;
+}
+
+// output @dirrm directives, in reverse order so that deeper
+// directories are removed first
+$dirrm = array_keys($dirrm);
+rsort($dirrm);
+foreach($dirrm as $dir)
+ echo "@dirrm {$PEAR_LIB}/$dir\n";
+?>
diff -r ef07721bd36a -r 0d585814d9b8 lang/php5/pear.mk
--- a/lang/php5/pear.mk Mon Nov 01 19:52:58 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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
diff -r ef07721bd36a -r 0d585814d9b8 www/php4/pear.mk
--- a/www/php4/pear.mk Mon Nov 01 19:52:58 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-# $NetBSD: pear.mk,v 1.9 2004/07/14 07:06:05 jdolecek 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
-
-.include "../../www/php4/buildlink3.mk"
-
-.include "../../mk/bsd.prefs.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
-
-# whether @dirrm for baseinstalldir should be included in PLIST
-PEAR_DIRRM_BASEDIR?= # empty
-
-# Dynamic PLIST, generated via a helper PHP script, which parses the package
-# XML config file.
-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;
-GENERATE_PLIST+= ${PEAR_GENERATE_PLIST}
-
-NO_BUILD= # defined
-
-post-extract:
- @cd ${WRKSRC} && ${LN} -s ${WRKDIR}/package.xml
-
-do-install:
- cd ${WRKSRC} && ${PEAR_CMD} install package.xml
-
-.endif # _PEAR_PACKAGE_MK
diff -r ef07721bd36a -r 0d585814d9b8 www/php4/pear_plist.php
--- a/www/php4/pear_plist.php Mon Nov 01 19:52:58 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-<?php
-# $NetBSD: pear_plist.php,v 1.1 2004/04/03 04:39:47 jdolecek Exp $
-# Parses package XML file and outputs appropriate PLIST
-
-$PEAR_LIB = getenv('PEAR_LIB');
-$WRKSRC = getenv('WRKSRC');
-$PEAR_DIRRM_BASEDIR = getenv('PEAR_DIRRM_BASEDIR');
-$dirrm = array();
-
-include_once "PEAR/Common.php";
-$obj = &new PEAR_Common;
-$info = $obj->infoFromAny("$WRKSRC/package.xml");
-$pkg = $info['package'];
-
-// output list of package files, in same order as specified in package
-echo "$PEAR_LIB/.registry/".strtolower($pkg).".reg\n";
-foreach($info['filelist'] as $f => $v) {
- switch($v['role']) {
- case 'test':
- case 'doc':
- $prefix = "$v[role]/$pkg/";
- $dirrm["$v[role]/$pkg"] = true;
- break;
-
- case 'php':
- default:
- if (!empty($v['baseinstalldir']) && $v['baseinstalldir'] != '/') {
- $prefix = $v['baseinstalldir'] . '/';
-
- if ($PEAR_DIRRM_BASEDIR)
- $dirrm[$v['baseinstalldir']] = true;
- } else
- $prefix = '';
- break;
- }
-
-
- echo "{$PEAR_LIB}/{$prefix}{$f}\n";
-
- while(($f = dirname($f)) && $f != '.')
- $dirrm["{$prefix}{$f}"] = true;
-}
-
-// output @dirrm directives, in reverse order so that deeper
-// directories are removed first
-$dirrm = array_keys($dirrm);
-rsort($dirrm);
-foreach($dirrm as $dir)
- echo "@dirrm {$PEAR_LIB}/$dir\n";
-?>
Home |
Main Index |
Thread Index |
Old Index