public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/musl:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
Date: Sat, 18 Jul 2015 21:53:14 +0000 (UTC)	[thread overview]
Message-ID: <1437256534.657503c1f5ac9436aecccadaed8e841beff4a900.blueness@gentoo> (raw)

commit:     657503c1f5ac9436aecccadaed8e841beff4a900
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 18 21:55:34 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Jul 18 21:55:34 2015 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=657503c1

media-libs/netpbm: fix 10.66.

 media-libs/netpbm/Manifest                         |  17 +-
 .../netpbm/files/netpbm-10.51.00-getline.patch     | 145 ---------------
 .../files/netpbm-10.51.00-pnmconvol-nooffset.patch |  83 ---------
 .../files/netpbm-10.51.00-ppmtompeg-free.patch     |  35 ----
 .../files/netpbm-10.51.00-underlinking.patch       |  16 --
 .../netpbm/files/netpbm-10.66-failing-tests.patch  |  28 +++
 .../netpbm/files/netpbm-10.66-jasper-hack.patch    |  41 +++++
 media-libs/netpbm/files/netpbm-10.66-jbig-2.patch  |  19 ++
 .../netpbm/files/netpbm-10.66-jpeg-dirs.patch      |  28 +++
 .../netpbm-10.66-musl-avoid-stdout-collision.patch |  30 ++++
 .../netpbm/files/netpbm-10.66-options-case.patch   | 105 +++++++++++
 media-libs/netpbm/files/netpbm-10.66-test.patch    |  17 ++
 .../files/netpbm-10.66-wordaccess_be_aligned.patch |  23 +++
 media-libs/netpbm/netpbm-10.51.00-r99.ebuild       | 178 ------------------
 media-libs/netpbm/netpbm-10.66.00.ebuild           | 198 +++++++++++++++++++++
 15 files changed, 499 insertions(+), 464 deletions(-)

diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index fbe240a..d5a53b6 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -1,10 +1,13 @@
 AUX make-tarball.sh 1053 SHA256 247827b36f85878195ad30f1a1ec3a4edf9992ccafcd4f66ce4fa18910abd731 SHA512 66d7de6cb87fefb353547183c7dd2ff28304534753aef48549801ef3ed23bcde995a766e6f3b14b70e64e1a7e6fddca56329e5a6e5e2182f26bf3b0d2dffd593 WHIRLPOOL 05831454f0109ef79549922234c98a9c4294804329212b197bb386d4faa37b26537f9b537cc50f890bf4d48e33b84d4fff3300da9adab12d3137ba2e90cbf3e0
 AUX netpbm-10.31-build.patch 1629 SHA256 eaf363941337718390856c318c8e69114c8fb9dbcea8b07755350dbdabce6323 SHA512 53e88bd1c85aa04d60ca2de7a32e5d00d9f959f3443e0c951c0694c814f6956708d8d12427a0fa8a8f76a1613d2982c3aa9b0c6ddd12b9cad3419ced1e5bb59e WHIRLPOOL 15a6b682813bfac808ccff8e16be492fd78defd59f82d5960d9a344452d8c761ea64ebbdc460c005c7d7669a3f26aa3704850487b43f4732bccb742b15709c28
-AUX netpbm-10.51.00-getline.patch 5633 SHA256 7ebd19673033dbfcbc1ba83c7d13b83e1775b3501799218725863e271caf3e7c SHA512 bc1342c3dc24377f365a01694b68f6ab1a18feef3dc8d595dabf0152b5e98a5d67ef9256ed16f50669ea3fa10c0e11962482c9f26ae74f50de0d5e425eb74a25 WHIRLPOOL 49de87814cc999ca12bd511f23306a12089510efe33c4f69dbd453fd01c1b7bdaa0211db84b44b0b9d1565a6350a4804a377f67191f981bd5d69c1e36d4c6f78
-AUX netpbm-10.51.00-pnmconvol-nooffset.patch 3930 SHA256 d9c7f70e58d50dac4998157021ac2fef92822d1abd9b9d060384b195e4f1cabb SHA512 9f9a1e9a2d7db117693648693c0152082cab1e60a075e9bd4ca67b9c042ea02549917504658d32311b116cd17901f153ece73303adabdac2cd0981ac22a1ce45 WHIRLPOOL c7a6b09c9c5e258445473d7f16e91fac9205d1f21f24e8eebe0a277908774e6670d00ee3f6aa44f6bfc6bccface76c5db6bc523f442c263306982d43cb83edb3
-AUX netpbm-10.51.00-ppmtompeg-free.patch 1199 SHA256 45c0229b035e8b50f759a5aae646a60ef07f4c0fb156b4aee1dc52aa0c1cbc75 SHA512 902f9882f24561e92277d2b93363e3611f26e59236f2f116728f25179198e2be723e7d1e39e5c12ef820fd98ba654ea0ccd946db6d27cfbf592d98bb2ba9cb57 WHIRLPOOL bc6222c72a9bb12d218a762161d2bff577fb04b577131eefea930f0fd6c324dcdd6740a032f40cc75b5e5403cb6757bd66b1867bab0ccd0735da9a62183f078b
-AUX netpbm-10.51.00-underlinking.patch 657 SHA256 f933003b9c50717d76abaf3272b9bef66b328629a8791144fd0038e692989b95 SHA512 5fe8513f982fbfe557460a9c4cba2d61e27d2a7142906a6a05bd40ceb3c6b194c3c1ae1005e246a94606ac15d1c2f109f2ef33d8c4140118691877fae22d61ee WHIRLPOOL 724976eaa5a5ac95498bac9f221d78f5a5ba73fa2a2666167ced3c66fa88f8c9b15be7a86d3a19c6faa771781ca37b57f302750f7c70ef30d2d92f2323531612
-DIST netpbm-10.51.00-libpng-1.5.patch.bz2 8120 SHA256 260a5f0e9834e7e1aa5c2dcc292695aa43b5aa198af1cb33e5705f7cac10da7b SHA512 3bebffb798e72e5ff872b482d43dffbd174496d1ca46e88bcb3c19f2b94cdfe2037aa1f19a22a40996503ccc03929bd28570722874a0c74265b083fbc66b24c4 WHIRLPOOL cbf1efd16ac7acef1fa318454f24afbd7f68eded7343168783ce8fd5dd389b9d97e7a9237cf4d6315cdeba462c9d84fb7011ddfa2df592b1fe15f4462ca0d623
-DIST netpbm-10.51.00.tar.xz 1834148 SHA256 6d7bb30d1d0e7f6a23b55c6f03bbb20b539909ad84281dc944b1072656dc1d0e SHA512 07b621bfebbd051a80eff09886bc2b3b4f82b01fa9087d6a76ed70a042493b69fb3295d471640a4576101ba19352a57eadf69c5721d9cc416d25ff563ee07c76 WHIRLPOOL 25cbfbdd575fe1c032ce1bb700181175b1386d481990e516ce62d953b1d37091c32ca2016c487d4963af1b8c79ec04953e59181334d2a53b9d5701acedabdf2a
-EBUILD netpbm-10.51.00-r99.ebuild 4872 SHA256 0a53f874d4d92a570722641046f60d33367ec24ce44a2af184c23652e4cb81d0 SHA512 7caff25e7f489de3a85011abba9149b9a9e1bc401952de0ba8b40a12705a2a8f220fd3d8460ef7298a13049ea73ff5d5a878dff8443b4524e5d070d518c55230 WHIRLPOOL a73ba95f8f48e5a379a86fab12f2639eed3c5b784ac0992b6b327beb840d4be802371dd999528c890ce62eca7a0c5f048eafbc8070345d85459b63489fe978d4
+AUX netpbm-10.66-failing-tests.patch 535 SHA256 bce4b9243d2cb9ba41428a927ff5275fd34bee4e67ed6203efb9b4a503d4d3f5 SHA512 33101e745fdeb9159da48393622edf9163c85f2c133951ba33d48f80758179f18ce36e60e3357bb978c101a7a0e1688aa6dbbc1a1c646782089760908dfe2b04 WHIRLPOOL 4db4c9002f30ac77c3fcd7c19dc7d659bf8d5548e02fd31aa14f57fc99344ebbc8b0e0b212c8bef6cc1d9419cf45a824bdf2f5ce09da1e64a19039adb48ed12d
+AUX netpbm-10.66-jasper-hack.patch 924 SHA256 9c8b32539402b16ced4c83f4c300b742736a9c3eb5bba8f8e5b1758e9de6f7cb SHA512 e58a5f6800e2ab511080d505e9286e4831cb498f9a02cd5823bd52bb8e267c780f4b792388ccc29023afe18005c753b6ea32a3e277b8b1e3ceb8e4b997afe359 WHIRLPOOL 4757e9bab145dfae5837281d645a98906da9d5b16960d6dca2562feecdfb81d4439d6ee52bb41c45ac164dc15cc21de1cd541ba14daef775c9f57a1c737b749f
+AUX netpbm-10.66-jbig-2.patch 725 SHA256 defe6bd506c73c48eeb94c7a0dd2a2e471823c44ca6d57d562151ff1188acd4a SHA512 5d7a90c982c67c17b37dc91b7b4668ddcbd67434873cfde86e04bac7d057d6e6cd8ace52c3fc6e0ce36f767333bb00bdfc4fb3f29f54427285214cbd2f41c42f WHIRLPOOL a00fc6a9001db640dda10e2709e03c41be184db886d6b516ed6ab9013dd7c6b37c8e66e4b7630787647419910db871506850c7e524fe182a559dd2412a1473dd
+AUX netpbm-10.66-jpeg-dirs.patch 722 SHA256 8cca55c06fd4f678c069a0ae3e63997a408d54bba9c44150c126d94fd6cce424 SHA512 95a4ab08702faa3d25c75b71329ea28e5eb5f4f0b200d34d7350633e9a999160fe58e8f57fadab30e273c61a06c8d148fdebecbffa5c0b5023c59647f6d4c3ae WHIRLPOOL 877efe30dea24809593bfa214509b69768e443a5f59c6441d94d63e80855e34b6725fbb79658cfb76accdff8acbb6b9a140f99864b82270146fad6e73e754d02
+AUX netpbm-10.66-musl-avoid-stdout-collision.patch 1350 SHA256 105db299ebb57ef78435edcba1dd8055bb54870d31d12aa62c84cf12f110acbe SHA512 e15d35354255dd71de6336fdb8c6a8361062a5f1b79ac29b0d2f3612b56205d26caa678060e348d7c122751814cd77a63c5dfc068b0a65963a5b71eeaf5ac20d WHIRLPOOL 6e894cc260a79eb64712ff5931103b0a12bf9fab8075ab40737f8cae6fa8da98edb6b5196aeffbae40f085871ee1de8f12cbf604830b6b2494e88416fb2b6443
+AUX netpbm-10.66-options-case.patch 3417 SHA256 1d286fc9da28b7cc264b6d227871e3d77f09cfa57fd680972c5147344930ae22 SHA512 2895b71269d321f84e79808a2fe65a8886ce3e173550051ca40563636b3e8561d5c812a3bb9f2e607c2dc7244b56492332a4299d165059d866ca00701adefe23 WHIRLPOOL 6afb3df9509357060879394f3d0c175bdf5db04719280aa5f98b2bb17dee1fb29b70e8594eaa0819cb905b2d00a4b32a61822f48deb60c541942e0e593fdba35
+AUX netpbm-10.66-test.patch 347 SHA256 fb95a101811a6e8b983d6f82130e511658831e6ad2e873fa4632c4049a00bac2 SHA512 bb271d77794fa8b3d5d4632e32d6bd2b5f9522853c6b96c7056fe9817da47b89153eba2653cf3a5a29f597e3fa616e1f6c810bd986651e610176d69b428afb74 WHIRLPOOL 5f59c43abf70d6bc74e6ac6050e25137421f0f3fd5e75e6fb8e77c54f2fc447f26c1a0aeb23ea70dca27bd44b11fdc88fbbd8bcbc1be338acb6f601b9fdcb943
+AUX netpbm-10.66-wordaccess_be_aligned.patch 942 SHA256 3a0c8120c69cd6f6f53dc51ec15944d17486e7d6d7a4cffc5a69fb2b94f863b1 SHA512 b3b33b0e32c7bcb126104f0f100b56cb811c1ce5051be854a93d0227d9a684e440dd9e0787dfe3f4cb12df1fef5b2e6d1ecb6c3a49d630a32595a026ae1fb482 WHIRLPOOL 2288bf481ae97df10b56d89a022b16659dadafdf0c207bc4a5ac501f029d0b4633999691f2849f8f1692be5d9370944e6e1a501dcb082482f0b8bb9cb843ea97
+DIST netpbm-10.66.00.tar.xz 2575356 SHA256 7fe94f38e139be194e9e384e8d9c9747f2fe08c18295bba93c55a41c5bbf63fc SHA512 44348eb1155353d5cd5a2ce025bc6d9301cc3239acea6b68418c14432f4bd61fc5a8669bb51b3e86b96abaf5b02cc20115c662e40fa5b41aee202b0c2ae605af WHIRLPOOL fa937fccd2da9068a268d6a5729c8093baacc3025ab2382902611dadab985247fdacf3433f6e15407b081478b93b772237c41363f37340ea6c93c169357dd0cf
+EBUILD netpbm-10.66.00.ebuild 5732 SHA256 a25308c0bad8df8f1395c028d33fc7df280967c1c702536844e1a71a24cdf593 SHA512 8e44e6baefba2cf43872906a62d3bdfab19c096556db9a74af1e23f288188e089e5324186c243ed1470dedd59edf1d4055efd74bcf5e00540ba2884b5c037170 WHIRLPOOL 62fe403f2d09d6e376da31701436a0452ee18c30506b885c606ba18f9c381b09631231009a2c52840f0a39ffd7dc867afa6c6896b8eae723117c5ffc867a0aa7
 MISC metadata.xml 261 SHA256 e04079912e263782a8c0e4f115e49ff3694535ff2efef7b7fff85cf8d100102b SHA512 e7bcb8f689bd7da37e414a3f33b125d52a5ec0d376e821edd58d352ffb502098fbe8b7d24c0eb073822e41a55c280f84558ca4314dd37ac20adcf6471bd712af WHIRLPOOL 9aa2223d48bacfa917affeb56dc180becb54fc612e69ce6d26496d45cc42fd1050e2a40c77957ee7f37b3e2665adc0c95f08b60fab1787d3292905f0a4c8092a

diff --git a/media-libs/netpbm/files/netpbm-10.51.00-getline.patch b/media-libs/netpbm/files/netpbm-10.51.00-getline.patch
deleted file mode 100644
index 645623e..0000000
--- a/media-libs/netpbm/files/netpbm-10.51.00-getline.patch
+++ /dev/null
@@ -1,145 +0,0 @@
---- a/netpbm-10.51.00/converter/ppm/xpmtoppm.c
-+++ b/netpbm-10.51.00/converter/ppm/xpmtoppm.c
-@@ -123,7 +123,7 @@
- 
- 
- static void
--getline(char * const line,
-+my_getline(char * const line,
-         size_t const size,
-         FILE * const stream) {
- /*----------------------------------------------------------------------------
-@@ -141,7 +141,7 @@
-    Exit program if the line doesn't fit in the buffer.
- -----------------------------------------------------------------------------*/
-     if (size > sizeof(lastInputLine))
--        pm_error("INTERNAL ERROR: getline() received 'size' parameter "
-+        pm_error("INTERNAL ERROR: my_getline() received 'size' parameter "
-                  "which is out of bounds");
- 
-     if (backup) {
-@@ -387,7 +387,7 @@
-                int *           const transparentP) {
- /*----------------------------------------------------------------------------
-   Read the header of the XPM file on stream 'stream'.  Assume the
--  getline() stream is presently positioned to the beginning of the
-+  my_getline() stream is presently positioned to the beginning of the
-   file and it is a Version 3 XPM file.  Leave the stream positioned
-   after the header.
- 
-@@ -423,25 +423,25 @@
-     unsigned int * ptab;
- 
-     /* Read the XPM signature comment */
--    getline(line, sizeof(line), stream);
-+    my_getline(line, sizeof(line), stream);
-     if (strncmp(line, xpm3_signature, strlen(xpm3_signature)) != 0) 
-         pm_error("Apparent XPM 3 file does not start with '/* XPM */'.  "
-                  "First line is '%s'", xpm3_signature);
- 
-     /* Read the assignment line */
--    getline(line, sizeof(line), stream);
-+    my_getline(line, sizeof(line), stream);
-     if (strncmp(line, "static char", 11) != 0)
-         pm_error("Cannot find data structure declaration.  Expected a "
-                  "line starting with 'static char', but found the line "
-                  "'%s'.", line);
- 
- 	/* Read the hints line */
--    getline(line, sizeof(line), stream);
-+    my_getline(line, sizeof(line), stream);
-     /* skip the comment line if any */
-     if (!strncmp(line, "/*", 2)) {
-         while (!strstr(line, "*/"))
--            getline(line, sizeof(line), stream);
--        getline(line, sizeof(line), stream);
-+            my_getline(line, sizeof(line), stream);
-+        my_getline(line, sizeof(line), stream);
-     }
-     if (sscanf(line, "\"%u %u %u %u\",", &width, &height,
-                &nColors, &charsPerPixel) != 4)
-@@ -475,10 +475,10 @@
-         *transparentP = -1;  /* initial value */
- 
-         for (seqNum = 0; seqNum < nColors; ++seqNum) {
--            getline(line, sizeof(line), stream);
-+            my_getline(line, sizeof(line), stream);
-             /* skip the comment line if any */
-             if (!strncmp(line, "/*", 2))
--                getline(line, sizeof(line), stream);
-+                my_getline(line, sizeof(line), stream);
-             
-             interpretXpm3ColorTableLine(line, seqNum, charsPerPixel,
-                                         colors, ptab, nColors, transparentP);
-@@ -504,7 +504,7 @@
-                unsigned int ** const ptabP) {
- /*----------------------------------------------------------------------------
-   Read the header of the XPM file on stream 'stream'.  Assume the
--  getline() stream is presently positioned to the beginning of the
-+  my_getline() stream is presently positioned to the beginning of the
-   file and it is a Version 1 XPM file.  Leave the stream positioned
-   after the header.
-   
-@@ -525,7 +525,7 @@
-     /* Read the initial defines. */
-     processedStaticChar = FALSE;
-     while (!processedStaticChar) {
--        getline(line, sizeof(line), stream);
-+        my_getline(line, sizeof(line), stream);
- 
-         if (sscanf(line, "#define %s %d", str1, &v) == 2) {
-             char *t1;
-@@ -576,7 +576,7 @@
-     /* If there's a monochrome color table, skip it. */
-     if (!strncmp(t1, "mono", 4)) {
-         for (;;) {
--            getline(line, sizeof(line), stream);
-+            my_getline(line, sizeof(line), stream);
-             if (!strncmp(line, "static char", 11))
-                 break;
-         }
-@@ -599,7 +599,7 @@
- 
-     /* Read color table. */
-     for (i = 0; i < *ncolorsP; ++i) {
--        getline(line, sizeof(line), stream);
-+        my_getline(line, sizeof(line), stream);
- 
-         if ((t1 = strchr(line, '"')) == NULL)
-             pm_error("D error scanning color table");
-@@ -635,7 +635,7 @@
-        "static char ...").
-     */
-     for (;;) {
--        getline(line, sizeof(line), stream);
-+        my_getline(line, sizeof(line), stream);
-         if (strncmp(line, "static char", 11) == 0)
-             break;
-     }
-@@ -741,7 +741,7 @@
-     backup = FALSE;
- 
-     /* Read the header line */
--    getline(line, sizeof(line), stream);
-+    my_getline(line, sizeof(line), stream);
-     backup = TRUE;  /* back up so next read reads this line again */
-     
-     rc = sscanf(line, "/* %s */", str1);
-@@ -761,7 +761,7 @@
-         pm_error("Could not get %d bytes of memory for image", totalpixels);
-     cursor = *dataP;
-     maxcursor = *dataP + totalpixels - 1;
--	getline(line, sizeof(line), stream); 
-+	my_getline(line, sizeof(line), stream); 
-         /* read next line (first line may not always start with comment) */
-     while (cursor <= maxcursor) {
-         if (strncmp(line, "/*", 2) == 0) {
-@@ -771,7 +771,7 @@
-                              ncolors, ptab, &cursor, maxcursor);
-         }
-         if (cursor <= maxcursor)
--            getline(line, sizeof(line), stream);
-+            my_getline(line, sizeof(line), stream);
-     }
-     if (ptab) free(ptab);
- }

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
deleted file mode 100644
index 1eb5506..0000000
--- a/media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-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
deleted file mode 100644
index 0c1e485..0000000
--- a/media-libs/netpbm/files/netpbm-10.51.00-ppmtompeg-free.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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
deleted file mode 100644
index e161242..0000000
--- a/media-libs/netpbm/files/netpbm-10.51.00-underlinking.patch
+++ /dev/null
@@ -1,16 +0,0 @@
- 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 0000000..63260de
--- /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 0000000..285475d
--- /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 0000000..f7e8cf8
--- /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 0000000..fcf9821
--- /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-musl-avoid-stdout-collision.patch b/media-libs/netpbm/files/netpbm-10.66-musl-avoid-stdout-collision.patch
new file mode 100644
index 0000000..76deb52
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.66-musl-avoid-stdout-collision.patch
@@ -0,0 +1,30 @@
+diff -Naur netpbm-10.66.00.orig/converter/other/pstopnm.c netpbm-10.66.00/converter/other/pstopnm.c
+--- netpbm-10.66.00.orig/converter/other/pstopnm.c	2014-01-01 15:59:14.000000000 -0500
++++ netpbm-10.66.00/converter/other/pstopnm.c	2015-07-18 17:52:11.501826392 -0400
+@@ -79,7 +79,7 @@
+     unsigned int ysize;  /* zero means unspecified */
+     unsigned int dpi;    /* zero means unspecified */
+     enum Orientation orientation;
+-    unsigned int stdout;
++    unsigned int stdout1;
+     unsigned int textalphabits;
+ };
+ 
+@@ -127,7 +127,7 @@
+     OPTENT3(0, "dpi",        OPT_UINT,  &cmdlineP->dpi, &dpiSpec,        0);
+     OPTENT3(0, "portrait",   OPT_FLAG,  NULL, &portraitOpt,             0);
+     OPTENT3(0, "landscape",  OPT_FLAG,  NULL, &landscapeOpt,            0);
+-    OPTENT3(0, "stdout",     OPT_FLAG,  NULL, &cmdlineP->stdout,         0);
++    OPTENT3(0, "stdout",     OPT_FLAG,  NULL, &cmdlineP->stdout1,         0);
+     OPTENT3(0, "textalphabits", OPT_UINT,
+             &cmdlineP->textalphabits,  &textalphabitsSpec, 0);
+ 
+@@ -664,7 +664,7 @@
+ -----------------------------------------------------------------------------*/
+     const char * retval;  /* malloc'ed */
+ 
+-    if (cmdline.stdout)
++    if (cmdline.stdout1)
+         retval = strdup("-");
+     else if (streq(cmdline.inputFileName, "-"))
+         retval = strdup("-");

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 0000000..a865bc1
--- /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 0000000..7c80648
--- /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 0000000..0da719a
--- /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/netpbm-10.51.00-r99.ebuild b/media-libs/netpbm/netpbm-10.51.00-r99.ebuild
deleted file mode 100644
index ea6cfbe..0000000
--- a/media-libs/netpbm/netpbm-10.51.00-r99.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/netpbm-10.51.00-r2.ebuild,v 1.6 2013/08/27 15:32:09 kensington Exp $
-
-EAPI="3"
-
-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
-	mirror://gentoo/${P}-libpng-1.5.patch.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc x86"
-IUSE="jbig jpeg jpeg2k png rle 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"
-
-maint_pkg_create() {
-	local base="/usr/local/src"
-	local srcdir="${base}/netpbm/release_number"
-	if [[ -d ${srcdir} ]] ; then
-		cd "${T}" || die
-
-		ebegin "Exporting ${srcdir}/${PV} to netpbm-${PV}"
-		svn export -q ${srcdir}/${PV} netpbm-${PV}
-		eend $? || return 1
-
-		ebegin "Creating netpbm-${PV}.tar.xz"
-		tar cf - netpbm-${PV} | xz > netpbm-${PV}.tar.xz
-		eend $?
-
-		einfo "Tarball now ready at: ${T}/netpbm-${PV}.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
-}
-pkg_setup() { [[ -n ${VAPIER_LOVES_YOU} && ! -e ${DISTDIR}/${P}.tar.xz ]] && maint_pkg_create ; }
-
-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}"/${P}-ppmtompeg-free.patch
-	epatch "${FILESDIR}"/${P}-pnmconvol-nooffset.patch #338230
-	epatch "${WORKDIR}"/${P}-libpng-1.5.patch #355025
-	epatch "${FILESDIR}"/${P}-underlinking.patch #367405
-
-	epatch "${FILESDIR}"/${P}-getline.patch
-
-	# make sure we use system urt
-	sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
-	rm -rf urt
-
-	# 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
-
-	# 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)
-
-	# Gentoo build options
-	TIFFLIB = $(netpbm_config tiff)
-	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 = -ljbig
-	JBIGHDR_DIR = $(netpbm_config jbig "!")
-	JASPERLIB = -ljasper
-	JASPERHDR_DIR = $(netpbm_config jpeg2k "!")
-	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 || die #149843
-	emake || die
-}
-
-src_install() {
-	# Subdir make targets like to use `mkdir` all over the place
-	# without any actual dependencies, thus the -j1.
-	emake -j1 package pkgdir="${D}"/usr || die
-
-	[[ $(get_libdir) != "lib" ]] && mv "${D}"/usr/lib "${D}"/usr/$(get_libdir)
-
-	# Remove cruft that we don't need, and move around stuff we want
-	rm "${D}"/usr/bin/{doc.url,manweb} || die
-	rm -r "${D}"/usr/man/web || die
-	rm -r "${D}"/usr/link || die
-	rm "${D}"/usr/{README,VERSION,config_template,pkginfo} || die
-	dodir /usr/share
-	mv "${D}"/usr/man "${D}"/usr/share/ || die
-	mv "${D}"/usr/misc "${D}"/usr/share/netpbm || die
-
-	dodoc README
-	cd doc
-	dodoc HISTORY Netpbm.programming USERDOC
-	dohtml -r .
-}

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 0000000..8ff44d6
--- /dev/null
+++ b/media-libs/netpbm/netpbm-10.66.00.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/netpbm-10.66.00.ebuild,v 1.17 2015/04/29 04:00:38 vapier Exp $
+
+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="amd64 arm ~mips ppc x86"
+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
+	epatch "${FILESDIR}"/netpbm-10.66-musl-avoid-stdout-collision.patch
+
+	# 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 .
+}


                 reply	other threads:[~2015-07-18 21:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437256534.657503c1f5ac9436aecccadaed8e841beff4a900.blueness@gentoo \
    --to=blueness@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox