summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-01-03 13:48:21 -0500
committerMichael Orlitzky <mjo@gentoo.org>2017-01-03 14:14:02 -0500
commit6e68c5351d74213a94d26626cd82fa478048c130 (patch)
tree18ef91e0ec13cbaafb12687069006e343a62197d /dev-php/jpgraph/jpgraph-4.0.2.ebuild
parentmedia-libs/phonon: Remove 4.7.2 (diff)
downloadgentoo-6e68c5351d74213a94d26626cd82fa478048c130.tar.gz
gentoo-6e68c5351d74213a94d26626cd82fa478048c130.tar.bz2
gentoo-6e68c5351d74213a94d26626cd82fa478048c130.zip
dev-php/jpgraph: new version 4.0.2 fixing a few bugs.
This new version fixes a few outstanding issues with the old 3.x series ebuilds. First, the config file is now installed to /etc, where the user will be able to edit it, and then merely symlinked to /usr/share/php/jpgraph where it used to live. This lets the user configure caching at any time, which brings us to the second improvement: caching is disabled by default, and we make no attempt to configure the web server user or cache directory. This fixes an open bug. Finally, all of the documentation and examples are now installed in the correct place, and no copies wind up in the PHP include directory. Other minor improvements were made, like an update to EAPI=6, and the use of a patch instead of a call to sed. Gentoo-Bug: 520566 Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-php/jpgraph/jpgraph-4.0.2.ebuild')
-rw-r--r--dev-php/jpgraph/jpgraph-4.0.2.ebuild64
1 files changed, 64 insertions, 0 deletions
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..17112d1341e2
--- /dev/null
+++ b/dev-php/jpgraph/jpgraph-4.0.2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+}