pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/php Allow a directory to be excluded from PEAR_DI...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c549afd01ad7
branches:  trunk
changeset: 553349:c549afd01ad7
user:      abs <abs%pkgsrc.org@localhost>
date:      Mon Jan 19 19:55:02 2009 +0000

description:
Allow a directory to be excluded from PEAR_DIRRM by specifying PEAR_DIRRM_EXCLUDE

diffstat:

 lang/php/pear.mk        |   3 ++-
 lang/php/pear_plist.php |  11 ++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 8749235d276e -r c549afd01ad7 lang/php/pear.mk
--- a/lang/php/pear.mk  Mon Jan 19 18:06:46 2009 +0000
+++ b/lang/php/pear.mk  Mon Jan 19 19:55:02 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pear.mk,v 1.11 2008/06/12 00:20:10 joerg Exp $
+# $NetBSD: pear.mk,v 1.12 2009/01/19 19:55:02 abs Exp $
 #
 # This Makefile fragment is intended to be included by packages that build
 # and install pear packages.
@@ -46,6 +46,7 @@
        ${ECHO} "@comment The following lines are automatically generated"; \
        PEAR_LIB="${PEAR_LIB}" WRKSRC="${WRKSRC}" \
        PEAR_DIRRM_BASEDIR="${PEAR_DIRRM_BASEDIR}" \
+       PEAR_DIRRM_EXCLUDE="${PEAR_DIRRM_EXCLUDE}" \
        ${PREFIX}/bin/php -d include_path=".:${PREFIX}/lib/php" \
                -C -n ${PKGDIR}/../../lang/php/pear_plist.php;
 GENERATE_PLIST+=       ${PEAR_GENERATE_PLIST}
diff -r 8749235d276e -r c549afd01ad7 lang/php/pear_plist.php
--- a/lang/php/pear_plist.php   Mon Jan 19 18:06:46 2009 +0000
+++ b/lang/php/pear_plist.php   Mon Jan 19 19:55:02 2009 +0000
@@ -1,10 +1,11 @@
 <?php
-# $NetBSD: pear_plist.php,v 1.5 2007/10/09 19:19:10 martti Exp $
+# $NetBSD: pear_plist.php,v 1.6 2009/01/19 19:55:02 abs Exp $
 # Parses package XML file and outputs appropriate PLIST
 
 $PEAR_LIB = getenv('PEAR_LIB');
 $WRKSRC = getenv('WRKSRC');
 $PEAR_DIRRM_BASEDIR = getenv('PEAR_DIRRM_BASEDIR');
+$PEAR_DIRRM_EXCLUDE = getenv('PEAR_DIRRM_EXCLUDE');
 $dirrm = array();
 
 include_once "PEAR/Common.php";
@@ -59,6 +60,10 @@
 # directories are removed first
 $dirrm = array_keys($dirrm);
 rsort($dirrm);
-foreach($dirrm as $dir)
-       echo "@dirrm {$PEAR_LIB}/$dir\n";
+foreach($dirrm as $dir) {
+       $fulldir = "{$PEAR_LIB}/$dir";
+       if ($PEAR_DIRRM_EXCLUDE && substr($fulldir, 0, strlen($PEAR_DIRRM_EXCLUDE)) == $PEAR_DIRRM_EXCLUDE)
+               continue;
+       echo "@dirrm $fulldir\n";
+}
 ?>



Home | Main Index | Thread Index | Old Index