summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Ullmann <jokey@gentoo.org>2007-08-31 09:38:43 +0000
committerMarkus Ullmann <jokey@gentoo.org>2007-08-31 09:38:43 +0000
commit1dfec62a420832e8a258083c5476695bb94311e1 (patch)
tree7d003646ee2f874031b9f12e0f5353f6d9ec51a6 /dev-php5/jpgraph
parentFixed bug #133504 (maildir account file-chooser descend into directories) rep... (diff)
downloadgentoo-2-1dfec62a420832e8a258083c5476695bb94311e1.tar.gz
gentoo-2-1dfec62a420832e8a258083c5476695bb94311e1.tar.bz2
gentoo-2-1dfec62a420832e8a258083c5476695bb94311e1.zip
Port from project overlay
(Portage version: 2.1.3.7)
Diffstat (limited to 'dev-php5/jpgraph')
-rw-r--r--dev-php5/jpgraph/ChangeLog13
-rw-r--r--dev-php5/jpgraph/files/digest-jpgraph-2.23
-rw-r--r--dev-php5/jpgraph/jpgraph-2.2.ebuild90
3 files changed, 105 insertions, 1 deletions
diff --git a/dev-php5/jpgraph/ChangeLog b/dev-php5/jpgraph/ChangeLog
index 039b06d901d3..e2db30f6ddaf 100644
--- a/dev-php5/jpgraph/ChangeLog
+++ b/dev-php5/jpgraph/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for dev-php5/jpgraph
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-php5/jpgraph/ChangeLog,v 1.19 2007/07/29 16:54:25 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php5/jpgraph/ChangeLog,v 1.20 2007/08/31 09:38:43 jokey Exp $
+
+*jpgraph-2.2 (31 Aug 2007)
+
+ 31 Aug 2007; Markus Ullmann <jokey@gentoo.org> +jpgraph-2.2.ebuild:
+ Port from project overlay
+
+ 30 Aug 2007; Jakub Moc <jakub@gentoo.org> jpgraph-2.2.ebuild:
+ Make HTTPD_{USER,GROUP} configurable.
+
+ 30 Aug 2007; Jakub Moc <jakub@gentoo.org> +jpgraph-2.2.ebuild:
+ Version bump
29 Jul 2007; Christian Heim <phreak@gentoo.org> jpgraph-2.1.3.ebuild,
jpgraph-2.1.4.ebuild:
diff --git a/dev-php5/jpgraph/files/digest-jpgraph-2.2 b/dev-php5/jpgraph/files/digest-jpgraph-2.2
new file mode 100644
index 000000000000..5ca3db219760
--- /dev/null
+++ b/dev-php5/jpgraph/files/digest-jpgraph-2.2
@@ -0,0 +1,3 @@
+MD5 90e1702e41acffd9c46b1977b2bc5739 jpgraph-2.2.tar.gz 4604898
+RMD160 d83e84dcf80ac037666ec4e2d84e8c8ade7abcec jpgraph-2.2.tar.gz 4604898
+SHA256 1b1de456bf7c01a94e32e6dd56cecb9570b294da1d55f410d5b48e7e147f566f jpgraph-2.2.tar.gz 4604898
diff --git a/dev-php5/jpgraph/jpgraph-2.2.ebuild b/dev-php5/jpgraph/jpgraph-2.2.ebuild
new file mode 100644
index 000000000000..192e3d1deb9c
--- /dev/null
+++ b/dev-php5/jpgraph/jpgraph-2.2.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php5/jpgraph/jpgraph-2.2.ebuild,v 1.1 2007/08/31 09:38:43 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/jpgraph2/${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-php5/"
+
+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 in 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 in 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 in 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 in 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}"
+}