diff options
Diffstat (limited to 'media-libs/netpbm')
-rw-r--r-- | media-libs/netpbm/Manifest | 8 | ||||
-rw-r--r--[-rwxr-xr-x] | media-libs/netpbm/files/make-tarball.sh | 0 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.86.21-build.patch | 64 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.86.21-format-security.patch | 18 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.86.21-misc-deps.patch | 68 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.86.21-test.patch | 10 | ||||
-rw-r--r-- | media-libs/netpbm/metadata.xml | 9 | ||||
-rw-r--r-- | media-libs/netpbm/netpbm-10.86.21.ebuild | 208 |
8 files changed, 383 insertions, 2 deletions
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest index df97dd33df16..399a1708979c 100644 --- a/media-libs/netpbm/Manifest +++ b/media-libs/netpbm/Manifest @@ -6,8 +6,14 @@ AUX netpbm-10.76.00-build.patch 1295 BLAKE2B 5ce1a973f503ded256fad7d8c2dddf24663 AUX netpbm-10.76.00-misc-deps.patch 1677 BLAKE2B 2b54610958755b452bffd186e6bdbac16db9c7b0a0242776798a7cc4b6685c4b0a26bcea7810e392437bba25a8839b5852a84fc3acc2daa50e1a893d7c58d702 SHA512 a632c2eb9afd3fcd4ed7a9467293ad9ac6201296c0910d150f6a1c94121cf0dac9654531fd18c5aec7b412c3fae203a28e62b00cff877629f89e4f995ab730b2 AUX netpbm-10.76.00-pbmtext-test.patch 711 BLAKE2B 7e1b825bd9735ace1e91c1e705df4843aebbec61d090ec3903e680aac3facba80075ffa518340140657e33cd6c36ae84cd669e9dcddb920d832caed218b6651e SHA512 32be11758652105a6964bca3a9b08c06ed34e2f9ea00370c8d3a961a0ba8b64102120881238fe016d0b0ca4f10882b25f655691bbd75be8ceb700e68a624d5ca AUX netpbm-10.76.00-test.patch 6045 BLAKE2B ec4bf18a2022e67b26b78a591f3949552e103d9dbaec0793707988265ecd9f1006e576b094e4a47c9a94de5aa0ac2be00702493d3234364e91e727ac90ca4f61 SHA512 36244194a688d7b3f9ef632ecc3a56ea9aae3e28ad68d4dc5f1a804c19203a76b76fd75c1d999661dea4aa6e529e7200fd195383d8585d129d6df088a0c633b5 +AUX netpbm-10.86.21-build.patch 2319 BLAKE2B b22150c8683790c9ac31abc00b8f3f5b55cc6e990186f506c67496fce774fdfef1ba23843129fd493f8aa3e4ad5f74cfcf1d2388da95225ac2ef19f0c949f425 SHA512 459c54dac19067f2185a02ef812932e8fcb6a73d6267c32578bd3b7d3b12494052e929b24663407ad919e1e98aa2df58ed8e27be3f18eeb2fbe2402e4ff9e629 +AUX netpbm-10.86.21-format-security.patch 730 BLAKE2B 2957d10c75264688a47a6b42a43915c4a29e97c8c097008d30adcb9783a90575bc7526121dea02d9016eb456dfbd08bd06cb2a76d22eef36620223be266dcb06 SHA512 e7b90662d8f2bb786bc0473151c949c6cb1d467e122114b5d4c8018e4b8cf3b6b2dc49a1a8b1deae95706b81d8d61bee38506b6deb82eb30d40762d4d8e6d934 +AUX netpbm-10.86.21-misc-deps.patch 1565 BLAKE2B a4d629ea9fe01efc45c799dac4bd3764368be33f264929bdc338bb724ace03471949467e5c84144636a9f4ee9130395dad77e23aa6686998bf9700dbde224cbf SHA512 f274ede7d11ed0f2a1825a4412a52fd9e30f5caf470c6111b606a87f1e67b16278c9f2a901d512ea3516ba033e30a3c08386cc5af1a555f868b7d7175fbfeed0 +AUX netpbm-10.86.21-test.patch 331 BLAKE2B 59451b2f1632afdd8e84bcec0ef91e0589604706b373281bf4963385fe971991711cc6ed4f169cc45aa460ac1db20de69039b137da1a2ec3d6cb82b60ae5f745 SHA512 e5c1a88cc03e227c7a7a01e9586ceacaf24a6752f4285f228b0176a8a12a6a9ac83d8ce1c5965e8f56ab652b5e42aa2cd535f1e121449fe668312b7e49720e4f DIST netpbm-10.70.00.tar.xz 2621612 BLAKE2B 2b07d130de0afeb3c1df32c6d267bc6bd13d4f556988cb7784b51941d81de1ad4f3381a0788eec6309bc6c024a21eb273a5f00726f6bb9a8ecb87f547678fc77 SHA512 f70d6dd79ce813f9fc4935d382b50bd3cecdf02c324b0f012056e56e33f24b621e8c1b3d054c6f470d437d0d793593de95eaa9724055d59c342228398a40f0b4 DIST netpbm-10.76.00.tar.xz 2657184 BLAKE2B b8d82268ba50881fab10bca00ea408afa39096f4f9c079b523d8e28ce62301797ee50f55c84f85a6d832b723da7449531e725bf60a4a89975c51382b2cbc4a94 SHA512 234a5616a7631a8eb70817bb88ed509ddddfce93f71739654ef78a2735245b268c391adb49b514ed883569c9fc6ea9c3eeed10aa7898c02b797fee5249b11cf3 +DIST netpbm-10.86.21.tar.xz 3768736 BLAKE2B 19d641f3519f55d737aa6cd22f60847b2b241f71134bc7f9fa558e681cbffb1bff53f16e4d89e7a85b20b86e0bf0f4d9c341dde656ca07a7bc20adc94e811e36 SHA512 caa6c18039be72c47419b3ef60b64e0a04123752beb27bab178adcbb48e5311da05b422205f52c784149bb0636be1e3155e6bbf7703ec5c5775cb9981de1008e EBUILD netpbm-10.70.00.ebuild 5373 BLAKE2B bae61227e2fd3e65aa4005e4abb612cbf8e4ab749ff61921c9999eb4fa9203eea7efc9256df0149b47f3877aa2dad9c91a05df774801272e3c467e16ea578fb2 SHA512 b94aeeb1d9c1b7e721708711e1eb5d2bbdfd69692540edd1b79a102c191fb8bad1cc57e6ce18a0ba2e36a417416ddb7ec233381a0ca482cbad8757b90cde5e02 EBUILD netpbm-10.76.00.ebuild 5261 BLAKE2B 56e5848b5c56ea78e54c7b2d09ef1bf942afe4aa8148ae3b534c8df9db9bae562753b0f1139e681bcc52e9758dedad4fa8ea2a6922260ae301e5607e168683ce SHA512 c75b3a3715371cd535c73811c667cc7c4d97f0e37089c017d769a572d7c716cb9b23a93f7f06f84760e0cd3d2203d6df61165c67533663f5a47f8607cca4d3e0 -MISC metadata.xml 342 BLAKE2B cd90d97e1e3d42554ec5feb7ab3db473ab52ba26e9ce4045a0bb55b89aca21f61c34043d0ec6db28af8f08dc95addcae6cd933544104259a334a794a467bcfdd SHA512 7bb2ebbf5bd2957fd06142bebe3271a0d4695b0b18d9bf9c0084ec7d0da65889efd5fbe39fa121b5f8dce0c3562bcd5ffc687d8092324ca85e43fa7f4cc53c7b +EBUILD netpbm-10.86.21.ebuild 5547 BLAKE2B b692572c523bd7840f60e955b584166996bec57629ee1bbf0a8d8a719233d7f5ba65e62c3f8609dc06024a7543f2aacfc793a3742871bcdeda4ee58f086c1b56 SHA512 c00bc6a48866f4e105d40558ae6bcac12f0d9660f1cbbb52efe92cb3dc55fae0489ceb9cf554cdbd433faa634cd92f612c444f4ae9661b18b9d8c8c9c9edba2c +MISC metadata.xml 577 BLAKE2B c70497704f1a34aa7b8bcf905c05560e554957e6350b7c219ea2050815215aa926f4242ae233c9f6b11a1dd9900fcbef0956cb45d50044720769857c15808b4b SHA512 9813c0b3d04c040a54dadbcedb1e88f1d90cbff7001381f7136c84ae3909788423496c7c97242cb989c63bf5127df5196d62e75c503fb2475f14f14cfd3741f0 diff --git a/media-libs/netpbm/files/make-tarball.sh b/media-libs/netpbm/files/make-tarball.sh index 29ad4b3d92e4..29ad4b3d92e4 100755..100644 --- a/media-libs/netpbm/files/make-tarball.sh +++ b/media-libs/netpbm/files/make-tarball.sh diff --git a/media-libs/netpbm/files/netpbm-10.86.21-build.patch b/media-libs/netpbm/files/netpbm-10.86.21-build.patch new file mode 100644 index 000000000000..7995c6daaf48 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.86.21-build.patch @@ -0,0 +1,64 @@ +- Don't install libnetpbm.a and libnetpbm.so into a sep link dir +- Try to fix parallel building + +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -221,7 +221,7 @@ + .PHONY: install.lib + ifeq ($(NETPBMLIBTYPE),unixshared) + # install a Unix-style shared library +-install.lib: $(PKGDIR)/lib $(PKGDIR)/sharedlink ++install.lib: $(PKGDIR)/lib + cd $(PKGDIR)/lib ; rm -f libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).* + $(INSTALL) -c -m $(INSTALL_PERM_LIBD) \ + libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).$(MIN) $(PKGDIR)/lib/ +@@ -263,29 +263,29 @@ + $(SRCDIR)/lib/$(@:%_installhdr=%) $(PKGDIR)/include/netpbm/ + + .PHONY: install.staticlib +-install.staticlib: $(PKGDIR)/staticlink ++install.staticlib: $(PKGDIR)/lib + $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.$(STATICLIBSUFFIX) \ +- $(PKGDIR)/staticlink ++ $(PKGDIR)/lib + + # Install a shared library stub -- the ".so" file used at link time to + # prepare a program for dynamically linking a library at run time + .PHONY: install.sharedlibstub +-install.sharedlibstub: $(PKGDIR)/sharedlink ++install.sharedlibstub: $(PKGDIR)/lib + ifeq ($(NETPBMLIBTYPE),unixshared) + # install the link-time (.so) links to the runtime libraries +- cd $(PKGDIR)/sharedlink ; \ ++ cd $(PKGDIR)/lib ; \ + rm -f libnetpbm.$(NETPBMLIBSUFFIX); \ +- $(SYMLINK) ../lib/libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \ ++ $(SYMLINK) libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \ + libnetpbm.$(NETPBMLIBSUFFIX) + endif + ifeq ($(NETPBMLIBTYPE),dll) + $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.dll.a \ +- $(PKGDIR)/sharedlink ++ $(PKGDIR)/lib + endif + ifeq ($(NETPBMLIBTYPE),dylib) +- cd $(PKGDIR)/sharedlink/ ; \ ++ cd $(PKGDIR)/lib/ ; \ + rm -f libnetpbm.dylib; \ +- $(SYMLINK) ../lib/libnetpbm.$(MAJ).$(MIN).dylib libnetpbm.dylib ++ $(SYMLINK) libnetpbm.$(MAJ).$(MIN).dylib libnetpbm.dylib + endif + + distclean clean: localclean +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -102,6 +102,9 @@ + .PHONY: nonmerge + nonmerge: $(PRODUCT_SUBDIRS:%=%/all) + ++$(PRODUCT_SUBDIRS:%=%/all): buildtools/all ++converter/all analyzer/all editor/all generator/all other/all: lib/all ++ + # Completely parallel make (make --jobs) does not work because there are + # multiple targets somewhere in the Netpbm build that depend upon pm_config.h + # and similar targets, and the threads building those multiple targets might diff --git a/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch b/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch new file mode 100644 index 000000000000..a7afc259ff5c --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch @@ -0,0 +1,18 @@ +Fix compiling with `CFLAGS` `-Werror=format-security` +See also https://bugs.gentoo.org/517524 + +--- a/converter/ppm/ximtoppm.c ++++ b/converter/ppm/ximtoppm.c +@@ -117,9 +117,9 @@ + */ + header->bits_channel = atoi(a_head.bits_per_channel); + header->alpha_flag = atoi(a_head.alpha_channel); +- pm_asprintf(&header->author, a_head.author); +- pm_asprintf(&header->date, a_head.date); +- pm_asprintf(&header->program, a_head.program); ++ pm_asprintf(&header->author, "%s", a_head.author); ++ pm_asprintf(&header->date, "%s", a_head.date); ++ pm_asprintf(&header->program, "%s", a_head.program); + /* Do double checking for bakwards compatibility */ + if (header->npics == 0) + header->npics = 1; diff --git a/media-libs/netpbm/files/netpbm-10.86.21-misc-deps.patch b/media-libs/netpbm/files/netpbm-10.86.21-misc-deps.patch new file mode 100644 index 000000000000..78c7670c9a8f --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.86.21-misc-deps.patch @@ -0,0 +1,68 @@ +do not autoprobe deps when we disabled them + +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -75,7 +75,10 @@ + + PROG_SUBDIRS = converter analyzer editor generator other + PRODUCT_SUBDIRS = lib $(PROG_SUBDIRS) +-SUPPORT_SUBDIRS = urt icon buildtools test ++SUPPORT_SUBDIRS = icon buildtools test ++ifeq ($(URTLIB),$(BUNDLED_URTLIB)) ++SUPPORT_SUBDIRS += urt ++endif + + SUBDIRS = $(PRODUCT_SUBDIRS) $(SUPPORT_SUBDIRS) + +--- a/converter/other/Makefile ++++ b/converter/other/Makefile +@@ -7,6 +7,7 @@ + + include $(BUILDDIR)/config.mk + ++ifneq ($(XML2_LIBS),NONE) + TEST_PKGCONFIG_LIBXML2 = if $(PKG_CONFIG) libxml-2.0; then echo exists; fi + + ifneq ($(shell $(TEST_PKGCONFIG_LIBXML2)),) +@@ -22,6 +23,7 @@ + XML2_CFLAGS=$(shell xml2-config --cflags) + endif + endif ++endif + + SUBDIRS = jbig pnmtopalm jpeg2000 cameratopam pamtosvg + ifneq ($(BUILD_FIASCO), N) +@@ -34,6 +36,7 @@ + endif + endif + ++ifneq ($(PNGLIB),NONE) + TEST_PKGCONFIG_LIBPNG = if $(PKG_CONFIG) libpng$(PNGVER); then echo exists; fi + + ifneq ($(shell $(TEST_PKGCONFIG_LIBPNG)),) +@@ -58,6 +61,7 @@ + endif + endif + endif ++endif + + ifneq ($(JPEGLIB),NONE) + ifneq ($(JPEGHDR_DIR)x,x) +--- a/other/pamx/Makefile ++++ b/other/pamx/Makefile +@@ -9,6 +9,7 @@ + + EXTERN_INCLUDE = + ++ifneq ($(X11LIB),NONE) + ifeq ($(shell $(PKG_CONFIG) x11 --modversion --silence-errors),) + # Pkg-config has never heard of X11, or doesn't even exist + +@@ -23,6 +24,7 @@ + X11LIB = $(shell $(PKG_CONFIG) x11 --libs) + EXTERN_INCLUDES += $(shell $(PKG_CONFIG) x11 --cflags) + endif ++endif + + ifeq ($(HAVE_X11LIB),Y) + PORTBINARIES += pamx diff --git a/media-libs/netpbm/files/netpbm-10.86.21-test.patch b/media-libs/netpbm/files/netpbm-10.86.21-test.patch new file mode 100644 index 000000000000..b7758fdbd61e --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.86.21-test.patch @@ -0,0 +1,10 @@ +`print ("got color map\n");` removed from `editor/pnmquantall` so remove from test +Do this from the patch instead of ebuild because if upstream also fixes it the patch will fail, sed would not + +--- a/test/pnmquantall.ok ++++ b/test/pnmquantall.ok +@@ -1,4 +1,3 @@ +-got color map + 2373957371 33838 + 3892560659 33838 + 1383839923 33838 diff --git a/media-libs/netpbm/metadata.xml b/media-libs/netpbm/metadata.xml index 788f49b6fe29..d5e770850fa4 100644 --- a/media-libs/netpbm/metadata.xml +++ b/media-libs/netpbm/metadata.xml @@ -1,7 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person" proxied="yes"> + <email>ceamac.paragon@gmail.com</email> + <name>Viorel Munteanu</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> <use> <flag name="rle">Build converters for the RLE format (utah raster toolkit)</flag> </use> diff --git a/media-libs/netpbm/netpbm-10.86.21.ebuild b/media-libs/netpbm/netpbm-10.86.21.ebuild new file mode 100644 index 000000000000..342952e16c90 --- /dev/null +++ b/media-libs/netpbm/netpbm-10.86.21.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats" +HOMEPAGE="http://netpbm.sourceforge.net/" +SRC_URI="https://github.com/ceamac/netpbm-make-dist/releases/download/v10.86.21/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib" + +BDEPEND=" + app-arch/xz-utils + sys-devel/flex + virtual/pkgconfig +" +RDEPEND="jbig? ( media-libs/jbigkit ) + jpeg? ( virtual/jpeg:0 ) + png? ( >=media-libs/libpng-1.4:0 ) + postscript? ( app-text/ghostscript-gpl ) + rle? ( media-libs/urt ) + svga? ( media-libs/svgalib ) + tiff? ( >=media-libs/tiff-3.5.5:0 ) + xml? ( dev-libs/libxml2 ) + zlib? ( sys-libs/zlib ) + X? ( x11-libs/libX11 )" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/netpbm-10.86.21-build.patch + "${FILESDIR}"/netpbm-10.86.21-test.patch #450530 + "${FILESDIR}"/netpbm-10.86.21-misc-deps.patch + "${FILESDIR}"/netpbm-10.86.21-format-security.patch #517524 +) + +netpbm_libtype() { + case ${CHOST} in + *-darwin*) echo dylib;; + *) echo unixshared;; + esac +} + +netpbm_libsuffix() { + local suffix=$(get_libname) + echo ${suffix//\.} +} + +netpbm_ldshlib() { + case ${CHOST} in + *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';; + *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';; + esac +} +netpbm_config() { + if use ${1} ; then + [[ ${2} != "!" ]] && echo -l${2:-$1} + else + echo NONE + fi +} + +src_prepare() { + default + + # make sure we use system libs + sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die + rm -r urt converter/other/jbig/libjbig converter/other/jpeg2000/libjasper || die + + # take care of the importinc stuff ourselves by only doing it once + # at the top level and having all subdirs use that one set #149843 + sed -i \ + -e '/^importinc:/s|^|importinc:\nmanual_|' \ + -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\ + common.mk || die + sed -i \ + -e '/%.c/s: importinc$::' \ + common.mk lib/Makefile lib/util/Makefile || die + sed -i \ + -e 's:pkg-config:$(PKG_CONFIG):' \ + GNUmakefile converter/other/Makefile other/pamx/Makefile || die + + # The postscript knob is currently bound up with a fork test. + if ! use postscript ; then + sed -i \ + -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \ + converter/other/Makefile generator/Makefile || die + sed -i -r \ + -e 's:(pbmtextps|pnmtops|pstopnm).*::' \ + test/all-in-place.{ok,test} || die + sed -i -e '/^$/d' test/all-in-place.ok || die + sed -i '2iexit 80' test/ps-{alt-,flate-,}roundtrip.test || die + fi + + # Do not test png if not built + if ! use png ; then + sed -i -r \ + -e 's:(pamtopng|pngtopam|pnmtopng).*::' \ + test/all-in-place.{ok,test} || die + sed -i -e '/^$/d' test/all-in-place.ok || die + + sed -i -r \ + -e 's:(pamrgbatopng|pngtopnm).*::' \ + test/legacy-names.{ok,test} || die + sed -i -e '/^$/d' test/legacy-names.ok || die + fi + + # avoid ugly depend.mk warnings + touch $(find . -name Makefile -exec sed "s:Makefile:depend.mk:g" {} + || die) +} + +src_configure() { + cat config.mk.in - >> config.mk <<-EOF || die + # Misc crap + BUILD_FIASCO = N + SYMLINK = ln -sf + + # These vars let src_test work by default + PKGDIR_DEFAULT = ${T}/netpbm + RESULTDIR_DEFAULT = ${T}/netpbm-test + + # Toolchain options + CC = $(tc-getCC) -Wall + LD = \$(CC) + CC_FOR_BUILD = $(tc-getBUILD_CC) + LD_FOR_BUILD = \$(CC_FOR_BUILD) + AR = $(tc-getAR) + RANLIB = $(tc-getRANLIB) + PKG_CONFIG = $(tc-getPKG_CONFIG) + + STRIPFLAG = + CFLAGS_SHLIB = -fPIC + + LDRELOC = \$(LD) -r + LDSHLIB = $(netpbm_ldshlib) + LINKER_CAN_DO_EXPLICIT_LIBRARY = N # we can, but dont want to + LINKERISCOMPILER = Y + NETPBMLIBSUFFIX = $(netpbm_libsuffix) + NETPBMLIBTYPE = $(netpbm_libtype) + STATICLIB_TOO = $(usex static-libs Y N) + + # The var is called SSE, but the code is actually SSE2. + WANT_SSE = $(usex cpu_flags_x86_sse2 Y N) + + # Gentoo build options + TIFFLIB = $(netpbm_config tiff) + # Let tiff worry about its own dependencies #395753 + TIFFLIB_NEEDS_JPEG = N + TIFFLIB_NEEDS_Z = N + JPEGLIB = $(netpbm_config jpeg) + PNGLIB = $(netpbm_config png) + ZLIB = $(netpbm_config zlib z) + LINUXSVGALIB = $(netpbm_config svga vga) + XML2_LIBS = $(netpbm_config xml xml2) + JBIGLIB = $(netpbm_config jbig) + JBIGHDR_DIR = + JASPERLIB = NONE + JASPERHDR_DIR = + URTLIB = $(netpbm_config rle) + URTHDR_DIR = + X11LIB = $(netpbm_config X X11) + X11HDR_DIR = + EOF + # cannot chain the die with the heredoc above as bash-3 + # has a parser bug in that setup #282902 + [[ $? -eq 0 ]] || die "writing config.mk failed" +} + +src_compile() { + emake -j1 pm_config.h version.h manual_importinc #149843 + emake +} + +src_test() { + # The code wants to install everything first and then test the result. + emake install.{bin,lib,data} + emake check +} + +src_install() { + # Subdir make targets like to use `mkdir` all over the place + # without any actual dependencies, thus the -j1. + emake -j1 package pkgdir="${ED}"/usr + + if [[ $(get_libdir) != "lib" ]] ; then + mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die + fi + + # Remove cruft that we don't need, and move around stuff we want + rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die + + dodir /usr/share + mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die + + doman userguide/*.[0-9] + dodoc README + + cd doc || die + dodoc HISTORY Netpbm.programming USERDOC + docinto html + dodoc -r *.html + + use doc && dodoc -r ../userguide/*.html +} |