From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3629E139085 for ; Tue, 3 Jan 2017 19:17:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7D48CE0CC6; Tue, 3 Jan 2017 19:17:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 44D41E0CC6 for ; Tue, 3 Jan 2017 19:17:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2E3EE341130 for ; Tue, 3 Jan 2017 19:17:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A984724EC for ; Tue, 3 Jan 2017 19:17:34 +0000 (UTC) From: "Michael Orlitzky" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" Message-ID: <1483470842.6e68c5351d74213a94d26626cd82fa478048c130.mjo@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/jpgraph/, dev-php/jpgraph/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-php/jpgraph/Manifest dev-php/jpgraph/files/gentoo_ttf_dir.patch dev-php/jpgraph/jpgraph-4.0.2.ebuild X-VCS-Directories: dev-php/jpgraph/ dev-php/jpgraph/files/ X-VCS-Committer: mjo X-VCS-Committer-Name: Michael Orlitzky X-VCS-Revision: 6e68c5351d74213a94d26626cd82fa478048c130 X-VCS-Branch: master Date: Tue, 3 Jan 2017 19:17:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f9cfc6b7-d889-4481-9001-fb0999cb367f X-Archives-Hash: 5c3a54d62255125928ab94f26b5cbb53 commit: 6e68c5351d74213a94d26626cd82fa478048c130 Author: Michael Orlitzky gentoo org> AuthorDate: Tue Jan 3 18:48:21 2017 +0000 Commit: Michael Orlitzky gentoo org> CommitDate: Tue Jan 3 19:14:02 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e68c535 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 dev-php/jpgraph/Manifest | 1 + dev-php/jpgraph/files/gentoo_ttf_dir.patch | 31 +++++++++++++++ dev-php/jpgraph/jpgraph-4.0.2.ebuild | 64 ++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) diff --git a/dev-php/jpgraph/Manifest b/dev-php/jpgraph/Manifest index a4ae5cf..68fcb83 100644 --- a/dev-php/jpgraph/Manifest +++ b/dev-php/jpgraph/Manifest @@ -1 +1,2 @@ DIST jpgraph-3.0.7.tar.bz2 10541173 SHA256 412a1aaf47c7d70c5a4350d1c571ebb88c77138d9b95afd51895c44f188a03b6 SHA512 9385d8ac72a942faa4c2a46e7390c9b672fe45802ea37da8a90bca00e32d34421f7ce5dc8d78da934e2dfd8e748c21211af6556f11b3037898757555b0b529ee WHIRLPOOL 83cbd6fd4be742af70a0d2790a2defb8ef6e5c1d9fb66f18f5c5913e3c6986d9a4063671ec3b8d6a0aa08859d58ee710ab644433340e62d9a5689d7715118eda +DIST jpgraph-4.0.2.tar.gz 13298314 SHA256 9cbcf565c2bfb211e1c85fef1ed4fac5a830435ab508d509d2f5cb724356e121 SHA512 db1877c09c13a26d24ef7df4aae50799f55c6d72ca0cdb0b8d8c05928c1bc860f8a86eb52a5fb05bdc1c07574931825baa2989f006e9a4cc57e60913e8b67a3e WHIRLPOOL e403e829058afb33606d393ad60e36a89018c94c4e46b235e6909679b1f53117753e99bcc528a5b13eaa132ff7587f0f2e5a1940d222c5f50600863a3aafe54a 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 00000000..a10479b --- /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 +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 00000000..17112d1 --- /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" +}