diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/netpbm/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/netpbm/files')
-rwxr-xr-x | media-libs/netpbm/files/make-tarball.sh | 67 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.31-build.patch | 50 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.66-failing-tests.patch | 28 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.66-jasper-hack.patch | 41 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.66-jbig-2.patch | 19 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.66-jpeg-dirs.patch | 28 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.66-options-case.patch | 105 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.66-test.patch | 17 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.66-wordaccess_be_aligned.patch | 23 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.70-system-libs.patch | 40 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.76.00-build.patch | 38 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch | 68 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch | 22 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.76.00-test.patch | 248 |
14 files changed, 794 insertions, 0 deletions
diff --git a/media-libs/netpbm/files/make-tarball.sh b/media-libs/netpbm/files/make-tarball.sh new file mode 100755 index 000000000000..90a64ffb34d7 --- /dev/null +++ b/media-libs/netpbm/files/make-tarball.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +. /etc/init.d/functions.sh + +PV=$1 +SVN_ROOT=${2:-/usr/local/src} + +if [[ $# -eq 0 ]] ; then + ebegin "Detecting latest version" + cd "${SVN_ROOT}/netpbm/release_number" + svn up -q || die + PV=$(svn ls | sort -V | tail -1) || die + [[ -z ${PV} ]] && die + PV=${PV%/} + eend + einfo "Using PV=${PV}" + + if [[ ! -d ${PV} ]] ; then + ebegin "Checking out ${PV}" + svn up -q ${PV} + eend || die + fi +fi + +if [[ $# -gt 2 ]] ; then + exec echo "Usage: $0 [version] [netpbm svn root]" +fi + +PN=netpbm +P=${PN}-${PV} + +T=/tmp + +maint_pkg_create() { + local base="/usr/local/src" + local srcdir="${base}/netpbm/release_number" + local htmldir="${base}/netpbm/userguide" + if [[ -d ${srcdir} ]] ; then + cd "${T}" || die + + rm -rf ${P} + + ebegin "Exporting ${srcdir}/${PV} to ${P}" + svn export -q "${srcdir}/${PV}" ${P} + eend $? || return 1 + + ebegin "Exporting ${htmldir} to ${P}/userguide" + svn export -q "${htmldir}" ${P}/userguide + eend $? || return 1 + + ebegin "Generating manpages from html" + (cd "${P}/userguide" && ../buildtools/makeman *.html) + eend $? || return 1 + + ebegin "Creating ${P}.tar.xz" + tar cf - ${P} | xz > ${P}.tar.xz + eend $? + + einfo "Tarball now ready at: ${T}/${P}.tar.xz" + else + einfo "You need to run:" + einfo " cd ${base}" + einfo " svn co https://netpbm.svn.sourceforge.net/svnroot/netpbm" + die "need svn checkout dir" + fi +} +maint_pkg_create diff --git a/media-libs/netpbm/files/netpbm-10.31-build.patch b/media-libs/netpbm/files/netpbm-10.31-build.patch new file mode 100644 index 000000000000..cd744743636c --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.31-build.patch @@ -0,0 +1,50 @@ +- Don't install libnetpbm.a and libnetpbm.so into a sep link dir +- Try to fix parallel building +- Make the libopt tool less 'helpful' + +--- lib/Makefile ++++ lib/Makefile +@@ -249,7 +249,7 @@ + .PHONY: install.staticlib + install.staticlib: $(PKGDIR)/link + $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.$(STATICLIBSUFFIX) \ +- $(PKGDIR)/link ++ $(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 +@@ -257,9 +257,9 @@ + install.sharedlibstub: $(PKGDIR)/link + ifeq ($(NETPBMLIBTYPE),unixshared) + # install the link-time (.so) links to the runtime libraries +- cd $(PKGDIR)/link ; \ ++ cd $(PKGDIR)/lib ; \ + rm -f libnetpbm.$(NETPBMLIBSUFFIX); \ +- $(SYMLINK) ../lib/libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \ ++ $(SYMLINK) libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \ + libnetpbm.$(NETPBMLIBSUFFIX) + endif + ifeq ($(NETPBMLIBTYPE),dll) +--- GNUmakefile ++++ GNUmakefile +@@ -87,6 +87,9 @@ + + .PHONY: nonmerge + nonmerge: $(PRODUCT_SUBDIRS:%=%/all) ++ ++$(PRODUCT_SUBDIRS:%=%/all): buildtools/all ++converter/all analyzer/all editor/all generator/all other/all: lib/all + + OMIT_CONFIG_RULE = 1 + include $(SRCDIR)/Makefile.common +--- buildtools/libopt.c ++++ buildtools/libopt.c +@@ -502,7 +502,7 @@ + + strcpy(outputLine, ""); /* initial value */ + runtime = FALSE; /* initial value */ +- quiet = FALSE; /* initial value */ ++ quiet = TRUE; /* initial value */ + error = FALSE; /* no error yet */ + for (arg = 1; arg < argc && !error; arg++) { + if (strcmp(argv[arg], "-runtime") == 0) diff --git a/media-libs/netpbm/files/netpbm-10.66-failing-tests.patch b/media-libs/netpbm/files/netpbm-10.66-failing-tests.patch new file mode 100644 index 000000000000..63260de2e490 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.66-failing-tests.patch @@ -0,0 +1,28 @@ +punt failing tests; already notified upstream + +--- a/test/Test-Order ++++ b/test/Test-Order +@@ -50,7 +50,6 @@ pamditherbw.test + pbmclean.test + pamcut.test + pnmcat.test +-pamflip.test + pamenlarge.test + pnminvert.test + pamchannel.test +@@ -70,7 +69,6 @@ ppmmix.test + + # Symmetry test + +-symmetry.test + + # Format converter tests + +@@ -87,7 +85,6 @@ ppmdfont.test + pnm-plain-roundtrip.test + pnm-pam-roundtrip.test + pnminvert-roundtrip.test +-pamflip-roundtrip.test + pamdepth-roundtrip.test + pad-crop-roundtrip.test + cut-paste-roundtrip.test diff --git a/media-libs/netpbm/files/netpbm-10.66-jasper-hack.patch b/media-libs/netpbm/files/netpbm-10.66-jasper-hack.patch new file mode 100644 index 000000000000..285475dab062 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.66-jasper-hack.patch @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/513240 + +the jasper headers are horribly broken and break things like stdbool.h. +re-order the includes to work around this. + +--- a/converter/other/jpeg2000/jpeg2ktopam.c ++++ b/converter/other/jpeg2000/jpeg2ktopam.c +@@ -13,13 +13,14 @@ + #define _XOPEN_SOURCE 600 + #include <string.h> + ++#include <jasper/jasper.h> ++ + #include "pm_c_util.h" + #include "pam.h" + #include "shhopt.h" + #include "nstring.h" + #include "mallocvar.h" + +-#include <jasper/jasper.h> + #include "libjasper_compat.h" + + enum compmode {COMPMODE_INTEGER, COMPMODE_REAL}; +--- a/converter/other/jpeg2000/pamtojpeg2k.c ++++ b/converter/other/jpeg2000/pamtojpeg2k.c +@@ -13,13 +13,14 @@ + #define _XOPEN_SOURCE 600 + #include <string.h> + ++#include <jasper/jasper.h> ++ + #include "pm_c_util.h" + #include "pam.h" + #include "shhopt.h" + #include "nstring.h" + #include "mallocvar.h" + +-#include <jasper/jasper.h> + #include "libjasper_compat.h" + + diff --git a/media-libs/netpbm/files/netpbm-10.66-jbig-2.patch b/media-libs/netpbm/files/netpbm-10.66-jbig-2.patch new file mode 100644 index 000000000000..f7e8cf80d6c4 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.66-jbig-2.patch @@ -0,0 +1,19 @@ +fix building w/jbig-2.x + +--- a/converter/other/jbig/jbigtopnm.c ++++ b/converter/other/jbig/jbigtopnm.c +@@ -230,8 +230,12 @@ int main (int argc, char **argv) + if (ferror(fin)) + pm_error("Problem while reading input file '%s", fnin); + if (result != JBG_EOK && result != JBG_EOK_INTR) +- pm_error("Problem with input file '%s': %s\n", +- fnin, jbg_strerror(result, JBG_EN)); ++ pm_error("Problem with input file '%s': %s\n", fnin, ++#ifdef JBG_EN ++ jbg_strerror(result, JBG_EN)); ++#else ++ jbg_strerror(result)); ++#endif + if (plane >= 0 && jbg_dec_getplanes(&s) <= plane) + pm_error("Image has only %d planes!\n", jbg_dec_getplanes(&s)); + diff --git a/media-libs/netpbm/files/netpbm-10.66-jpeg-dirs.patch b/media-libs/netpbm/files/netpbm-10.66-jpeg-dirs.patch new file mode 100644 index 000000000000..fcf98211ba01 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.66-jpeg-dirs.patch @@ -0,0 +1,28 @@ +use same -I style as converter/other/Makefile so people can disable these + +--- a/converter/other/jbig/Makefile ++++ b/converter/other/jbig/Makefile +@@ -11,7 +11,9 @@ LIBJBIG_OBJECTS = jbig.o jbig_tab.o + + EXTERN_INCLUDES = + ifneq ($(JBIGHDR_DIR),NONE) +- EXTERN_INCLUDES += -I$(JBIGHDR_DIR) ++ ifneq ($(JBIGHDR_DIR)x,x) ++ EXTERN_INCLUDES += -I$(JBIGHDR_DIR) ++ endif + endif + + ifneq ($(JBIGHDR_DIR),NONE) +--- a/converter/other/jpeg2000/Makefile ++++ b/converter/other/jpeg2000/Makefile +@@ -11,7 +11,9 @@ include $(BUILDDIR)/config.mk + + EXTERN_INCLUDES = + ifneq ($(JASPERHDR_DIR),NONE) +- EXTERN_INCLUDES += -I$(JASPERHDR_DIR) ++ ifneq ($(JASPERHDR_DIR)x,x) ++ EXTERN_INCLUDES += -I$(JASPERHDR_DIR) ++ endif + endif + + diff --git a/media-libs/netpbm/files/netpbm-10.66-options-case.patch b/media-libs/netpbm/files/netpbm-10.66-options-case.patch new file mode 100644 index 000000000000..a865bc1f4514 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.66-options-case.patch @@ -0,0 +1,105 @@ +r2175 | giraffedata | 2014-04-01 22:28:23 -0400 (Tue, 01 Apr 2014) | 1 line + +Fix bug: inconsistent use of upper and lower case Y and N in make file variables. Make it consistently upper case + +--- buildtools/configure.pl (revision 2174) ++++ buildtools/configure.pl (revision 2175) +@@ -835,16 +835,16 @@ sub getLibTypes($$$$$$$$) { + my $response = prompt("(y)es or (n)o", $default); + + if (uc($response) =~ /^(Y|YES)$/) { +- $staticlib_too = "y"; ++ $staticlib_too = "Y"; + } elsif (uc($response) =~ /^(N|NO)$/) { +- $staticlib_too = "n"; ++ $staticlib_too = "N"; + } else { + print("'$response' isn't one of the choices. \n" . + "You must choose 'yes' or 'no' (or 'y' or 'n').\n"); + exit 12; + } + } else { +- $staticlib_too = "n"; ++ $staticlib_too = "N"; + } + print("\n"); + +--- config.mk.in (revision 2174) ++++ config.mk.in (revision 2175) +@@ -503,7 +503,7 @@ LINUXSVGAHDR_DIR = + #LINUXSVGALIB = /usr/lib/libvga.so + #LINUXSVGAHDR_DIR = /usr/include/vgalib + +-# If you don't want any network functions, set OMIT_NETWORK to "y". ++# If you don't want any network functions, set OMIT_NETWORK to "Y". + # The only thing that requires network functions is the option in + # ppmtompeg to run it on multiple computers simultaneously. On some + # systems network functions don't work or we haven't figured out how to +@@ -512,11 +512,11 @@ OMIT_NETWORK = + #DJGPP/Windows, Tru64: + # (there's some minor header problem that prevents network functions from + # building on Tru64 2000.10.06) +-#OMIT_NETWORK = y ++#OMIT_NETWORK = Y + + # These are -l options to link in the network libraries. Often, these are + # built into the standard C library, so this can be null. This is irrelevant +-# if OMIT_NETWORK is "y". ++# if OMIT_NETWORK is "Y". + + NETWORKLD = + # Solaris, SunOS: +@@ -602,12 +602,12 @@ NETPBMLIBSUFFIX = so + # Windows shared library: + #NETPBMLIBSUFFIX = dll + +-#STATICLIB_TOO is "y" to signify that you want a static library built ++#STATICLIB_TOO is "Y" to signify that you want a static library built + #and installed in addition to whatever library type you specified by + #NETPBMLIBTYPE. If NETPBMLIBTYPE specified a static library, + #STATICLIB_TOO simply has no effect. +-STATICLIB_TOO = y +-#STATICLIB_TOO = n ++STATICLIB_TOO = Y ++#STATICLIB_TOO = N + + #STATICLIBSUFFIX is the suffix that static libraries have. It's + #meaningless if you aren't building static libraries. +--- GNUmakefile (revision 2174) ++++ GNUmakefile (revision 2175) +@@ -396,19 +396,19 @@ lib/install.hdr: + $(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/Makefile \ + SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@) + +-ifeq ($(STATICLIB_TOO),y) +-BUILD_STATIC = y ++ifeq ($(STATICLIB_TOO),Y) ++BUILD_STATIC = Y + else + ifeq ($(NETPBMLIBTYPE),unixstatic) +- BUILD_STATIC = y ++ BUILD_STATIC = Y + else +- BUILD_STATIC = n ++ BUILD_STATIC = N + endif + endif + + .PHONY: install.staticlib + install.staticlib: +-ifeq ($(BUILD_STATIC),y) ++ifeq ($(BUILD_STATIC),Y) + $(MAKE) -C lib -f $(SRCDIR)/lib/Makefile \ + SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) install.staticlib + endif +--- lib/Makefile (revision 2174) ++++ lib/Makefile (revision 2175) +@@ -175,7 +175,7 @@ else + ifeq ($(STATICLIB_TOO),Y) + BUILD_STATICLIB = Y + else +- BUILD_STATICLIB = n ++ BUILD_STATICLIB = N + endif + endif + diff --git a/media-libs/netpbm/files/netpbm-10.66-test.patch b/media-libs/netpbm/files/netpbm-10.66-test.patch new file mode 100644 index 000000000000..7c80648bafab --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.66-test.patch @@ -0,0 +1,17 @@ +https://bugs.gentoo.org/450530 + +we disable fiascotopnm all the time, so delete the test too + +--- a/test/all-in-place.test ++++ b/test/all-in-place.test +@@ -387,10 +387,6 @@ for i in $ordinary_testprogs + + + +-# Test fiascotopnm, which has a unique -v flag. +- +-${PBM_TESTPREFIX}fiascotopnm -v 2> /dev/null +- testExitStatus fiascotopnm 2 $? + + + diff --git a/media-libs/netpbm/files/netpbm-10.66-wordaccess_be_aligned.patch b/media-libs/netpbm/files/netpbm-10.66-wordaccess_be_aligned.patch new file mode 100644 index 000000000000..0da719ae07d4 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.66-wordaccess_be_aligned.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/547252 + +------------------------------------------------------------------------ +r2395 | giraffedata | 2015-01-23 13:51:17 -0500 (Fri, 23 Jan 2015) | 1 line + +Fix syntax error + +build: fix compile failure in wordint_access_be.h with +Bigendian target platforms. + +Index: trunk/lib/util/wordaccess_be_aligned.h +=================================================================== +--- trunk/lib/util/wordaccess_be_aligned.h (revision 2394) ++++ trunk/lib/util/wordaccess_be_aligned.h (revision 2395) +@@ -24,7 +24,7 @@ bytesToWordint(wordintBytes bytes) { + static __inline__ void + wordintToBytes(wordintBytes * const bytesP, + wordint const wordInt) { +- uint16_t const hi = ((wordInt >> 48) & 0xFF) ++ uint16_t const hi = ((wordInt >> 48) & 0xFF); + uint16_t const mh = ((wordInt >> 32) & 0xFF); + uint16_t const ml = ((wordInt >> 24) & 0xFF); + uint16_t const lo = ((wordInt >> 0) & 0xFF); diff --git a/media-libs/netpbm/files/netpbm-10.70-system-libs.patch b/media-libs/netpbm/files/netpbm-10.70-system-libs.patch new file mode 100644 index 000000000000..ef50ff2435dd --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.70-system-libs.patch @@ -0,0 +1,40 @@ +when we disable the bundled libs, make sure we don't try to run install in them + +--- converter/other/jbig/Makefile ++++ converter/other/jbig/Makefile +@@ -5,7 +5,7 @@ endif + SUBDIR = converter/other/jbig + VPATH=.:$(SRCDIR)/$(SUBDIR) + +-SUBDIRS = libjbig ++SUBDIRS = + + include $(BUILDDIR)/config.mk + +@@ -35,6 +35,7 @@ SCRIPTS = + + ifeq ($(JBIGLIB),$(INTERNAL_JBIGLIB)) + JBIGLIB_DEP = $(JBIGLIB) ++ SUBDIRS += libjbig + else + # It's not our internal version; user's on his own to make sure it's built + endif +--- converter/other/jpeg2000/Makefile ++++ converter/other/jpeg2000/Makefile +@@ -5,7 +5,7 @@ endif + SUBDIR = converter/other/jpeg2000 + VPATH=.:$(SRCDIR)/$(SUBDIR) + +-SUBDIRS = libjasper ++SUBDIRS = + + include $(BUILDDIR)/config.mk + +@@ -52,6 +52,7 @@ ifeq ($(JASPERLIB),$(INTERNAL_JASPERLIB) + # MERGE_OBJECTS contains relative paths, so $(INTERNAL_JASPERLIB) had better + # be relative to the current directory. + MERGE_OBJECTS += $(JASPERLIB) ++ SUBDIRS += libjasper + endif + MERGEBINARIES = $(BINARIES) + diff --git a/media-libs/netpbm/files/netpbm-10.76.00-build.patch b/media-libs/netpbm/files/netpbm-10.76.00-build.patch new file mode 100644 index 000000000000..231da5446719 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.76.00-build.patch @@ -0,0 +1,38 @@ +- Don't install libnetpbm.a and libnetpbm.so into a sep link dir +- Try to fix parallel building + +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -249,7 +249,7 @@ + .PHONY: install.staticlib + install.staticlib: $(PKGDIR)/link + $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.$(STATICLIBSUFFIX) \ +- $(PKGDIR)/link ++ $(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 +@@ -257,9 +257,9 @@ + install.sharedlibstub: $(PKGDIR)/link + ifeq ($(NETPBMLIBTYPE),unixshared) + # install the link-time (.so) links to the runtime libraries +- cd $(PKGDIR)/link ; \ ++ cd $(PKGDIR)/lib ; \ + rm -f libnetpbm.$(NETPBMLIBSUFFIX); \ +- $(SYMLINK) ../lib/libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \ ++ $(SYMLINK) libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \ + libnetpbm.$(NETPBMLIBSUFFIX) + endif + ifeq ($(NETPBMLIBTYPE),dll) +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -87,6 +87,9 @@ + + .PHONY: nonmerge + nonmerge: $(PRODUCT_SUBDIRS:%=%/all) ++ ++$(PRODUCT_SUBDIRS:%=%/all): buildtools/all ++converter/all analyzer/all editor/all generator/all other/all: lib/all + + # Parallel make (make --jobs) is not smart enough to coordinate builds + # between submakes, so a naive parallel make would cause certain 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 new file mode 100644 index 000000000000..392eae0f40e4 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch @@ -0,0 +1,68 @@ +do not autoprobe deps when we disabled them + +--- GNUmakefile ++++ GNUmakefile +@@ -74,7 +74,10 @@ include $(BUILDDIR)/config.mk + + 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) + +--- converter/other/Makefile ++++ converter/other/Makefile +@@ -7,6 +7,7 @@ VPATH=.:$(SRCDIR)/$(SUBDIR) + + 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 @@ else + XML2_CFLAGS=$(shell xml2-config --cflags) + endif + endif ++endif + + SUBDIRS = jbig pnmtopalm jpeg2000 cameratopam pamtosvg + ifneq ($(BUILD_FIASCO), N) +@@ -34,6 +36,7 @@ ifneq ($(TIFFLIB),NONE) + 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 @@ else + endif + endif + endif ++endif + + ifneq ($(JPEGLIB),NONE) + ifneq ($(JPEGHDR_DIR)x,x) +--- other/pamx/Makefile ++++ other/pamx/Makefile +@@ -9,6 +9,7 @@ include $(BUILDDIR)/config.mk + + 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 @@ else + 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.76.00-pbmtext-test.patch b/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch new file mode 100644 index 000000000000..cdc075e5293f --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch @@ -0,0 +1,22 @@ +the tool tries to generate binary output, but the current locale might change +what awk generates. force it to C/ASCII to avoid that. + +https://bugs.gentoo.org/601012 + +--- test/pbmtext.test ++++ test/pbmtext.test +@@ -81,12 +81,14 @@ rm ${fontRectangle_txt} ${font_pbm} + + # One long row + # Should print 3233136020 4535 ++LC_CTYPE=C \ + awk 'BEGIN { for (i=32; i<=125;++i) printf("%c",i); + for (i=160;i<=255;++i) printf("%c",i); }' | \ + pbmtext -builtin bdf | cksum + + # One tall column + # Should print 1216262214 5711 ++LC_CTYPE=C \ + awk 'BEGIN { for (i=32; i<=125;++i) printf("%c\n",i); + for (i=160;i<=255;++i) printf("%c\n",i); }' | \ + pbmtext -nomargins -builtin bdf | cksum diff --git a/media-libs/netpbm/files/netpbm-10.76.00-test.patch b/media-libs/netpbm/files/netpbm-10.76.00-test.patch new file mode 100644 index 000000000000..870998bc98a8 --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.76.00-test.patch @@ -0,0 +1,248 @@ +automatically skip tests of disabled tools + +--- GNUmakefile ++++ GNUmakefile +@@ -455,6 +458,21 @@ deb: + .PHONY: check-package + .PHONY: check-install + ++# Variables from the make env we pass down to the test scripts. ++CHECK_VARS = \ ++ BUILDDIR=$(BUILDDIR) \ ++ RGBDEF=$(RGBDEF) \ ++ BUILD_FIASCO=$(BUILD_FIASCO) \ ++ JASPERLIB="$(JASPERLIB)" \ ++ JBIGLIB="$(JBIGLIB)" \ ++ JPEGLIB="$(JPEGLIB)" \ ++ PNGLIB="$(PNGLIB)" \ ++ TIFFLIB="$(TIFFLIB)" \ ++ URTLIB="$(URTLIB)" \ ++ X11LIB="$(X11LIB)" \ ++ XML2_LIBS="$(XML2_LIBS)" \ ++ ZLIB="$(ZLIB)" ++ + # Test files in source tree. + + check-tree : BUILDBINDIRS :=./analyzer \ +@@ -525,10 +543,10 @@ resultdir-backup: FORCE + + check-tree: $(TESTRANDOM) resultdir-backup + cd $(RESULTDIR); \ ++ $(CHECK_VARS) \ + CHECK_TYPE=tree \ +- PBM_TEST_PATH=$(PBM_TEST_PATH) BUILDDIR=$(BUILDDIR) \ ++ PBM_TEST_PATH=$(PBM_TEST_PATH) \ + LD_LIBRARY_PATH=$(PBM_LIBRARY_PATH):${LD_LIBRARY_PATH} \ +- RGBDEF=$(RGBDEF) \ + $(SRCDIR)/test/Execute-Tests 2>&1 + + # Execute-Tests needs to know BUILDDIR in order to locate testrandom. +@@ -545,19 +563,18 @@ check: check-package + + check-package: $(TESTRANDOM) resultdir-backup + cd $(RESULTDIR); \ ++ $(CHECK_VARS) \ + CHECK_TYPE=package \ +- PBM_TEST_PATH=$(PBM_TEST_PATH) BUILDDIR=$(BUILDDIR) \ ++ PBM_TEST_PATH=$(PBM_TEST_PATH) \ + LD_LIBRARY_PATH=$(PBM_LIBRARY_PATH):${LD_LIBRARY_PATH} \ +- RGBDEF=$(RGBDEF) \ + $(SRCDIR)/test/Execute-Tests 2>&1 + + + # Check after install + check-install: $(TESTRANDOM) resultdir-backup + cd $(RESULTDIR); \ ++ $(CHECK_VARS) \ + CHECK_TYPE=install \ +- BUILDDIR=$(BUILDDIR) \ +- RGBDEF=$(RGBDEF) \ + $(SRCDIR)/test/Execute-Tests 2>&1 + + +--- test/all-in-place.test ++++ test/all-in-place.test +@@ -367,11 +367,62 @@ ordinary_testprogs="\ + zeisstopnm \ + " + ++enabled_testprog() { ++ case $1 in ++ fiascotopnm|\ ++ pnmtofiasco) ++ [ "${BUILD_FIASCO}" = "N" ] && return 1 ;; ++ ++ jpeg2ktopam|\ ++ pamtojpeg2k) ++ [ "${JASPERLIB}" = "NONE" ] && return 1 ;; ++ ++ jbigtopnm|\ ++ pnmtojbig) ++ [ "${JBIGLIB}" = "NONE" ] && return 1 ;; ++ ++ jpegtopnm|\ ++ pnmtojpeg|\ ++ ppmtojpeg) ++ [ "${JPEGLIB}" = "NONE" ] && return 1 ;; ++ ++ pamtopng|\ ++ pngtopam|\ ++ pnmtopng) ++ [ "${PNGLIB}" = "NONE" ] && return 1 ;; ++ ++ svgtopam) ++ [ "${PNGLIB}" = "NONE" ] && return 1 ++ [ "${XML2_LIBS}" = "NONE" ] && return 1 ++ ;; ++ ++ pamtotiff|\ ++ pnmtotiffcmyk|\ ++ tifftopnm) ++ [ "${TIFFLIB}" = "NONE" ] && return 1 ;; ++ ++ pnmtorle|\ ++ rletopnm) ++ [ "${URTLIB}" = "NONE" ] && return 1 ;; ++ ++ pamx) ++ [ "${X11LIB}" = "NONE" ] && return 1 ;; ++ esac ++ ++ return 0 ++} ++ + # The string "fiascotopnm" has to be filtered out by egrep for fiascotopnm + # has a slightly different version report format. + + for i in $ordinary_testprogs + do ++ # Stub out programs that aren't built. ++ if ! enabled_testprog "$i"; then ++ echo "$i: ok" ++ continue ++ fi ++ + $i --version 2>&1 | \ + egrep -v -e fiascotopnm -e \ + "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \ +--- test/fiasco-roundtrip.test ++++ test/fiasco-roundtrip.test +@@ -2,6 +2,10 @@ + # This script tests: pnmtofiasco fiascotopnm + # Also requires: pnmpad + ++if [ "${BUILD_FIASCO}" = "N" ]; then ++ exit 80 ++fi ++ + # Should print 215556145 102615 + + pnmpad --black --bottom 1 --left 1 testimg.ppm | \ +--- test/jbig-roundtrip.test ++++ test/jbig-roundtrip.test +@@ -2,6 +2,9 @@ + # This script tests: pnmtojbig jbigtopnm + # Also requires: pamchannel pamtopnm + ++if [ "${JBIGLIB}" = "NONE" ]; then ++ exit 80 ++fi + + # Test 1. Should print 2425386270 41 + pnmtojbig testgrid.pbm | jbigtopnm | cksum +--- test/legacy-names.test ++++ test/legacy-names.test +@@ -94,8 +94,30 @@ ordinary_testprogs="\ + ppmtouil \ + " + ++enabled_testprog() { ++ case $1 in ++ ppmtojpeg) ++ [ "${JPEGLIB}" = "NONE" ] && return 1 ;; ++ ++ pamrgbatopng|\ ++ pngtopnm) ++ [ "${PNGLIB}" = "NONE" ] && return 1 ;; ++ ++ pnmtotiff) ++ [ "${TIFFLIB}" = "NONE" ] && return 1 ;; ++ esac ++ ++ return 0 ++} ++ + for i in $ordinary_testprogs + do ++ # Stub out programs that aren't built. ++ if ! enabled_testprog "$i"; then ++ echo "$i: ok" ++ continue ++ fi ++ + $i --version 2>&1 | \ + egrep -v \ + "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \ +--- test/png-roundtrip.test ++++ test/png-roundtrip.test +@@ -6,6 +6,10 @@ + ## If this test fails and pnm-roundtrip2.test succeeds, it indicates + ## some problem with pnmtopng. + ++if [ "${PNGLIB}" = "NONE" ]; then ++ exit 80 ++fi ++ + # Test 1. Should print 1926073387 101484 18 times + for flags in "" -interlace \ + -gamma=.45 \ +--- test/png-roundtrip2.test ++++ test/png-roundtrip2.test +@@ -9,6 +9,10 @@ + ## If both tests fail, the likely cause is a problem with pngtopam. + ## It is also possible that there is some problem in libpng. + ++if [ "${PNGLIB}" = "NONE" ]; then ++ exit 80 ++fi ++ + # Test 1. Should print 1926073387 101484 twice + for flags in "" -gamma=.45 + do +--- test/ps-roundtrip.test ++++ test/ps-roundtrip.test +@@ -8,6 +8,10 @@ + ## (1) zlib was not linked. + ## (2) ghostscript is not available. + ++if [ "${ZLIB}" = "NONE" ]; then ++ exit 80 ++fi ++ + tmpdir=${tmpdir:-/tmp} + + # pstopnm does not use libnetpbm functions for output. +--- test/tiff-roundtrip.test ++++ test/tiff-roundtrip.test +@@ -2,6 +2,9 @@ + # This script tests: pamtotiff tifftopnm + # Also requires: + ++if [ "${TIFFLIB}" = "NONE" ]; then ++ exit 80 ++fi + + # Failure message + ## Second test fails if Netpbm was built without the flate library +--- test/utahrle-roundtrip.test ++++ test/utahrle-roundtrip.test +@@ -2,6 +2,9 @@ + # This script tests: pnmtorle rletopnm + # Also requires: pamchannel pamtopnm + ++if [ "${URTLIB}" = "NONE" ]; then ++ exit 80 ++fi + + #Test 1. Should produce 1571496937 33838, cksum of testimg.red + pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \ |