summaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-02-24 05:27:41 +0000
committeredwin <edwin@FreeBSD.org>2003-02-24 05:27:41 +0000
commitdb62b47fa4214e30a42fe7615d788fd394634bb5 (patch)
treedfcae2d367617bc3d346263639d3aeee26bc545a /sysutils
parent5eeaa5840923c17a01e19598913ae6928e46ba4b (diff)
downloadFreeBSD-ports-db62b47fa4214e30a42fe7615d788fd394634bb5.zip
FreeBSD-ports-db62b47fa4214e30a42fe7615d788fd394634bb5.tar.gz
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>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/pear-File/Makefile16
-rw-r--r--sysutils/pear-File/pkg-deinstall13
-rw-r--r--sysutils/pear-File/pkg-plist1
-rw-r--r--sysutils/pear-Log/Makefile14
-rw-r--r--sysutils/pear-Log/pkg-deinstall13
5 files changed, 49 insertions, 8 deletions
diff --git a/sysutils/pear-File/Makefile b/sysutils/pear-File/Makefile
index 73117c0..ec6b664 100644
--- a/sysutils/pear-File/Makefile
+++ b/sysutils/pear-File/Makefile
@@ -7,6 +7,7 @@
PORTNAME= File
PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= sysutils www
MASTER_SITES= http://pear.php.net/get/
PKGNAMEPREFIX= pear-
@@ -16,8 +17,8 @@ DIST_SUBDIR= PEAR
MAINTAINER= ports@FreeBSD.org
COMMENT= PEAR common file and directory routines
-BUILD_DEPENDS= ${PEARDIR}.DIST_PHP:${PORTSDIR}/devel/pear-install
-RUN_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
@@ -25,14 +26,21 @@ NO_BUILD= yes
.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= ${PHP_BASE}/${LPHP_LIB}
PLIST_SUB= PEARDIR=${LPHP_LIB}
do-install:
@${CP} -Rp ${WRKSRC}/* ${PEARDIR}
- @${CHOWN} -R root:wheel ${PEARDIR}/${PORTNAME}*
- @${CHOWN} -R root:wheel ${PEARDIR}/tests
+ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PEARDIR}/${PORTNAME}*
+ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PEARDIR}/tests
+
+post-install:
+# Register a new package
+ @${PEAR} install -r -f ${WRKDIR}/package.xml
.include <bsd.port.post.mk>
diff --git a/sysutils/pear-File/pkg-deinstall b/sysutils/pear-File/pkg-deinstall
new file mode 100644
index 0000000..c17e9d1
--- /dev/null
+++ b/sysutils/pear-File/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
diff --git a/sysutils/pear-File/pkg-plist b/sysutils/pear-File/pkg-plist
index af92a14..85b9e5e 100644
--- a/sysutils/pear-File/pkg-plist
+++ b/sysutils/pear-File/pkg-plist
@@ -2,4 +2,3 @@
%%PEARDIR%%/File.php
%%PEARDIR%%/tests/parser.php
%%PEARDIR%%/tests/test.csv
-@dirrm %%PEARDIR%%/tests
diff --git a/sysutils/pear-Log/Makefile b/sysutils/pear-Log/Makefile
index 56088d3..f6d920d 100644
--- a/sysutils/pear-Log/Makefile
+++ b/sysutils/pear-Log/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Log
PORTVERSION= 1.5.3
+PORTREVISION= 1
CATEGORIES= sysutils www
MASTER_SITES= http://pear.php.net/get/
PKGNAMEPREFIX= pear-
@@ -16,8 +17,8 @@ DIST_SUBDIR= PEAR
MAINTAINER= ports@FreeBSD.org
COMMENT= PEAR logging utilities
-BUILD_DEPENDS= ${PEARDIR}.DIST_PHP:${PORTSDIR}/devel/pear-install
-RUN_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
@@ -25,13 +26,20 @@ NO_BUILD= yes
.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= ${PHP_BASE}/${LPHP_LIB}
PLIST_SUB= PEARDIR=${LPHP_LIB}
do-install:
@${CP} -Rp ${WRKSRC}/* ${PEARDIR}
- @${CHOWN} -R root:wheel ${PEARDIR}/${PORTNAME}*
+ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PEARDIR}/${PORTNAME}*
+
+post-install:
+# Register a new package
+ @${PEAR} install -r -f ${WRKDIR}/package.xml
.include <bsd.port.post.mk>
diff --git a/sysutils/pear-Log/pkg-deinstall b/sysutils/pear-Log/pkg-deinstall
new file mode 100644
index 0000000..c17e9d1
--- /dev/null
+++ b/sysutils/pear-Log/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
OpenPOWER on IntegriCloud