diff options
author | mm <mm@FreeBSD.org> | 2011-07-07 20:17:05 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-07-07 20:17:05 +0800 |
commit | 4b2d83e0b93c2f9c28ecadca9c1a20ea4580df89 (patch) | |
tree | 063e6a7df0e2bdecfb6aa40221f084675a1a081d /devel | |
parent | fefcce72dc1f1476e606be466b97dc67007e5547 (diff) | |
download | freebsd-ports-gnome-4b2d83e0b93c2f9c28ecadca9c1a20ea4580df89.tar.gz freebsd-ports-gnome-4b2d83e0b93c2f9c28ecadca9c1a20ea4580df89.tar.zst freebsd-ports-gnome-4b2d83e0b93c2f9c28ecadca9c1a20ea4580df89.zip |
Make PKGNAMEPREFIX and DIST_SUBDIR definable in ports
Simplify pkg-deinstall
Diffstat (limited to 'devel')
-rw-r--r-- | devel/pear/bsd.pear.mk | 8 | ||||
-rw-r--r-- | devel/pear/pear-deinstall.in | 11 |
2 files changed, 6 insertions, 13 deletions
diff --git a/devel/pear/bsd.pear.mk b/devel/pear/bsd.pear.mk index fd646687316c..2e97515da9c6 100644 --- a/devel/pear/bsd.pear.mk +++ b/devel/pear/bsd.pear.mk @@ -5,13 +5,12 @@ MASTER_SITES?= http://pear.php.net/get/ \ http://us.pear.php.net/get/ \ http://de.pear.php.net/get/ -PKGNAMEPREFIX= pear- .if defined(PEAR_DIST_SUFX) EXTRACT_SUFX= ${PEAR_DIST_SUFX} .else EXTRACT_SUFX= .tgz .endif -DIST_SUBDIR= PEAR +DIST_SUBDIR?= PEAR RUN_DEPENDS+= pear:${PORTSDIR}/devel/pear @@ -26,9 +25,10 @@ NO_BUILD= yes .endif .if defined(PEAR_CHANNEL) && ${PEAR_CHANNEL} != "" -PKGNAMEPREFIX= pear-${PEAR_CHANNEL}- +PKGNAMEPREFIX?= pear-${PEAR_CHANNEL}- PEARPKGREF= ${PEAR_CHANNEL}/${PORTNAME} .else +PKGNAMEPREFIX?= pear- PEARPKGREF= ${PORTNAME} .endif @@ -61,7 +61,7 @@ LINSTDIR= ${LPEARDIR} .endif INSTDIR= ${PHP_BASE}/${LINSTDIR} -SUB_LIST+= PEAR_CHANNEL=${PEAR_CHANNEL} +SUB_LIST+= PKG_NAME=${PEARPKGREF} .if !defined(USE_PHPIZE) && !exists(${.CURDIR}/pkg-plist) PLIST= ${WRKDIR}/PLIST diff --git a/devel/pear/pear-deinstall.in b/devel/pear/pear-deinstall.in index de1886f48c4a..c7cd8c7840eb 100644 --- a/devel/pear/pear-deinstall.in +++ b/devel/pear/pear-deinstall.in @@ -8,14 +8,7 @@ if [ x$2 != xDEINSTALL ]; then exit fi -PKG_NAME=${1%%-[0-9._]*} -CHANNEL=%%PEAR_CHANNEL%% +PACKAGE=%%PKG_NAME%% PEAR=${PKG_PREFIX}/bin/pear -if [ -z "$CHANNEL" ]; then - PACKAGE=$(echo $PKG_NAME | sed "s/pear-//") - ${PEAR} uninstall -r -n ${PACKAGE} || true -else - PACKAGE=$(echo $PKG_NAME | sed "s/pear-${CHANNEL}-//") - ${PEAR} uninstall -r -n ${CHANNEL}/${PACKAGE} || true -fi +${PEAR} uninstall -r -n ${PACKAGE} || true |