Gentoo Archives: gentoo-commits

From: Amy Liffey <amynka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/peps/
Date: Sun, 06 Aug 2017 13:49:12
Message-Id: 1502027294.eefc2342f65773e3d7aeee2f5af43a10e6616bda.amynka@gentoo
1 commit: eefc2342f65773e3d7aeee2f5af43a10e6616bda
2 Author: Amy Liffey <amynka <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 6 13:48:14 2017 +0000
4 Commit: Amy Liffey <amynka <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 6 13:48:14 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eefc2342
7
8 media-gfx/peps: eapi bump to 6
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.1
11
12 media-gfx/peps/peps-2.0-r1.ebuild | 54 +++++++++++++++++++++++++++++++++++++++
13 1 file changed, 54 insertions(+)
14
15 diff --git a/media-gfx/peps/peps-2.0-r1.ebuild b/media-gfx/peps/peps-2.0-r1.ebuild
16 new file mode 100644
17 index 00000000000..8b79fa61acf
18 --- /dev/null
19 +++ b/media-gfx/peps/peps-2.0-r1.ebuild
20 @@ -0,0 +1,54 @@
21 +# Copyright 1999-2017 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +
26 +inherit eutils toolchain-funcs
27 +
28 +DESCRIPTION="Preprocess and convert EPS files to bitmap with Ghostscript"
29 +HOMEPAGE="http://peps.redprince.net/peps/"
30 +SRC_URI="http://www.peps.redprince.net/peps/${P}.tar.gz"
31 +
32 +LICENSE="BSD-2"
33 +SLOT="0"
34 +KEYWORDS="~amd64 ~x86"
35 +IUSE="X"
36 +
37 +DEPEND="app-text/ghostscript-gpl
38 + app-arch/gzip"
39 +RDEPEND="${DEPEND}"
40 +
41 +pkg_setup() {
42 + if use X && ! grep -q x11gray4 <(gs -h 2>/dev/null); then
43 + die "you need a ghostscript version with 'x11' and 'x11gray4' devices!"
44 + fi
45 +}
46 +
47 +src_prepare() {
48 + default
49 + # adding <string.h> include
50 + sed -i -e "s:^\(#include.*<unistd.h>.*\):\1\n#include <string.h>:" peps.c || die
51 + # adding LDFLAGS to Makefile
52 + sed -i -e "s:\( -o \): \${LDFLAGS}\1:g" Makefile || die
53 +}
54 +
55 +src_compile() {
56 + local myopts="peps"
57 + use X && myopts="${myopts} xpeps"
58 + emake CC="$(tc-getCC)" ${myopts}
59 +}
60 +
61 +src_install() {
62 + # manual install, because fixing dumb Makefile is more compilcated
63 + dobin peps
64 + use X && dobin xpeps
65 +
66 + doman peps.1
67 + dodoc README
68 +
69 + insinto /etc
70 + doins peps.mime
71 +
72 + # copy PDF so it won't be compressed
73 + cp peps.pdf "${D}usr/share/doc/${PF}" || die
74 +}