summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Bergmann <sebastian@gentoo.org>2006-08-07 14:06:00 +0000
committerSebastian Bergmann <sebastian@gentoo.org>2006-08-07 14:06:00 +0000
commit2d806e9ea49bcd35fd60063e078144d0f12f5e6f (patch)
treea3bf172f7601d5dea04a2ed8af9421fb89cbd45b /dev-php5/jpgraph
parent- stable on x86 and amd64 (diff)
downloadgentoo-2-2d806e9ea49bcd35fd60063e078144d0f12f5e6f.tar.gz
gentoo-2-2d806e9ea49bcd35fd60063e078144d0f12f5e6f.tar.bz2
gentoo-2-2d806e9ea49bcd35fd60063e078144d0f12f5e6f.zip
Version bump, closes bug #143074.
(Portage version: 2.1.1_pre4-r4)
Diffstat (limited to 'dev-php5/jpgraph')
-rw-r--r--dev-php5/jpgraph/ChangeLog8
-rw-r--r--dev-php5/jpgraph/files/digest-jpgraph-2.1.23
-rw-r--r--dev-php5/jpgraph/jpgraph-2.1.2.ebuild87
3 files changed, 97 insertions, 1 deletions
diff --git a/dev-php5/jpgraph/ChangeLog b/dev-php5/jpgraph/ChangeLog
index cd7c77976ae1..9a01a61f6bd0 100644
--- a/dev-php5/jpgraph/ChangeLog
+++ b/dev-php5/jpgraph/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-php5/jpgraph
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-php5/jpgraph/ChangeLog,v 1.9 2006/06/29 17:09:40 gmsoft Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php5/jpgraph/ChangeLog,v 1.10 2006/08/07 14:06:00 sebastian Exp $
+
+*jpgraph-2.1.2 (07 Aug 2006)
+
+ 07 Aug 2006; Sebastian Bergmann <sebastian@gentoo.org>
+ +jpgraph-2.1.2.ebuild:
+ Version bump, closes bug #143074.
29 Jun 2006; Guy Martin <gmsoft@gentoo.org> jpgraph-2.1.1.ebuild:
Added ~hppa to KEYWORDS.
diff --git a/dev-php5/jpgraph/files/digest-jpgraph-2.1.2 b/dev-php5/jpgraph/files/digest-jpgraph-2.1.2
new file mode 100644
index 000000000000..971ae7fdccc1
--- /dev/null
+++ b/dev-php5/jpgraph/files/digest-jpgraph-2.1.2
@@ -0,0 +1,3 @@
+MD5 af90ddff994629d3162192efff565179 jpgraph-2.1.2.tar.gz 4479849
+RMD160 4865c564707b5960471124c1f5d9be07e4ca72fb jpgraph-2.1.2.tar.gz 4479849
+SHA256 ae97dbfae010d620d495c1ac06e500dfd1a2ff03fcb9c642f8d062d5bbbec6f2 jpgraph-2.1.2.tar.gz 4479849
diff --git a/dev-php5/jpgraph/jpgraph-2.1.2.ebuild b/dev-php5/jpgraph/jpgraph-2.1.2.ebuild
new file mode 100644
index 000000000000..53c6b8d483e6
--- /dev/null
+++ b/dev-php5/jpgraph/jpgraph-2.1.2.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php5/jpgraph/jpgraph-2.1.2.ebuild,v 1.1 2006/08/07 14:06:00 sebastian Exp $
+
+inherit php-lib-r1
+
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+DESCRIPTION="Fully OO graph drawing library for PHP."
+HOMEPAGE="http://www.aditus.nu/jpgraph/"
+LICENSE="QPL-1.0"
+SLOT="0"
+IUSE="truetype"
+
+MY_P=${P/_/}
+SRC_URI="http://members.chello.se/jpgraph/jpgdownloads/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+RDEPEND="${RDEPEND}
+ truetype? ( media-fonts/corefonts )"
+
+need_php_by_category
+
+JPGRAPH_CACHE_DIR="/var/cache/jpgraph"
+COREFONTS_DIR="/usr/share/fonts/corefonts"
+
+pkg_setup() {
+ has_php
+
+ # we need the GD functionality of PHP
+ require_gd
+
+ # 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.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
+
+ # 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.php
+
+ # 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.php
+ fi
+
+ # patch 4:
+ # disable READ_CACHE in jpgraph
+
+ sed -i "s|^DEFINE(\"READ_CACHE\",true);|DEFINE(\"READ_CACHE\",false);|" src/jpg-config.inc.php
+
+ # 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
+ 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}"
+}