Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jul 2004 10:07:00 +0800 (CST)
From:      Xin LI <delphij@frontfree.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        ale@FreeBSD.org
Subject:   ports/68969: [PATCH] [UPDATE] Update devel/ZendOptimizer to 2.5.3
Message-ID:  <20040713020700.992981153D@beastie.frontfree.net>
Resent-Message-ID: <200407130210.i6D2AK0w010714@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         68969
>Category:       ports
>Synopsis:       [PATCH] [UPDATE] Update devel/ZendOptimizer to 2.5.3
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 13 02:10:20 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Xin LI
>Release:        FreeBSD 5.2-delphij i386
>Organization:
The FreeBSD Simplified Chinese Project
>Environment:
System: FreeBSD beastie.frontfree.net 5.2-delphij FreeBSD 5.2-delphij #80: Thu Jun 24 17:30:33 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386

>Description:
	ZendOptimizer has released 2.5.3 for a long time. This release brings support for php 5.0.0.
	Please review the attached patch, which will make the update for ZendOptimizer port.
>How-To-Repeat:
	N/A
>Fix:

	Apply the attached patch against devel/ZendOptimizer. To summarize, the patch:

	- Bumped the version from 2.5.1_1 -> 2.5.3
	- Mark broken with PHP 3.x
	- Detect OSVERSION earlier. This does not make functional changes,
	  but make the logic more clean.
	- Utilize bsd.php.mk (PREFIX/etc/php.conf)'s PHP_VER to support
	  both php 4.3.x and 5.0.0 (We need better mechanism to detect
	  php version, if possible)
	- Adjusted plist to include two new PDF files.

--- patch-ZendOptimizer begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/ZendOptimizer/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	28 Mar 2004 22:50:13 -0000	1.10
+++ Makefile	13 Jul 2004 01:59:57 -0000
@@ -6,10 +6,10 @@
 #
 
 PORTNAME=	ZendOptimizer
-PORTVERSION=	2.5.1
-PORTREVISION=	1
+PORTVERSION=	2.5.3
+PORTREVISION=	0
 CATEGORIES=	devel
-DISTNAME=	${PORTNAME}-${PORTVERSION}-FreeBSD${VER}-i386
+DISTNAME=	${PORTNAME}-${PORTVERSION}-freebsd${VER}-i386
 
 MAINTAINER=	ale@FreeBSD.org
 COMMENT=	An optimizer for PHP code
@@ -17,7 +17,7 @@
 ONLY_FOR_ARCHS=	i386
 NO_BUILD=	yes
 USE_PHP=	yes
-BROKEN_WITH_PHP=5
+BROKEN_WITH_PHP=3
 
 RESTRICTED=	"Redistribution of pre-compiled binaries is not permitted"
 
@@ -26,14 +26,14 @@
 .include <bsd.port.pre.mk>
 
 # Check for FreeBSD version
+.if ${OSVERSION} < 400000
+IGNORE=		"This port is for FreeBSD 4 or above"
+.else
 .if ${OSVERSION} < 500000
 VER=		4.0
 .else
 VER=		5.1
 .endif
-.if ${OSVERSION} < 400000
-IGNORE=		"This port is for FreeBSD 4 or above"
-.else
 # Check for ZendOptimizer sources
 .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
 ECHO_MSG=/usr/bin/printf
@@ -47,13 +47,23 @@
 .endif
 .endif
 
+.if ${PHP_VER} == 4
+ZEND_DISTPATH=	4_3_x
+ZEND_INSTPATH=	4.3.x
+.else
+ZEND_DISTPATH=	5_0_0
+ZEND_INSTPATH=	5.0.0
+.endif
+
+PLIST_SUB+=	ZEND_INSTPATH=${ZEND_INSTPATH}
+
 do-install:
-	@${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}/Optimizer/php-4.3.x
-	${INSTALL_DATA} ${WRKSRC}/data/4_3_x_comp/ZendOptimizer.so \
-		${PREFIX}/lib/php/${PHP_EXT_DIR}/Optimizer/php-4.3.x/ZendOptimizer.so
-	@${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}/Optimizer_TS/php-4.3.x
-	${INSTALL_DATA} ${WRKSRC}/data/4_3_x_comp/TS/ZendOptimizer.so \
-		${PREFIX}/lib/php/${PHP_EXT_DIR}/Optimizer_TS/php-4.3.x/ZendOptimizer.so
+	@${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}/Optimizer/php-${ZEND_INSTPATH}
+	${INSTALL_DATA} ${WRKSRC}/data/${ZEND_DISTPATH}_comp/ZendOptimizer.so \
+		${PREFIX}/lib/php/${PHP_EXT_DIR}/Optimizer/php-${ZEND_INSTPATH}/ZendOptimizer.so
+	@${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}/Optimizer_TS/php-${ZEND_INSTPATH}
+	${INSTALL_DATA} ${WRKSRC}/data/${ZEND_DISTPATH}_comp/TS/ZendOptimizer.so \
+		${PREFIX}/lib/php/${PHP_EXT_DIR}/Optimizer_TS/php-${ZEND_INSTPATH}/ZendOptimizer.so
 	${INSTALL_DATA} ${WRKSRC}/data/ZendExtensionManager.so \
 		${PREFIX}/lib/php/${PHP_EXT_DIR}
 	${INSTALL_DATA} ${WRKSRC}/data/ZendExtensionManager_TS.so \
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/devel/ZendOptimizer/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo	25 Mar 2004 23:08:47 -0000	1.3
+++ distinfo	13 Jul 2004 01:59:57 -0000
@@ -1,4 +1,4 @@
-MD5 (ZendOptimizer-2.5.1-FreeBSD4.0-i386.tar.gz) = 63dc38b28255982d3ec29c9d61567c90
-SIZE (ZendOptimizer-2.5.1-FreeBSD4.0-i386.tar.gz) = 1975000
-MD5 (ZendOptimizer-2.5.1-FreeBSD5.1-i386.tar.gz) = 735a0a675e252c77890bcc2448bcdba8
-SIZE (ZendOptimizer-2.5.1-FreeBSD5.1-i386.tar.gz) = 1914687
+MD5 (ZendOptimizer-2.5.3-freebsd4.0-i386.tar.gz) = aa907b69f7883f917e83214059b41980
+SIZE (ZendOptimizer-2.5.3-freebsd4.0-i386.tar.gz) = 2515561
+MD5 (ZendOptimizer-2.5.3-freebsd5.1-i386.tar.gz) = 2e5cd6afcdcf73a3e6e076ef9bdfd869
+SIZE (ZendOptimizer-2.5.3-freebsd5.1-i386.tar.gz) = 2339225
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/devel/ZendOptimizer/pkg-plist,v
retrieving revision 1.4
diff -u -r1.4 pkg-plist
--- pkg-plist	28 Mar 2004 22:50:13 -0000	1.4
+++ pkg-plist	13 Jul 2004 01:59:57 -0000
@@ -1,12 +1,14 @@
 lib/php/%%PHP_EXT_DIR%%/ZendExtensionManager_TS.so
 lib/php/%%PHP_EXT_DIR%%/ZendExtensionManager.so
-lib/php/%%PHP_EXT_DIR%%/Optimizer/php-4.3.x/ZendOptimizer.so
-lib/php/%%PHP_EXT_DIR%%/Optimizer_TS/php-4.3.x/ZendOptimizer.so
+lib/php/%%PHP_EXT_DIR%%/Optimizer/php-%%ZEND_INSTPATH%%/ZendOptimizer.so
+lib/php/%%PHP_EXT_DIR%%/Optimizer_TS/php-%%ZEND_INSTPATH%%/ZendOptimizer.so
 %%PORTDOCS%%%%DOCSDIR%%/ZendOptimizer_TechFAQ.pdf
 %%PORTDOCS%%%%DOCSDIR%%/ZendOptimizer_UserGuide.pdf
-@dirrm lib/php/%%PHP_EXT_DIR%%/Optimizer_TS/php-4.3.x
+%%PORTDOCS%%%%DOCSDIR%%/Zend_Optimizer_Tech_FAQ.pdf
+%%PORTDOCS%%%%DOCSDIR%%/Zend_Optimizer_User_Guide.pdf
+@dirrm lib/php/%%PHP_EXT_DIR%%/Optimizer_TS/php-%%ZEND_INSTPATH%%
 @dirrm lib/php/%%PHP_EXT_DIR%%/Optimizer_TS
-@dirrm lib/php/%%PHP_EXT_DIR%%/Optimizer/php-4.3.x
+@dirrm lib/php/%%PHP_EXT_DIR%%/Optimizer/php-%%ZEND_INSTPATH%%
 @dirrm lib/php/%%PHP_EXT_DIR%%/Optimizer
 @unexec rmdir %D/lib/php/%%PHP_EXT_DIR%% 2> /dev/null || true
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
--- patch-ZendOptimizer ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040713020700.992981153D>