summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-libs/netpbm
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-libs/netpbm')
-rw-r--r--media-libs/netpbm/Manifest2
-rwxr-xr-xmedia-libs/netpbm/files/make-tarball.sh67
-rw-r--r--media-libs/netpbm/files/netpbm-10.31-build.patch50
-rw-r--r--media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch83
-rw-r--r--media-libs/netpbm/files/netpbm-10.51.00-ppmtompeg-free.patch35
-rw-r--r--media-libs/netpbm/files/netpbm-10.51.00-underlinking.patch16
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-failing-tests.patch28
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-jasper-hack.patch41
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-jbig-2.patch19
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-jpeg-dirs.patch28
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-options-case.patch105
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-test.patch17
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-wordaccess_be_aligned.patch23
-rw-r--r--media-libs/netpbm/files/netpbm-10.70-system-libs.patch40
-rw-r--r--media-libs/netpbm/metadata.xml8
-rw-r--r--media-libs/netpbm/netpbm-10.66.00.ebuild197
-rw-r--r--media-libs/netpbm/netpbm-10.70.00.ebuild189
17 files changed, 948 insertions, 0 deletions
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
new file mode 100644
index 000000000000..1fda332a16fd
--- /dev/null
+++ b/media-libs/netpbm/Manifest
@@ -0,0 +1,2 @@
+DIST netpbm-10.66.00.tar.xz 2575356 SHA256 7fe94f38e139be194e9e384e8d9c9747f2fe08c18295bba93c55a41c5bbf63fc SHA512 44348eb1155353d5cd5a2ce025bc6d9301cc3239acea6b68418c14432f4bd61fc5a8669bb51b3e86b96abaf5b02cc20115c662e40fa5b41aee202b0c2ae605af WHIRLPOOL fa937fccd2da9068a268d6a5729c8093baacc3025ab2382902611dadab985247fdacf3433f6e15407b081478b93b772237c41363f37340ea6c93c169357dd0cf
+DIST netpbm-10.70.00.tar.xz 2621612 SHA256 1268cb6801790619f6d057b964305355011dfe66247f2b71fe9978cdd7af7d93 SHA512 f70d6dd79ce813f9fc4935d382b50bd3cecdf02c324b0f012056e56e33f24b621e8c1b3d054c6f470d437d0d793593de95eaa9724055d59c342228398a40f0b4 WHIRLPOOL 8810a2e8d4ed6a834d6fbc2861079b4e2664f85ff2548d00f95a9c26f92d02dcebcb8d1b9c26226caba067accc41eabbe1211322607de77d61827b34a8b4c82a
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.51.00-pnmconvol-nooffset.patch b/media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch
new file mode 100644
index 000000000000..1eb5506ddae2
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch
@@ -0,0 +1,83 @@
+taken from upstream
+
+http://bugs.gentoo.org/338230
+
+Index: editor/pnmconvol.c
+===================================================================
+--- editor/pnmconvol.c (revision 1297)
++++ editor/pnmconvol.c (revision 1298)
+@@ -455,13 +455,13 @@ static void
+ convKernelCreatePnm(struct pam * const cpamP,
+ tuple * const * const ctuples,
+ unsigned int const depth,
+- bool const offsetPgm,
++ bool const offsetPnm,
+ struct convKernel ** const convKernelPP) {
+ /*----------------------------------------------------------------------------
+- Compute the convolution matrix in normalized form from the PGM
+- form. Each element of the output matrix is the actual weight we give an
+- input pixel -- i.e. the thing by which we multiple a value from the
+- input image.
++ Compute the convolution matrix in normalized form from the PGM form
++ 'ctuples'/'cpamP'. Each element of the output matrix is the actual weight
++ we give an input pixel -- i.e. the thing by which we multiple a value from
++ the input image.
+
+ 'depth' is the required number of planes in the kernel. If 'ctuples' has
+ fewer planes than that, we duplicate as necessary. E.g. if 'ctuples' is
+@@ -470,13 +470,13 @@ convKernelCreatePnm(struct pam *
+ 'ctuples' has more planes than specified, we ignore the higher numbered
+ ones.
+
+- 'offsetPgm' means the PGM convolution matrix is defined in offset form so
++ 'offsetPnm' means the PNM convolution matrix is defined in offset form so
+ that it can represent negative values. E.g. with maxval 100, 50 means
+ 0, 100 means 50, and 0 means -50. If 'offsetPgm' is false, 0 means 0
+ and there are no negative weights.
+ -----------------------------------------------------------------------------*/
+- double const scale = (offsetPgm ? 2.0 : 1.0) / cpamP->maxval;
+- double const offset = offsetPgm ? - 1.0 : 0.0;
++ double const scale = (offsetPnm ? 2.0 : 1.0) / cpamP->maxval;
++ double const offset = offsetPnm ? - 1.0 : 0.0;
+ unsigned int const planes = MIN(3, depth);
+
+ struct convKernel * convKernelP;
+@@ -579,9 +579,19 @@ normalizeKernel(struct convKernel * cons
+ static void
+ getKernelPnm(const char * const fileName,
+ unsigned int const depth,
+- bool const nooffset,
++ bool const offset,
+ struct convKernel ** const convKernelPP) {
++/*----------------------------------------------------------------------------
++ Get the convolution kernel from the PNM file named 'fileName'.
++ 'offset' means the PNM convolution matrix is defined in offset form so
++ that it can represent negative values. E.g. with maxval 100, 50 means
++ 0, 100 means 50, and 0 means -50. If 'offsetPgm' is false, 0 means 0
++ and there are no negative weights.
++
++ Make the kernel suitable for convolving an image of depth 'depth'.
+
++ Return the kernel as *convKernelPP.
++-----------------------------------------------------------------------------*/
+ struct pam cpam;
+ FILE * cifP;
+ tuple ** ctuples;
+@@ -594,7 +604,7 @@ getKernelPnm(const char * const
+
+ validateKernelDimensions(cpam.width, cpam.height);
+
+- convKernelCreatePnm(&cpam, ctuples, depth, nooffset, convKernelPP);
++ convKernelCreatePnm(&cpam, ctuples, depth, offset, convKernelPP);
+ }
+
+
+@@ -893,7 +903,7 @@ getKernel(struct cmdlineInfo const cmd
+ struct convKernel * convKernelP;
+
+ if (cmdline.pnmMatrixFileName)
+- getKernelPnm(cmdline.pnmMatrixFileName, depth, cmdline.nooffset,
++ getKernelPnm(cmdline.pnmMatrixFileName, depth, !cmdline.nooffset,
+ &convKernelP);
+ else if (cmdline.matrixfile)
+ convKernelCreateSimpleFile(cmdline.matrixfile, cmdline.normalize,
diff --git a/media-libs/netpbm/files/netpbm-10.51.00-ppmtompeg-free.patch b/media-libs/netpbm/files/netpbm-10.51.00-ppmtompeg-free.patch
new file mode 100644
index 000000000000..0c1e48549b1b
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.51.00-ppmtompeg-free.patch
@@ -0,0 +1,35 @@
+fix from upstream
+
+------------------------------------------------------------------------
+r1285 | giraffedata | 2010-09-18 16:13:39 -0400 (Sat, 18 Sep 2010) | 1 line
+
+Fix free of non-allocated memory
+
+Index: converter/ppm/ppmtompeg/param.c
+===================================================================
+--- converter/ppm/ppmtompeg/param.c (revision 1284)
++++ converter/ppm/ppmtompeg/param.c (revision 1285)
+@@ -283,8 +283,8 @@ GetFrameRate(const char * const p)
+
+
+ static void
+-mergeInputSource(struct inputSource * const baseSourceP,
+- struct inputSource * const addedSourceP) {
++mergeInputSource(struct inputSource * const baseSourceP,
++ const struct inputSource * const addedSourceP) {
+
+ unsigned int i;
+
+@@ -294,12 +294,6 @@ mergeInputSource(struct inputSource * co
+ for (i = 0; i < addedSourceP->numInputFileEntries; ++i)
+ baseSourceP->inputFileEntries[baseSourceP->numInputFileEntries++] =
+ addedSourceP->inputFileEntries[i];
+-
+- free(addedSourceP);
+- /* Note the space allocated for the *addedSourceP input file
+- entries themselves is still allocated, and used by
+- *baseSourceP.
+- */
+ }
+
+
diff --git a/media-libs/netpbm/files/netpbm-10.51.00-underlinking.patch b/media-libs/netpbm/files/netpbm-10.51.00-underlinking.patch
new file mode 100644
index 000000000000..e161242c4402
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.51.00-underlinking.patch
@@ -0,0 +1,16 @@
+ converter/other/Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/converter/other/Makefile b/converter/other/Makefile
+index 1417cd3..c178101 100644
+--- a/converter/other/Makefile
++++ b/converter/other/Makefile
+@@ -167,7 +167,7 @@ pngtopam: %: %.o pngx.o $(NETPBMLIB) $(LIBOPT)
+ pnmtopng: %: %.o pngx.o pngtxt.o $(NETPBMLIB) $(LIBOPT)
+ $(LD) -o $@ $@.o pngx.o pngtxt.o \
+ $(shell $(LIBOPT) $(NETPBMLIB)) \
+- $(PNGLIB_LIBOPTS) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD)
++ $(PNGLIB_LIBOPTS) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) -lz
+
+ pamrgbatopng: %: %.o $(NETPBMLIB) $(LIBOPT)
+ $(LD) -o $@ $@.o \
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/metadata.xml b/media-libs/netpbm/metadata.xml
new file mode 100644
index 000000000000..867433382de9
--- /dev/null
+++ b/media-libs/netpbm/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="rle">Build converters for the RLE format (utah raster toolkit)</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/netpbm/netpbm-10.66.00.ebuild b/media-libs/netpbm/netpbm-10.66.00.ebuild
new file mode 100644
index 000000000000..b5b4f1e67ea9
--- /dev/null
+++ b/media-libs/netpbm/netpbm-10.66.00.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils multilib
+
+DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
+HOMEPAGE="http://netpbm.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc jbig jpeg jpeg2k png rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
+
+RDEPEND="jbig? ( media-libs/jbigkit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ png? ( >=media-libs/libpng-1.4:0 )
+ 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}
+ app-arch/xz-utils
+ sys-devel/flex"
+
+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() {
+ epatch "${FILESDIR}"/netpbm-10.31-build.patch
+ epatch "${FILESDIR}"/netpbm-10.66-test.patch #450530
+ epatch "${FILESDIR}"/netpbm-10.66-jasper-hack.patch #513240
+ epatch "${FILESDIR}"/netpbm-10.66-options-case.patch
+ epatch "${FILESDIR}"/netpbm-10.66-jpeg-dirs.patch
+ epatch "${FILESDIR}"/netpbm-10.66-jbig-2.patch
+ epatch "${FILESDIR}"/netpbm-10.66-failing-tests.patch
+ epatch "${FILESDIR}"/netpbm-10.66-wordaccess_be_aligned.patch #547252
+
+ # make sure we use system urt
+ sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
+ rm -rf urt
+
+ # avoid mixing the local copy of jbig with the system
+ rm converter/other/jbig/jbig.h || die
+
+ # disable certain tests based on active USE flags
+ local del=(
+ $(usex jbig '' 'jbigtopnm pnmtojbig jbig-roundtrip')
+ $(usex rle '' 'utahrle-roundtrip')
+ $(usex tiff '' 'tiff-roundtrip')
+ )
+ if [[ ${#del[@]} -gt 0 ]] ; then
+ sed -i -r $(printf -- ' -e /%s.test/d' "${del[@]}") test/Test-Order || die
+ fi
+ del=(
+ pnmtofiasco fiascotopnm # We always disable fiasco
+ $(usex jbig '' 'jbigtopnm pnmtojbig')
+ $(usex jpeg2k '' 'jpeg2ktopam pamtojpeg2k')
+ $(usex rle '' 'pnmtorle rletopnm')
+ $(usex tiff '' 'pamtotiff pnmtotiff pnmtotiffcmyk tifftopnm')
+ )
+ if [[ ${#del[@]} -gt 0 ]] ; then
+ sed -i -r $(printf -- ' -e s/\<%s\>(:.ok)?//' "${del[@]}") test/all-in-place.{ok,test} || die
+ sed -i '/^$/d' test/all-in-place.ok || die
+ fi
+
+ # 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
+
+ # 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)
+
+ 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 = $(netpbm_config jpeg2k jasper)
+ 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}
+ 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
+
+ [[ $(get_libdir) != "lib" ]] && mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir)
+
+ # Remove cruft that we don't need, and move around stuff we want
+ rm "${ED}"/usr/bin/{doc.url,manweb} || die
+ rm -r "${ED}"/usr/man/web || die
+ rm -r "${ED}"/usr/link || die
+ rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
+ dodir /usr/share
+ mv "${ED}"/usr/man "${ED}"/usr/share/ || die
+ mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
+
+ doman userguide/*.[0-9]
+ use doc && dohtml -r userguide
+ dodoc README
+ cd doc
+ dodoc HISTORY Netpbm.programming USERDOC
+ dohtml -r .
+}
diff --git a/media-libs/netpbm/netpbm-10.70.00.ebuild b/media-libs/netpbm/netpbm-10.70.00.ebuild
new file mode 100644
index 000000000000..fb0f12f63937
--- /dev/null
+++ b/media-libs/netpbm/netpbm-10.70.00.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils multilib
+
+DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
+HOMEPAGE="http://netpbm.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc jbig jpeg jpeg2k png rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
+
+RDEPEND="jbig? ( media-libs/jbigkit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ png? ( >=media-libs/libpng-1.4:0 )
+ 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}
+ app-arch/xz-utils
+ sys-devel/flex"
+
+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() {
+ epatch "${FILESDIR}"/netpbm-10.31-build.patch
+ epatch "${FILESDIR}"/netpbm-10.66-test.patch #450530
+ epatch "${FILESDIR}"/netpbm-10.70-system-libs.patch
+
+ # 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
+
+ # disable certain tests based on active USE flags
+ local del=(
+ $(usex jbig '' 'jbigtopnm pnmtojbig jbig-roundtrip')
+ $(usex rle '' 'utahrle-roundtrip')
+ $(usex tiff '' 'tiff-roundtrip')
+ )
+ if [[ ${#del[@]} -gt 0 ]] ; then
+ sed -i -r $(printf -- ' -e /%s.test/d' "${del[@]}") test/Test-Order || die
+ fi
+ del=(
+ pnmtofiasco fiascotopnm # We always disable fiasco
+ $(usex jbig '' 'jbigtopnm pnmtojbig')
+ $(usex jpeg2k '' 'jpeg2ktopam pamtojpeg2k')
+ $(usex rle '' 'pnmtorle rletopnm')
+ $(usex tiff '' 'pamtotiff pnmtotiff pnmtotiffcmyk tifftopnm')
+ )
+ if [[ ${#del[@]} -gt 0 ]] ; then
+ sed -i -r $(printf -- ' -e s/\<%s\>(:.ok)?//' "${del[@]}") test/all-in-place.{ok,test} || die
+ sed -i '/^$/d' test/all-in-place.ok || die
+ fi
+
+ # 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
+
+ # 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)
+
+ 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 = $(netpbm_config jpeg2k jasper)
+ 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}
+ 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
+
+ [[ $(get_libdir) != "lib" ]] && mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir)
+
+ # Remove cruft that we don't need, and move around stuff we want
+ rm "${ED}"/usr/bin/{doc.url,manweb} || die
+ rm -r "${ED}"/usr/man/web || die
+ rm -r "${ED}"/usr/link || die
+ rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
+ dodir /usr/share
+ mv "${ED}"/usr/man "${ED}"/usr/share/ || die
+ mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
+
+ doman userguide/*.[0-9]
+ use doc && dohtml -r userguide
+ dodoc README
+ cd doc
+ dodoc HISTORY Netpbm.programming USERDOC
+ dohtml -r .
+}