diff options
Diffstat (limited to 'devel/pear-HTML_Common')
-rw-r--r-- | devel/pear-HTML_Common/Makefile | 19 | ||||
-rw-r--r-- | devel/pear-HTML_Common/pkg-deinstall | 13 |
2 files changed, 29 insertions, 3 deletions
diff --git a/devel/pear-HTML_Common/Makefile b/devel/pear-HTML_Common/Makefile index b43449855ede..538db6f4d788 100644 --- a/devel/pear-HTML_Common/Makefile +++ b/devel/pear-HTML_Common/Makefile @@ -7,6 +7,7 @@ PORTNAME= HTML_Common PORTVERSION= 1.0 +PORTREVISION= 1 CATEGORIES= devel www MASTER_SITES= http://pear.php.net/get/ PKGNAMEPREFIX= pear- @@ -16,13 +17,21 @@ DIST_SUBDIR= PEAR MAINTAINER= ports@FreeBSD.org COMMENT= PEAR::HTML_Common is a base class for other HTML classes -BUILD_DEPENDS= ${PEARDIR}.DIST_PHP:${PORTSDIR}/devel/pear-install +BUILD_DEPENDS= ${PEARDIR}/PEAR.php.dist:${PORTSDIR}/devel/pear-PEAR RUN_DEPENDS= ${BUILD_DEPENDS} NO_BUILD= yes +.include <bsd.port.pre.mk> + +.if exists(${LOCALBASE}/bin/php-config) +PHP_BASE!= ${LOCALBASE}/bin/php-config --prefix +.else +PHP_BASE!= ${LOCALBASE} +.endif +PEAR= ${LOCALBASE}/bin/pear LPHP_LIB= lib/php -PEARDIR= ${LOCALBASE}/${LPHP_LIB} +PEARDIR= ${PHP_BASE}/${LPHP_LIB} PLIST_SUB= PEARDIR=${LPHP_LIB} do-install: @@ -30,4 +39,8 @@ do-install: @${CP} -Rp ${WRKSRC}/Common.php ${PEARDIR}/HTML @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PEARDIR}/HTML -.include <bsd.port.mk> +post-install: +# Register a new package + @${PEAR} install -r -f ${WRKDIR}/package.xml + +.include <bsd.port.post.mk> diff --git a/devel/pear-HTML_Common/pkg-deinstall b/devel/pear-HTML_Common/pkg-deinstall new file mode 100644 index 000000000000..c17e9d19ced0 --- /dev/null +++ b/devel/pear-HTML_Common/pkg-deinstall @@ -0,0 +1,13 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Remove package declaration from PEAR's registry. + +if [ x$2 != xDEINSTALL ]; then + exit +fi +PKG_NAME=${1%%-[0-9._]*} +PACKAGE=$(echo $PKG_NAME | sed 's/pear-//') + +${PKG_PREFIX}/bin/pear uninstall -r ${PACKAGE} || true |