Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/files/, media-libs/netpbm/
Date: Sun, 28 Nov 2021 02:09:22
Message-Id: 1638065338.3ad19a84552b64107365fbcd64ac457b84800d80.ionen@gentoo
1 commit: 3ad19a84552b64107365fbcd64ac457b84800d80
2 Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
3 AuthorDate: Thu Nov 25 08:04:33 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 28 02:08:58 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ad19a84
7
8 media-libs/netpbm: drop v10.76.00
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/23073
13 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
14
15 media-libs/netpbm/Manifest | 1 -
16 .../netpbm/files/netpbm-10.76.00-build.patch | 38 ----
17 .../netpbm/files/netpbm-10.76.00-misc-deps.patch | 68 ------
18 .../files/netpbm-10.76.00-pbmtext-test.patch | 22 --
19 media-libs/netpbm/files/netpbm-10.76.00-test.patch | 248 ---------------------
20 media-libs/netpbm/netpbm-10.76.00.ebuild | 199 -----------------
21 6 files changed, 576 deletions(-)
22
23 diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
24 index 6f839ad5e36d..6ffd36b4ff2d 100644
25 --- a/media-libs/netpbm/Manifest
26 +++ b/media-libs/netpbm/Manifest
27 @@ -1,4 +1,3 @@
28 DIST netpbm-10.70.00.tar.xz 2621612 BLAKE2B 2b07d130de0afeb3c1df32c6d267bc6bd13d4f556988cb7784b51941d81de1ad4f3381a0788eec6309bc6c024a21eb273a5f00726f6bb9a8ecb87f547678fc77 SHA512 f70d6dd79ce813f9fc4935d382b50bd3cecdf02c324b0f012056e56e33f24b621e8c1b3d054c6f470d437d0d793593de95eaa9724055d59c342228398a40f0b4
29 -DIST netpbm-10.76.00.tar.xz 2657184 BLAKE2B b8d82268ba50881fab10bca00ea408afa39096f4f9c079b523d8e28ce62301797ee50f55c84f85a6d832b723da7449531e725bf60a4a89975c51382b2cbc4a94 SHA512 234a5616a7631a8eb70817bb88ed509ddddfce93f71739654ef78a2735245b268c391adb49b514ed883569c9fc6ea9c3eeed10aa7898c02b797fee5249b11cf3
30 DIST netpbm-10.86.24.tar.xz 3698448 BLAKE2B 189fbaeb91db15e317c62758c64d1165d3cb32fa0221b2dcdefb0425577d4af9a13e66c35774149a44727c99fc18263123fd3c2b71f6409344bcf458341a4470 SHA512 50ad5a726c4219e1d87c7a46868b8f7bdb2d676903f049816b58e00addb416e4684a6c669188beebc5cc3c3961d2b0e35cd663215196d9925e3a23a989e14be3
31 DIST netpbm-10.86.26.tar.xz 3699572 BLAKE2B d0b3fccfecea20a7979a6b29dac670dc33616a6cdd6f985af76cbd0d8125b887ad2dfc193e5e59f47014f685887cadeebcdce0da8db0a219457bb88caf42ba62 SHA512 23ca6125827c61648e0a475880efade7b83f87cfc884361c1f706f0a69ac70b5a7a2ae4699c77e21eda1c73241768b1bd7e595d5d533eeb10b7f69a79c7ae69d
32
33 diff --git a/media-libs/netpbm/files/netpbm-10.76.00-build.patch b/media-libs/netpbm/files/netpbm-10.76.00-build.patch
34 deleted file mode 100644
35 index 231da5446719..000000000000
36 --- a/media-libs/netpbm/files/netpbm-10.76.00-build.patch
37 +++ /dev/null
38 @@ -1,38 +0,0 @@
39 -- Don't install libnetpbm.a and libnetpbm.so into a sep link dir
40 -- Try to fix parallel building
41 -
42 ---- a/lib/Makefile
43 -+++ b/lib/Makefile
44 -@@ -249,7 +249,7 @@
45 - .PHONY: install.staticlib
46 - install.staticlib: $(PKGDIR)/link
47 - $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.$(STATICLIBSUFFIX) \
48 -- $(PKGDIR)/link
49 -+ $(PKGDIR)/lib
50 -
51 - # Install a shared library stub -- the ".so" file used at link time to
52 - # prepare a program for dynamically linking a library at run time
53 -@@ -257,9 +257,9 @@
54 - install.sharedlibstub: $(PKGDIR)/link
55 - ifeq ($(NETPBMLIBTYPE),unixshared)
56 - # install the link-time (.so) links to the runtime libraries
57 -- cd $(PKGDIR)/link ; \
58 -+ cd $(PKGDIR)/lib ; \
59 - rm -f libnetpbm.$(NETPBMLIBSUFFIX); \
60 -- $(SYMLINK) ../lib/libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \
61 -+ $(SYMLINK) libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \
62 - libnetpbm.$(NETPBMLIBSUFFIX)
63 - endif
64 - ifeq ($(NETPBMLIBTYPE),dll)
65 ---- a/GNUmakefile
66 -+++ b/GNUmakefile
67 -@@ -87,6 +87,9 @@
68 -
69 - .PHONY: nonmerge
70 - nonmerge: $(PRODUCT_SUBDIRS:%=%/all)
71 -+
72 -+$(PRODUCT_SUBDIRS:%=%/all): buildtools/all
73 -+converter/all analyzer/all editor/all generator/all other/all: lib/all
74 -
75 - # Parallel make (make --jobs) is not smart enough to coordinate builds
76 - # between submakes, so a naive parallel make would cause certain
77
78 diff --git a/media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch b/media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch
79 deleted file mode 100644
80 index bd894bfb3159..000000000000
81 --- a/media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch
82 +++ /dev/null
83 @@ -1,68 +0,0 @@
84 -do not autoprobe deps when we disabled them
85 -
86 ---- a/GNUmakefile
87 -+++ b/GNUmakefile
88 -@@ -74,7 +74,10 @@ include $(BUILDDIR)/config.mk
89 -
90 - PROG_SUBDIRS = converter analyzer editor generator other
91 - PRODUCT_SUBDIRS = lib $(PROG_SUBDIRS)
92 --SUPPORT_SUBDIRS = urt icon buildtools test
93 -+SUPPORT_SUBDIRS = icon buildtools test
94 -+ifeq ($(URTLIB),$(BUNDLED_URTLIB))
95 -+SUPPORT_SUBDIRS += urt
96 -+endif
97 -
98 - SUBDIRS = $(PRODUCT_SUBDIRS) $(SUPPORT_SUBDIRS)
99 -
100 ---- a/converter/other/Makefile
101 -+++ b/converter/other/Makefile
102 -@@ -7,6 +7,7 @@ VPATH=.:$(SRCDIR)/$(SUBDIR)
103 -
104 - include $(BUILDDIR)/config.mk
105 -
106 -+ifneq ($(XML2_LIBS),NONE)
107 - TEST_PKGCONFIG_LIBXML2 = if pkg-config libxml-2.0; then echo exists; fi
108 -
109 - ifneq ($(shell $(TEST_PKGCONFIG_LIBXML2)),)
110 -@@ -22,6 +23,7 @@ else
111 - XML2_CFLAGS=$(shell xml2-config --cflags)
112 - endif
113 - endif
114 -+endif
115 -
116 - SUBDIRS = jbig pnmtopalm jpeg2000 cameratopam pamtosvg
117 - ifneq ($(BUILD_FIASCO), N)
118 -@@ -34,6 +36,7 @@ ifneq ($(TIFFLIB),NONE)
119 - endif
120 - endif
121 -
122 -+ifneq ($(PNGLIB),NONE)
123 - TEST_PKGCONFIG_LIBPNG = if pkg-config libpng$(PNGVER); then echo exists; fi
124 -
125 - ifneq ($(shell $(TEST_PKGCONFIG_LIBPNG)),)
126 -@@ -58,6 +61,7 @@ else
127 - endif
128 - endif
129 - endif
130 -+endif
131 -
132 - ifneq ($(JPEGLIB),NONE)
133 - ifneq ($(JPEGHDR_DIR)x,x)
134 ---- a/other/pamx/Makefile
135 -+++ b/other/pamx/Makefile
136 -@@ -9,6 +9,7 @@ include $(BUILDDIR)/config.mk
137 -
138 - EXTERN_INCLUDE =
139 -
140 -+ifneq ($(X11LIB),NONE)
141 - ifeq ($(shell pkg-config x11 --modversion --silence-errors),)
142 - # Pkg-config has never heard of X11, or doesn't even exist
143 -
144 -@@ -23,6 +24,7 @@ else
145 - X11LIB = $(shell pkg-config x11 --libs)
146 - EXTERN_INCLUDES += $(shell pkg-config x11 --cflags)
147 - endif
148 -+endif
149 -
150 - ifeq ($(HAVE_X11LIB),Y)
151 - PORTBINARIES += pamx
152
153 diff --git a/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch b/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch
154 deleted file mode 100644
155 index 717c86a72ac5..000000000000
156 --- a/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch
157 +++ /dev/null
158 @@ -1,22 +0,0 @@
159 -the tool tries to generate binary output, but the current locale might change
160 -what awk generates. force it to C/ASCII to avoid that.
161 -
162 -https://bugs.gentoo.org/601012
163 -
164 ---- a/test/pbmtext.test
165 -+++ b/test/pbmtext.test
166 -@@ -81,12 +81,14 @@ rm ${fontRectangle_txt} ${font_pbm}
167 -
168 - # One long row
169 - # Should print 3233136020 4535
170 -+LC_CTYPE=C \
171 - awk 'BEGIN { for (i=32; i<=125;++i) printf("%c",i);
172 - for (i=160;i<=255;++i) printf("%c",i); }' | \
173 - pbmtext -builtin bdf | cksum
174 -
175 - # One tall column
176 - # Should print 1216262214 5711
177 -+LC_CTYPE=C \
178 - awk 'BEGIN { for (i=32; i<=125;++i) printf("%c\n",i);
179 - for (i=160;i<=255;++i) printf("%c\n",i); }' | \
180 - pbmtext -nomargins -builtin bdf | cksum
181
182 diff --git a/media-libs/netpbm/files/netpbm-10.76.00-test.patch b/media-libs/netpbm/files/netpbm-10.76.00-test.patch
183 deleted file mode 100644
184 index 8bb1b17e15fa..000000000000
185 --- a/media-libs/netpbm/files/netpbm-10.76.00-test.patch
186 +++ /dev/null
187 @@ -1,248 +0,0 @@
188 -automatically skip tests of disabled tools
189 -
190 ---- a/GNUmakefile
191 -+++ b/GNUmakefile
192 -@@ -455,6 +458,21 @@ deb:
193 - .PHONY: check-package
194 - .PHONY: check-install
195 -
196 -+# Variables from the make env we pass down to the test scripts.
197 -+CHECK_VARS = \
198 -+ BUILDDIR=$(BUILDDIR) \
199 -+ RGBDEF=$(RGBDEF) \
200 -+ BUILD_FIASCO=$(BUILD_FIASCO) \
201 -+ JASPERLIB="$(JASPERLIB)" \
202 -+ JBIGLIB="$(JBIGLIB)" \
203 -+ JPEGLIB="$(JPEGLIB)" \
204 -+ PNGLIB="$(PNGLIB)" \
205 -+ TIFFLIB="$(TIFFLIB)" \
206 -+ URTLIB="$(URTLIB)" \
207 -+ X11LIB="$(X11LIB)" \
208 -+ XML2_LIBS="$(XML2_LIBS)" \
209 -+ ZLIB="$(ZLIB)"
210 -+
211 - # Test files in source tree.
212 -
213 - check-tree : BUILDBINDIRS :=./analyzer \
214 -@@ -525,10 +543,10 @@ resultdir-backup: FORCE
215 -
216 - check-tree: $(TESTRANDOM) resultdir-backup
217 - cd $(RESULTDIR); \
218 -+ $(CHECK_VARS) \
219 - CHECK_TYPE=tree \
220 -- PBM_TEST_PATH=$(PBM_TEST_PATH) BUILDDIR=$(BUILDDIR) \
221 -+ PBM_TEST_PATH=$(PBM_TEST_PATH) \
222 - LD_LIBRARY_PATH=$(PBM_LIBRARY_PATH):${LD_LIBRARY_PATH} \
223 -- RGBDEF=$(RGBDEF) \
224 - $(SRCDIR)/test/Execute-Tests 2>&1
225 -
226 - # Execute-Tests needs to know BUILDDIR in order to locate testrandom.
227 -@@ -545,19 +563,18 @@ check: check-package
228 -
229 - check-package: $(TESTRANDOM) resultdir-backup
230 - cd $(RESULTDIR); \
231 -+ $(CHECK_VARS) \
232 - CHECK_TYPE=package \
233 -- PBM_TEST_PATH=$(PBM_TEST_PATH) BUILDDIR=$(BUILDDIR) \
234 -+ PBM_TEST_PATH=$(PBM_TEST_PATH) \
235 - LD_LIBRARY_PATH=$(PBM_LIBRARY_PATH):${LD_LIBRARY_PATH} \
236 -- RGBDEF=$(RGBDEF) \
237 - $(SRCDIR)/test/Execute-Tests 2>&1
238 -
239 -
240 - # Check after install
241 - check-install: $(TESTRANDOM) resultdir-backup
242 - cd $(RESULTDIR); \
243 -+ $(CHECK_VARS) \
244 - CHECK_TYPE=install \
245 -- BUILDDIR=$(BUILDDIR) \
246 -- RGBDEF=$(RGBDEF) \
247 - $(SRCDIR)/test/Execute-Tests 2>&1
248 -
249 -
250 ---- a/test/all-in-place.test
251 -+++ b/test/all-in-place.test
252 -@@ -367,11 +367,62 @@ ordinary_testprogs="\
253 - zeisstopnm \
254 - "
255 -
256 -+enabled_testprog() {
257 -+ case $1 in
258 -+ fiascotopnm|\
259 -+ pnmtofiasco)
260 -+ [ "${BUILD_FIASCO}" = "N" ] && return 1 ;;
261 -+
262 -+ jpeg2ktopam|\
263 -+ pamtojpeg2k)
264 -+ [ "${JASPERLIB}" = "NONE" ] && return 1 ;;
265 -+
266 -+ jbigtopnm|\
267 -+ pnmtojbig)
268 -+ [ "${JBIGLIB}" = "NONE" ] && return 1 ;;
269 -+
270 -+ jpegtopnm|\
271 -+ pnmtojpeg|\
272 -+ ppmtojpeg)
273 -+ [ "${JPEGLIB}" = "NONE" ] && return 1 ;;
274 -+
275 -+ pamtopng|\
276 -+ pngtopam|\
277 -+ pnmtopng)
278 -+ [ "${PNGLIB}" = "NONE" ] && return 1 ;;
279 -+
280 -+ svgtopam)
281 -+ [ "${PNGLIB}" = "NONE" ] && return 1
282 -+ [ "${XML2_LIBS}" = "NONE" ] && return 1
283 -+ ;;
284 -+
285 -+ pamtotiff|\
286 -+ pnmtotiffcmyk|\
287 -+ tifftopnm)
288 -+ [ "${TIFFLIB}" = "NONE" ] && return 1 ;;
289 -+
290 -+ pnmtorle|\
291 -+ rletopnm)
292 -+ [ "${URTLIB}" = "NONE" ] && return 1 ;;
293 -+
294 -+ pamx)
295 -+ [ "${X11LIB}" = "NONE" ] && return 1 ;;
296 -+ esac
297 -+
298 -+ return 0
299 -+}
300 -+
301 - # The string "fiascotopnm" has to be filtered out by egrep for fiascotopnm
302 - # has a slightly different version report format.
303 -
304 - for i in $ordinary_testprogs
305 - do
306 -+ # Stub out programs that aren't built.
307 -+ if ! enabled_testprog "$i"; then
308 -+ echo "$i: ok"
309 -+ continue
310 -+ fi
311 -+
312 - $i --version 2>&1 | \
313 - egrep -v -e fiascotopnm -e \
314 - "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \
315 ---- a/test/fiasco-roundtrip.test
316 -+++ b/test/fiasco-roundtrip.test
317 -@@ -2,6 +2,10 @@
318 - # This script tests: pnmtofiasco fiascotopnm
319 - # Also requires: pnmpad
320 -
321 -+if [ "${BUILD_FIASCO}" = "N" ]; then
322 -+ exit 80
323 -+fi
324 -+
325 - # Should print 215556145 102615
326 -
327 - pnmpad --black --bottom 1 --left 1 testimg.ppm | \
328 ---- a/test/jbig-roundtrip.test
329 -+++ b/test/jbig-roundtrip.test
330 -@@ -2,6 +2,9 @@
331 - # This script tests: pnmtojbig jbigtopnm
332 - # Also requires: pamchannel pamtopnm
333 -
334 -+if [ "${JBIGLIB}" = "NONE" ]; then
335 -+ exit 80
336 -+fi
337 -
338 - # Test 1. Should print 2425386270 41
339 - pnmtojbig testgrid.pbm | jbigtopnm | cksum
340 ---- a/test/legacy-names.test
341 -+++ b/test/legacy-names.test
342 -@@ -94,8 +94,30 @@ ordinary_testprogs="\
343 - ppmtouil \
344 - "
345 -
346 -+enabled_testprog() {
347 -+ case $1 in
348 -+ ppmtojpeg)
349 -+ [ "${JPEGLIB}" = "NONE" ] && return 1 ;;
350 -+
351 -+ pamrgbatopng|\
352 -+ pngtopnm)
353 -+ [ "${PNGLIB}" = "NONE" ] && return 1 ;;
354 -+
355 -+ pnmtotiff)
356 -+ [ "${TIFFLIB}" = "NONE" ] && return 1 ;;
357 -+ esac
358 -+
359 -+ return 0
360 -+}
361 -+
362 - for i in $ordinary_testprogs
363 - do
364 -+ # Stub out programs that aren't built.
365 -+ if ! enabled_testprog "$i"; then
366 -+ echo "$i: ok"
367 -+ continue
368 -+ fi
369 -+
370 - $i --version 2>&1 | \
371 - egrep -v \
372 - "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \
373 ---- a/test/png-roundtrip.test
374 -+++ b/test/png-roundtrip.test
375 -@@ -6,6 +6,10 @@
376 - ## If this test fails and pnm-roundtrip2.test succeeds, it indicates
377 - ## some problem with pnmtopng.
378 -
379 -+if [ "${PNGLIB}" = "NONE" ]; then
380 -+ exit 80
381 -+fi
382 -+
383 - # Test 1. Should print 1926073387 101484 18 times
384 - for flags in "" -interlace \
385 - -gamma=.45 \
386 ---- a/test/png-roundtrip2.test
387 -+++ b/test/png-roundtrip2.test
388 -@@ -9,6 +9,10 @@
389 - ## If both tests fail, the likely cause is a problem with pngtopam.
390 - ## It is also possible that there is some problem in libpng.
391 -
392 -+if [ "${PNGLIB}" = "NONE" ]; then
393 -+ exit 80
394 -+fi
395 -+
396 - # Test 1. Should print 1926073387 101484 twice
397 - for flags in "" -gamma=.45
398 - do
399 ---- a/test/ps-roundtrip.test
400 -+++ b/test/ps-roundtrip.test
401 -@@ -8,6 +8,10 @@
402 - ## (1) zlib was not linked.
403 - ## (2) ghostscript is not available.
404 -
405 -+if [ "${ZLIB}" = "NONE" ]; then
406 -+ exit 80
407 -+fi
408 -+
409 - tmpdir=${tmpdir:-/tmp}
410 -
411 - # pstopnm does not use libnetpbm functions for output.
412 ---- a/test/tiff-roundtrip.test
413 -+++ b/test/tiff-roundtrip.test
414 -@@ -2,6 +2,9 @@
415 - # This script tests: pamtotiff tifftopnm
416 - # Also requires:
417 -
418 -+if [ "${TIFFLIB}" = "NONE" ]; then
419 -+ exit 80
420 -+fi
421 -
422 - # Failure message
423 - ## Second test fails if Netpbm was built without the flate library
424 ---- a/test/utahrle-roundtrip.test
425 -+++ b/test/utahrle-roundtrip.test
426 -@@ -2,6 +2,9 @@
427 - # This script tests: pnmtorle rletopnm
428 - # Also requires: pamchannel pamtopnm
429 -
430 -+if [ "${URTLIB}" = "NONE" ]; then
431 -+ exit 80
432 -+fi
433 -
434 - #Test 1. Should produce 1571496937 33838, cksum of testimg.red
435 - pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \
436
437 diff --git a/media-libs/netpbm/netpbm-10.76.00.ebuild b/media-libs/netpbm/netpbm-10.76.00.ebuild
438 deleted file mode 100644
439 index b27af756a539..000000000000
440 --- a/media-libs/netpbm/netpbm-10.76.00.ebuild
441 +++ /dev/null
442 @@ -1,199 +0,0 @@
443 -# Copyright 1999-2021 Gentoo Authors
444 -# Distributed under the terms of the GNU General Public License v2
445 -
446 -EAPI=7
447 -
448 -inherit multilib toolchain-funcs
449 -
450 -DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
451 -HOMEPAGE="http://netpbm.sourceforge.net/"
452 -SRC_URI="mirror://gentoo/${P}.tar.xz"
453 -
454 -LICENSE="GPL-2"
455 -SLOT="0"
456 -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
457 -IUSE="doc jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
458 -
459 -BDEPEND="
460 - app-arch/xz-utils
461 - sys-devel/flex
462 - virtual/pkgconfig
463 -"
464 -RDEPEND="jbig? ( media-libs/jbigkit )
465 - jpeg? ( virtual/jpeg:0 )
466 - png? ( >=media-libs/libpng-1.4:0 )
467 - postscript? ( app-text/ghostscript-gpl )
468 - rle? ( media-libs/urt )
469 - svga? ( media-libs/svgalib )
470 - tiff? ( >=media-libs/tiff-3.5.5:0 )
471 - xml? ( dev-libs/libxml2 )
472 - zlib? ( sys-libs/zlib )
473 - X? ( x11-libs/libX11 )"
474 -DEPEND="${RDEPEND}"
475 -
476 -PATCHES=(
477 - "${FILESDIR}"/netpbm-10.76.00-build.patch
478 - "${FILESDIR}"/netpbm-10.76.00-test.patch #450530
479 - "${FILESDIR}"/netpbm-10.76.00-misc-deps.patch
480 - "${FILESDIR}"/netpbm-10.76.00-pbmtext-test.patch #601012
481 -)
482 -
483 -netpbm_libtype() {
484 - case ${CHOST} in
485 - *-darwin*) echo dylib;;
486 - *) echo unixshared;;
487 - esac
488 -}
489 -
490 -netpbm_libsuffix() {
491 - local suffix=$(get_libname)
492 - echo ${suffix//\.}
493 -}
494 -
495 -netpbm_ldshlib() {
496 - case ${CHOST} in
497 - *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';;
498 - *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';;
499 - esac
500 -}
501 -netpbm_config() {
502 - if use $1 ; then
503 - [[ $2 != "!" ]] && echo -l${2:-$1}
504 - else
505 - echo NONE
506 - fi
507 -}
508 -
509 -src_prepare() {
510 - default
511 -
512 - # make sure we use system libs
513 - sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
514 - rm -r urt converter/other/jbig/libjbig converter/other/jpeg2000/libjasper || die
515 -
516 - # take care of the importinc stuff ourselves by only doing it once
517 - # at the top level and having all subdirs use that one set #149843
518 - sed -i \
519 - -e '/^importinc:/s|^|importinc:\nmanual_|' \
520 - -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
521 - common.mk || die
522 - sed -i \
523 - -e '/%.c/s: importinc$::' \
524 - common.mk lib/Makefile lib/util/Makefile || die
525 - sed -i \
526 - -e 's:pkg-config:$(PKG_CONFIG):' \
527 - GNUmakefile converter/other/Makefile other/pamx/Makefile || die
528 -
529 - # The postscript knob is currently bound up with a fork test.
530 - if ! use postscript ; then
531 - sed -i \
532 - -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \
533 - converter/other/Makefile generator/Makefile || die
534 - sed -i -r \
535 - -e 's:(pbmtextps|pnmtops|pstopnm).*::' \
536 - test/all-in-place.{ok,test} || die
537 - sed -i -e '/^$/d' test/all-in-place.ok || die
538 - sed -i '2iexit 80' test/ps-{alt-,}roundtrip.test || die
539 - fi
540 -
541 - # avoid ugly depend.mk warnings
542 - touch $(find . -name Makefile | sed s:Makefile:depend.mk:g)
543 -}
544 -
545 -src_configure() {
546 - cat config.mk.in - >> config.mk <<-EOF
547 - # Misc crap
548 - BUILD_FIASCO = N
549 - SYMLINK = ln -sf
550 -
551 - # These vars let src_test work by default
552 - PKGDIR_DEFAULT = ${T}/netpbm
553 - RESULTDIR_DEFAULT = ${T}/netpbm-test
554 -
555 - # Toolchain options
556 - CC = $(tc-getCC) -Wall
557 - LD = \$(CC)
558 - CC_FOR_BUILD = $(tc-getBUILD_CC)
559 - LD_FOR_BUILD = \$(CC_FOR_BUILD)
560 - AR = $(tc-getAR)
561 - RANLIB = $(tc-getRANLIB)
562 - PKG_CONFIG = $(tc-getPKG_CONFIG)
563 -
564 - STRIPFLAG =
565 - CFLAGS_SHLIB = -fPIC
566 -
567 - LDRELOC = \$(LD) -r
568 - LDSHLIB = $(netpbm_ldshlib)
569 - LINKER_CAN_DO_EXPLICIT_LIBRARY = N # we can, but dont want to
570 - LINKERISCOMPILER = Y
571 - NETPBMLIBSUFFIX = $(netpbm_libsuffix)
572 - NETPBMLIBTYPE = $(netpbm_libtype)
573 - STATICLIB_TOO = $(usex static-libs Y N)
574 -
575 - # The var is called SSE, but the code is actually SSE2.
576 - WANT_SSE = $(usex cpu_flags_x86_sse2 Y N)
577 -
578 - # Gentoo build options
579 - TIFFLIB = $(netpbm_config tiff)
580 - # Let tiff worry about its own dependencies #395753
581 - TIFFLIB_NEEDS_JPEG = N
582 - TIFFLIB_NEEDS_Z = N
583 - JPEGLIB = $(netpbm_config jpeg)
584 - PNGLIB = $(netpbm_config png)
585 - ZLIB = $(netpbm_config zlib z)
586 - LINUXSVGALIB = $(netpbm_config svga vga)
587 - XML2_LIBS = $(netpbm_config xml xml2)
588 - JBIGLIB = $(netpbm_config jbig)
589 - JBIGHDR_DIR =
590 - JASPERLIB = NONE
591 - JASPERHDR_DIR =
592 - URTLIB = $(netpbm_config rle)
593 - URTHDR_DIR =
594 - X11LIB = $(netpbm_config X X11)
595 - X11HDR_DIR =
596 - EOF
597 - # cannot chain the die with the heredoc above as bash-3
598 - # has a parser bug in that setup #282902
599 - [[ $? -eq 0 ]] || die "writing config.mk failed"
600 -}
601 -
602 -src_compile() {
603 - emake -j1 pm_config.h version.h manual_importinc #149843
604 - emake
605 -}
606 -
607 -src_test() {
608 - # The code wants to install everything first and then test the result.
609 - emake install.{bin,lib,data}
610 - emake check
611 -}
612 -
613 -src_install() {
614 - # Subdir make targets like to use `mkdir` all over the place
615 - # without any actual dependencies, thus the -j1.
616 - emake -j1 package pkgdir="${ED}"/usr
617 -
618 - if [[ $(get_libdir) != "lib" ]] ; then
619 - mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die
620 - fi
621 -
622 - # Remove cruft that we don't need, and move around stuff we want
623 - rm "${ED}"/usr/bin/{doc.url,manweb} || die
624 - rm -r "${ED}"/usr/man/web || die
625 - rm -r "${ED}"/usr/link || die
626 - rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
627 -
628 - dodir /usr/share
629 - mv "${ED}"/usr/man "${ED}"/usr/share/ || die
630 - mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
631 -
632 - doman userguide/*.[0-9]
633 - dodoc README
634 -
635 - cd doc || die
636 - dodoc HISTORY Netpbm.programming USERDOC
637 - docinto html
638 - dodoc -r *.html
639 -
640 - use doc && dodoc -r ../userguide/*.html
641 -}