[Midnightbsd-cvs] mports: mports/www: add eaccelerator, a php byte code cache

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Oct 15 17:40:32 EDT 2008


Log Message:
-----------
add eaccelerator, a php byte code cache

Modified Files:
--------------
    mports/www:
        Makefile (r1.84 -> r1.85)

Added Files:
-----------
    mports/www/eaccelerator:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-plist (r1.1)
    mports/www/eaccelerator/files:
        patch-encoder.php (r1.1)
        pkg-message.in (r1.1)

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/www/Makefile,v
retrieving revision 1.84
retrieving revision 1.85
diff -L www/Makefile -L www/Makefile -u -r1.84 -r1.85
--- www/Makefile
+++ www/Makefile
@@ -15,6 +15,7 @@
     SUBDIR += cherokee
     SUBDIR += dillo
     SUBDIR += dummyflash
+    SUBDIR += eaccelerator
     SUBDIR += epiphany
     SUBDIR += epiphany-extensions
     SUBDIR += epiphany-webkit
--- /dev/null
+++ www/eaccelerator/pkg-descr
@@ -0,0 +1,14 @@
+eAccelerator is a opcode cache for PHP. It increases
+performance of PHP scripts by caching them in compiled state,
+so that the overhead of compiling is almost completely eliminated.
+Also it uses some optimizations for speed up of PHP scripts execution.
+eAccelerator typically reduces server load and increases
+the speed of your PHP code by 1-10 times.
+
+eAccelerator contains PHP encoder and loader. You can encode any PHP
+scripts with encoder to distribute them without sources. Encoded files
+can be run on any site which runs PHP with eAccelerator. The sources
+of encoded script can't be restored because they are stored in a compiled
+form and the encoded version doesn't contain the source. 
+
+WWW: http://eaccelerator.net/
--- /dev/null
+++ www/eaccelerator/pkg-plist
@@ -0,0 +1,7 @@
+%%ENCODER%%bin/encoder
+lib/php/%%PHP_EXT_DIR%%/eaccelerator.so
+ at dirrmtry lib/php/%%PHP_EXT_DIR%%
+%%EXAMPLESDIR%%/control.php
+%%EXAMPLESDIR%%/dasm.php
+%%EXAMPLESDIR%%/eaccelerator.ini
+ at dirrm %%EXAMPLESDIR%%
--- /dev/null
+++ www/eaccelerator/Makefile
@@ -0,0 +1,60 @@
+# New ports collection makefile for:	eaccelerator
+# Date created:			Sat Mar 1 13:55:55 CET 2003
+# Whom:				Alex Dupre <sysadmin at alexdupre.com>
+#
+# $MidnightBSD: mports/www/eaccelerator/Makefile,v 1.1 2008/10/15 21:40:29 laffer1 Exp $
+# $FreeBSD: ports/www/eaccelerator/Makefile,v 1.39 2008/06/18 12:26:58 ale Exp $
+#
+
+PORTNAME=	eaccelerator
+PORTVERSION=	0.9.5.3
+CATEGORIES=	www
+MASTER_SITES=	http://bart.eaccelerator.net/source/${PORTVERSION}/
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	An opcode cache for PHP with encoder and loader
+LICENSE=	gpl2
+
+USE_PHP=	session
+USE_PHPIZE=	yes
+USE_PHP_BUILD=	yes
+
+CONFIGURE_ARGS=	--enable-eaccelerator=shared \
+		--with-eaccelerator-shared-memory \
+		--with-eaccelerator-sessions \
+		--with-eaccelerator-content-caching \
+		--with-eaccelerator-userid=80
+
+USE_BZIP2=	yes
+SUB_FILES=	pkg-message
+PKGMESSAGE=	${WRKDIR}/pkg-message
+
+PORTDOCS=	*
+
+.include <bsd.port.pre.mk>
+
+CONFIGURE_ARGS+=	--without-eaccelerator-encoder
+PLIST_SUB+=		ENCODER="@comment "
+
+post-build:
+	@${SED} "s|%%LOCALBASE%%|${LOCALBASE}|g; s|0777|0755|g" \
+		${WRKSRC}/encoder.php > ${WRKSRC}/encoder
+.endif
+
+do-install:
+	@${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}
+	${INSTALL_DATA} ${WRKSRC}/modules/${PORTNAME}.so \
+	       ${PREFIX}/lib/php/${PHP_EXT_DIR}
+
+post-install:
+.if !defined(NOPORTDOCS)
+	@${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+.endif
+	@${MKDIR} ${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.ini ${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/control.php ${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/dasm.php ${EXAMPLESDIR}
+	@${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ www/eaccelerator/distinfo
@@ -0,0 +1,3 @@
+MD5 (eaccelerator-0.9.5.3.tar.bz2) = caf797223739516882f870342f74b935
+SHA256 (eaccelerator-0.9.5.3.tar.bz2) = aa4f0e7817e0193d698db71cc858f45461c2820266941ae2034eb1b82c379e45
+SIZE (eaccelerator-0.9.5.3.tar.bz2) = 555631
--- /dev/null
+++ www/eaccelerator/files/patch-encoder.php
@@ -0,0 +1,33 @@
+--- encoder.php.orig	Fri May  6 10:26:43 2005
++++ encoder.php	Thu Feb  2 09:39:47 2006
+@@ -1,10 +1,12 @@
++#!%%LOCALBASE%%/bin/php -f
++
+ <?php
+ $web_error = "";
+ 
+ function eaccelerator_encoder_usage() {
+-  echo "Usage:\tphp -q encoder.php [options] source_file_name\n";
+-  echo       "\tphp -q encoder.php [options] source_file_name...\n";
+-  echo       "\tphp -q encoder.php [options] source_directory_name...\n\n";
++  echo "Usage:\tencoder [options] source_file_name\n";
++  echo       "\tencoder [options] source_file_name...\n";
++  echo       "\tencoder [options] source_directory_name...\n\n";
+   echo "Options:\n";
+   echo "\t-s suffix\n\t\tencode files only with following suffix (default is \"php\")\n";
+   echo "\t-a\n\t\tencode all files (no by default)\n";
+@@ -17,10 +19,10 @@
+   echo               "\t\tfile name. If you encode directory or several files at once\n";
+   echo               "\t\tthen 'target' specifyes an output directory name.\n";
+   echo "\nExamples:\n";
+-  echo "\tphp -q encoder.php some_file.php\n";
+-  echo "\tphp -q encoder.php some_file.php -o some_encoded_file.php\n";
+-  echo "\tphp -q encoder.php *.php -o some_dir\n";
+-  echo "\tphp -q encoder.php ~/public_html/x -rcf -sphp -sinc -o ~/public_html/y\n";
++  echo "\tencoder some_file.php\n";
++  echo "\tencoder some_file.php -o some_encoded_file.php\n";
++  echo "\tencoder *.php -o some_dir\n";
++  echo "\tencoder ~/public_html/x -rcf -sphp -sinc -o ~/public_html/y\n";
+   echo "\n";
+   exit();
+ }
--- /dev/null
+++ www/eaccelerator/files/pkg-message.in
@@ -0,0 +1,11 @@
+You have installed the eaccelerator package.
+
+Edit %%LOCALBASE%%/etc/php.ini and add:
+
+zend_extension="%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/eaccelerator.so"
+
+Then create the cache directory:
+
+mkdir /tmp/eaccelerator
+chown www /tmp/eaccelerator
+chmod 0700 /tmp/eaccelerator


More information about the Midnightbsd-cvs mailing list