Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/leptonica/files/, media-libs/leptonica/
Date: Mon, 14 Jan 2019 20:50:21
Message-Id: 1547499006.2edc2a7914a5175332d2b3bdf713477ee9061a85.chewi@gentoo
1 commit: 2edc2a7914a5175332d2b3bdf713477ee9061a85
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 14 20:49:10 2019 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 14 20:50:06 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2edc2a79
7
8 media-libs/leptonica: Version bump to 1.77.0, EAPI 7
9
10 Package-Manager: Portage-2.3.55, Repoman-2.3.12
11 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
12
13 media-libs/leptonica/Manifest | 1 +
14 media-libs/leptonica/files/1.77.0-gnuplot.patch | 25 +++++++++
15 media-libs/leptonica/leptonica-1.77.0.ebuild | 75 +++++++++++++++++++++++++
16 3 files changed, 101 insertions(+)
17
18 diff --git a/media-libs/leptonica/Manifest b/media-libs/leptonica/Manifest
19 index f41ecb5fcdf..74485e4a7d9 100644
20 --- a/media-libs/leptonica/Manifest
21 +++ b/media-libs/leptonica/Manifest
22 @@ -1,2 +1,3 @@
23 DIST leptonica-1.74.4.tar.gz 12349877 BLAKE2B 5c4a71c1c4f44b617f16b1b1029455badee268dc1ac459f1c7ffe6af5b8dbe702bdbaa6e5564af6e41d0881c59e1aa43dc40d5164f618f13ca2a563b2aa3bd0e SHA512 e74732c10218430463ca01f15e19d329dceb938e315586ed100c634c4d50809824f1d9bf7eeaf91654caf42ed78a5ae5de7c08e7a1d8884c580c536121627891
24 DIST leptonica-1.76.0.tar.gz 12436958 BLAKE2B 3cbb581340531762090f009393b21252d6f7ecbe3dd7c30043f42e8a437f6ae16d3e95229fedcf6845ca47e4323a35ab3e72e349c6fae35f0587c21b44461ef8 SHA512 83c77bebbf739cecab997ee08f7c9abf3ca884019c559b8f77c292ea2676c464cbf9b6812d7f12aefceef86c19d04bb3bc85119de298647a641b984dcdf3b111
25 +DIST leptonica-1.77.0.tar.gz 12888756 BLAKE2B a1de6ff8d886c4e302faa362ad5c18ece727771e5cdbe62b33c34c950d1af9e0e97418e59485568a6386eb2a7e51fd42ffb2fd01f16591c5bc668961640f1f4d SHA512 3cf764c76d5acb6d5982c44e78c02d7a7c3b5e79937c41df193e71dd8a02dbbf965d34a2ecdf0444e907cb73c06bdb8bcae4ceafbf5ee1483c022659e897015b
26
27 diff --git a/media-libs/leptonica/files/1.77.0-gnuplot.patch b/media-libs/leptonica/files/1.77.0-gnuplot.patch
28 new file mode 100644
29 index 00000000000..0d6b0e3cb15
30 --- /dev/null
31 +++ b/media-libs/leptonica/files/1.77.0-gnuplot.patch
32 @@ -0,0 +1,25 @@
33 +From 5204b5453fe8035d77e34add80f8ebb1f36b9350 Mon Sep 17 00:00:00 2001
34 +From: James Le Cuirot <chewi@××××××××××××××.uk>
35 +Date: Mon, 14 Jan 2019 20:26:14 +0000
36 +Subject: [PATCH] Add boxa2_reg and numa[12]_reg to gnuplot-dependent test list
37 +
38 +---
39 + prog/reg_wrapper.sh | 2 +-
40 + 1 file changed, 1 insertion(+), 1 deletion(-)
41 +
42 +diff --git a/prog/reg_wrapper.sh b/prog/reg_wrapper.sh
43 +index 5568c8e..ff9264d 100755
44 +--- a/prog/reg_wrapper.sh
45 ++++ b/prog/reg_wrapper.sh
46 +@@ -31,7 +31,7 @@ TEST_NAME="${TEST##*/}"
47 + TEST_NAME="${TEST_NAME%_reg*}"
48 +
49 + case "${TEST_NAME}" in
50 +- baseline|boxa1|colormask|colorspace|dna|enhance|extrema|fpix1|italic|kernel|nearline|projection|rankbin|rankhisto|wordboxes)
51 ++ baseline|boxa[12]|colormask|colorspace|dna|enhance|extrema|fpix1|italic|kernel|nearline|numa[12]|projection|rankbin|rankhisto|wordboxes)
52 + GNUPLOT=$(type -P gnuplot || type -P wgnuplot)
53 +
54 + if [ -z "${GNUPLOT}" ] || ! "${GNUPLOT}" -e "set terminal png" 2>/dev/null ; then
55 +--
56 +2.19.2
57 +
58
59 diff --git a/media-libs/leptonica/leptonica-1.77.0.ebuild b/media-libs/leptonica/leptonica-1.77.0.ebuild
60 new file mode 100644
61 index 00000000000..1e8f7a678d8
62 --- /dev/null
63 +++ b/media-libs/leptonica/leptonica-1.77.0.ebuild
64 @@ -0,0 +1,75 @@
65 +# Copyright 1999-2019 Gentoo Authors
66 +# Distributed under the terms of the GNU General Public License v2
67 +
68 +EAPI=7
69 +
70 +inherit multilib-minimal
71 +
72 +DESCRIPTION="C library for image processing and analysis"
73 +HOMEPAGE="http://www.leptonica.org/"
74 +SRC_URI="https://github.com/DanBloomberg/${PN}/releases/download/${PV}/${P}.tar.gz"
75 +LICENSE="Apache-2.0"
76 +SLOT="0/5"
77 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos"
78 +IUSE="gif jpeg jpeg2k png static-libs test tiff utils webp zlib"
79 +
80 +# N.B. Tests need some features enabled:
81 +REQUIRED_USE="test? ( jpeg png tiff zlib )"
82 +
83 +RDEPEND="gif? ( >=media-libs/giflib-5.1.3:=[${MULTILIB_USEDEP}] )
84 + jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
85 + jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] )
86 + png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}]
87 + sys-libs/zlib:=[${MULTILIB_USEDEP}] )
88 + tiff? ( media-libs/tiff:0=[${MULTILIB_USEDEP}] )
89 + webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] )
90 + zlib? ( sys-libs/zlib:=[${MULTILIB_USEDEP}] )"
91 +
92 +DEPEND="${RDEPEND}
93 + test? ( media-libs/tiff:0[zlib] )"
94 +
95 +PATCHES=(
96 + "${FILESDIR}"/${PV}-gnuplot.patch
97 +)
98 +
99 +ECONF_SOURCE="${S}"
100 +DOCS=( README version-notes )
101 +
102 +src_prepare() {
103 + default
104 +
105 + # unhtmlize docs
106 + local X
107 + for X in ${DOCS[@]}; do
108 + awk '/<\/pre>/{s--} {if (s) print $0} /<pre>/{s++}' \
109 + "${X}.html" > "${X}" || die 'awk failed'
110 + rm -f -- "${X}.html"
111 + done
112 +}
113 +
114 +multilib_src_configure() {
115 + econf \
116 + --enable-shared \
117 + $(use_with gif giflib) \
118 + $(use_with jpeg) \
119 + $(use_with jpeg2k libopenjpeg) \
120 + $(use_with png libpng) \
121 + $(use_with tiff libtiff) \
122 + $(use_with webp libwebp) \
123 + $(use_with zlib) \
124 + $(use_enable static-libs static) \
125 + $(multilib_native_use_enable utils programs)
126 +}
127 +
128 +multilib_src_test() {
129 + default
130 +
131 + # ${TMPDIR} is not respected. It used to be but it lead to issues
132 + # and there have been long debates with upstream about it. :(
133 + rm -rf /tmp/lept/ || die
134 +}
135 +
136 +multilib_src_install_all() {
137 + # libtool archives covered by pkg-config.
138 + find "${D}" -name "*.la" -delete || die
139 +}