commit:     d081dcb324c5a3588756047b499fccdb19007306
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  3 05:11:46 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Thu Aug  3 05:11:46 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d081dcb3

media-libs/netpbm: drop 10.86.36

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 media-libs/netpbm/Manifest                         |   1 -
 media-libs/netpbm/files/netpbm-10.86.21-test.patch |  10 -
 .../netpbm/files/netpbm-10.86.22-fix-ps-test.patch | 506 ---------------------
 media-libs/netpbm/netpbm-10.86.36.ebuild           | 243 ----------
 4 files changed, 760 deletions(-)

diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index d783fb50ac7b..28e9e501e510 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -1,3 +1,2 @@
-DIST netpbm-10.86.36.tar.xz 3700660 BLAKE2B 
c5f0acd0147f2ad66f69ae2ade56fcbb5286faddc7f8f3387e2269fd20ea2586a29d7e7dc96bd715fe12896eef47803b826031087e6be8166183ba7cf82aebf4
 SHA512 
b05df76760629881047c44799a905a491fb4c139a9af909d77cc4238fc82dfac37ba174df4f81cb1177716ad38a37b26eadcc3889d2c2057ff9d850697fad3c6
 DIST netpbm-11.2.0.tar.xz 3777372 BLAKE2B 
d9a2de49db61f642df75fe1c1fcda752f837535ac7cc698fb50e7c2c93dacfe3894fc46b402af30d07e3617f0f421a36d8d6a3d846c07d6b3526724dce93283b
 SHA512 
70bde6e6112ae595e18be588ea95d2b2acb08e42bb36d0fc93b9584c4b2adf72e35f80ff87823a8e3d98a8ffd0ff907401d351533b9170d7a11a28515c10fdbd
 DIST netpbm-11.3.1.tar.xz 3779152 BLAKE2B 
fa342670a72939c661290b344819cb8ba1bc5f0d09c49cbe68560077384c985a714c6808a4858e5f0eb6a8fb52be698eb075ff7892d0972f4eeb571c3ebd45ef
 SHA512 
d43fdb7f2a91575cb17486ab9ca31d5c0757fd9756a230db9b9bfc3a786f58a2fbb4f6f0ce40d396245a8b1dd718b8aab0d80611ec23b19312bcd93c5d2548b3

diff --git a/media-libs/netpbm/files/netpbm-10.86.21-test.patch 
b/media-libs/netpbm/files/netpbm-10.86.21-test.patch
deleted file mode 100644
index b7758fdbd61e..000000000000
--- a/media-libs/netpbm/files/netpbm-10.86.21-test.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-`print ("got color map\n");` removed from `editor/pnmquantall` so remove from 
test
-Do this from the patch instead of ebuild because if upstream also fixes it the 
patch will fail, sed would not
-
---- a/test/pnmquantall.ok
-+++ b/test/pnmquantall.ok
-@@ -1,4 +1,3 @@
--got color map
- 2373957371 33838
- 3892560659 33838
- 1383839923 33838

diff --git a/media-libs/netpbm/files/netpbm-10.86.22-fix-ps-test.patch 
b/media-libs/netpbm/files/netpbm-10.86.22-fix-ps-test.patch
deleted file mode 100644
index e8876120a181..000000000000
--- a/media-libs/netpbm/files/netpbm-10.86.22-fix-ps-test.patch
+++ /dev/null
@@ -1,506 +0,0 @@
-postscript tests fail because of pbmtolps
-backport pbmtolps from netpbm-10.94.3, including tests
-see also bug #670362
-
---- a/converter/pbm/pbmtolps.c
-+++ b/converter/pbm/pbmtolps.c
-@@ -1,181 +1,253 @@
--/*
-- * pbmtolps -- convert a Portable BitMap into Postscript.  The
-- * output Postscript uses lines instead of the image operator to
-- * generate a (device dependent) picture which will be imaged
-- * much faster.
-- *
-- * The Postscript path length is constrained to be less that 1000
-- * points so that no limits are overrun on the Apple Laserwriter
-- * and (presumably) no other printers.
-- *
-- * To do:
-- *      make sure encapsulated format is correct
-- *      repitition of black-white strips
-- *      make it more device independent (is this possible?)
-- *
-- * Author:
-- *      George Phillips <phill...@cs.ubc.ca>
-- *      Department of Computer Science
-- *      University of British Columbia
-- */
--
--#include <string.h>
--#include <stdio.h>
-+/*=============================================================================
-+                             pbmtolps
-+===============================================================================
-+
-+  Convert a PBM image to Postscript.  The output Postscript uses lines instead
-+  of the image operator to generate a (device dependent) picture which will be
-+  imaged much faster.
-+
-+  The Postscript path length is constrained to be at most 1000 vertices so 
that
-+  no limits are overrun on the Apple Laserwriter and (presumably) no other
-+  printers.  The typical limit is 1500.  See "4.4 Path Construction" and
-+  "Appendix B: Implementation Limits" in: PostScript Language Reference Manual
-+  https://www.adobe.com/content/dam/acom/en/devnet/actionscript/
-+  articles/psrefman.pdf
-+
-+  To do:
-+       make sure encapsulated format is correct
-+       repetition of black-white strips
-+       make it more device independent (is this possible?)
-+
-+  Author:
-+       George Phillips <phill...@cs.ubc.ca>
-+       Department of Computer Science
-+       University of British Columbia
-+=============================================================================*/
-+#include <stdbool.h>
- 
-+#include "pm_c_util.h"
-+#include "mallocvar.h"
- #include "nstring.h"
-+#include "shhopt.h"
- #include "pbm.h"
- 
- 
--static int prev_white = -1;
--static int prev_black = -1;
--static char cmd = '\0';
--static int pointcount = 2;
--
--#ifdef RUN
--static int run = 1;
--#endif
--
--static char 
--morepoints(char cmd, int howmany_pbmtolps) {
--    pointcount += 2;
--    if (pointcount > 1000) {
--        pointcount = 2;
--        cmd += 'm' - 'a';
--    }
--    return(cmd);
-+static float        const MAX_DPI           = 5000;
-+static float        const MIN_DPI           = 10;
-+static unsigned int const MAX_PATH_VERTICES = 1000;
-+
-+
-+struct CmdlineInfo {
-+    /* All the information the user supplied in the command line, in a form
-+       easy for the program to use.
-+    */
-+    const char * inputFileName;  /* File name of input file */
-+    unsigned int inputFileSpec;  /* Input file name specified */
-+    float        lineWidth;      /* Line width, if specified */
-+    unsigned int lineWidthSpec;  /* Line width specified */
-+    float        dpi;            /* Resolution in DPI, if specified */
-+    unsigned int dpiSpec;        /* Resolution specified */
-+};
-+
-+
-+
-+static void
-+validateDpi(float const dpi) {
-+
-+    if (dpi > MAX_DPI || dpi < MIN_DPI)
-+        pm_error("Specified DPI value out of range (%f)", dpi);
- }
- 
- 
- 
--static void 
--addstrip(int const white, 
--         int const black) {
--
--    if (cmd) {
--#ifdef RUN
--        if (white == prev_white && black == prev_black)
--            run++;
--        else {
--            if (run == 1)
--#endif
--                printf("%d %d %c ", 
--                       prev_black, prev_white, morepoints(cmd, 2));
--#ifdef RUN
--            else
--                                /* of course, we need to give a new command */
--                printf("%d %d %d %c ",
--                       prev_white, prev_black, run,
--                       morepoints(cmd + 'f' - 'a', 2 * run));
--            run = 1;
--        }
--#endif
-+static void
-+parseCommandLine(int                        argc,
-+                 const char **        const argv,
-+                 struct CmdlineInfo * const cmdlineP) {
-+/*----------------------------------------------------------------------------
-+   Parse program command line described in Unix standard form by argc
-+   and argv.  Return the information in the options as *cmdlineP.
-+-----------------------------------------------------------------------------*/
-+    optEntry * option_def;  /* malloc'ed */
-+        /* Instructions to OptParseOptions3 on how to parse our options.  */
-+    optStruct3 opt;
-+
-+    unsigned int option_def_index;
-+
-+    MALLOCARRAY_NOFAIL(option_def, 100);
-+
-+    option_def_index = 0;   /* incremented by OPTENTRY */
-+    OPTENT3(0, "linewidth", OPT_FLOAT, &cmdlineP->lineWidth,
-+                            &cmdlineP->lineWidthSpec,    0);
-+    OPTENT3(0, "dpi",       OPT_FLOAT,  &cmdlineP->dpi,
-+                            &cmdlineP->dpiSpec,          0);
-+
-+    opt.opt_table = option_def;
-+    opt.short_allowed = FALSE;  /* We have no short (old-fashioned) options */
-+    opt.allowNegNum = FALSE;  /* We have no parms that are negative numbers */
-+
-+    pm_optParseOptions3(&argc, (char **)argv, opt, sizeof(opt), 0);
-+        /* Uses and sets argc, argv, and some of *cmdlineP and others. */
-+
-+    if (cmdlineP->dpiSpec)
-+        validateDpi(cmdlineP->dpi);
-+    else
-+        cmdlineP->dpi = 300;
-+
-+    if (argc-1 < 1)
-+        cmdlineP->inputFileName = "-";
-+    else {
-+        if (argc-1 > 1)
-+            pm_error("Program takes zero or one argument (filename).  You "
-+                     "specified %u", argc-1);
-+        else
-+            cmdlineP->inputFileName = argv[1];
-     }
- 
--    prev_white = white;
--    prev_black = black;
--    cmd = 'a';
-+    if (cmdlineP->inputFileName[0] == '-' &&
-+        cmdlineP->inputFileName[1] == '\0')
-+        cmdlineP->inputFileSpec = false;
-+    else
-+        cmdlineP->inputFileSpec = true;
-+
-+    free(option_def);
- }
- 
- 
- 
--static void 
--nextline(void) {
--    /* need to check run, should have an outcommand */
--    if (cmd)
--        printf("%d %d %c\n", prev_black, prev_white, morepoints('c', 3));
--    else
--        printf("%c\n", morepoints('b', 1));
--    cmd = '\0';
-+static void
-+validateLineWidth(float const scCols,
-+                  float const scRows,
-+                  float const lineWidth) {
-+
-+    if (lineWidth >= scCols || lineWidth >= scRows)
-+        pm_error("Absurdly large -linewidth value (%f)", lineWidth);
- }
- 
- 
- 
--int
--main(int argc, char ** argv) {
--    FILE*   fp;
--    bit*    bits;
--    int             row;
--    int             col;
--    int         rows;
--    int             cols;
--    int             format;
--    int             white;
--    int             black;
--    const char*   name;
--    float   dpi = 300.0;
--    float   sc_rows;
--    float   sc_cols;
--    int             i;
--    const char*   const usage = "[ -dpi n ] [ pbmfile ]";
--
--
--      pbm_init(&argc, argv);
--
--    i = 1;
--    if (i < argc && streq(argv[i], "-dpi")) {
--        if (i == argc - 1)
--            pm_usage(usage);
--        sscanf(argv[i + 1], "%f", &dpi);
--        i += 2;
--    }
-+static void
-+doRaster(FILE *       const ifP,
-+         unsigned int const cols,
-+         unsigned int const rows,
-+         int          const format,
-+         FILE *       const ofP) {
- 
--    if (i < argc - 1)
--        pm_usage(usage);
-+    bit *        bitrow;
-+    unsigned int row;
-+    unsigned int vertexCt;
-+        /* Number of vertices drawn since last stroke command */
- 
--    if (i == argc) {
--        name = "noname";
--        fp = stdin;
--    } else {
--        name = argv[i];
--        fp = pm_openr(name);
--    }
--    pbm_readpbminit(fp, &cols, &rows, &format);
--    bits = pbm_allocrow(cols);
-+    bitrow = pbm_allocrow(cols);
-+
-+    for (row = 0, vertexCt = 0; row < rows; ++row) {
-+        unsigned int col;
-+        bool firstRun;
- 
--    sc_rows = (float)rows / dpi * 72.0;
--    sc_cols = (float)cols / dpi * 72.0;
-+        firstRun = true;  /* initial value */
-+
-+        pbm_readpbmrow(ifP, bitrow, cols, format);
-+
-+        /* output white-strip + black-strip sequences */
- 
--    puts("%!PS-Adobe-2.0 EPSF-2.0");
--    puts("%%Creator: pbmtolps");
--    printf("%%%%Title: %s\n", name);
--    printf("%%%%BoundingBox: %d %d %d %d\n",
--           (int)(305.5 - sc_cols / 2.0),
--           (int)(395.5 - sc_rows / 2.0),
--           (int)(306.5 + sc_cols / 2.0),
--           (int)(396.5 + sc_rows / 2.0));
--    puts("%%EndComments");
--    puts("%%EndProlog");
--    puts("gsave");
--
--    printf("%f %f translate\n", 306.0 - sc_cols / 2.0, 396.0 + sc_rows / 2.0);
--    printf("72 %f div dup neg scale\n", dpi);
--    puts("/a { 0 rmoveto 0 rlineto } def");
--    puts("/b { 0 row 1 add dup /row exch def moveto } def");
--    puts("/c { a b } def");
--    puts("/m { currentpoint stroke newpath moveto a } def");
--    puts("/n { currentpoint stroke newpath moveto b } def");
--    puts("/o { currentpoint stroke newpath moveto c } def");
--    puts("/row 0 def");
--    puts("newpath 0 0 moveto");
--
--    for (row = 0; row < rows; row++) {
--        pbm_readpbmrow(fp, bits, cols, format);
--        /* output white-strip+black-strip sequences */
-         for (col = 0; col < cols; ) {
--            for (white = 0; col < cols && bits[col] == PBM_WHITE; col++)
--                white++;
--            for (black = 0; col < cols && bits[col] == PBM_BLACK; col++)
--                black++;
-+            unsigned int whiteCt;
-+            unsigned int blackCt;
-+
-+            for (whiteCt = 0; col < cols && bitrow[col] == PBM_WHITE; ++col)
-+                ++whiteCt;
-+            for (blackCt = 0; col < cols && bitrow[col] == PBM_BLACK; ++col)
-+                ++blackCt;
-+
-+            if (blackCt > 0) {
-+                if (vertexCt > MAX_PATH_VERTICES) {
-+                    printf("m ");
-+                    vertexCt = 0;
-+                }
-+
-+                if (firstRun) {
-+                    printf("%u %u moveto %u 0 rlineto\n",
-+                           whiteCt, row, blackCt);
-+                    firstRun = false;
-+                } else
-+                    printf("%u %u a\n", blackCt, whiteCt);
- 
--            if (black != 0)
--                addstrip(white, black);
-+                vertexCt += 2;
-+            }
-         }
--        nextline();
-     }
--    puts("stroke grestore showpage");
--    puts("%%Trailer");
-+    pbm_freerow(bitrow);
-+}
-+
-+
-+
-+static void
-+pbmtolps(FILE *             const ifP,
-+         FILE *             const ofP,
-+         struct CmdlineInfo const cmdline) {
-+
-+    const char * const psName =
-+        cmdline.inputFileSpec ? cmdline.inputFileName : "noname";
-+
-+    int          rows;
-+    int          cols;
-+    int          format;
-+    float        scRows, scCols;
-+        /* Dimensions of the printed image in points */
-+
-+    pbm_readpbminit(ifP, &cols, &rows, &format);
-+
-+    scRows = (float) rows / (cmdline.dpi / 72.0);
-+    scCols = (float) cols / (cmdline.dpi / 72.0);
-+
-+    if (cmdline.lineWidthSpec)
-+        validateLineWidth(scCols, scRows, cmdline.lineWidth);
-+
-+    fputs("%!PS-Adobe-2.0 EPSF-2.0\n", ofP);
-+    fputs("%%Creator: pbmtolps\n", ofP);
-+    fprintf(ofP, "%%%%Title: %s\n", psName);
-+    fprintf(ofP, "%%%%BoundingBox: %d %d %d %d\n",
-+           (int)(305.5 - scCols / 2.0),
-+           (int)(395.5 - scRows / 2.0),
-+           (int)(306.5 + scCols / 2.0),
-+           (int)(396.5 + scRows / 2.0));
-+    fputs("%%EndComments\n", ofP);
-+    fputs("%%EndProlog\n", ofP);
-+    fputs("gsave\n", ofP);
-+
-+    fprintf(ofP, "%f %f translate\n",
-+            306.0 - scCols / 2.0, 396.0 + scRows / 2.0);
-+    fprintf(ofP, "72 %f div dup neg scale\n", cmdline.dpi);
-+
-+    if (cmdline.lineWidthSpec)
-+        fprintf(ofP, "%f setlinewidth\n", cmdline.lineWidth);
-+
-+    fputs("/a { 0 rmoveto 0 rlineto } def\n", ofP);
-+    fputs("/m { currentpoint stroke newpath moveto } def\n", ofP);
-+    fputs("newpath 0 0 moveto\n", ofP);
-+
-+    doRaster(ifP, cols, rows, format, ofP);
-+
-+    fputs("stroke grestore showpage\n", ofP);
-+    fputs("%%Trailer\n", ofP);
-+}
-+
-+
-+
-+int
-+main(int argc, const char *argv[]) {
-+    FILE *  ifP;
-+    struct CmdlineInfo cmdline;
-+
-+    pm_proginit(&argc, argv);
-+
-+    parseCommandLine(argc, argv, &cmdline);
-+
-+    ifP = pm_openr(cmdline.inputFileName);
-+
-+    pbmtolps(ifP, stdout, cmdline);
- 
--    pm_close(fp);
-+    pm_close(ifP);
- 
--    exit(0);
-+    return 0;
- }
---- a/test/lps-roundtrip.ok
-+++ b/test/lps-roundtrip.ok
-@@ -0,0 +1 @@
-+match
---- a/test/lps-roundtrip.test
-+++ b/test/lps-roundtrip.test
-@@ -0,0 +1,22 @@
-+#! /bin/bash
-+# This script tests: pbmtolps pstopnm
-+# Also requires: gs pamdepth pamscale pnmcrop pnmpsnr
-+
-+# The ordinary round-trip does not work because of the way ghostscript
-+# renders: a line is considered wider than a single pixel and all pixels
-+# it touches are set to black if the output is PBM.  To work around this,
-+# we tell pstopnm to output PGM at a high resolution (=large dpi value).
-+
-+
-+test_pgm=${tmpdir}/testgrid.pgm
-+
-+pamdepth 255 testgrid.pbm > ${test_pgm}
-+
-+pbmtolps -dpi 72 testgrid.pbm | \
-+    pstopnm -dpi $((72*12)) -stdout -pgm | \
-+    pnmcrop -white | pamscale -xsize=14 -ysize=16 | \
-+    pnmpsnr -target=30 - ${test_pgm}
-+
-+# ghostscript version 8.71: pnmpsnr lumina 33.14dB
-+
-+rm ${test_pgm}
---- a/test/ps-alt-roundtrip.ok
-+++ b/test/ps-alt-roundtrip.ok
-@@ -1,3 +1,2 @@
- 2425386270 41
--2425386270 41
- 2916080186 235
---- a/test/ps-alt-roundtrip.test
-+++ b/test/ps-alt-roundtrip.test
-@@ -1,21 +1,24 @@
- #! /bin/bash
--# This script tests: pbmtoepsi pbmtopsg3 pbmtolps psidtopgm pstopnm
-+# This script tests: pbmtoepsi pbmtopsg3 psidtopgm pstopnm
- # Also requires: gs pnmcrop
- 
- 
- # This script is for testing alternative (or minor) utilities that
- # read/write Postscript and encapsulated Postscript:
--# pbmtoepsi, pbmtopsg3, pbmtolps and psidtopgm.
-+# pbmtoepsi, pbmtopsg3 and psidtopgm.
- #
- # We keep these tests separate from those for pnmtops and pstopnm
- # which are far more popular.
- #
--# pbmtopsg3 and pbmtolps produce output that require pstopnm for decoding.
-+# pbmtopsg3 produces output that requires pstopnm for decoding.
-+#
-+# We used to test pbmtolps here, but moved it out when gs changed its
-+# rendering formula.
- #
- # Failure message
- ## If ps-roundtrip.test succeeds and this test fails, it is most likely
- ## a problem with one of the alternate Postscipt utilities:
--## pbmtoepsi, pbmtopsg3, pbmtolps or psidtopgm.
-+## pbmtoepsi, pbmtopsg3, or psidtopgm.
- ## If both tests fail it indicates a problem with pstopnm or gs.
- 
- # pstopnm does not use libnetpbm functions for output.
-@@ -33,18 +36,8 @@
- rm ${testgrid1_ps}
- 
- 
--# Test 2. Should print: 2425386270 41
--testgrid2_ps=${tmpdir}/testgrid2.ps
--
--pbmtolps -dpi 72 testgrid.pbm \
--     > ${testgrid2_ps} && \
--pstopnm -xborder=0 -yborder=0 -dpi=72 -stdout \
--    -quiet ${testgrid2_ps} -pbm | \
--  pnmcrop | cksum
--
--rm ${testgrid2_ps}
- 
--# Test 3. Should print: 2916080186 235
-+# Test 2. Should print: 2916080186 235
- # Output is pgm maxval=1 with black and white inverted.
- #
- testgrid_epsi=${tmpdir}/testgrid.epsi
---- a/test/Test-Order
-+++ b/test/Test-Order
-@@ -183,5 +183,6 @@
- 
- fiasco-roundtrip.test
- jpeg-roundtrip.test
-+lps-roundtrip.test
- tiffcmyk-roundtrip.test
- yuv-roundtrip.test

diff --git a/media-libs/netpbm/netpbm-10.86.36.ebuild 
b/media-libs/netpbm/netpbm-10.86.36.ebuild
deleted file mode 100644
index 1cf3b450fbef..000000000000
--- a/media-libs/netpbm/netpbm-10.86.36.ebuild
+++ /dev/null
@@ -1,243 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic multilib toolchain-funcs
-
-# Upstream has 3 flavors of netpbm: super stable, stable and advanced.
-# They only provide a tarball for super stable, but super stable is a bit 
lagging.
-# So we package the stable branch of their svn (currently versions 10.86.xx) 
on SLOT "0/stable"
-# and the advanced branch of their svn (currently versions 11.aa.bb) on SLOT 
"0/advanced".
-# The stable branch is stabilized according to usual Gentoo rules, while the
-# advanced branch will not be stabilized.
-# A detailed explanation is here https://netpbm.sourceforge.net/release.html
-
-# libnetpbm.so is not 100% ABI compatible between stable and advanced, so
-# packages that depend on it should use "media-libs/netpbm:="
-
-DESCRIPTION="A set of utilities for converting to/from the netpbm (and 
related) formats"
-HOMEPAGE="https://netpbm.sourceforge.net/";
-SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${P}.tar.xz";
-
-LICENSE="Artistic BSD GPL-2 IJG LGPL-2.1 MIT public-domain"
-SLOT="0/stable"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X 
xml"
-
-# app-text/ghostscript-gpl is really needed for postscript
-# some utilities execute /usr/bin/gs
-# also some installed programs are perl scripts
-RDEPEND="
-       dev-lang/perl
-       jbig? ( media-libs/jbigkit:= )
-       jpeg? ( media-libs/libjpeg-turbo:=[static-libs?] )
-       png? (
-               >=media-libs/libpng-1.4:0=
-               sys-libs/zlib
-       )
-       postscript? (
-               app-text/ghostscript-gpl
-               sys-libs/zlib
-       )
-       rle? ( media-libs/urt:= )
-       svga? ( media-libs/svgalib )
-       tiff? ( >=media-libs/tiff-3.5.5:= )
-       xml? ( dev-libs/libxml2 )
-       X? ( x11-libs/libX11 )
-"
-
-DEPEND="
-       ${RDEPEND}
-       x11-base/xorg-proto
-"
-
-BDEPEND="
-       app-arch/xz-utils
-       sys-devel/flex
-       virtual/pkgconfig
-"
-
-PATCHES=(
-       "${FILESDIR}"/netpbm-10.86.21-build.patch
-       "${FILESDIR}"/netpbm-10.86.21-test.patch #450530
-       "${FILESDIR}"/netpbm-10.86.21-misc-deps.patch
-       "${FILESDIR}"/netpbm-10.86.22-fix-ps-test.patch #670362
-)
-
-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_lib() {
-       usex ${1} -l${2:-$1} NONE
-}
-
-# for bug #828127
-netpbm_cflags_for_build() {
-       if is-flagq -fPIC; then
-               echo -fPIC
-       fi
-}
-
-src_prepare() {
-       default
-
-       # make sure we use system libs
-       sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
-       rm -r urt converter/other/jbig/libjbig 
converter/other/jpeg2000/libjasper || die
-
-       # take care of the importinc stuff ourselves by only doing it once
-       # at the top level and having all subdirs use that one set #149843
-       sed -i \
-               -e '/^importinc:/s|^|importinc:\nmanual_|' \
-               -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
-               common.mk || die
-       sed -i \
-               -e '/%.c/s: importinc$::' \
-               common.mk lib/Makefile lib/util/Makefile || die
-       sed -i \
-               -e 's:pkg-config:$(PKG_CONFIG):' \
-               GNUmakefile converter/other/Makefile other/pamx/Makefile || die
-
-       # The postscript knob is currently bound up with a fork test.
-       if ! use postscript ; then
-               sed -i \
-                       -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \
-                       converter/other/Makefile generator/Makefile || die
-               sed -i -r \
-                       -e 's:(pbmtextps|pnmtops|pstopnm).*::' \
-                       test/all-in-place.{ok,test} || die
-               sed -i -e 's:lps-roundtrip.*::' test/Test-Order || die
-               sed -i -e '/^$/d' test/all-in-place.ok || die
-               sed -i '2iexit 80' test/ps-{alt-,flate-,}roundtrip.test || die
-       fi
-
-       # the new postscript test needs +x
-       chmod +x test/lps-roundtrip.test
-
-       # Do not test png if not built
-       if ! use png ; then
-               sed -i -r \
-                       -e 's:(pamtopng|pngtopam|pnmtopng).*::' \
-                       test/all-in-place.{ok,test} || die
-               sed -i -e '/^$/d' test/all-in-place.ok || die
-
-               sed -i -r \
-                       -e 's:(pamrgbatopng|pngtopnm).*::' \
-                       test/legacy-names.{ok,test} || die
-               sed -i -e '/^$/d' test/legacy-names.ok || die
-               sed -i -e 's:png-roundtrip.*::' test/Test-Order || die
-       fi
-
-       # this test requires LC_ALL=en_US.iso88591, not available on musl
-       if use elibc_musl; then
-               sed -i -e 's:pbmtext-iso88591.*::' test/Test-Order || die
-       fi
-}
-
-src_configure() {
-       cat config.mk.in - >> config.mk <<-EOF || die "writing config.mk failed"
-               # Misc stuff
-               BUILD_FIASCO = N
-               SYMLINK = ln -sf
-
-               # These vars let src_test work by default
-               PKGDIR_DEFAULT = ${T}/netpbm
-               RESULTDIR_DEFAULT = ${T}/netpbm-test
-
-               # Toolchain options
-               CC = $(tc-getCC) -Wall
-               LD = \$(CC)
-               CC_FOR_BUILD = $(tc-getBUILD_CC)
-               LD_FOR_BUILD = \$(CC_FOR_BUILD)
-               AR = $(tc-getAR)
-               RANLIB = $(tc-getRANLIB)
-               PKG_CONFIG = $(tc-getPKG_CONFIG)
-
-               STRIPFLAG =
-               CFLAGS_SHLIB = -fPIC
-               CFLAGS_FOR_BUILD += $(netpbm_cflags_for_build)
-
-               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_lib tiff)
-               # Let tiff worry about its own dependencies #395753
-               TIFFLIB_NEEDS_JPEG = N
-               TIFFLIB_NEEDS_Z = N
-               JPEGLIB = $(netpbm_config_lib jpeg)
-               PNGLIB = $(netpbm_config_lib png)
-               ZLIB = $($(tc-getPKG_CONFIG) --libs zlib)
-               LINUXSVGALIB = $(netpbm_config_lib svga vga)
-               XML2_LIBS = $(netpbm_config_lib xml xml2)
-               JBIGLIB = $(netpbm_config_lib jbig)
-               JBIGHDR_DIR =
-               JASPERLIB = NONE
-               JASPERHDR_DIR =
-               URTLIB = $(netpbm_config_lib rle)
-               URTHDR_DIR =
-               X11LIB = $(netpbm_config_lib X X11)
-               X11HDR_DIR =
-       EOF
-}
-
-src_compile() {
-       emake -j1 pm_config.h version.h manual_importinc #149843
-       emake
-}
-
-src_test() {
-       # The code wants to install everything first and then test the result.
-       emake install.{bin,lib,data}
-       emake check
-}
-
-src_install() {
-       # Subdir make targets like to use `mkdir` all over the place
-       # without any actual dependencies, thus the -j1.
-       emake -j1 package pkgdir="${ED}"/usr
-
-       if [[ $(get_libdir) != "lib" ]] ; then
-               mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die
-       fi
-
-       # Remove cruft that we don't need, and move around stuff we want
-       rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || 
die
-
-       dodir /usr/share
-       mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
-
-       doman userguide/*.[0-9]
-       dodoc README
-
-       cd doc || die
-       dodoc HISTORY Netpbm.programming USERDOC
-       docinto html
-       dodoc -r *.html
-       dodoc -r ../userguide/*.html
-}

Reply via email to