summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-php/jpgraph
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-php/jpgraph')
-rw-r--r--dev-php/jpgraph/Manifest1
-rw-r--r--dev-php/jpgraph/files/cve-2009-4422.patch31
-rw-r--r--dev-php/jpgraph/jpgraph-3.0.7-r1.ebuild94
-rw-r--r--dev-php/jpgraph/jpgraph-3.0.7-r2.ebuild94
-rw-r--r--dev-php/jpgraph/metadata.xml5
5 files changed, 225 insertions, 0 deletions
diff --git a/dev-php/jpgraph/Manifest b/dev-php/jpgraph/Manifest
new file mode 100644
index 000000000000..a4ae5cff615f
--- /dev/null
+++ b/dev-php/jpgraph/Manifest
@@ -0,0 +1 @@
+DIST jpgraph-3.0.7.tar.bz2 10541173 SHA256 412a1aaf47c7d70c5a4350d1c571ebb88c77138d9b95afd51895c44f188a03b6 SHA512 9385d8ac72a942faa4c2a46e7390c9b672fe45802ea37da8a90bca00e32d34421f7ce5dc8d78da934e2dfd8e748c21211af6556f11b3037898757555b0b529ee WHIRLPOOL 83cbd6fd4be742af70a0d2790a2defb8ef6e5c1d9fb66f18f5c5913e3c6986d9a4063671ec3b8d6a0aa08859d58ee710ab644433340e62d9a5689d7715118eda
diff --git a/dev-php/jpgraph/files/cve-2009-4422.patch b/dev-php/jpgraph/files/cve-2009-4422.patch
new file mode 100644
index 000000000000..b092d43c9006
--- /dev/null
+++ b/dev-php/jpgraph/files/cve-2009-4422.patch
@@ -0,0 +1,31 @@
+diff -ur jpgraph-3.0.7.orig/src/jpgraph.php jpgraph-3.0.7/src/jpgraph.php
+--- jpgraph-3.0.7.orig/src/jpgraph.php 1970-01-01 10:13:08.000000000 +0100
++++ jpgraph-3.0.7/src/jpgraph.php 2012-06-11 14:55:18.557995018 +0200
+@@ -1286,11 +1286,11 @@
+ while( list($key,$value) = each($_GET) ) {
+ if( is_array($value) ) {
+ foreach ( $value as $k => $v ) {
+- $urlarg .= '&amp;'.$key.'%5B'.$k.'%5D='.urlencode($v);
++ $urlarg .= '&amp;'.urlencode($key).'%5B'.$k.'%5D='.urlencode($v);
+ }
+ }
+ else {
+- $urlarg .= '&amp;'.$key.'='.urlencode($value);
++ $urlarg .= '&amp;'.urlencode($key).'='.urlencode($value);
+ }
+ }
+
+@@ -1301,11 +1301,11 @@
+ while( list($key,$value) = each($_POST) ) {
+ if( is_array($value) ) {
+ foreach ( $value as $k => $v ) {
+- $urlarg .= '&amp;'.$key.'%5B'.$k.'%5D='.urlencode($v);
++ $urlarg .= '&amp;'.htmlentities($key).'%5B'.$k.'%5D='.htmlentities($v);
+ }
+ }
+ else {
+- $urlarg .= '&amp;'.$key.'='.urlencode($value);
++ $urlarg .= '&amp;'.htmlentities($key).'='.htmlentities($value);
+ }
+ }
+
diff --git a/dev-php/jpgraph/jpgraph-3.0.7-r1.ebuild b/dev-php/jpgraph/jpgraph-3.0.7-r1.ebuild
new file mode 100644
index 000000000000..46118fc82459
--- /dev/null
+++ b/dev-php/jpgraph/jpgraph-3.0.7-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit 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.bz2"
+LICENSE="QPL-1.0"
+SLOT="0"
+IUSE="truetype +examples"
+
+DEPEND=""
+RDEPEND="truetype? ( media-fonts/corefonts )
+ dev-lang/php[gd]
+ "
+S="${WORKDIR}"
+
+[[ -z "${JPGRAPH_CACHEDIR}" ]] && JPGRAPH_CACHEDIR="/var/cache/jpgraph-php5/"
+
+pkg_setup() {
+ # check to which 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_prepare() {
+ epatch "${FILESDIR}/cve-2009-4422.patch"
+}
+
+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','www');|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"
+ insinto "/usr/share/php/${PN}"
+ doins -r src/*
+
+ # remove unwanted examples
+ use examples || rm -rf "${D}/usr/share/php/${PN}/Examples"
+
+ # install documentation
+ einfo "Installing documentation"
+ dodoc -r docportal/*
+ dodoc README
+
+ # setup the cache dir
+ einfo "Setting up the cache dir"
+ keepdir "${JPGRAPH_CACHEDIR}"
+ fowners ${HTTPD_USER}:${HTTPD_GROUP} "${JPGRAPH_CACHEDIR}"
+ fperms 750 "${JPGRAPH_CACHEDIR}"
+}
diff --git a/dev-php/jpgraph/jpgraph-3.0.7-r2.ebuild b/dev-php/jpgraph/jpgraph-3.0.7-r2.ebuild
new file mode 100644
index 000000000000..3aac6c65da80
--- /dev/null
+++ b/dev-php/jpgraph/jpgraph-3.0.7-r2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+
+DESCRIPTION="Fully OO graph drawing library for PHP"
+HOMEPAGE="http://jpgraph.net/"
+SRC_URI="http://hem.bredband.net/jpgraph2/${P}.tar.bz2"
+LICENSE="QPL-1.0"
+SLOT="0"
+IUSE="truetype +examples"
+
+DEPEND=""
+RDEPEND="truetype? ( media-fonts/corefonts )
+ dev-lang/php[gd,truetype?]
+ "
+S="${WORKDIR}"
+
+[[ -z "${JPGRAPH_CACHEDIR}" ]] && JPGRAPH_CACHEDIR="/var/cache/jpgraph-php5/"
+
+pkg_setup() {
+ # check to which 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_prepare() {
+ epatch "${FILESDIR}/cve-2009-4422.patch"
+}
+
+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','www');|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/share/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"
+ insinto "/usr/share/php/${PN}"
+ doins -r src/*
+
+ # remove unwanted examples
+ use examples || rm -rf "${D}/usr/share/php/${PN}/Examples"
+
+ # install documentation
+ einfo "Installing documentation"
+ dodoc -r docportal/*
+ dodoc README
+
+ # setup the cache dir
+ einfo "Setting up the cache dir"
+ keepdir "${JPGRAPH_CACHEDIR}"
+ fowners ${HTTPD_USER}:${HTTPD_GROUP} "${JPGRAPH_CACHEDIR}"
+ fperms 750 "${JPGRAPH_CACHEDIR}"
+}
diff --git a/dev-php/jpgraph/metadata.xml b/dev-php/jpgraph/metadata.xml
new file mode 100644
index 000000000000..fd3dbe39fa64
--- /dev/null
+++ b/dev-php/jpgraph/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>