From 4f34d36c5e06f0c756e652a6f4be02dc23cc6b97 Mon Sep 17 00:00:00 2001 From: Markus Ullmann Date: Fri, 31 Aug 2007 09:11:44 +0000 Subject: Port from project overlay (Portage version: 2.1.3.7) --- dev-php4/jpgraph/ChangeLog | 13 ++++- dev-php4/jpgraph/files/digest-jpgraph-1.21b | 3 + dev-php4/jpgraph/jpgraph-1.21b.ebuild | 89 +++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 dev-php4/jpgraph/files/digest-jpgraph-1.21b create mode 100644 dev-php4/jpgraph/jpgraph-1.21b.ebuild (limited to 'dev-php4') diff --git a/dev-php4/jpgraph/ChangeLog b/dev-php4/jpgraph/ChangeLog index 1eaf6107286f..da03bad0e985 100644 --- a/dev-php4/jpgraph/ChangeLog +++ b/dev-php4/jpgraph/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for dev-php4/jpgraph # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php4/jpgraph/ChangeLog,v 1.17 2007/07/29 16:53:50 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php4/jpgraph/ChangeLog,v 1.18 2007/08/31 09:11:44 jokey Exp $ + +*jpgraph-1.21b (31 Aug 2007) + + 31 Aug 2007; Markus Ullmann +jpgraph-1.21b.ebuild: + Port from project overlay + + 30 Aug 2007; Jakub Moc jpgraph-1.21b.ebuild: + Make HTTPD_{USER,GROUP} configurable. + + 30 Aug 2007; Jakub Moc +jpgraph-1.21b.ebuild: + Version bump 29 Jul 2007; Christian Heim jpgraph-1.20.5.ebuild: Fixing the DEPEND/RDEPEND for the move of net-www/apache to diff --git a/dev-php4/jpgraph/files/digest-jpgraph-1.21b b/dev-php4/jpgraph/files/digest-jpgraph-1.21b new file mode 100644 index 000000000000..e8bd8e19b763 --- /dev/null +++ b/dev-php4/jpgraph/files/digest-jpgraph-1.21b @@ -0,0 +1,3 @@ +MD5 410b5b8a82a08b927bebd027ab12c829 jpgraph-1.21b.tar.gz 4608361 +RMD160 b03bb2597be17c4073ff9928bcae5d1619b35d3c jpgraph-1.21b.tar.gz 4608361 +SHA256 9fd5a603d0a6e523876fb8b8607dc7ff19b64812185e3d9917d281873a4520e0 jpgraph-1.21b.tar.gz 4608361 diff --git a/dev-php4/jpgraph/jpgraph-1.21b.ebuild b/dev-php4/jpgraph/jpgraph-1.21b.ebuild new file mode 100644 index 000000000000..dd3f1201e403 --- /dev/null +++ b/dev-php4/jpgraph/jpgraph-1.21b.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php4/jpgraph/jpgraph-1.21b.ebuild,v 1.1 2007/08/31 09:11:44 jokey Exp $ + +inherit php-lib-r1 eutils + +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" + +DESCRIPTION="Fully OO graph drawing library for PHP." +HOMEPAGE="http://www.aditus.nu/jpgraph/" +SRC_URI="http://hem.bredband.net/jpgraph/${P}.tar.gz" +LICENSE="QPL-1.0" +SLOT="0" +IUSE="truetype" + +DEPEND="" +RDEPEND="truetype? ( media-fonts/corefonts )" + +need_php_by_category + +[[ -z "${JPGRAPH_CACHEDIR}" ]] && JPGRAPH_CACHEDIR="/var/cache/jpgraph-php4/" + +pkg_setup() { + has_php + + # we need the PHP GD functionality + require_gd + + # check to wich user:group the cache dir will go + if has_version "www-servers/apache" ; then + HTTPD_USER="apache" + HTTPD_GROUP="apache" + einfo "Configuring ${JPGRAPH_CACHEDIR} for Apache." + else + HTTPD_USER="${HTTPD_USER:-root}" + HTTPD_GROUP="${HTTPD_GROUP:-root}" + ewarn "No Apache webserver detected - ${JPGRAPH_CACHEDIR} will be" + ewarn "owned by ${HTTPD_USER}:${HTTPD_GROUP} instead." + ewarn "It this is not what you want, you can define" + ewarn "HTTPD_USER and HTTPD_GROUP variables and re-emerge ${PN}." + epause 3 + fi +} + +src_install() { + # some patches to adapt the config to Gentoo + einfo "Patching jpg-config.inc.php" + + # 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.php \ + || die "sed failed on patch 1" + + # patch 2: + # make jpgraph use the correct directory for caching + + sed -i "s|.*DEFINE(\"CACHE_DIR\",\"/tmp/jpgraph_cache/\");|DEFINE(\"CACHE_DIR\",\"${JPGRAPH_CACHEDIR}\");|" src/jpg-config.inc.php \ + || die "sed failed on patch 2" + + # 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\",\"/usr/share/fonts/corefonts/\");|" src/jpg-config.inc.php \ + || die "sed failed on patch 3" + fi + + # patch 4: + # disable READ_CACHE in jpgraph + + sed -i "s|^DEFINE(\"READ_CACHE\",true);|DEFINE(\"READ_CACHE\",false);|" src/jpg-config.inc.php || die "sed failed on patch 4" + + # install php files + einfo "Building list of files to install" + php-lib-r1_src_install src `cd src ; find . -type f -print` + + # install documentation + einfo "Installing documentation" + dodoc-php README QPL.txt + insinto /usr/share/doc/${CATEGORY}/${PF} + doins -r docs/* + + # setup the cache dir + einfo "Setting up the cache dir" + keepdir "${JPGRAPH_CACHEDIR}" + fowners ${HTTPD_USER}:${HTTPD_GROUP} "${JPGRAPH_CACHEDIR}" + fperms 750 "${JPGRAPH_CACHEDIR}" +} -- cgit v1.2.3-65-gdbad