summaryrefslogtreecommitdiff
path: root/dev-php/jpgraph
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-php/jpgraph
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-php/jpgraph')
-rw-r--r--dev-php/jpgraph/Manifest6
-rw-r--r--dev-php/jpgraph/files/gentoo_ttf_dir.patch31
-rw-r--r--dev-php/jpgraph/jpgraph-4.0.2.ebuild63
-rw-r--r--dev-php/jpgraph/metadata.xml8
4 files changed, 108 insertions, 0 deletions
diff --git a/dev-php/jpgraph/Manifest b/dev-php/jpgraph/Manifest
new file mode 100644
index 000000000000..e01bbc80aca1
--- /dev/null
+++ b/dev-php/jpgraph/Manifest
@@ -0,0 +1,6 @@
+AUX gentoo_ttf_dir.patch 1187 SHA256 e516ab39a95020b1ad90b19e936367145412df1c5379c0241d6cc9f89cb94684 SHA512 76cd126b80849b915d48d88af292c75b66c3212870e2b1daafe7cee9ab248719d7517a0bc8a3fed076a4aec960badeedde0d7874053b8ab448f6b9e839cb34e3 WHIRLPOOL 6967e0e99f2dafa31560ff8995d67e405edaac837e97f966aefc850f039ab42ad21b04814660c984dfdf78d85063d5581e08660d20d16d164968e8f3263846ee
+DIST jpgraph-4.0.2.tar.gz 13298314 SHA256 9cbcf565c2bfb211e1c85fef1ed4fac5a830435ab508d509d2f5cb724356e121 SHA512 db1877c09c13a26d24ef7df4aae50799f55c6d72ca0cdb0b8d8c05928c1bc860f8a86eb52a5fb05bdc1c07574931825baa2989f006e9a4cc57e60913e8b67a3e WHIRLPOOL e403e829058afb33606d393ad60e36a89018c94c4e46b235e6909679b1f53117753e99bcc528a5b13eaa132ff7587f0f2e5a1940d222c5f50600863a3aafe54a
+EBUILD jpgraph-4.0.2.ebuild 2375 SHA256 1a4b330e3c366aee2665a5ae187eac6fa206dc5a69e0885a5a09328ee75bd1b3 SHA512 3e1538ea3822fa61b9a1b186790fef83fa5369afacca1368a7e4a836374453d081d7244d972c8876317d69a1edbd3c73af783d1a59a8d4096ccbbe1166831e9e WHIRLPOOL 693ed50a37e857b6dc84d3fbb235e67897620ccc478de749fe81567e76fe0591ae49ab1358995e1c4f0b165484dd319e1ea3f6aacc399c7b5c86f1d7b801fea5
+MISC ChangeLog 2520 SHA256 e00873e6c2e263abddef7f4da31bf4e3c2ddf360b4957633cf13a4ffc76a2e95 SHA512 733c4774d4a20abd9740c083331c072f683479bac4f203afffa965b4f07bb5a72e541a1b46a8c16a73bcf0875f4dcb8ab9d0947ddcdf5df71252877e2315bd60 WHIRLPOOL f1abfdee23075c2f60689ef2d7e6c6a0d4c697fd846c8136e68e2563c17775beba466d47823c56acd1e00cb1ccfb651f98ec1279cbe8bbe3de68f5d3c3d9e1b3
+MISC ChangeLog-2015 5520 SHA256 7a9bd0d123511397baad596a0fe1e4abf6de1a32945a9a70ac5bd29834b22b56 SHA512 99fa78db270601c65cfb4f69232be4b03f89178b698bfd41796c5198e127e43ece555c27cd3d9f3650c4175f1afda8aec1963180d4405d5ce94c264ebc7763ca WHIRLPOOL 9e559fc004cd719a483298fc40833034a0383e76087ce92da0c1fdeee3115e5744e3429db0b2336e47d31cbceb815a840025acfb636bfbcd099523c53f94ab67
+MISC metadata.xml 239 SHA256 b54aca642ac424532264a97d14931720ed288cf387dbdef6a10b34ffed6689f1 SHA512 2181b874bfe8cd31e7730d8207e26cfd2f272eaf2d1b57ae0faff126347a5298fa1c506d9107e1da9736c8a0ed9c8c339e4d9509a8726b79dbe86e073c12dee0 WHIRLPOOL 80ab9605bb31ce3310bf524de4705c67ca85cf8f2346b7e13274595598b9fe92c9b119beb865ef214ad33ef172b880e318d18ff8c8d2026cb7319f0524d8a7aa
diff --git a/dev-php/jpgraph/files/gentoo_ttf_dir.patch b/dev-php/jpgraph/files/gentoo_ttf_dir.patch
new file mode 100644
index 000000000000..a10479b3f673
--- /dev/null
+++ b/dev-php/jpgraph/files/gentoo_ttf_dir.patch
@@ -0,0 +1,31 @@
+From fd1fc5e3c72ac4511f86852b1704821c440bdb3d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 3 Jan 2017 12:56:18 -0500
+Subject: [PATCH 1/1] Set TTF_DIR to the Gentoo corefonts location.
+
+The default value of TTF_DIR in jpg-config.inc.php points to
+/usr/share/fonts/truetype, a location that does not exist on
+Gentoo. Since JpGraph largely only supports the Microsoft
+corefonts, we point it to /usr/share/fonts/corefonts instead.
+If the user does not have the corefonts installed, this is no
+great loss: neither location exists.
+---
+ src/jpg-config.inc.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/jpg-config.inc.php b/src/jpg-config.inc.php
+index ea16c1e..98cbdc7 100755
+--- a/src/jpg-config.inc.php
++++ b/src/jpg-config.inc.php
+@@ -36,7 +36,7 @@
+ //
+ //------------------------------------------------------------------------
+ // define('CACHE_DIR','/tmp/jpgraph_cache/');
+-// define('TTF_DIR','/usr/share/fonts/TrueType/');
++define('TTF_DIR','/usr/share/fonts/corefonts/');
+ // define('MBTTF_DIR','/usr/share/fonts/TrueType/');
+
+ //-------------------------------------------------------------------------
+--
+2.10.2
+
diff --git a/dev-php/jpgraph/jpgraph-4.0.2.ebuild b/dev-php/jpgraph/jpgraph-4.0.2.ebuild
new file mode 100644
index 000000000000..3d0a12eeb095
--- /dev/null
+++ b/dev-php/jpgraph/jpgraph-4.0.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Object-oriented graphing library for PHP"
+HOMEPAGE="http://jpgraph.net/"
+# Upstream didn't have a stable download URL when this was packaged.
+SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.gz"
+LICENSE="QPL-1.0"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc sparc x86"
+IUSE="truetype examples"
+
+DEPEND=""
+RDEPEND="truetype? ( media-fonts/corefonts )
+ dev-lang/php[gd,truetype?]"
+
+src_prepare() {
+ default
+
+ # The DejaVu fonts are now bundled with the library and don't need
+ # to be found in TTF_DIR. Since most of the fonts supported by
+ # JpGraph are corefonts, we point the sole TTF_DIR towards them for
+ # maximum impact. Why not apply the patch unconditionally? We want
+ # to avoid a situation where TTF fonts appear to work, but then
+ # break without warning when the user e.g. removes corefonts. By
+ # applying the patch conditionally, we ensure a dependency on
+ # media-fonts/corefonts before anything will work.
+ use truetype && eapply "${FILESDIR}/gentoo_ttf_dir.patch"
+
+ # Some of the documentation and examples are shipped in the "src"
+ # directory. We want them outside of that tree so that we can simply
+ # call doins recursively on "src". First, rename the existing "docs"
+ # directory which contains the HTML manual and class reference.
+ mv docs html || die 'failed to rename "docs" directory'
+ mv src/README ./ || die 'failed to relocate the README'
+ mv src/Examples ./examples || die 'failed to relocate the examples'
+
+ # These are present (duplicated) in the other Examples directory,
+ # and don't work anyway.
+ rm -r src/barcode || die 'failed to remove some barcode examples'
+
+ # We'll also want to install the config file to /etc, since it may
+ # need to be edited by the user.
+ mv src/jpg-config.inc.php ./ || die 'failed to relocate the config file'
+ rm src/jpg-config.inc.php.orig || die 'failed to remove original config file'
+}
+
+src_install() {
+ dodoc README
+ dodoc -r html
+ use examples && dodoc -r examples
+
+ insinto "/usr/share/php/${PN}"
+ doins -r src/*
+
+ insinto /etc
+ doins jpg-config.inc.php
+ # Create a symlink for the config file, because the library will only
+ # look for it in its own source tree (not in /etc where we've put it).
+ dosym /etc/jpg-config.inc.php "/usr/share/php/${PN}/jpg-config.inc.php"
+}
diff --git a/dev-php/jpgraph/metadata.xml b/dev-php/jpgraph/metadata.xml
new file mode 100644
index 000000000000..b86acf66c756
--- /dev/null
+++ b/dev-php/jpgraph/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>php-bugs@gentoo.org</email>
+ <name>PHP</name>
+ </maintainer>
+</pkgmetadata>