diff options
author | Ole Markus With <olemarkus@gentoo.org> | 2011-03-13 08:08:22 +0000 |
---|---|---|
committer | Ole Markus With <olemarkus@gentoo.org> | 2011-03-13 08:08:22 +0000 |
commit | 3dee0b2f8c02893cf1734c48f17f1fac57a1d534 (patch) | |
tree | f3e4b2dc6eea51d283237cbc8fd888ff54ec9e72 /dev-php/eaccelerator | |
parent | Fix compability with x11-libs/libnotify >= 0.7 wrt #357877 by Justin Lecher. (diff) | |
download | historical-3dee0b2f8c02893cf1734c48f17f1fac57a1d534.tar.gz historical-3dee0b2f8c02893cf1734c48f17f1fac57a1d534.tar.bz2 historical-3dee0b2f8c02893cf1734c48f17f1fac57a1d534.zip |
Moved from dev-php5/eaccelerator
Package-Manager: portage-2.1.9.25/cvs/Linux i686
RepoMan-Options: --force
Diffstat (limited to 'dev-php/eaccelerator')
-rw-r--r-- | dev-php/eaccelerator/ChangeLog | 169 | ||||
-rw-r--r-- | dev-php/eaccelerator/Manifest | 11 | ||||
-rw-r--r-- | dev-php/eaccelerator/eaccelerator-0.9.5.3-r1.ebuild | 125 | ||||
-rw-r--r-- | dev-php/eaccelerator/eaccelerator-0.9.6.1-r1.ebuild | 93 | ||||
-rw-r--r-- | dev-php/eaccelerator/eaccelerator-0.9.6.1-r3.ebuild | 93 | ||||
-rw-r--r-- | dev-php/eaccelerator/eaccelerator-0.9.6.1.ebuild | 100 | ||||
-rw-r--r-- | dev-php/eaccelerator/eaccelerator-0.9.6.ebuild | 100 | ||||
-rw-r--r-- | dev-php/eaccelerator/files/eaccelerator-remove-encoder.patch | 417 | ||||
-rw-r--r-- | dev-php/eaccelerator/metadata.xml | 12 |
9 files changed, 1120 insertions, 0 deletions
diff --git a/dev-php/eaccelerator/ChangeLog b/dev-php/eaccelerator/ChangeLog new file mode 100644 index 000000000000..3c469a84eb22 --- /dev/null +++ b/dev-php/eaccelerator/ChangeLog @@ -0,0 +1,169 @@ +# ChangeLog for dev-php5/eaccelerator +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/ChangeLog,v 1.20 2011/03/13 08:08:22 olemarkus Exp $ + +*eaccelerator-0.9.6.1-r3 (05 Jan 2011) + + 05 Jan 2011; Ole Markus With <olemarkus@gentoo.org> + -eaccelerator-0.9.6.1-r2.ebuild, +eaccelerator-0.9.6.1-r3.ebuild: + Fixed bug 350741. Thanks to Daniel T. + + 04 Jan 2011; Markos Chandras <hwoarang@gentoo.org> + eaccelerator-0.9.6.1-r1.ebuild: + Stable on amd64 wrt bug #349659 + +*eaccelerator-0.9.6.1-r2 (04 Jan 2011) + + 04 Jan 2011; Ole Markus With <olemarkus@gentoo.org> + +eaccelerator-0.9.6.1-r2.ebuild: + Fixes bug 350450 + + 04 Jan 2011; Christian Faulhammer <fauli@gentoo.org> + eaccelerator-0.9.6.1-r1.ebuild: + stable x86, bug 349659 + + 28 Nov 2010; Markos Chandras <hwoarang@gentoo.org> + eaccelerator-0.9.6.1.ebuild: + Stable on amd64 wrt bug #343227 + + 24 Nov 2010; Christian Faulhammer <fauli@gentoo.org> + eaccelerator-0.9.6.1.ebuild: + stable x86, bug 343227 + +*eaccelerator-0.9.6.1-r1 (03 Nov 2010) + + 03 Nov 2010; <olemarkus@gentoo.org> +eaccelerator-0.9.6.1-r1.ebuild: + Added a version that supports minor version slotting + + 23 Oct 2010; <olemarkus@gentoo.org> eaccelerator-0.9.6.1.ebuild: + Swapped depending on specific httpd SAPI's with virtual/httpd-php. Thanks to Andrey Yurchuk for notifying + and testing. + + 26 Sep 2010; <olemarkus@gentoo.org> eaccelerator-0.9.5.3-r1.ebuild, + eaccelerator-0.9.6.ebuild, eaccelerator-0.9.6.1.ebuild: + Now correctly installs extension as a regular extension. Fixes bug #338533 + +*eaccelerator-0.9.6.1 (02 Aug 2010) + + 02 Aug 2010; Matti Bickel <mabi@gentoo.org> +eaccelerator-0.9.6.1.ebuild: + version bump (bug #330465) + +*eaccelerator-0.9.6 (22 Apr 2010) + + 22 Apr 2010; <mabi@gentoo.org> +eaccelerator-0.9.6.ebuild: + bump (bug #304289), provided by Ole Markus With + +*eaccelerator-0.9.5.3-r1 (14 Aug 2009) + + 14 Aug 2009; Alex Legler <a3li@gentoo.org> -eaccelerator-0.9.5.1.ebuild, + -files/eaccelerator-0.9.5.1-optimize-catch-exceptions.patch, + -eaccelerator-0.9.5.3.ebuild, +eaccelerator-0.9.5.3-r1.ebuild, + +files/eaccelerator-remove-encoder.patch: + Non-mainatiner commit: Removing encoder because it a) contains a + vulnerabilitiy and b) is already deprecated by upstream and will be gone + anyway in the next upstream release. Security bug 277293. Removing + vulnerable versions. + + 26 May 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + eaccelerator-0.9.5.1.ebuild, eaccelerator-0.9.5.3.ebuild: + Call depend.apache_pkg_setup() in pkg_setup() (bug #268371). + +*eaccelerator-0.9.5.3 (03 Jun 2008) + + 03 Jun 2008; Luca Longinotti <chtekk@gentoo.org> + +eaccelerator-0.9.5.3.ebuild: + Version bump. + + 09 May 2008; Christian Hoffmann <hoffie@gentoo.org> + eaccelerator-0.9.5.1.ebuild: + explicitly call phpize, not src_unpack (bug 220519) + + 07 May 2008; Christian Hoffmann <hoffie@gentoo.org> + eaccelerator-0.9.5.1.ebuild: + call php-ext-source-r1_src_unpack, bug 220519 + + 20 Aug 2007; Markus Ullmann <jokey@gentoo.org> + +files/eaccelerator-0.9.5.1-optimize-catch-exceptions.patch, + eaccelerator-0.9.5.1.ebuild: + Porting from project overlay + + 20 Aug 2007; Jakub Moc <jakub@gentoo.org> eaccelerator-0.9.5.1.ebuild: + This ebuild mistakenly assumed that apache user and group exist. Make + HTTPD_{USER,GROUP} configurable and fix pkg_setup accordingly. + + 20 Aug 2007; Jakub Moc <jakub@gentoo.org> + +files/eaccelerator-0.9.5.1-optimize-catch-exceptions.patch, + +metadata.xml, +eaccelerator-0.9.5.1.ebuild: + Add patch for Bug 184439 + +*eaccelerator-0.9.5.1 (12 May 2007) + + 12 May 2007; Luca Longinotti <chtekk@gentoo.org> + -eaccelerator-0.9.5.ebuild, +eaccelerator-0.9.5.1.ebuild: + Fix bug #170023. + Fix require_php_sapi_from usage wrt apache1. + + 06 Mar 2007; Luca Longinotti <chtekk@gentoo.org> + eaccelerator-0.9.5.ebuild: + Cleanup. Fix bug #156414. + + 28 Jan 2007; Marius Mauch <genone@gentoo.org> eaccelerator-0.9.5.ebuild: + Replacing einfo with elog + + 10 Nov 2006; Gustavo Zacarias <gustavoz@gentoo.org> + eaccelerator-0.9.5.ebuild: + Keyworded ~sparc wrt #149938 + + 15 Oct 2006; Luca Longinotti <chtekk@gentoo.org> + eaccelerator-0.9.5.ebuild: + Different cache dirs for PHP4/PHP5. + + 15 Oct 2006; Luca Longinotti <chtekk@gentoo.org> + eaccelerator-0.9.5.ebuild: + Fix file collisions. + + 14 Oct 2006; Luca Longinotti <chtekk@gentoo.org> + eaccelerator-0.9.5.ebuild: + Fix failure when using SysV semaphores. + + 14 Oct 2006; Luca Longinotti <chtekk@gentoo.org> + eaccelerator-0.9.5.ebuild: + Fix deps. + + 14 Oct 2006; Luca Longinotti <chtekk@gentoo.org> + eaccelerator-0.9.5.ebuild: + Fixup ebuild. + +*eaccelerator-0.9.5 (11 Oct 2006) + + 11 Oct 2006; Sebastian Bergmann <sebastian@gentoo.org> + -eaccelerator-0.9.5_rc1.ebuild, +eaccelerator-0.9.5.ebuild: + Version bump, remove release candidate. + + 21 Aug 2006; Luca Longinotti <chtekk@gentoo.org> + -eaccelerator-0.9.5_beta2.ebuild, eaccelerator-0.9.5_rc1.ebuild: + Fix bug #144328. + +*eaccelerator-0.9.5_rc1 (26 Jul 2006) + + 26 Jul 2006; Konstantin Arkhipov <voxus@gentoo.org> + +eaccelerator-0.9.5_rc1.ebuild: + Bump. + + 18 Jul 2006; Konstantin Arkhipov <voxus@gentoo.org> + eaccelerator-0.9.5_beta2.ebuild: + Added ~amd64 keyword. + +*eaccelerator-0.9.5_beta2 (12 Apr 2006) + + 12 Apr 2006; Luca Longinotti <chtekk@gentoo.org> + -eaccelerator-0.9.5_beta1.ebuild, +eaccelerator-0.9.5_beta2.ebuild: + Version bump, add some new USE flags for features that were changed, update + the ebuild accordingly. + +*eaccelerator-0.9.5_beta1 (05 Mar 2006) + + 05 Mar 2006; Sebastian Bergmann <sebastian@gentoo.org> +metadata.xml, + +eaccelerator-0.9.5_beta1.ebuild: + Initial ebuild. + diff --git a/dev-php/eaccelerator/Manifest b/dev-php/eaccelerator/Manifest new file mode 100644 index 000000000000..e21c3d9b857c --- /dev/null +++ b/dev-php/eaccelerator/Manifest @@ -0,0 +1,11 @@ +AUX eaccelerator-remove-encoder.patch 14612 RMD160 553c8681f82d95962e2f94be1083ae5bc7a0eb53 SHA1 c144550a94ddf51675fea631d37272fc711f690b SHA256 ddc22103c0e4bf0d348b14407e95ef566a557a5ad23fa56f35db0b71bc643b61 +DIST eaccelerator-0.9.5.3.tar.bz2 555631 RMD160 9da55beec18e7a36761b5556d3bb4d5292d21650 SHA1 6671a105497f41c4e93e0b84da516b72df159fc5 SHA256 aa4f0e7817e0193d698db71cc858f45461c2820266941ae2034eb1b82c379e45 +DIST eaccelerator-0.9.6.1.tar.bz2 106049 RMD160 6a16ab377ec124a27e26a5fdc1fd6ada845695bd SHA1 c95e87229a6e674b4994d4fc13278e516ea314f9 SHA256 33703ad1678cdb65ef0cd28fbd2e262ef5d9f201f9016de26b7254987deba53c +DIST eaccelerator-0.9.6.tar.bz2 105833 RMD160 86320cbafa31f4b6db308c55035bbf057325a708 SHA1 65594917d0efa754d35760d2cde8701ffaa2914a SHA256 ab1f309078d04ede3297b96f6c2689104e349e11e61376866f59c983ddde9a56 +EBUILD eaccelerator-0.9.5.3-r1.ebuild 4436 RMD160 bc5cf3d4af2216d38963fa47f58519c568cd9df0 SHA1 0f03c264b86b5103fd48d6227527354762565045 SHA256 ba548d845ca4aceffab82032a39ae7463f8965f97bb41ca6de952d162dc08cbc +EBUILD eaccelerator-0.9.6.1-r1.ebuild 3421 RMD160 1aff30d4b3ef344d40d27256fed09cb04cf96fe1 SHA1 ce3e70fa2a3c5dac516dd9c761c9fd860159001c SHA256 e73b41cb34654564e58aed4a649e76f4eadfb2c72cd258384e09ba0095fa5ac1 +EBUILD eaccelerator-0.9.6.1-r3.ebuild 3425 RMD160 5a34998c9cb2f65407535f89d2f367541777c15e SHA1 8eddfcb0d1e5743e6df036118e381e1e709dbca1 SHA256 f580f7a06a14c08a736e14027ccc99e9ab1cb0d2b356e1eadfc0675f6656f435 +EBUILD eaccelerator-0.9.6.1.ebuild 3457 RMD160 def5840fe4b12281b34af2471c50f0b3f4e264c1 SHA1 7e00a47ef19fb6d46b089d26e7208a568116fc3e SHA256 5d584d6813a9943c1eaa8c85f8a37ccca80e023dec731510c150a887886320a8 +EBUILD eaccelerator-0.9.6.ebuild 3509 RMD160 877c06fe879351b854f35f446896e83f6c79768c SHA1 a37e88031ddfbad3940bb5805a71a02a34958c72 SHA256 8b01bc7abd356ea368a14be9c155624984b57431d4b2865f31215e0d167e4572 +MISC ChangeLog 5689 RMD160 db6534a646aad9bc8cbfd3b45f31782243f4d6af SHA1 e4afad0c03994b47e31d17fc8e9dc9591c078899 SHA256 aaaca538a928375cf3cab95d34f138bbbc6291d4894f88cc80b804c0dc7fde6d +MISC metadata.xml 482 RMD160 3f0e4bf32cf90bbaebc348aa734c2fbabf065b0c SHA1 6cdfaa3d1e838e8c058d360fa1c6de52bfa9e9da SHA256 3e049a6d7ac92b1aef6095e29064ffce5aa56eaac36bf60c64e42e3da46fb07c diff --git a/dev-php/eaccelerator/eaccelerator-0.9.5.3-r1.ebuild b/dev-php/eaccelerator/eaccelerator-0.9.5.3-r1.ebuild new file mode 100644 index 000000000000..149020fb1c18 --- /dev/null +++ b/dev-php/eaccelerator/eaccelerator-0.9.5.3-r1.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/eaccelerator-0.9.5.3-r1.ebuild,v 1.1 2011/03/13 08:08:22 olemarkus Exp $ + +PHP_EXT_NAME="eaccelerator" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" + +[[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/" + +inherit php-ext-source-r1 eutils depend.apache autotools + +KEYWORDS="~amd64 ~sparc ~x86" + +DESCRIPTION="A PHP Accelerator & Encoder." +HOMEPAGE="http://www.eaccelerator.net/" +SRC_URI="http://bart.eaccelerator.net/source/${PV}/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +IUSE="contentcache debug disassembler inode session sharedmem" + +DEPEND="!dev-php5/pecl-apc !dev-php5/xcache" +RDEPEND="${DEPEND}" + +# Webserver user and group, here for Apache by default +HTTPD_USER="${HTTPD_USER:-apache}" +HTTPD_GROUP="${HTTPD_GROUP:-apache}" + +need_php_by_category +want_apache + +pkg_setup() { + depend.apache_pkg_setup + + has_php + + require_php_sapi_from cgi apache2 + + if use session ; then + require_php_with_use session zlib + else + require_php_with_use zlib + fi + + if ! use apache2 ; then + if [[ ${HTTPD_USER} == "apache" ]] || [[ ${HTTPD_GROUP} == "apache" ]] ; then + eerror "You did not enable apache2 USE flag, so you need to define" + eerror "the user and group that will be used for ${PN} yourself." + eerror + eerror "This should (generally) match the user and group that your webserver uses, e.g.:" + eerror "HTTPD_USER=\"lighttpd\" HTTPD_GROUP=\"lighttpd\" if using www-servers/lighttpd" + eerror + die "Either enable USE=\"apache2\" or re-emerge this with HTTPD_USER and HTTPD_GROUP set" + else + enewgroup ${HTTPD_GROUP} + enewuser ${HTTPD_USER} -1 -1 /var/www ${HTTPD_GROUP} + fi + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Remove the badly broken encoder, already done by upstream in SVN trunk + # Also needed for security bug 277293. + rm loader.c encoder.{php,c} doc/php/{loader,encoder}.php || die "Cannot remove encoder" + epatch "${FILESDIR}/${PN}-remove-encoder.patch" + + eautoconf + eautomake + php-ext-source-r1_phpize +} + +src_compile() { + has_php + + my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`" + + use contentcache && my_conf="${my_conf} --with-eaccelerator-content-caching" + use debug && my_conf="${my_conf} --with-eaccelerator-debug" + use disassembler && my_conf="${my_conf} --with-eaccelerator-disassembler" + ! use inode && my_conf="${my_conf} --without-eaccelerator-use-inode" + use session && my_conf="${my_conf} --with-eaccelerator-sessions" + use sharedmem && my_conf="${my_conf} --with-eaccelerator-shared-memory" + + php-ext-source-r1_src_compile +} + +src_install() { + php-ext-source-r1_src_install + + keepdir "${EACCELERATOR_CACHEDIR}" + fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}" + fperms 750 "${EACCELERATOR_CACHEDIR}" + + insinto "/usr/share/${PN}-php5/" + doins -r doc/php/ + dodoc-php AUTHORS ChangeLog COPYING NEWS README README.eLoader + + php-ext-base-r1_addtoinifiles "eaccelerator.shm_size" '"28"' + php-ext-base-r1_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\"" + php-ext-base-r1_addtoinifiles "eaccelerator.enable" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.optimizer" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.debug" '"0"' + php-ext-base-r1_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"' + php-ext-base-r1_addtoinifiles "eaccelerator.check_mtime" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.filter" '""' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_max" '"0"' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_ttl" '"0"' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_prune_period" '"0"' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_only" '"0"' + php-ext-base-r1_addtoinifiles "eaccelerator.compress" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.compress_level" '"9"' + php-ext-base-r1_addtoinifiles "eaccelerator.keys" '"shm_and_disk"' + php-ext-base-r1_addtoinifiles "eaccelerator.sessions" '"shm_and_disk"' + php-ext-base-r1_addtoinifiles "eaccelerator.content" '"shm_and_disk"' + php-ext-base-r1_addtoinifiles ";eaccelerator.allowed_admin_path" '"/path/where/admin/files/shall/be/allowed"' +} + +pkg_postinst() { + elog "Please see the files in ${ROOT}usr/share/${PN}-php5/ for some" + elog "examples and informations on how to use the functions that" + elog "eAccelerator adds to PHP." +} diff --git a/dev-php/eaccelerator/eaccelerator-0.9.6.1-r1.ebuild b/dev-php/eaccelerator/eaccelerator-0.9.6.1-r1.ebuild new file mode 100644 index 000000000000..28d21bceec5f --- /dev/null +++ b/dev-php/eaccelerator/eaccelerator-0.9.6.1-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/eaccelerator-0.9.6.1-r1.ebuild,v 1.1 2011/03/13 08:08:22 olemarkus Exp $ + +PHP_EXT_NAME="eaccelerator" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" + +EAPI="2" + +[[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/" + +inherit php-ext-source-r2 eutils depend.apache + +KEYWORDS="amd64 x86" + +DESCRIPTION="A PHP Accelerator & Encoder." +HOMEPAGE="http://www.eaccelerator.net/" +SRC_URI="http://bart.eaccelerator.net/source/${PV}/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +IUSE="debug disassembler inode doccommentinclusion session" + +DEPEND="!dev-php5/pecl-apc !dev-php5/xcache" +RDEPEND="${DEPEND} + >=dev-lang/php-5.1[zlib,session?] + virtual/httpd-php +" + +# Webserver user and group, here for Apache by default +HTTPD_USER="${HTTPD_USER:-apache}" +HTTPD_GROUP="${HTTPD_GROUP:-apache}" + +want_apache + +pkg_setup() { + depend.apache_pkg_setup + + if ! use apache2 ; then + if [[ ${HTTPD_USER} == "apache" ]] || [[ ${HTTPD_GROUP} == "apache" ]] ; then + eerror "You did not enable apache2 USE flag, so you need to define" + eerror "the user and group that will be used for ${PN} yourself." + eerror + eerror "This should (generally) match the user and group that your webserver uses, e.g.:" + eerror "HTTPD_USER=\"lighttpd\" HTTPD_GROUP=\"lighttpd\" if using www-servers/lighttpd" + eerror + die "Either enable USE=\"apache2\" or re-emerge this with HTTPD_USER and HTTPD_GROUP set" + else + enewgroup ${HTTPD_GROUP} + enewuser ${HTTPD_USER} -1 -1 /var/www ${HTTPD_GROUP} + fi + fi +} + +src_compile() { + my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`" + use debug && my_conf="${my_conf} --with-eaccelerator-debug" + use disassembler && my_conf="${my_conf} --with-eaccelerator-disassembler" + ! use inode && my_conf="${my_conf} --without-eaccelerator-use-inode" + use doccommentinclusion && my_conf="${my_conf} --with-eaccelerator-doc-comment-inclusion" + php-ext-source-r2_src_compile +} + +src_install() { + php-ext-source-r2_src_install + + keepdir "${EACCELERATOR_CACHEDIR}" + fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}" + fperms 750 "${EACCELERATOR_CACHEDIR}" + + insinto "/usr/share/${PVR}" + doins -r doc/php/ + dodoc AUTHORS ChangeLog NEWS README + + php-ext-source-r2_addtoinifiles "eaccelerator.shm_size" '"28"' + php-ext-source-r2_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\"" + php-ext-source-r2_addtoinifiles "eaccelerator.enable" '"1"' + php-ext-source-r2_addtoinifiles "eaccelerator.optimizer" '"1"' + php-ext-source-r2_addtoinifiles "eaccelerator.debug" '"0"' + php-ext-source-r2_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"' + php-ext-source-r2_addtoinifiles "eaccelerator.check_mtime" '"1"' + php-ext-source-r2_addtoinifiles "eaccelerator.filter" '""' + php-ext-source-r2_addtoinifiles "eaccelerator.shm_ttl" '"0"' + php-ext-source-r2_addtoinifiles "eaccelerator.shm_prune_period" '"0"' + php-ext-source-r2_addtoinifiles "eaccelerator.shm_only" '"0"' + php-ext-source-r2_addtoinifiles ";eaccelerator.allowed_admin_path" '"/path/where/admin/files/shall/be/allowed"' +} + +pkg_postinst() { + elog "Please see the files in ${ROOT}usr/share/${PVR}/ for some" + elog "examples and informations on how to use the functions that" + elog "eAccelerator adds to PHP." +} diff --git a/dev-php/eaccelerator/eaccelerator-0.9.6.1-r3.ebuild b/dev-php/eaccelerator/eaccelerator-0.9.6.1-r3.ebuild new file mode 100644 index 000000000000..77840b6cf97e --- /dev/null +++ b/dev-php/eaccelerator/eaccelerator-0.9.6.1-r3.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/eaccelerator-0.9.6.1-r3.ebuild,v 1.1 2011/03/13 08:08:22 olemarkus Exp $ + +PHP_EXT_NAME="eaccelerator" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" + +EAPI="2" + +[[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/" + +inherit php-ext-source-r2 eutils depend.apache + +KEYWORDS="~amd64 ~x86" + +DESCRIPTION="A PHP Accelerator & Encoder." +HOMEPAGE="http://www.eaccelerator.net/" +SRC_URI="http://bart.eaccelerator.net/source/${PV}/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +IUSE="debug disassembler inode doccommentinclusion session" + +DEPEND="!dev-php5/pecl-apc !dev-php5/xcache" +RDEPEND="${DEPEND} + >=dev-lang/php-5.1[zlib,session?] + virtual/httpd-php +" + +# Webserver user and group, here for Apache by default +HTTPD_USER="${HTTPD_USER:-apache}" +HTTPD_GROUP="${HTTPD_GROUP:-apache}" + +want_apache + +pkg_setup() { + depend.apache_pkg_setup + + if ! use apache2 ; then + if [[ ${HTTPD_USER} == "apache" ]] || [[ ${HTTPD_GROUP} == "apache" ]] ; then + eerror "You did not enable apache2 USE flag, so you need to define" + eerror "the user and group that will be used for ${PN} yourself." + eerror + eerror "This should (generally) match the user and group that your webserver uses, e.g.:" + eerror "HTTPD_USER=\"lighttpd\" HTTPD_GROUP=\"lighttpd\" if using www-servers/lighttpd" + eerror + die "Either enable USE=\"apache2\" or re-emerge this with HTTPD_USER and HTTPD_GROUP set" + else + enewgroup ${HTTPD_GROUP} + enewuser ${HTTPD_USER} -1 -1 /var/www ${HTTPD_GROUP} + fi + fi +} + +src_configure() { + my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`" + use debug && my_conf="${my_conf} --with-eaccelerator-debug" + use disassembler && my_conf="${my_conf} --with-eaccelerator-disassembler" + ! use inode && my_conf="${my_conf} --without-eaccelerator-use-inode" + use doccommentinclusion && my_conf="${my_conf} --with-eaccelerator-doc-comment-inclusion" + php-ext-source-r2_src_configure +} + +src_install() { + php-ext-source-r2_src_install + + keepdir "${EACCELERATOR_CACHEDIR}" + fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}" + fperms 750 "${EACCELERATOR_CACHEDIR}" + + insinto "/usr/share/${PF}" + doins -r doc/php/ + dodoc AUTHORS ChangeLog NEWS README + + php-ext-source-r2_addtoinifiles "eaccelerator.shm_size" '"28"' + php-ext-source-r2_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\"" + php-ext-source-r2_addtoinifiles "eaccelerator.enable" '"1"' + php-ext-source-r2_addtoinifiles "eaccelerator.optimizer" '"1"' + php-ext-source-r2_addtoinifiles "eaccelerator.debug" '"0"' + php-ext-source-r2_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"' + php-ext-source-r2_addtoinifiles "eaccelerator.check_mtime" '"1"' + php-ext-source-r2_addtoinifiles "eaccelerator.filter" '""' + php-ext-source-r2_addtoinifiles "eaccelerator.shm_ttl" '"0"' + php-ext-source-r2_addtoinifiles "eaccelerator.shm_prune_period" '"0"' + php-ext-source-r2_addtoinifiles "eaccelerator.shm_only" '"0"' + php-ext-source-r2_addtoinifiles ";eaccelerator.allowed_admin_path" '"/path/where/admin/files/shall/be/allowed"' +} + +pkg_postinst() { + elog "Please see the files in ${ROOT}usr/share/${PF}/ for some" + elog "examples and informations on how to use the functions that" + elog "eAccelerator adds to PHP." +} diff --git a/dev-php/eaccelerator/eaccelerator-0.9.6.1.ebuild b/dev-php/eaccelerator/eaccelerator-0.9.6.1.ebuild new file mode 100644 index 000000000000..50bfc7ae9c4c --- /dev/null +++ b/dev-php/eaccelerator/eaccelerator-0.9.6.1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/eaccelerator-0.9.6.1.ebuild,v 1.1 2011/03/13 08:08:22 olemarkus Exp $ + +PHP_EXT_NAME="eaccelerator" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" + +EAPI="2" + +[[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/" + +inherit php-ext-source-r1 eutils depend.apache + +KEYWORDS="amd64 ~sparc x86" + +DESCRIPTION="A PHP Accelerator & Encoder." +HOMEPAGE="http://www.eaccelerator.net/" +SRC_URI="http://bart.eaccelerator.net/source/${PV}/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +IUSE="debug disassembler inode doccommentinclusion session" + +DEPEND="!dev-php5/pecl-apc !dev-php5/xcache" +RDEPEND="${DEPEND} + >=dev-lang/php-5.1[zlib,session?] + virtual/httpd-php +" + +# Webserver user and group, here for Apache by default +HTTPD_USER="${HTTPD_USER:-apache}" +HTTPD_GROUP="${HTTPD_GROUP:-apache}" + +need_php_by_category +want_apache + +pkg_setup() { + depend.apache_pkg_setup + + has_php + + if ! use apache2 ; then + if [[ ${HTTPD_USER} == "apache" ]] || [[ ${HTTPD_GROUP} == "apache" ]] ; then + eerror "You did not enable apache2 USE flag, so you need to define" + eerror "the user and group that will be used for ${PN} yourself." + eerror + eerror "This should (generally) match the user and group that your webserver uses, e.g.:" + eerror "HTTPD_USER=\"lighttpd\" HTTPD_GROUP=\"lighttpd\" if using www-servers/lighttpd" + eerror + die "Either enable USE=\"apache2\" or re-emerge this with HTTPD_USER and HTTPD_GROUP set" + else + enewgroup ${HTTPD_GROUP} + enewuser ${HTTPD_USER} -1 -1 /var/www ${HTTPD_GROUP} + fi + fi +} + +src_compile() { + has_php + + my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`" + + use debug && my_conf="${my_conf} --with-eaccelerator-debug" + use disassembler && my_conf="${my_conf} --with-eaccelerator-disassembler" + ! use inode && my_conf="${my_conf} --without-eaccelerator-use-inode" + use doccommentinclusion && my_conf="${my_conf} --with-eaccelerator-doc-comment-inclusion" + + php-ext-source-r1_src_compile +} + +src_install() { + php-ext-source-r1_src_install + + keepdir "${EACCELERATOR_CACHEDIR}" + fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}" + fperms 750 "${EACCELERATOR_CACHEDIR}" + + insinto "/usr/share/${PN}-php5/" + doins -r doc/php/ + dodoc-php AUTHORS ChangeLog NEWS README + + php-ext-base-r1_addtoinifiles "eaccelerator.shm_size" '"28"' + php-ext-base-r1_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\"" + php-ext-base-r1_addtoinifiles "eaccelerator.enable" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.optimizer" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.debug" '"0"' + php-ext-base-r1_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"' + php-ext-base-r1_addtoinifiles "eaccelerator.check_mtime" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.filter" '""' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_ttl" '"0"' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_prune_period" '"0"' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_only" '"0"' + php-ext-base-r1_addtoinifiles ";eaccelerator.allowed_admin_path" '"/path/where/admin/files/shall/be/allowed"' +} + +pkg_postinst() { + elog "Please see the files in ${ROOT}usr/share/${PN}-php5/ for some" + elog "examples and informations on how to use the functions that" + elog "eAccelerator adds to PHP." +} diff --git a/dev-php/eaccelerator/eaccelerator-0.9.6.ebuild b/dev-php/eaccelerator/eaccelerator-0.9.6.ebuild new file mode 100644 index 000000000000..4b7358d75efd --- /dev/null +++ b/dev-php/eaccelerator/eaccelerator-0.9.6.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/eaccelerator-0.9.6.ebuild,v 1.1 2011/03/13 08:08:22 olemarkus Exp $ + +PHP_EXT_NAME="eaccelerator" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" + +EAPI="2" + +[[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/" + +inherit php-ext-source-r1 eutils depend.apache + +KEYWORDS="~amd64 ~sparc ~x86" + +DESCRIPTION="A PHP Accelerator & Encoder." +HOMEPAGE="http://www.eaccelerator.net/" +SRC_URI="http://bart.eaccelerator.net/source/${PV}/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +IUSE="debug disassembler inode doccommentinclusion session" + +DEPEND="!dev-php5/pecl-apc !dev-php5/xcache" +RDEPEND="${DEPEND} + >=dev-lang/php-5.1[zlib,session?] + || ( dev-lang/php[cgi] dev-lang/php[apache2] ) +" + +# Webserver user and group, here for Apache by default +HTTPD_USER="${HTTPD_USER:-apache}" +HTTPD_GROUP="${HTTPD_GROUP:-apache}" + +need_php_by_category +want_apache + +pkg_setup() { + depend.apache_pkg_setup + + has_php + + if ! use apache2 ; then + if [[ ${HTTPD_USER} == "apache" ]] || [[ ${HTTPD_GROUP} == "apache" ]] ; then + eerror "You did not enable apache2 USE flag, so you need to define" + eerror "the user and group that will be used for ${PN} yourself." + eerror + eerror "This should (generally) match the user and group that your webserver uses, e.g.:" + eerror "HTTPD_USER=\"lighttpd\" HTTPD_GROUP=\"lighttpd\" if using www-servers/lighttpd" + eerror + die "Either enable USE=\"apache2\" or re-emerge this with HTTPD_USER and HTTPD_GROUP set" + else + enewgroup ${HTTPD_GROUP} + enewuser ${HTTPD_USER} -1 -1 /var/www ${HTTPD_GROUP} + fi + fi +} + +src_compile() { + has_php + + my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`" + + use debug && my_conf="${my_conf} --with-eaccelerator-debug" + use disassembler && my_conf="${my_conf} --with-eaccelerator-disassembler" + ! use inode && my_conf="${my_conf} --without-eaccelerator-use-inode" + use doccommentinclusion && my_conf="${my_conf} --with-eaccelerator-doc-comment-inclusion" + + php-ext-source-r1_src_compile +} + +src_install() { + php-ext-source-r1_src_install + + keepdir "${EACCELERATOR_CACHEDIR}" + fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}" + fperms 750 "${EACCELERATOR_CACHEDIR}" + + insinto "/usr/share/${PN}-php5/" + doins -r doc/php/ + dodoc-php AUTHORS ChangeLog COPYING NEWS README README.eLoader + + php-ext-base-r1_addtoinifiles "eaccelerator.shm_size" '"28"' + php-ext-base-r1_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\"" + php-ext-base-r1_addtoinifiles "eaccelerator.enable" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.optimizer" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.debug" '"0"' + php-ext-base-r1_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"' + php-ext-base-r1_addtoinifiles "eaccelerator.check_mtime" '"1"' + php-ext-base-r1_addtoinifiles "eaccelerator.filter" '""' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_ttl" '"0"' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_prune_period" '"0"' + php-ext-base-r1_addtoinifiles "eaccelerator.shm_only" '"0"' + php-ext-base-r1_addtoinifiles ";eaccelerator.allowed_admin_path" '"/path/where/admin/files/shall/be/allowed"' +} + +pkg_postinst() { + elog "Please see the files in ${ROOT}usr/share/${PN}-php5/ for some" + elog "examples and informations on how to use the functions that" + elog "eAccelerator adds to PHP." +} diff --git a/dev-php/eaccelerator/files/eaccelerator-remove-encoder.patch b/dev-php/eaccelerator/files/eaccelerator-remove-encoder.patch new file mode 100644 index 000000000000..6a77dcc56675 --- /dev/null +++ b/dev-php/eaccelerator/files/eaccelerator-remove-encoder.patch @@ -0,0 +1,417 @@ +Removing the encoder which has a security issue and is deprectated by upstream anyway. Bug 277293. +Changes from upstream SVN r246, backported by a3li@gentoo.org. +Note the rm'ed files in the ebuild, too. + +diff -Naur a/config.m4 b/config.m4 +--- a/config.m4 2007-05-16 21:07:31.000000000 +0200 ++++ b/config.m4 2009-08-13 18:54:15.759128874 +0200 +@@ -29,20 +29,6 @@ + eaccelerator_optimizer=yes + ]) + +-AC_ARG_WITH(eaccelerator-encoder, +-[ --without-eaccelerator-encoder Do not include eaccelerator encoder],[ +- eaccelerator_encoder=$withval +-],[ +- eaccelerator_encoder=yes +-]) +- +-AC_ARG_WITH(eaccelerator-loader, +-[ --without-eaccelerator-loader Do not include eaccelerator loader],[ +- eaccelerator_loader=$withval +-],[ +- eaccelerator_loader=yes +-]) +- + AC_ARG_WITH(eaccelerator-shared-memory, + [ --with-eaccelerator-shared-memory Include eaccelerator shared memory functions],[ + eaccelerator_shm=$withval +@@ -124,12 +110,6 @@ + if test "$eaccelerator_optimizer" = "yes"; then + AC_DEFINE(WITH_EACCELERATOR_OPTIMIZER, 1, [Define if you like to use peephole opcode optimization]) + fi +- if test "$eaccelerator_encoder" = "yes"; then +- AC_DEFINE(WITH_EACCELERATOR_ENCODER, 1, [Define if you like to use eAccelerator enoder]) +- fi +- if test "$eaccelerator_loader" = "yes"; then +- AC_DEFINE(WITH_EACCELERATOR_LOADER, 1, [Define if you like to load files encoded by eAccelerator encoder]) +- fi + if test "$eaccelerator_shm" = "yes"; then + AC_DEFINE(WITH_EACCELERATOR_SHM, 1, [Define if you like to use the eAccelerator functions to store keys in shared memory]) + fi +diff -Naur a/eaccelerator.c b/eaccelerator.c +--- a/eaccelerator.c 2008-05-18 11:04:20.000000000 +0200 ++++ b/eaccelerator.c 2009-08-13 18:54:15.759128874 +0200 +@@ -1408,52 +1408,6 @@ + ((stat(file_handle->opened_path, &buf) == 0) && S_ISREG(buf.st_mode)))) { + DBG(ea_debug_printf, (EA_TEST_PERFORMANCE, "\t[%d] compile_file: storing in cache (%ld)\n", getpid(), ea_debug_elapsed_time(&tv_start))); + DBG(ea_debug_printf, (EA_DEBUG, "\t[%d] compile_file: storing in cache\n", getpid())); +-#ifdef WITH_EACCELERATOR_LOADER +- if (t->last >= 3 && +- t->opcodes[0].opcode == ZEND_SEND_VAL && +- t->opcodes[1].opcode == ZEND_DO_FCALL && +- t->opcodes[2].opcode == ZEND_RETURN && +- t->opcodes[1].op1.op_type == IS_CONST && +- t->opcodes[1].op1.u.constant.type == IS_STRING && +- t->opcodes[1].op1.u.constant.value.str.len == sizeof("eaccelerator_load")-1 && +- (memcmp(t->opcodes[1].op1.u.constant.value.str.val, "eaccelerator_load", sizeof("eaccelerator_load")-1) == 0) && +- t->opcodes[0].op1.op_type == IS_CONST && +- t->opcodes[0].op1.u.constant.type == IS_STRING) { +- zend_op_array* new_t = NULL; +- zend_bool old_in_compilation = CG(in_compilation); +- char* old_filename = CG(compiled_filename); +- int old_lineno = CG(zend_lineno); +- +- CG(in_compilation) = 1; +- zend_set_compiled_filename(t->filename TSRMLS_CC); +- CG(zend_lineno) = t->opcodes[1].lineno; +- +- zend_try { +- new_t = eaccelerator_load( +- t->opcodes[0].op1.u.constant.value.str.val, +- t->opcodes[0].op1.u.constant.value.str.len TSRMLS_CC); +- } zend_catch { +- CG(function_table) = orig_function_table; +- CG(class_table) = orig_class_table; +- ea_bailout = 1; +- } zend_end_try(); +- if (ea_bailout) { +- zend_bailout (); +- } +- CG(in_compilation) = old_in_compilation; +- CG(compiled_filename) = old_filename; +- CG(zend_lineno) = old_lineno; +- if (new_t != NULL) { +-#ifdef ZEND_ENGINE_2 +- destroy_op_array(t TSRMLS_CC); +-#else +- destroy_op_array(t); +-#endif +- efree(t); +- t = new_t; +- } +- } +-#endif + function_table_tail = function_table_tail?function_table_tail->pListNext:CG(function_table)->pListHead; + class_table_tail = class_table_tail?class_table_tail->pListNext:CG(class_table)->pListHead; + if (eaccelerator_store(file_handle->opened_path, &buf, nreloads, t, function_table_tail, class_table_tail TSRMLS_CC)) { +@@ -1907,7 +1861,6 @@ + eaccelerator_globals->cache_dir = NULL; + eaccelerator_globals->optimizer_enabled = 1; + eaccelerator_globals->compiler = 0; +- eaccelerator_globals->encoder = 0; + eaccelerator_globals->cond_list = NULL; + eaccelerator_globals->content_headers = NULL; + #ifdef WITH_EACCELERATOR_SESSIONS +@@ -1986,15 +1939,6 @@ + } + } + #endif +-#ifdef WITH_EACCELERATOR_LOADER +- if (zend_hash_exists(&module_registry, EACCELERATOR_LOADER_EXTENSION_NAME, +- sizeof(EACCELERATOR_LOADER_EXTENSION_NAME))) { +- zend_error(E_CORE_WARNING,"Extension \"%s\" is not need with \"%s\". Remove it from php.ini\n", +- EACCELERATOR_LOADER_EXTENSION_NAME, EACCELERATOR_EXTENSION_NAME); +- zend_hash_del(&module_registry, EACCELERATOR_LOADER_EXTENSION_NAME, +- sizeof(EACCELERATOR_LOADER_EXTENSION_NAME)); +- } +-#endif + } + if (!eaccelerator_check_php_version(TSRMLS_C)) { + return FAILURE; +@@ -2115,7 +2059,6 @@ + EAG(in_request) = 1; + EAG(used_entries) = NULL; + EAG(compiler) = 0; +- EAG(encoder) = 0; + EAG(refcount_helper) = 1; + EAG(compress_content) = 1; + EAG(content_headers) = NULL; +@@ -2242,14 +2185,6 @@ + PHP_FE(eaccelerator_removed_scripts, NULL) + PHP_FE(eaccelerator_list_keys, NULL) + #endif +-#ifdef WITH_EACCELERATOR_ENCODER +- PHP_FE(eaccelerator_encode, eaccelerator_second_arg_force_ref) +-#endif +-#ifdef WITH_EACCELERATOR_LOADER +- PHP_FE(eaccelerator_load, NULL) +- PHP_FE(_eaccelerator_loader_file, NULL) +- PHP_FE(_eaccelerator_loader_line, NULL) +-#endif + #ifdef WITH_EACCELERATOR_SESSIONS + #ifndef HAVE_PHP_SESSIONS_SUPPORT + PHP_FE(_eaccelerator_session_open, NULL) +diff -Naur a/eaccelerator.h b/eaccelerator.h +--- a/eaccelerator.h 2007-05-16 21:07:31.000000000 +0200 ++++ b/eaccelerator.h 2009-08-13 18:54:15.751121331 +0200 +@@ -117,7 +117,6 @@ + #endif + + #ifdef HAVE_EACCELERATOR +-#ifndef HAVE_EACCELERATOR_STANDALONE_LOADER + + #include "mm.h" + +@@ -185,7 +184,6 @@ + + /******************************************************************************/ + +-#endif /* HAVE_EACCELERATOR_STANDALONE_LOADER */ + + #ifndef offsetof + # define offsetof(str,fld) ((size_t)&(((str*)NULL)->fld)) +@@ -275,7 +273,6 @@ + char htabkey[1]; /* must be last element */ + } mm_fc_entry; + +-#ifndef HAVE_EACCELERATOR_STANDALONE_LOADER + + /* + * A mm_cache_entry is a bucket for one PHP script file. +@@ -423,11 +420,6 @@ + void eaccelerator_optimize (zend_op_array * op_array); + # endif + +-#ifdef WITH_EACCELERATOR_ENCODER +-PHP_FUNCTION (eaccelerator_encode); +-#endif +-#endif /* HAVE_EACCELERATOR_STANDALONE_LOADER */ +- + #ifdef ZTS + # define EAG(v) TSRMG(eaccelerator_globals_id, zend_eaccelerator_globals*, v) + #else +@@ -444,13 +436,6 @@ + struct _mm_cond_entry *next; + } mm_cond_entry; + +-#ifdef WITH_EACCELERATOR_LOADER +-zend_op_array *eaccelerator_load (char *src, int src_len TSRMLS_DC); +-PHP_FUNCTION (eaccelerator_load); +-PHP_FUNCTION (_eaccelerator_loader_file); +-PHP_FUNCTION (_eaccelerator_loader_line); +-#endif +- + /* + * Globals (different for each process/thread) + */ +@@ -461,7 +446,6 @@ + zend_bool optimizer_enabled; + zend_bool compression_enabled; + zend_bool compiler; +-zend_bool encoder; + zend_bool compress; + zend_bool compress_content; + zend_bool in_request; +@@ -508,16 +492,9 @@ + ZEND_EXTERN_MODULE_GLOBALS (eaccelerator) + + #define EACCELERATOR_EXTENSION_NAME "eAccelerator" +-#define EACCELERATOR_LOADER_EXTENSION_NAME "eLoader" + + #define EA_MAGIC "EACCELERATOR" + +-#define EA_ENCODER_VERSION 0x00000004 +-#define EA_ENCODER_END 0x00 +-#define EA_ENCODER_NAMESPACE 0x01 +-#define EA_ENCODER_CLASS 0x02 +-#define EA_ENCODER_FUNCTION 0x03 +- + #define EACCELERATOR_VERSION_GUID "PHPE8EDA1B6-806A-4851-B1C8-A6B4712F44FB" + #define EACCELERATOR_LOGO_GUID "PHPE6F78DE9-13E4-4dee-8518-5FA2DACEA803" + #define EACCELERATOR_VERSION_STRING ("eAccelerator " EACCELERATOR_VERSION " (PHP " PHP_VERSION ")") +diff -Naur a/ea_store.c b/ea_store.c +--- a/ea_store.c 2007-05-16 21:07:31.000000000 +0200 ++++ b/ea_store.c 2009-08-13 18:54:15.755134601 +0200 +@@ -42,9 +42,8 @@ + #endif + static void calc_string(char *str, int len TSRMLS_DC) + { +- if (len > MAX_DUP_STR_LEN || zend_hash_add(&EAG(strings), str, len, +- &str, sizeof(char *), +- NULL) == SUCCESS) { ++ if (len > MAX_DUP_STR_LEN || ++ zend_hash_add(&EAG(strings), str, len, &str, sizeof(char *), NULL) == SUCCESS) { + EACCELERATOR_ALIGN(EAG(mem)); + EAG(mem) += len; + } +@@ -360,7 +359,6 @@ + return (size_t) EAG(mem); + } + +-/** Functions to store a script **/ + static inline char *store_string(char *str, int len TSRMLS_DC) + { + char *p; +diff -Naur a/Makefile.in b/Makefile.in +--- a/Makefile.in 2007-05-16 21:07:31.000000000 +0200 ++++ b/Makefile.in 2009-08-13 18:54:15.755134601 +0200 +@@ -1,5 +1,5 @@ + LTLIBRARY_NAME = libeaccelerator.la +-LTLIBRARY_SOURCES = eaccelerator.c optimize.c encoder.c loader.c opcodes.c content.c mm.c session.c shm.c debug.c cache.c ea_restore.c ea_store.c ea_info.c ea_dasm.c ++LTLIBRARY_SOURCES = eaccelerator.c optimize.c opcodes.c content.c mm.c session.c shm.c debug.c cache.c ea_restore.c ea_store.c ea_info.c ea_dasm.c + LTLIBRARY_SHARED_NAME = eaccelerator.la + + EXTRA_CFLAGS = -O2 -g -Wall +diff -Naur a/optimize.c b/optimize.c +--- a/optimize.c 2007-08-14 13:14:00.000000000 +0200 ++++ b/optimize.c 2009-08-13 18:54:15.755134601 +0200 +@@ -1496,88 +1496,77 @@ + } + + static int opt_get_constant(const char* name, int name_len, zend_constant** result TSRMLS_DC) { +- if (!EAG(encoder) || +- (name_len == sizeof("false")-1 && strcmp(name,"false") == 0) || +- (name_len == sizeof("true")-1 && strcmp(name,"true") == 0)) { +- union { +- zend_constant *v; +- void *ptr; +- } c; +- int retval; +- char *lookup_name = do_alloca(name_len+1); +- memcpy(lookup_name, name, name_len); +- lookup_name[name_len] = '\0'; ++ union { ++ zend_constant *v; ++ void *ptr; ++ } c; ++ int retval; ++ char *lookup_name = do_alloca(name_len+1); ++ memcpy(lookup_name, name, name_len); ++ lookup_name[name_len] = '\0'; ++ ++ if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, &c.ptr)==SUCCESS) { ++ *result = c.v; ++ retval=1; ++ } else { ++ zend_str_tolower(lookup_name, name_len); + + if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, &c.ptr)==SUCCESS) { +- *result = c.v; +- retval=1; +- } else { +- zend_str_tolower(lookup_name, name_len); +- +- if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, &c.ptr)==SUCCESS) { +- if ((c.v->flags & CONST_CS) && (memcmp(c.v->name, name, name_len)!=0)) { +- retval=0; +- } else { +- *result = c.v; +- retval=1; +- } +- } else { ++ if ((c.v->flags & CONST_CS) && (memcmp(c.v->name, name, name_len)!=0)) { + retval=0; ++ } else { ++ *result = c.v; ++ retval=1; + } ++ } else { ++ retval=0; + } +- free_alloca(lookup_name); +- return retval; +- } else { +- return 0; + } ++ free_alloca(lookup_name); ++ return retval; + } + + static int opt_function_exists(const char* name, int name_len TSRMLS_DC) { +- if (!EAG(encoder)) { +- char *lcname; +- char *lcfname; +- Bucket *p; +- +- lcname = estrndup(name,name_len+1); +- zend_str_tolower(lcname, name_len); +- p = module_registry.pListHead; +- while (p != NULL) { +- zend_module_entry *m = (zend_module_entry*)p->pData; +- if (m->type == MODULE_PERSISTENT) { +- zend_function_entry* f = m->functions; +- if (f != NULL) { +- while (f->fname) { +- lcfname = estrdup(f->fname); +- zend_str_tolower(lcfname, strlen(lcfname)); +- if (strcmp(lcname,lcfname) == 0) { +- efree(lcfname); +- efree(lcname); +- return 1; +- } +- efree(lcfname); +- f++; +- } ++ char *lcname; ++ char *lcfname; ++ Bucket *p; ++ ++ lcname = estrndup(name,name_len+1); ++ zend_str_tolower(lcname, name_len); ++ p = module_registry.pListHead; ++ while (p != NULL) { ++ zend_module_entry *m = (zend_module_entry*)p->pData; ++ if (m->type == MODULE_PERSISTENT) { ++ zend_function_entry* f = m->functions; ++ if (f != NULL) { ++ while (f->fname) { ++ lcfname = estrdup(f->fname); ++ zend_str_tolower(lcfname, strlen(lcfname)); ++ if (strcmp(lcname,lcfname) == 0) { ++ efree(lcfname); ++ efree(lcname); ++ return 1; ++ } ++ efree(lcfname); ++ f++; + } + } +- p = p->pListNext; + } +- efree(lcname); ++ p = p->pListNext; + } ++ efree(lcname); + return 0; + } + + static int opt_extension_loaded(const char* name, int name_len TSRMLS_DC) { +- if (!EAG(encoder)) { +- Bucket *p = module_registry.pListHead; +- while (p != NULL) { +- zend_module_entry *m = (zend_module_entry*)p->pData; +- if (m->type == MODULE_PERSISTENT && strcmp(m->name,name) == 0) { +- return 1; +- } +- p = p->pListNext; ++ Bucket *p = module_registry.pListHead; ++ while (p != NULL) { ++ zend_module_entry *m = (zend_module_entry*)p->pData; ++ if (m->type == MODULE_PERSISTENT && strcmp(m->name,name) == 0) { ++ return 1; + } ++ p = p->pListNext; + } +- return 0; + } + + static int opt_result_is_numeric(zend_op* x) { +diff -Naur a/README b/README +--- a/README 2007-05-16 21:07:31.000000000 +0200 ++++ b/README 2009-08-13 18:54:15.759128874 +0200 +@@ -19,14 +19,6 @@ + by several engines. Files that can't fit in shared memory are cached on disk + only. + +-eAccelerator contains a PHP encoder and loader. You can encode PHP scripts +-using encoder.php in order to distribute them without sources. Encoded files +-can be run on any site which runs PHP with eAccelerator. The sources of +-encoded scripts can't be restored because they are stored in a compiled form +-and the encoded version doesn't contain the source. Of course, some internals +-of the scripts can be restored with different reverse engineering tools +-(disassemblers, debuggers, etc), but it is not trivial. +- + eAccelerator is compatible with Zend Optimizer's loader. Zend Optimizer must + be installed after eAccelerator in php.ini. If you don't use scripts encoded + with Zend Encoder we do not recommend to install Zend Optimizer with diff --git a/dev-php/eaccelerator/metadata.xml b/dev-php/eaccelerator/metadata.xml new file mode 100644 index 000000000000..5ac8970e15d0 --- /dev/null +++ b/dev-php/eaccelerator/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>php</herd> + <use> + <flag name="contentcache">Enable content caching</flag> + <flag name="disassembler">Enable the eA disassembler</flag> + <flag name="inode">Use inode-based caching</flag> + <flag name="doccommentinclusion">If you want eAccelerator to retain + doc-comments in internal php structures.</flag> + </use> +</pkgmetadata> |