summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2009-01-19 19:55:02 +0000
committerabs <abs@pkgsrc.org>2009-01-19 19:55:02 +0000
commit3b173ae359a7ba8a8314bfca60d9fa0e9e143db4 (patch)
treed07c13289e5eba8ce125078d43f388c20e9b56eb /lang
parent525e56a28513d77f56bfe434771f1feb02c21287 (diff)
downloadpkgsrc-3b173ae359a7ba8a8314bfca60d9fa0e9e143db4.tar.gz
Allow a directory to be excluded from PEAR_DIRRM by specifying PEAR_DIRRM_EXCLUDE
Diffstat (limited to 'lang')
-rw-r--r--lang/php/pear.mk3
-rw-r--r--lang/php/pear_plist.php11
2 files changed, 10 insertions, 4 deletions
diff --git a/lang/php/pear.mk b/lang/php/pear.mk
index 78a7082ad66..e15d597b3b3 100644
--- a/lang/php/pear.mk
+++ b/lang/php/pear.mk
@@ -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 @@ PEAR_GENERATE_PLIST= \
${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 --git a/lang/php/pear_plist.php b/lang/php/pear_plist.php
index 5e188c686bc..fc34f920d80 100644
--- a/lang/php/pear_plist.php
+++ b/lang/php/pear_plist.php
@@ -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 @@ foreach($info['filelist'] as $f => $v) {
# 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";
+}
?>