ports/52678: mail/pear-mailparse: chasing php4 upgrade (follow-up to PR ports/52596).
Thierry Thomas
thierry at pompo.net
Sun May 25 20:30:15 UTC 2003
>Number: 52678
>Category: ports
>Synopsis: mail/pear-mailparse: chasing php4 upgrade (follow-up to PR ports/52596).
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sun May 25 13:30:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Thierry Thomas
>Release: FreeBSD 4.8-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 4.8-STABLE FreeBSD 4.8-STABLE #0: Tue Apr 29 18:16:35 CEST 2003 thierry at graf.pompo.net:/usr/obj/mntsrc/src/sys/GRAF020727 i386
>Description:
Idem PR ports/52596, for mail/pear-mailparse.
Note: this PR supersedes PR ports/52655. It has been rewritten using
USE_PHPIZE from lang/php4/bsd.php.mk submitted by Alex dupre, and this
is much more cleaner!
>How-To-Repeat:
N/A.
>Fix:
Pre-requisites: to be applied after PR ports/52596 and PR ports/52655.
1) Apply a first patch to devel/pear-PEAR/Makefile.common:
--- pear-PEAR::Makefile.common.diff begins here ---
--- devel/pear-PEAR/Makefile.common.orig Fri May 23 22:19:42 2003
+++ devel/pear-PEAR/Makefile.common Sun May 25 21:55:32 2003
@@ -7,7 +7,9 @@
EXTRACT_SUFX= .tgz
DIST_SUBDIR= PEAR
+.if !defined(USE_PHPIZE)
NO_BUILD= yes
+.endif
.if exists(${LOCALBASE}/bin/php-config)
PHP_BASE!= ${LOCALBASE}/bin/php-config --prefix
--- pear-PEAR::Makefile.common.diff ends here ---
2) Apply the following patch:
--- pear-mailparse.diff begins here ---
diff -urN mail/pear-mailparse.orig/Makefile mail/pear-mailparse/Makefile
--- mail/pear-mailparse.orig/Makefile Sat Apr 12 08:47:43 2003
+++ mail/pear-mailparse/Makefile Sun May 25 22:05:17 2003
@@ -7,53 +7,35 @@
PORTNAME= mailparse
PORTVERSION= 0.9.1
+PORTREVISION= 1
CATEGORIES= mail www
-MASTER_SITES= http://pear.php.net/get/
-PKGNAMEPREFIX= pear-
-EXTRACT_SUFX= .tgz
-DIST_SUBDIR= PEAR
MAINTAINER= ports at FreeBSD.org
COMMENT= PEAR classes to create and decode MIME messages
-BUILD_DEPENDS= ${LOCALBASE}/bin/phpize:${PORTSDIR}/www/mod_php4 \
- ${PEARDIR}/PEAR.php.dist:${PORTSDIR}/devel/pear-PEAR
-RUN_DEPENDS= ${PEARDIR}/PEAR.php.dist:${PORTSDIR}/devel/pear-PEAR
+BUILD_DEPENDS= ${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear-PEAR
+RUN_DEPENDS= ${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear-PEAR
-USE_AUTOMAKE= yes
-USE_AUTOCONF= yes
-
-.include <bsd.port.pre.mk>
-
-# Don't call autoconf directly, ./buildconf does this
-GNU_CONFIGURE= yes
-USE_AUTOCONF= no
-USE_LIBTOOL= no
+USE_PHPIZE= yes
USE_REINPLACE= yes
-
REINPLACE_ARGS= -i.before_mailparse
+.include <bsd.port.pre.mk>
+.include "${.CURDIR}/../../lang/php4/bsd.php.mk"
+.include "${.CURDIR}/../../devel/pear-PEAR/Makefile.common"
+
.if exists(${LOCALBASE}/bin/php-config)
-PHP_BASE!= ${LOCALBASE}/bin/php-config --prefix
EXT_DIR!= ${LOCALBASE}/bin/php-config --extension-dir | ${SED} -e \
"s:${PHP_BASE}/::"
-.else
-PHP_BASE= ${LOCALBASE}
.endif
-PEAR= ${LOCALBASE}/bin/pear
-LPHP_LIB= lib/php
PHP_DIR?= ${LOCALBASE}/etc
PHP_INI= ${PHP_DIR}/php.ini
-PEARDIR= ${PHP_BASE}/${LPHP_LIB}
-PLIST_SUB= EXTDIR=${EXT_DIR} PEARDIR=${LPHP_LIB}
+PLIST_SUB+= EXTDIR=${EXT_DIR}
DOCSDIR= ${PEARDIR}/docs/${PORTNAME}
DOCS= CREDITS README try.php
TESTDIR= ${PEARDIR}/tests/${PORTNAME}
-post-patch:
- (cd ${WRKSRC} && ${LOCALBASE}/bin/phpize)
-
pre-configure:
@if ! ${LOCALBASE}/bin/php -i | ${GREP} -q -e "--enable-mbstring"; then \
${ECHO_MSG} "" ; \
@@ -62,7 +44,7 @@
${FALSE} ; \
fi
-post-install:
+post-install-script:
@${STRIP_CMD} ${PHP_BASE}/${EXT_DIR}/mailparse.so
# Configure extension_dir
@if [ ! -f ${PHP_INI} ]; then \
@@ -85,7 +67,5 @@
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TESTDIR}
@${ECHO_MSG} "===> Examples installed in ${TESTDIR}."
.endif
-# Register a new package
- @${PEAR} install -r -f ${WRKDIR}/package.xml
.include <bsd.port.post.mk>
diff -urN mail/pear-mailparse.orig/pkg-deinstall mail/pear-mailparse/pkg-deinstall
--- mail/pear-mailparse.orig/pkg-deinstall Mon Feb 24 06:51:29 2003
+++ mail/pear-mailparse/pkg-deinstall Thu Jan 1 01:00:00 1970
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/mail/pear-mailparse/pkg-deinstall,v 1.1 2003/02/24 05:51:29 edwin Exp $
-#
-# 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 -urN mail/pear-mailparse.orig/pkg-plist mail/pear-mailparse/pkg-plist
--- mail/pear-mailparse.orig/pkg-plist Sun Feb 9 23:12:30 2003
+++ mail/pear-mailparse/pkg-plist Fri May 2 23:47:51 2003
@@ -1,4 +1,5 @@
%%EXTDIR%%/mailparse.so
+%%PKGREGDIR%%/package.xml
%%PORTDOCS%%%%PEARDIR%%/docs/mailparse/CREDITS
%%PORTDOCS%%%%PEARDIR%%/docs/mailparse/README
%%PORTDOCS%%%%PEARDIR%%/docs/mailparse/try.php
@@ -22,3 +23,4 @@
%%PORTDOCS%%@dirrm %%PEARDIR%%/docs/mailparse
%%PORTDOCS%%@dirrm %%PEARDIR%%/tests/mailparse/tests/testdata
%%PORTDOCS%%@dirrm %%PEARDIR%%/tests/mailparse/tests/
+ at dirrm %%PKGREGDIR%%
--- pear-mailparse.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list