1 |
commit: 3b5a7f9df543154df47f302f0f7339f9772884c0 |
2 |
Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Aug 24 07:52:04 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 1 02:16:10 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b5a7f9d |
7 |
|
8 |
media-libs/netpbm: add 10.86.34 |
9 |
|
10 |
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com> |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
media-libs/netpbm/Manifest | 1 + |
14 |
media-libs/netpbm/netpbm-10.86.34.ebuild | 229 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 230 insertions(+) |
16 |
|
17 |
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest |
18 |
index 9905cb431cfd..157e6e1daadd 100644 |
19 |
--- a/media-libs/netpbm/Manifest |
20 |
+++ b/media-libs/netpbm/Manifest |
21 |
@@ -2,3 +2,4 @@ DIST netpbm-10.86.24.tar.xz 3698448 BLAKE2B 189fbaeb91db15e317c62758c64d1165d3cb |
22 |
DIST netpbm-10.86.27.tar.xz 3699900 BLAKE2B cf1e2742b343100081d53cdccfca5d41ce46ad57adb72c10c2e8ea94547e8d097e657c50554dae79b47c5c2e8d8146d15ef372b9e031152411b3379a0998a8d8 SHA512 b809b05647b4f4509db04a937a5c0b03301ccf93a56d773d6ddfe11a1cdc254befeb311e20306e5329db75fce9697b823c351a32ba0a771f4545793a55cb646c |
23 |
DIST netpbm-10.86.30.tar.xz 3692036 BLAKE2B 2529adfe7f93cf2400547c107cf04b03478aef95bce6573195a6a9e20767b04371bcff13744aa547885ffa3137d948076de01ad0a979f4464c13e3fdeeb37bf7 SHA512 7643b279c59717b30130e7178be82638085d2ae28c0cea8c7595f5ff3a1cd3c5dd0201a051bed8997f8a8354b5eeb08949d4e8587d3e807df7859a4cb1a44534 |
24 |
DIST netpbm-10.86.33.tar.xz 3696704 BLAKE2B 57657d69e235ee9babefce6e44e7ac35ac9b67c38797cee140488afe268687e4030158280c1064f8111891b9114106420314cdbce1b8be8d7dd45204a07aa5b0 SHA512 b0a555276e26d171705e93bdc26d33869fa611e01728d935edd0a7b96815db4f9ff264d7d6cecccc751b0bbfd639b14316f1ab576b1182b755e0f1832d8f43ca |
25 |
+DIST netpbm-10.86.34.tar.xz 3698852 BLAKE2B 7ea0e93450fb0bdf50b1b498468dd32350f20c8e993cda3e0ffa942dcdeab775a532a4771b10c55c862340964a4520f51ea4916c20051d5140dbb0a9ce373860 SHA512 bbb4dc685a44c0d7733808edd938b1205891ae5cf312218ef717bf63053513058251a659e3cf9acc762b0aeec8da3fc8e8a05e1442591c87f5a1dce7f63ee870 |
26 |
|
27 |
diff --git a/media-libs/netpbm/netpbm-10.86.34.ebuild b/media-libs/netpbm/netpbm-10.86.34.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..6bcdb4345f40 |
30 |
--- /dev/null |
31 |
+++ b/media-libs/netpbm/netpbm-10.86.34.ebuild |
32 |
@@ -0,0 +1,229 @@ |
33 |
+# Copyright 1999-2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+inherit flag-o-matic multilib toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats" |
41 |
+HOMEPAGE="http://netpbm.sourceforge.net/" |
42 |
+SRC_URI="https://github.com/ceamac/netpbm-make-dist/releases/download/v${PV}/${P}.tar.xz" |
43 |
+ |
44 |
+LICENSE="GPL-2" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
47 |
+IUSE="jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml" |
48 |
+ |
49 |
+BDEPEND=" |
50 |
+ app-arch/xz-utils |
51 |
+ sys-devel/flex |
52 |
+ virtual/pkgconfig |
53 |
+" |
54 |
+# app-text/ghostscript-gpl is really needed for postscript |
55 |
+# some utilities execute /usr/bin/gs |
56 |
+RDEPEND="jbig? ( media-libs/jbigkit:= ) |
57 |
+ jpeg? ( media-libs/libjpeg-turbo:=[static-libs?] ) |
58 |
+ png? ( |
59 |
+ >=media-libs/libpng-1.4:0= |
60 |
+ sys-libs/zlib |
61 |
+ ) |
62 |
+ postscript? ( |
63 |
+ app-text/ghostscript-gpl |
64 |
+ sys-libs/zlib |
65 |
+ ) |
66 |
+ rle? ( media-libs/urt:= ) |
67 |
+ svga? ( media-libs/svgalib ) |
68 |
+ tiff? ( >=media-libs/tiff-3.5.5:0 ) |
69 |
+ xml? ( dev-libs/libxml2 ) |
70 |
+ X? ( x11-libs/libX11 )" |
71 |
+DEPEND="${RDEPEND}" |
72 |
+ |
73 |
+PATCHES=( |
74 |
+ "${FILESDIR}"/netpbm-10.86.21-build.patch |
75 |
+ "${FILESDIR}"/netpbm-10.86.21-test.patch #450530 |
76 |
+ "${FILESDIR}"/netpbm-10.86.21-misc-deps.patch |
77 |
+ "${FILESDIR}"/netpbm-10.86.22-fix-ps-test.patch #670362 |
78 |
+) |
79 |
+ |
80 |
+netpbm_libtype() { |
81 |
+ case ${CHOST} in |
82 |
+ *-darwin*) echo dylib;; |
83 |
+ *) echo unixshared;; |
84 |
+ esac |
85 |
+} |
86 |
+ |
87 |
+netpbm_libsuffix() { |
88 |
+ local suffix=$(get_libname) |
89 |
+ echo ${suffix//\.} |
90 |
+} |
91 |
+ |
92 |
+netpbm_ldshlib() { |
93 |
+ case ${CHOST} in |
94 |
+ *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';; |
95 |
+ *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';; |
96 |
+ esac |
97 |
+} |
98 |
+netpbm_config() { |
99 |
+ if use ${1} ; then |
100 |
+ [[ ${2} != "!" ]] && echo -l${2:-$1} |
101 |
+ else |
102 |
+ echo NONE |
103 |
+ fi |
104 |
+} |
105 |
+ |
106 |
+# for bug #828127 |
107 |
+netpbm_cflags_for_build() { |
108 |
+ if is-flagq -fPIC; then |
109 |
+ echo -fPIC |
110 |
+ fi |
111 |
+} |
112 |
+ |
113 |
+src_prepare() { |
114 |
+ default |
115 |
+ |
116 |
+ # make sure we use system libs |
117 |
+ sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die |
118 |
+ rm -r urt converter/other/jbig/libjbig converter/other/jpeg2000/libjasper || die |
119 |
+ |
120 |
+ # take care of the importinc stuff ourselves by only doing it once |
121 |
+ # at the top level and having all subdirs use that one set #149843 |
122 |
+ sed -i \ |
123 |
+ -e '/^importinc:/s|^|importinc:\nmanual_|' \ |
124 |
+ -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\ |
125 |
+ common.mk || die |
126 |
+ sed -i \ |
127 |
+ -e '/%.c/s: importinc$::' \ |
128 |
+ common.mk lib/Makefile lib/util/Makefile || die |
129 |
+ sed -i \ |
130 |
+ -e 's:pkg-config:$(PKG_CONFIG):' \ |
131 |
+ GNUmakefile converter/other/Makefile other/pamx/Makefile || die |
132 |
+ |
133 |
+ # The postscript knob is currently bound up with a fork test. |
134 |
+ if ! use postscript ; then |
135 |
+ sed -i \ |
136 |
+ -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \ |
137 |
+ converter/other/Makefile generator/Makefile || die |
138 |
+ sed -i -r \ |
139 |
+ -e 's:(pbmtextps|pnmtops|pstopnm).*::' \ |
140 |
+ test/all-in-place.{ok,test} || die |
141 |
+ sed -i -e 's:lps-roundtrip.*::' test/Test-Order || die |
142 |
+ sed -i -e '/^$/d' test/all-in-place.ok || die |
143 |
+ sed -i '2iexit 80' test/ps-{alt-,flate-,}roundtrip.test || die |
144 |
+ fi |
145 |
+ |
146 |
+ # the new postscript test needs +x |
147 |
+ chmod +x test/lps-roundtrip.test |
148 |
+ |
149 |
+ # Do not test png if not built |
150 |
+ if ! use png ; then |
151 |
+ sed -i -r \ |
152 |
+ -e 's:(pamtopng|pngtopam|pnmtopng).*::' \ |
153 |
+ test/all-in-place.{ok,test} || die |
154 |
+ sed -i -e '/^$/d' test/all-in-place.ok || die |
155 |
+ |
156 |
+ sed -i -r \ |
157 |
+ -e 's:(pamrgbatopng|pngtopnm).*::' \ |
158 |
+ test/legacy-names.{ok,test} || die |
159 |
+ sed -i -e '/^$/d' test/legacy-names.ok || die |
160 |
+ sed -i -e 's:png-roundtrip.*::' test/Test-Order || die |
161 |
+ fi |
162 |
+ |
163 |
+ # this test requires LC_ALL=en_US.iso88591, not available on musl |
164 |
+ if use elibc_musl; then |
165 |
+ sed -i -e 's:pbmtext-iso88591.*::' test/Test-Order || die |
166 |
+ fi |
167 |
+} |
168 |
+ |
169 |
+src_configure() { |
170 |
+ # cannot chain the die with the heredoc |
171 |
+ # repoman tries to parse the heredoc and fails |
172 |
+ cat config.mk.in - >> config.mk <<-EOF |
173 |
+ # Misc crap |
174 |
+ BUILD_FIASCO = N |
175 |
+ SYMLINK = ln -sf |
176 |
+ |
177 |
+ # These vars let src_test work by default |
178 |
+ PKGDIR_DEFAULT = ${T}/netpbm |
179 |
+ RESULTDIR_DEFAULT = ${T}/netpbm-test |
180 |
+ |
181 |
+ # Toolchain options |
182 |
+ CC = $(tc-getCC) -Wall |
183 |
+ LD = \$(CC) |
184 |
+ CC_FOR_BUILD = $(tc-getBUILD_CC) |
185 |
+ LD_FOR_BUILD = \$(CC_FOR_BUILD) |
186 |
+ AR = $(tc-getAR) |
187 |
+ RANLIB = $(tc-getRANLIB) |
188 |
+ PKG_CONFIG = $(tc-getPKG_CONFIG) |
189 |
+ |
190 |
+ STRIPFLAG = |
191 |
+ CFLAGS_SHLIB = -fPIC |
192 |
+ CFLAGS_FOR_BUILD += $(netpbm_cflags_for_build) |
193 |
+ |
194 |
+ LDRELOC = \$(LD) -r |
195 |
+ LDSHLIB = $(netpbm_ldshlib) |
196 |
+ LINKER_CAN_DO_EXPLICIT_LIBRARY = N # we can, but dont want to |
197 |
+ LINKERISCOMPILER = Y |
198 |
+ NETPBMLIBSUFFIX = $(netpbm_libsuffix) |
199 |
+ NETPBMLIBTYPE = $(netpbm_libtype) |
200 |
+ STATICLIB_TOO = $(usex static-libs Y N) |
201 |
+ |
202 |
+ # The var is called SSE, but the code is actually SSE2. |
203 |
+ WANT_SSE = $(usex cpu_flags_x86_sse2 Y N) |
204 |
+ |
205 |
+ # Gentoo build options |
206 |
+ TIFFLIB = $(netpbm_config tiff) |
207 |
+ # Let tiff worry about its own dependencies #395753 |
208 |
+ TIFFLIB_NEEDS_JPEG = N |
209 |
+ TIFFLIB_NEEDS_Z = N |
210 |
+ JPEGLIB = $(netpbm_config jpeg) |
211 |
+ PNGLIB = $(netpbm_config png) |
212 |
+ ZLIB = $($(tc-getPKG_CONFIG) --libs zlib) |
213 |
+ LINUXSVGALIB = $(netpbm_config svga vga) |
214 |
+ XML2_LIBS = $(netpbm_config xml xml2) |
215 |
+ JBIGLIB = $(netpbm_config jbig) |
216 |
+ JBIGHDR_DIR = |
217 |
+ JASPERLIB = NONE |
218 |
+ JASPERHDR_DIR = |
219 |
+ URTLIB = $(netpbm_config rle) |
220 |
+ URTHDR_DIR = |
221 |
+ X11LIB = $(netpbm_config X X11) |
222 |
+ X11HDR_DIR = |
223 |
+ EOF |
224 |
+ [[ $? -eq 0 ]] || die "writing config.mk failed" |
225 |
+} |
226 |
+ |
227 |
+src_compile() { |
228 |
+ emake -j1 pm_config.h version.h manual_importinc #149843 |
229 |
+ emake |
230 |
+} |
231 |
+ |
232 |
+src_test() { |
233 |
+ # The code wants to install everything first and then test the result. |
234 |
+ emake install.{bin,lib,data} |
235 |
+ emake check |
236 |
+} |
237 |
+ |
238 |
+src_install() { |
239 |
+ # Subdir make targets like to use `mkdir` all over the place |
240 |
+ # without any actual dependencies, thus the -j1. |
241 |
+ emake -j1 package pkgdir="${ED}"/usr |
242 |
+ |
243 |
+ if [[ $(get_libdir) != "lib" ]] ; then |
244 |
+ mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die |
245 |
+ fi |
246 |
+ |
247 |
+ # Remove cruft that we don't need, and move around stuff we want |
248 |
+ rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die |
249 |
+ |
250 |
+ dodir /usr/share |
251 |
+ mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die |
252 |
+ |
253 |
+ doman userguide/*.[0-9] |
254 |
+ dodoc README |
255 |
+ |
256 |
+ cd doc || die |
257 |
+ dodoc HISTORY Netpbm.programming USERDOC |
258 |
+ docinto html |
259 |
+ dodoc -r *.html |
260 |
+ dodoc -r ../userguide/*.html |
261 |
+} |