aboutsummaryrefslogtreecommitdiff
path: root/devel/pear-HTML_Select_Common
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-02-24 05:27:41 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-02-24 05:27:41 +0000
commit37408314394e95028d8b2c39c7a046743f4a8aff (patch)
tree2b6191d95df05d3c803b2b608388da8da19d5172 /devel/pear-HTML_Select_Common
parente9cbac30476d2a2b80b9d5e2de2698408bade36d (diff)
downloadports-37408314394e95028d8b2c39c7a046743f4a8aff.tar.gz
ports-37408314394e95028d8b2c39c7a046743f4a8aff.zip
PEAR ports: handling PEAR's registry.
PEAR uses a "registry" to register installed modules, and this registry is initialized during the installation of mod_php4 (since 4.3.0). Unfortunately, installing PEAR modules through the ports does not maintain this registry. This PR fix this problem for the following ports: - sysutils/pear-Log - devel/pear-PEAR - devel/pear-Date - devel/pear-I18N - devel/pear-HTML_Common - devel/pear-HTML_Select_Common - security/pear-Crypt_CBC - mail/pear-Mail_Mime - net/pear-Net_Sieve - sysutils/pear-File - archivers/pear-Archive_Tar PR: ports/47921 Submitted by: Thierry Thomas <thierry@pompo.net>
Notes
Notes: svn path=/head/; revision=76356
Diffstat (limited to 'devel/pear-HTML_Select_Common')
-rw-r--r--devel/pear-HTML_Select_Common/Makefile21
-rw-r--r--devel/pear-HTML_Select_Common/pkg-deinstall13
2 files changed, 30 insertions, 4 deletions
diff --git a/devel/pear-HTML_Select_Common/Makefile b/devel/pear-HTML_Select_Common/Makefile
index 8b2585136582..9f885a2e6c23 100644
--- a/devel/pear-HTML_Select_Common/Makefile
+++ b/devel/pear-HTML_Select_Common/Makefile
@@ -7,6 +7,7 @@
PORTNAME= HTML_Select_Common
PORTVERSION= 1.1
+PORTREVISION= 1
CATEGORIES= devel www
MASTER_SITES= http://pear.php.net/get/
PKGNAMEPREFIX= pear-
@@ -21,11 +22,21 @@ RUN_DEPENDS= ${PEARDIR}/HTML/Common.php:${PORTSDIR}/devel/pear-HTML_Common \
${PEARDIR}/I18N/Common.php:${PORTSDIR}/devel/pear-I18N
NO_BUILD= yes
+
EXAMPLESDIR= ${PREFIX}/share/examples/pear/${PORTNAME}
+.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}
+
MANIFEST= Country.php FRDepartements.php UKCounty.php USState.php
EXAMPLES= Country.php FRDepartements.php UKCounty.php USState.php
@@ -40,8 +51,6 @@ do-install:
# but should be removed with the next release.
@${CP} -p ${FILESDIR}/Select.php ${PEARDIR}/HTML
@${CHOWN} ${SHAREOWN}:${SHAREGRP} ${PEARDIR}/HTML/Select.php
-
-post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${EXAMPLESDIR}
.for FILE in ${EXAMPLES}
@@ -50,4 +59,8 @@ post-install:
@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
.endif
-.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_Select_Common/pkg-deinstall b/devel/pear-HTML_Select_Common/pkg-deinstall
new file mode 100644
index 000000000000..c17e9d19ced0
--- /dev/null
+++ b/devel/pear-HTML_Select_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