diff options
author | Viorel Munteanu <ceamac.paragon@gmail.com> | 2021-04-16 21:24:15 +0300 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-05-10 09:23:06 +0300 |
commit | a9ca76213bf8ae926caac89806977e7b02523973 (patch) | |
tree | 45c241033d27af45ca46d91c2d9ce96cc7f26d8c /media-libs/netpbm | |
parent | x11-misc/idesk: bump to v1 (diff) | |
download | gentoo-a9ca76213bf8ae926caac89806977e7b02523973.tar.gz gentoo-a9ca76213bf8ae926caac89806977e7b02523973.tar.bz2 gentoo-a9ca76213bf8ae926caac89806977e7b02523973.zip |
media-libs/netpbm: new version 10.86.21
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-libs/netpbm')
-rw-r--r-- | media-libs/netpbm/Manifest | 1 | ||||
-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-misc-deps.patch | 68 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.86.21-test.patch | 10 | ||||
-rw-r--r-- | media-libs/netpbm/netpbm-10.86.21.ebuild | 207 |
6 files changed, 350 insertions, 0 deletions
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest index 5519fbb6b9dd..be3d0a3dff35 100644 --- a/media-libs/netpbm/Manifest +++ b/media-libs/netpbm/Manifest @@ -1,2 +1,3 @@ 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 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-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/netpbm-10.86.21.ebuild b/media-libs/netpbm/netpbm-10.86.21.ebuild new file mode 100644 index 000000000000..4ce9a9ab909a --- /dev/null +++ b/media-libs/netpbm/netpbm-10.86.21.ebuild @@ -0,0 +1,207 @@ +# 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 +) + +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 | sed s:Makefile:depend.mk:g) +} + +src_configure() { + cat config.mk.in - >> config.mk <<-EOF + # 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 +} |