Fix for bug 107467 by Luca Longinotti <chtekk@longitekk.com>.
authorSebastian Bergmann <sebastian@gentoo.org>
Tue, 11 Oct 2005 04:51:36 +0000 (04:51 +0000)
committerSebastian Bergmann <sebastian@gentoo.org>
Tue, 11 Oct 2005 04:51:36 +0000 (04:51 +0000)
Package-Manager: portage-2.0.53_rc5

dev-php/eaccelerator/ChangeLog
dev-php/eaccelerator/eaccelerator-0.9.3-r1.ebuild
dev-php/jpgraph/ChangeLog
dev-php/jpgraph/Manifest
dev-php/jpgraph/files/digest-jpgraph-1.19-r1 [new file with mode: 0644]
dev-php/jpgraph/jpgraph-1.19-r1.ebuild [new file with mode: 0644]

index 5ccc13f1a33460f42f30ac90fb40af2449148865..0e71c29aec7c214a69468999c5907d72033a3f0b 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for dev-php/eaccelerator
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/ChangeLog,v 1.17 2005/08/17 08:01:04 sebastian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/ChangeLog,v 1.18 2005/10/11 04:48:31 sebastian Exp $
+
+  11 Oct 2005; Sebastian Bergmann <sebastian@gentoo.org>
+  eaccelerator-0.9.3-r1.ebuild:
+  Fix for bug 107467 by Luca Longinotti <chtekk@longitekk.com>.
 
   17 Aug 2005; Sebastian Bergmann <sebastian@gentoo.org>
   eaccelerator-0.9.3.ebuild, eaccelerator-0.9.3-r1.ebuild:
index cce08cbd02f6de8ca8c840344d498347d3d85739..07f71cfdb818e76d24bd8146b708c7ebef3d1806 100644 (file)
@@ -1,63 +1,45 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/eaccelerator-0.9.3-r1.ebuild,v 1.4 2005/08/17 08:01:04 sebastian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/eaccelerator/eaccelerator-0.9.3-r1.ebuild,v 1.5 2005/10/11 04:48:31 sebastian Exp $
 
-PHP_EXT_NAME="eaccelerator"
 PHP_EXT_ZENDEXT="yes"
+PHP_EXT_NAME="eaccelerator"
+PHP_EXT_INI="yes"
+
 [ -z "${EACCELERATOR_CACHEDIR}" ] && EACCELERATOR_CACHEDIR=/var/cache/eaccelerator
+
 inherit php-ext-source
 
 DESCRIPTION="A PHP Accelerator & Encoder."
 HOMEPAGE="http://www.eaccelerator.net/"
 SRC_URI="mirror://sourceforge/eaccelerator/${P}.tar.gz"
-IUSE="apache2 inode session"
+IUSE="inode session"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~sparc ~x86"
 
-DEPEND="$DEPEND
+DEPEND="${DEPEND}
+               =virtual/httpd-php-4*
                !dev-php/ioncube_loaders
                !dev-php/PECL-apc"
 
-HTTPD_USER=root
-HTTPD_GROUP=root
-
-has_version "net-www/apache" && USE_APACHE=1 && inherit webapp-apache
-[ -n "${USE_APACHE}" ] && webapp-detect || NO_WEBSERVER=1
-
-pkg_setup() {
-       if [ "${NO_WEBSERVER}" = "1" ]; then
-               ewarn "No webserver detected - ${EACCELERATOR_CACHEDIR} will be"
-               ewarn "owned by ${HTTPD_USER} instead"
-       else
-               einfo "Configuring cache dir ${EACCELERATOR_CACHEDIR} for ${WEBAPP_SERVER}"
-       fi
-}
+# this is a good example of why we need all web servers installed under a
+# common 'www' user and group!
+HTTPD_USER=apache
+HTTPD_GROUP=apache
 
 src_compile() {
-       # eAccelerator does not work with Zend Thread Safety (ZTS)
-       # so about if we are using Apache 2 with an MPM that would
-       # require ZTS.
-       if use apache2; then
-               APACHE2_MPM="`/usr/sbin/apache2 -l | egrep 'worker|perchild|leader|threadpool|prefork'|cut -d. -f1|sed -e 's/^[[:space:]]*//g;s/[[:space:]]+/ /g;'`"
-               case "${APACHE2_MPM}" in
-                       *prefork*) ;;
-                       *) eerror "eAccelerator does not yet work with the Apache 2 MPM in use." ; die ;;
-               esac;
-       fi
-
-       myconf="--enable-eaccelerator=shared"
+       my_conf="--enable-eaccelerator=shared"
 
        if use !session; then
-               myconf="${myconf} --without-eaccelerator-sessions"
+               my_conf="${my_conf} --without-eaccelerator-sessions"
        fi
 
        if use !inode; then
-               myconf="${myconf} --without-eaccelerator-use-inode"
+               my_conf="${my_conf} --without-eaccelerator-use-inode"
        fi
 
        export WANT_AUTOMAKE=1.6
-
        php-ext-source_src_compile
 }
 
@@ -92,9 +74,15 @@ src_install() {
        php-ext-base_addtoinifiles ";eaccelerator.admin.password" '"hashed_password"'
 }
 
-pkg_postinst () {
-       einfo "You need to restart your webserver to activate eAccelerator."
-       einfo
+pkg_postinst() {
+       # you only need to restart the webserver if you're using mod_php
+       if has_version "dev-php/mod_php" ; then
+               einfo "You need to restart your webserver to activate eAccelerator."
+               einfo
+       fi
+
+       # this web interface needs moving into a separate, webapp-config compatible
+       # package!!
        einfo "A web interface is available to manage the eAccelerator cache."
        einfo "Copy /usr/share/eaccelerator/*.php to somewhere"
        einfo "where your web server can see it. See the documentation on how"
index 5ddc83a4e3715c299e8b89e1a72194ed9c6bb8a3..3021cbd09561cb1e0830db39c2ea399d23db051a 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for dev-php/jpgraph
 # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-php/jpgraph/ChangeLog,v 1.17 2005/07/16 14:08:14 sebastian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/jpgraph/ChangeLog,v 1.18 2005/10/11 04:51:36 sebastian Exp $
+
+*jpgraph-1.19-r1 (11 Oct 2005)
+
+  11 Oct 2005; Sebastian Bergmann <sebastian@gentoo.org>
+  +jpgraph-1.19-r1.ebuild:
+  Fix for bug 107467 by Luca Longinotti <chtekk@longitekk.com>.
 
 *jpgraph-1.19 (16 Jul 2005)
 
index c5f07f43cf59d437027258126d448899f9715206..222b9a1ae95c6b00b49c2225445ff5295a6dc12d 100644 (file)
@@ -1,14 +1,6 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 3d5cef9c4bdc3d16cf5dfa13416a62b7 jpgraph-1.19.ebuild 2161
 MD5 881f32a81def82415fed8b47b6215e5c ChangeLog 2093
-MD5 34b376f52ca199fffb4e52b83169574a metadata.xml 156
 MD5 5808c16ea2ebf688f36553295fd2caee files/digest-jpgraph-1.19 65
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFC2RToaGfFFLhbXWkRAuspAJ9x3vIGfXRBGzmiq/qK7b/aGZ6NCQCggE+7
-IrrqlpKT4Sy8xeYdxS8AfXc=
-=rGIi
------END PGP SIGNATURE-----
+MD5 5808c16ea2ebf688f36553295fd2caee files/digest-jpgraph-1.19-r1 65
+MD5 43bcbeb6ff85c24f79468325051d1917 jpgraph-1.19-r1.ebuild 2577
+MD5 3d5cef9c4bdc3d16cf5dfa13416a62b7 jpgraph-1.19.ebuild 2161
+MD5 34b376f52ca199fffb4e52b83169574a metadata.xml 156
diff --git a/dev-php/jpgraph/files/digest-jpgraph-1.19-r1 b/dev-php/jpgraph/files/digest-jpgraph-1.19-r1
new file mode 100644 (file)
index 0000000..6eadd10
--- /dev/null
@@ -0,0 +1 @@
+MD5 fc364e1b56dea32bdace47411085cd72 jpgraph-1.19.tar.gz 4068179
diff --git a/dev-php/jpgraph/jpgraph-1.19-r1.ebuild b/dev-php/jpgraph/jpgraph-1.19-r1.ebuild
new file mode 100644 (file)
index 0000000..3d1a464
--- /dev/null
@@ -0,0 +1,86 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php/jpgraph/jpgraph-1.19-r1.ebuild,v 1.1 2005/10/11 04:51:36 sebastian Exp $
+
+inherit php-lib eutils
+
+DESCRIPTION="fully OO graph drawing library for PHP"
+HOMEPAGE="http://www.aditus.nu/jpgraph/"
+SRC_URI="http://members.chello.se/jpgraph/jpgdownloads/${P}.tar.gz"
+LICENSE="QPL-1.0"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha ~amd64"
+IUSE="truetype"
+
+DEPEND="${DEPEND}
+               =dev-php/php-4*"
+RDEPEND="${RDEPEND}
+               truetype? ( media-fonts/corefonts )"
+
+JPGRAPH_CACHE_DIR="/var/cache/jpgraph"
+COREFONTS_DIR="/usr/share/fonts/corefonts"
+
+pkg_setup() {
+       # we need the GD functionality of PHP
+       if ! built_with_use =`best_version =dev-php/php-4*` gd ; then
+               eerror "Please build dev-php/php with the"
+               eerror "'gd' USE flag turned on."
+               die "No GD support in PHP"
+       fi
+
+       # check to wich user:group the cache dir will go
+       if has_version "net-www/apache" ; then
+               HTTPD_USER=apache
+               HTTPD_GROUP=apache
+               einfo "Configuring cache dir ${JPGRAPH_CACHE_DIR} for Apache."
+       else
+               HTTPD_USER=root
+               HTTPD_GROUP=root
+               ewarn "No Apache webserver detected - ${JPGRAPH_CACHE_DIR} will be"
+               ewarn "owned by ${HTTPD_USER}:${HTTPD_GROUP} instead."
+       fi
+}
+
+src_install() {
+       # some patches to adapt the config to Gentoo
+       einfo "Patching jpg-config.inc"
+
+       # patch 1:
+       # make jpgraph use the correct group for file permissions
+
+       sed -i "s|^DEFINE(\"CACHE_FILE_GROUP\",\"wwwadmin\");|DEFINE(\"CACHE_FILE_GROUP\",\"${HTTPD_GROUP}\");|" src/jpg-config.inc
+
+       # patch 2:
+       # make jpgraph use the correct directory for caching
+
+       sed -i "s|.*DEFINE(\"CACHE_DIR\",\"/tmp/jpgraph_cache/\");|DEFINE(\"CACHE_DIR\",\"${JPGRAPH_CACHE_DIR}/\");|" src/jpg-config.inc
+
+       # patch 3:
+       # make jpgraph use the correct directory for the corefonts if the truetype USE flag is set
+
+       if use truetype ; then
+               sed -i "s|.*DEFINE(\"TTF_DIR\",\"/usr/X11R6/lib/X11/fonts/truetype/\");|DEFINE(\"TTF_DIR\",\"${COREFONTS_DIR}/\");|" src/jpg-config.inc
+       fi
+
+       # patch 4:
+       # disable READ_CACHE in jpgraph
+
+       sed -i "s|^DEFINE(\"READ_CACHE\",true);|DEFINE(\"READ_CACHE\",false);|" src/jpg-config.inc
+
+       # install php files
+       einfo "Building list of files to install"
+       php-lib_src_install src `cd src ; find . -type f -print`
+
+       # install documentation
+       einfo "Installing documentation"
+       dodoc README QPL.txt
+       dohtml -r docs/*
+
+       # setup the cache dir
+       # cachedir must be world-writable, because PHP/CLI doesn't run
+       # as the apache user!
+       einfo "Setting up the cache dir"
+       keepdir "${JPGRAPH_CACHE_DIR}"
+       fowners ${HTTPD_USER}:${HTTPD_GROUP} "${JPGRAPH_CACHE_DIR}"
+       fperms 700 "${JPGRAPH_CACHE_DIR}"
+}