* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2016-11-27 18:33 Mike Frysinger
0 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2016-11-27 18:33 UTC (permalink / raw
To: gentoo-commits
commit: f41c64c921a8c8baa2633ed6c00630e661e6fbfa
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 27 18:33:15 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Nov 27 18:33:40 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f41c64c9
media-libs/netpbm: fix pbmtext test failure in some locales #601012
.../files/netpbm-10.76.00-pbmtext-test.patch | 22 ++++++++++++++++++++++
media-libs/netpbm/netpbm-10.76.00.ebuild | 1 +
2 files changed, 23 insertions(+)
diff --git a/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch b/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch
new file mode 100644
index 00000000..cdc075e
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch
@@ -0,0 +1,22 @@
+the tool tries to generate binary output, but the current locale might change
+what awk generates. force it to C/ASCII to avoid that.
+
+https://bugs.gentoo.org/601012
+
+--- test/pbmtext.test
++++ test/pbmtext.test
+@@ -81,12 +81,14 @@ rm ${fontRectangle_txt} ${font_pbm}
+
+ # One long row
+ # Should print 3233136020 4535
++LC_CTYPE=C \
+ awk 'BEGIN { for (i=32; i<=125;++i) printf("%c",i);
+ for (i=160;i<=255;++i) printf("%c",i); }' | \
+ pbmtext -builtin bdf | cksum
+
+ # One tall column
+ # Should print 1216262214 5711
++LC_CTYPE=C \
+ awk 'BEGIN { for (i=32; i<=125;++i) printf("%c\n",i);
+ for (i=160;i<=255;++i) printf("%c\n",i); }' | \
+ pbmtext -nomargins -builtin bdf | cksum
diff --git a/media-libs/netpbm/netpbm-10.76.00.ebuild b/media-libs/netpbm/netpbm-10.76.00.ebuild
index 5be50fe..29f12e7 100644
--- a/media-libs/netpbm/netpbm-10.76.00.ebuild
+++ b/media-libs/netpbm/netpbm-10.76.00.ebuild
@@ -57,6 +57,7 @@ src_prepare() {
epatch "${FILESDIR}"/netpbm-10.76.00-build.patch
epatch "${FILESDIR}"/netpbm-10.76.00-test.patch #450530
epatch "${FILESDIR}"/netpbm-10.76.00-misc-deps.patch
+ epatch "${FILESDIR}"/netpbm-10.76.00-pbmtext-test.patch #601012
# make sure we use system libs
sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2021-05-10 6:24 Joonas Niilola
0 siblings, 0 replies; 11+ messages in thread
From: Joonas Niilola @ 2021-05-10 6:24 UTC (permalink / raw
To: gentoo-commits
commit: a77aca5fe3136bdd774e403d093ee5cc9125df33
Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
AuthorDate: Sat Apr 17 11:49:06 2021 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon May 10 06:23:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a77aca5f
media-libs/netpbm: fix compiling with format-security
Closes: https://bugs.gentoo.org/517524
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
.../netpbm/files/netpbm-10.86.21-format-security.patch | 18 ++++++++++++++++++
media-libs/netpbm/netpbm-10.86.21.ebuild | 1 +
2 files changed, 19 insertions(+)
diff --git a/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch b/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch
new file mode 100644
index 00000000000..a7afc259ff5
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch
@@ -0,0 +1,18 @@
+Fix compiling with `CFLAGS` `-Werror=format-security`
+See also https://bugs.gentoo.org/517524
+
+--- a/converter/ppm/ximtoppm.c
++++ b/converter/ppm/ximtoppm.c
+@@ -117,9 +117,9 @@
+ */
+ header->bits_channel = atoi(a_head.bits_per_channel);
+ header->alpha_flag = atoi(a_head.alpha_channel);
+- pm_asprintf(&header->author, a_head.author);
+- pm_asprintf(&header->date, a_head.date);
+- pm_asprintf(&header->program, a_head.program);
++ pm_asprintf(&header->author, "%s", a_head.author);
++ pm_asprintf(&header->date, "%s", a_head.date);
++ pm_asprintf(&header->program, "%s", a_head.program);
+ /* Do double checking for bakwards compatibility */
+ if (header->npics == 0)
+ header->npics = 1;
diff --git a/media-libs/netpbm/netpbm-10.86.21.ebuild b/media-libs/netpbm/netpbm-10.86.21.ebuild
index 4ce9a9ab909..17dcba9b8e7 100644
--- a/media-libs/netpbm/netpbm-10.86.21.ebuild
+++ b/media-libs/netpbm/netpbm-10.86.21.ebuild
@@ -35,6 +35,7 @@ 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.21-format-security.patch #517524
)
netpbm_libtype() {
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2021-05-31 8:20 Sam James
0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2021-05-31 8:20 UTC (permalink / raw
To: gentoo-commits
commit: 5ddd362b77fa5ba98bb4e09db554afc653558206
Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
AuthorDate: Thu May 27 18:15:26 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 31 08:17:20 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ddd362b
media-libs/netpbm: new version 10.86.22
Also backported a fix from 10.94.3 for tests failing with USE=postfix
Closes: https://bugs.gentoo.org/670362
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/netpbm/Manifest | 1 +
.../netpbm/files/netpbm-10.86.22-fix-ps-test.patch | 506 +++++++++++++++++++++
media-libs/netpbm/netpbm-10.86.22.ebuild | 211 +++++++++
3 files changed, 718 insertions(+)
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index be3d0a3dff3..ddc99b62a12 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -1,3 +1,4 @@
DIST netpbm-10.70.00.tar.xz 2621612 BLAKE2B 2b07d130de0afeb3c1df32c6d267bc6bd13d4f556988cb7784b51941d81de1ad4f3381a0788eec6309bc6c024a21eb273a5f00726f6bb9a8ecb87f547678fc77 SHA512 f70d6dd79ce813f9fc4935d382b50bd3cecdf02c324b0f012056e56e33f24b621e8c1b3d054c6f470d437d0d793593de95eaa9724055d59c342228398a40f0b4
DIST netpbm-10.76.00.tar.xz 2657184 BLAKE2B b8d82268ba50881fab10bca00ea408afa39096f4f9c079b523d8e28ce62301797ee50f55c84f85a6d832b723da7449531e725bf60a4a89975c51382b2cbc4a94 SHA512 234a5616a7631a8eb70817bb88ed509ddddfce93f71739654ef78a2735245b268c391adb49b514ed883569c9fc6ea9c3eeed10aa7898c02b797fee5249b11cf3
DIST netpbm-10.86.21.tar.xz 3768736 BLAKE2B 19d641f3519f55d737aa6cd22f60847b2b241f71134bc7f9fa558e681cbffb1bff53f16e4d89e7a85b20b86e0bf0f4d9c341dde656ca07a7bc20adc94e811e36 SHA512 caa6c18039be72c47419b3ef60b64e0a04123752beb27bab178adcbb48e5311da05b422205f52c784149bb0636be1e3155e6bbf7703ec5c5775cb9981de1008e
+DIST netpbm-10.86.22.tar.xz 3696588 BLAKE2B eabc11b4928681f2d96c8b6da1e23284868d7ba2f610f496d1ddf5b6ceb34c991160780f79c69b2c905e5210b024a1a5868656b89e23d6b63e587ce0cd70a950 SHA512 5840d0e88158ac77be7dfc5430e696701a740d56c98efdaf02b3c4e92bdf10268572ef0087b3bf263937073e0fbda3183aa7ed56bfe12dba30b3a3ff382bd4ff
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
new file mode 100644
index 00000000000..e8876120a18
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.86.22-fix-ps-test.patch
@@ -0,0 +1,506 @@
+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 <phillips@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 <phillips@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.22.ebuild b/media-libs/netpbm/netpbm-10.86.22.ebuild
new file mode 100644
index 00000000000..048c6e3162e
--- /dev/null
+++ b/media-libs/netpbm/netpbm-10.86.22.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib toolchain-funcs
+
+DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
+HOMEPAGE="http://netpbm.sourceforge.net/"
+SRC_URI="https://github.com/ceamac/netpbm-make-dist/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
+
+BDEPEND="
+ app-arch/xz-utils
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="jbig? ( media-libs/jbigkit )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( >=media-libs/libpng-1.4:0 )
+ postscript? ( app-text/ghostscript-gpl )
+ rle? ( media-libs/urt )
+ svga? ( media-libs/svgalib )
+ tiff? ( >=media-libs/tiff-3.5.5:0 )
+ xml? ( dev-libs/libxml2 )
+ zlib? ( sys-libs/zlib )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/netpbm-10.86.21-build.patch
+ "${FILESDIR}"/netpbm-10.86.21-test.patch #450530
+ "${FILESDIR}"/netpbm-10.86.21-misc-deps.patch
+ "${FILESDIR}"/netpbm-10.86.21-format-security.patch #517524
+ "${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() {
+ if use ${1} ; then
+ [[ ${2} != "!" ]] && echo -l${2:-$1}
+ else
+ echo NONE
+ fi
+}
+
+src_prepare() {
+ default
+
+ # make sure we use system libs
+ sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
+ rm -r urt converter/other/jbig/libjbig converter/other/jpeg2000/libjasper || die
+
+ # take care of the importinc stuff ourselves by only doing it once
+ # at the top level and having all subdirs use that one set #149843
+ sed -i \
+ -e '/^importinc:/s|^|importinc:\nmanual_|' \
+ -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
+ common.mk || die
+ sed -i \
+ -e '/%.c/s: importinc$::' \
+ common.mk lib/Makefile lib/util/Makefile || die
+ sed -i \
+ -e 's:pkg-config:$(PKG_CONFIG):' \
+ GNUmakefile converter/other/Makefile other/pamx/Makefile || die
+
+ # The postscript knob is currently bound up with a fork test.
+ if ! use postscript ; then
+ sed -i \
+ -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \
+ converter/other/Makefile generator/Makefile || die
+ sed -i -r \
+ -e 's:(pbmtextps|pnmtops|pstopnm).*::' \
+ test/all-in-place.{ok,test} || die
+ sed -i -e '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
+ fi
+}
+
+src_configure() {
+ # cannot chain the die with the heredoc, please check the comment below
+ cat config.mk.in - >> config.mk <<-EOF
+ # Misc crap
+ BUILD_FIASCO = N
+ SYMLINK = ln -sf
+
+ # These vars let src_test work by default
+ PKGDIR_DEFAULT = ${T}/netpbm
+ RESULTDIR_DEFAULT = ${T}/netpbm-test
+
+ # Toolchain options
+ CC = $(tc-getCC) -Wall
+ LD = \$(CC)
+ CC_FOR_BUILD = $(tc-getBUILD_CC)
+ LD_FOR_BUILD = \$(CC_FOR_BUILD)
+ AR = $(tc-getAR)
+ RANLIB = $(tc-getRANLIB)
+ PKG_CONFIG = $(tc-getPKG_CONFIG)
+
+ STRIPFLAG =
+ CFLAGS_SHLIB = -fPIC
+
+ LDRELOC = \$(LD) -r
+ LDSHLIB = $(netpbm_ldshlib)
+ LINKER_CAN_DO_EXPLICIT_LIBRARY = N # we can, but dont want to
+ LINKERISCOMPILER = Y
+ NETPBMLIBSUFFIX = $(netpbm_libsuffix)
+ NETPBMLIBTYPE = $(netpbm_libtype)
+ STATICLIB_TOO = $(usex static-libs Y N)
+
+ # The var is called SSE, but the code is actually SSE2.
+ WANT_SSE = $(usex cpu_flags_x86_sse2 Y N)
+
+ # Gentoo build options
+ TIFFLIB = $(netpbm_config tiff)
+ # Let tiff worry about its own dependencies #395753
+ TIFFLIB_NEEDS_JPEG = N
+ TIFFLIB_NEEDS_Z = N
+ JPEGLIB = $(netpbm_config jpeg)
+ PNGLIB = $(netpbm_config png)
+ ZLIB = $(netpbm_config zlib z)
+ LINUXSVGALIB = $(netpbm_config svga vga)
+ XML2_LIBS = $(netpbm_config xml xml2)
+ JBIGLIB = $(netpbm_config jbig)
+ JBIGHDR_DIR =
+ JASPERLIB = NONE
+ JASPERHDR_DIR =
+ URTLIB = $(netpbm_config rle)
+ URTHDR_DIR =
+ X11LIB = $(netpbm_config X X11)
+ X11HDR_DIR =
+ EOF
+ # cannot chain the die with the heredoc above as bash-3
+ # has a parser bug in that setup #282902
+ [[ $? -eq 0 ]] || die "writing config.mk failed"
+}
+
+src_compile() {
+ emake -j1 pm_config.h version.h manual_importinc #149843
+ emake
+}
+
+src_test() {
+ # The code wants to install everything first and then test the result.
+ emake install.{bin,lib,data}
+ emake check
+}
+
+src_install() {
+ # Subdir make targets like to use `mkdir` all over the place
+ # without any actual dependencies, thus the -j1.
+ emake -j1 package pkgdir="${ED}"/usr
+
+ if [[ $(get_libdir) != "lib" ]] ; then
+ mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die
+ fi
+
+ # Remove cruft that we don't need, and move around stuff we want
+ rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
+
+ dodir /usr/share
+ mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
+
+ doman userguide/*.[0-9]
+ dodoc README
+
+ cd doc || die
+ dodoc HISTORY Netpbm.programming USERDOC
+ docinto html
+ dodoc -r *.html
+
+ use doc && dodoc -r ../userguide/*.html
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2021-10-20 1:14 Sam James
0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2021-10-20 1:14 UTC (permalink / raw
To: gentoo-commits
commit: 73c82fcd9ce790393806798f18e841c21d244a0c
Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
AuthorDate: Sun Oct 10 11:25:56 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 20 01:13:04 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73c82fcd
media-libs/netpbm: drop v10.86.22
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/22542
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/netpbm/Manifest | 1 -
.../files/netpbm-10.86.21-format-security.patch | 18 --
media-libs/netpbm/netpbm-10.86.22.ebuild | 212 ---------------------
3 files changed, 231 deletions(-)
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index f48d52bd249..04be1f7ac45 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -1,4 +1,3 @@
DIST netpbm-10.70.00.tar.xz 2621612 BLAKE2B 2b07d130de0afeb3c1df32c6d267bc6bd13d4f556988cb7784b51941d81de1ad4f3381a0788eec6309bc6c024a21eb273a5f00726f6bb9a8ecb87f547678fc77 SHA512 f70d6dd79ce813f9fc4935d382b50bd3cecdf02c324b0f012056e56e33f24b621e8c1b3d054c6f470d437d0d793593de95eaa9724055d59c342228398a40f0b4
DIST netpbm-10.76.00.tar.xz 2657184 BLAKE2B b8d82268ba50881fab10bca00ea408afa39096f4f9c079b523d8e28ce62301797ee50f55c84f85a6d832b723da7449531e725bf60a4a89975c51382b2cbc4a94 SHA512 234a5616a7631a8eb70817bb88ed509ddddfce93f71739654ef78a2735245b268c391adb49b514ed883569c9fc6ea9c3eeed10aa7898c02b797fee5249b11cf3
-DIST netpbm-10.86.22.tar.xz 3696588 BLAKE2B eabc11b4928681f2d96c8b6da1e23284868d7ba2f610f496d1ddf5b6ceb34c991160780f79c69b2c905e5210b024a1a5868656b89e23d6b63e587ce0cd70a950 SHA512 5840d0e88158ac77be7dfc5430e696701a740d56c98efdaf02b3c4e92bdf10268572ef0087b3bf263937073e0fbda3183aa7ed56bfe12dba30b3a3ff382bd4ff
DIST netpbm-10.86.24.tar.xz 3698448 BLAKE2B 189fbaeb91db15e317c62758c64d1165d3cb32fa0221b2dcdefb0425577d4af9a13e66c35774149a44727c99fc18263123fd3c2b71f6409344bcf458341a4470 SHA512 50ad5a726c4219e1d87c7a46868b8f7bdb2d676903f049816b58e00addb416e4684a6c669188beebc5cc3c3961d2b0e35cd663215196d9925e3a23a989e14be3
diff --git a/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch b/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch
deleted file mode 100644
index a7afc259ff5..00000000000
--- a/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix compiling with `CFLAGS` `-Werror=format-security`
-See also https://bugs.gentoo.org/517524
-
---- a/converter/ppm/ximtoppm.c
-+++ b/converter/ppm/ximtoppm.c
-@@ -117,9 +117,9 @@
- */
- header->bits_channel = atoi(a_head.bits_per_channel);
- header->alpha_flag = atoi(a_head.alpha_channel);
-- pm_asprintf(&header->author, a_head.author);
-- pm_asprintf(&header->date, a_head.date);
-- pm_asprintf(&header->program, a_head.program);
-+ pm_asprintf(&header->author, "%s", a_head.author);
-+ pm_asprintf(&header->date, "%s", a_head.date);
-+ pm_asprintf(&header->program, "%s", a_head.program);
- /* Do double checking for bakwards compatibility */
- if (header->npics == 0)
- header->npics = 1;
diff --git a/media-libs/netpbm/netpbm-10.86.22.ebuild b/media-libs/netpbm/netpbm-10.86.22.ebuild
deleted file mode 100644
index 402cbd40216..00000000000
--- a/media-libs/netpbm/netpbm-10.86.22.ebuild
+++ /dev/null
@@ -1,212 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib toolchain-funcs
-
-DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
-HOMEPAGE="http://netpbm.sourceforge.net/"
-SRC_URI="https://github.com/ceamac/netpbm-make-dist/releases/download/v${PV}/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
-
-BDEPEND="
- app-arch/xz-utils
- sys-devel/flex
- virtual/pkgconfig
-"
-RDEPEND="jbig? ( media-libs/jbigkit )
- jpeg? ( virtual/jpeg:0 )
- png? ( >=media-libs/libpng-1.4:0 )
- postscript? ( app-text/ghostscript-gpl )
- rle? ( media-libs/urt )
- svga? ( media-libs/svgalib )
- tiff? ( >=media-libs/tiff-3.5.5:0 )
- xml? ( dev-libs/libxml2 )
- zlib? ( sys-libs/zlib )
- X? ( x11-libs/libX11 )"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/netpbm-10.86.21-build.patch
- "${FILESDIR}"/netpbm-10.86.21-test.patch #450530
- "${FILESDIR}"/netpbm-10.86.21-misc-deps.patch
- "${FILESDIR}"/netpbm-10.86.21-format-security.patch #517524
- "${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() {
- if use ${1} ; then
- [[ ${2} != "!" ]] && echo -l${2:-$1}
- else
- echo NONE
- fi
-}
-
-src_prepare() {
- default
-
- # make sure we use system libs
- sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
- rm -r urt converter/other/jbig/libjbig converter/other/jpeg2000/libjasper || die
-
- # take care of the importinc stuff ourselves by only doing it once
- # at the top level and having all subdirs use that one set #149843
- sed -i \
- -e '/^importinc:/s|^|importinc:\nmanual_|' \
- -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
- common.mk || die
- sed -i \
- -e '/%.c/s: importinc$::' \
- common.mk lib/Makefile lib/util/Makefile || die
- sed -i \
- -e 's:pkg-config:$(PKG_CONFIG):' \
- GNUmakefile converter/other/Makefile other/pamx/Makefile || die
-
- # The postscript knob is currently bound up with a fork test.
- if ! use postscript ; then
- sed -i \
- -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \
- converter/other/Makefile generator/Makefile || die
- sed -i -r \
- -e 's:(pbmtextps|pnmtops|pstopnm).*::' \
- test/all-in-place.{ok,test} || die
- sed -i -e '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
-}
-
-src_configure() {
- # cannot chain the die with the heredoc, please check the comment below
- cat config.mk.in - >> config.mk <<-EOF
- # Misc crap
- BUILD_FIASCO = N
- SYMLINK = ln -sf
-
- # These vars let src_test work by default
- PKGDIR_DEFAULT = ${T}/netpbm
- RESULTDIR_DEFAULT = ${T}/netpbm-test
-
- # Toolchain options
- CC = $(tc-getCC) -Wall
- LD = \$(CC)
- CC_FOR_BUILD = $(tc-getBUILD_CC)
- LD_FOR_BUILD = \$(CC_FOR_BUILD)
- AR = $(tc-getAR)
- RANLIB = $(tc-getRANLIB)
- PKG_CONFIG = $(tc-getPKG_CONFIG)
-
- STRIPFLAG =
- CFLAGS_SHLIB = -fPIC
-
- LDRELOC = \$(LD) -r
- LDSHLIB = $(netpbm_ldshlib)
- LINKER_CAN_DO_EXPLICIT_LIBRARY = N # we can, but dont want to
- LINKERISCOMPILER = Y
- NETPBMLIBSUFFIX = $(netpbm_libsuffix)
- NETPBMLIBTYPE = $(netpbm_libtype)
- STATICLIB_TOO = $(usex static-libs Y N)
-
- # The var is called SSE, but the code is actually SSE2.
- WANT_SSE = $(usex cpu_flags_x86_sse2 Y N)
-
- # Gentoo build options
- TIFFLIB = $(netpbm_config tiff)
- # Let tiff worry about its own dependencies #395753
- TIFFLIB_NEEDS_JPEG = N
- TIFFLIB_NEEDS_Z = N
- JPEGLIB = $(netpbm_config jpeg)
- PNGLIB = $(netpbm_config png)
- ZLIB = $(netpbm_config zlib z)
- LINUXSVGALIB = $(netpbm_config svga vga)
- XML2_LIBS = $(netpbm_config xml xml2)
- JBIGLIB = $(netpbm_config jbig)
- JBIGHDR_DIR =
- JASPERLIB = NONE
- JASPERHDR_DIR =
- URTLIB = $(netpbm_config rle)
- URTHDR_DIR =
- X11LIB = $(netpbm_config X X11)
- X11HDR_DIR =
- EOF
- # cannot chain the die with the heredoc above as bash-3
- # has a parser bug in that setup #282902
- [[ $? -eq 0 ]] || die "writing config.mk failed"
-}
-
-src_compile() {
- emake -j1 pm_config.h version.h manual_importinc #149843
- emake
-}
-
-src_test() {
- # The code wants to install everything first and then test the result.
- emake install.{bin,lib,data}
- emake check
-}
-
-src_install() {
- # Subdir make targets like to use `mkdir` all over the place
- # without any actual dependencies, thus the -j1.
- emake -j1 package pkgdir="${ED}"/usr
-
- if [[ $(get_libdir) != "lib" ]] ; then
- mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die
- fi
-
- # Remove cruft that we don't need, and move around stuff we want
- rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
-
- dodir /usr/share
- mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
-
- doman userguide/*.[0-9]
- dodoc README
-
- cd doc || die
- dodoc HISTORY Netpbm.programming USERDOC
- docinto html
- dodoc -r *.html
-
- use doc && dodoc -r ../userguide/*.html
-}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2022-09-01 2:16 Sam James
0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2022-09-01 2:16 UTC (permalink / raw
To: gentoo-commits
commit: c41ea8f438e6d0547e9e53c612b9f0752ddde6c9
Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
AuthorDate: Wed Aug 24 07:53:02 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 1 02:16:10 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c41ea8f4
media-libs/netpbm: drop 10.86.24-r1, 10.86.27, 10.86.30
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26996
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/netpbm/Manifest | 3 -
.../files/netpbm-10.86.24-fix-test-ppc64.patch | 22 --
media-libs/netpbm/netpbm-10.86.24-r1.ebuild | 220 --------------------
media-libs/netpbm/netpbm-10.86.27.ebuild | 227 --------------------
media-libs/netpbm/netpbm-10.86.30.ebuild | 229 ---------------------
5 files changed, 701 deletions(-)
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index 157e6e1daadd..297c499d1ba7 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -1,5 +1,2 @@
-DIST netpbm-10.86.24.tar.xz 3698448 BLAKE2B 189fbaeb91db15e317c62758c64d1165d3cb32fa0221b2dcdefb0425577d4af9a13e66c35774149a44727c99fc18263123fd3c2b71f6409344bcf458341a4470 SHA512 50ad5a726c4219e1d87c7a46868b8f7bdb2d676903f049816b58e00addb416e4684a6c669188beebc5cc3c3961d2b0e35cd663215196d9925e3a23a989e14be3
-DIST netpbm-10.86.27.tar.xz 3699900 BLAKE2B cf1e2742b343100081d53cdccfca5d41ce46ad57adb72c10c2e8ea94547e8d097e657c50554dae79b47c5c2e8d8146d15ef372b9e031152411b3379a0998a8d8 SHA512 b809b05647b4f4509db04a937a5c0b03301ccf93a56d773d6ddfe11a1cdc254befeb311e20306e5329db75fce9697b823c351a32ba0a771f4545793a55cb646c
-DIST netpbm-10.86.30.tar.xz 3692036 BLAKE2B 2529adfe7f93cf2400547c107cf04b03478aef95bce6573195a6a9e20767b04371bcff13744aa547885ffa3137d948076de01ad0a979f4464c13e3fdeeb37bf7 SHA512 7643b279c59717b30130e7178be82638085d2ae28c0cea8c7595f5ff3a1cd3c5dd0201a051bed8997f8a8354b5eeb08949d4e8587d3e807df7859a4cb1a44534
DIST netpbm-10.86.33.tar.xz 3696704 BLAKE2B 57657d69e235ee9babefce6e44e7ac35ac9b67c38797cee140488afe268687e4030158280c1064f8111891b9114106420314cdbce1b8be8d7dd45204a07aa5b0 SHA512 b0a555276e26d171705e93bdc26d33869fa611e01728d935edd0a7b96815db4f9ff264d7d6cecccc751b0bbfd639b14316f1ab576b1182b755e0f1832d8f43ca
DIST netpbm-10.86.34.tar.xz 3698852 BLAKE2B 7ea0e93450fb0bdf50b1b498468dd32350f20c8e993cda3e0ffa942dcdeab775a532a4771b10c55c862340964a4520f51ea4916c20051d5140dbb0a9ce373860 SHA512 bbb4dc685a44c0d7733808edd938b1205891ae5cf312218ef717bf63053513058251a659e3cf9acc762b0aeec8da3fc8e8a05e1442591c87f5a1dce7f63ee870
diff --git a/media-libs/netpbm/files/netpbm-10.86.24-fix-test-ppc64.patch b/media-libs/netpbm/files/netpbm-10.86.24-fix-test-ppc64.patch
deleted file mode 100644
index e1b558d59117..000000000000
--- a/media-libs/netpbm/files/netpbm-10.86.24-fix-test-ppc64.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-char is unsigned by default on ppc64
-
---- a/converter/other/pnmtopalm/palmtopnm.c
-+++ b/converter/other/pnmtopalm/palmtopnm.c
-@@ -823,7 +823,7 @@
- unsigned int j;
-
- for (j = 0; j < bytesPerRow; ) {
-- char incount;
-+ signed char incount;
- pm_readchar(ifP, &incount);
- if (incount < 0) {
- /* How do we handle incount == -128 ? */
-@@ -865,7 +865,7 @@
- unsigned int j;
-
- for (j = 0; j < bytesPerRow; ) {
-- char incount;
-+ signed char incount;
- pm_readchar(ifP, &incount);
- if (incount < 0) {
- /* How do we handle incount == -128 ? */
diff --git a/media-libs/netpbm/netpbm-10.86.24-r1.ebuild b/media-libs/netpbm/netpbm-10.86.24-r1.ebuild
deleted file mode 100644
index bef703001a86..000000000000
--- a/media-libs/netpbm/netpbm-10.86.24-r1.ebuild
+++ /dev/null
@@ -1,220 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib toolchain-funcs
-
-DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
-HOMEPAGE="http://netpbm.sourceforge.net/"
-SRC_URI="https://github.com/ceamac/netpbm-make-dist/releases/download/v${PV}/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="doc jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
-# zlib USE flag is no longer used, enabled by default.
-# cannot remove it yet because of #801445
-
-BDEPEND="
- app-arch/xz-utils
- sys-devel/flex
- virtual/pkgconfig
-"
-# app-text/ghostscript-gpl is really needed for postscript
-# some utilities execute /usr/bin/gs
-RDEPEND="jbig? ( media-libs/jbigkit:= )
- jpeg? ( virtual/jpeg:0 )
- 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:0 )
- xml? ( dev-libs/libxml2 )
- X? ( x11-libs/libX11 )"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/netpbm-10.86.21-build.patch
- "${FILESDIR}"/netpbm-10.86.21-test.patch #450530
- "${FILESDIR}"/netpbm-10.86.21-misc-deps.patch
- "${FILESDIR}"/netpbm-10.86.22-fix-ps-test.patch #670362
- "${FILESDIR}"/netpbm-10.86.24-fix-test-ppc64.patch #827338
-)
-
-netpbm_libtype() {
- case ${CHOST} in
- *-darwin*) echo dylib;;
- *) echo unixshared;;
- esac
-}
-
-netpbm_libsuffix() {
- local suffix=$(get_libname)
- echo ${suffix//\.}
-}
-
-netpbm_ldshlib() {
- case ${CHOST} in
- *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';;
- *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';;
- esac
-}
-netpbm_config() {
- if use ${1} ; then
- [[ ${2} != "!" ]] && echo -l${2:-$1}
- else
- echo NONE
- fi
-}
-
-src_prepare() {
- default
-
- # make sure we use system libs
- sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
- rm -r urt converter/other/jbig/libjbig converter/other/jpeg2000/libjasper || die
-
- # take care of the importinc stuff ourselves by only doing it once
- # at the top level and having all subdirs use that one set #149843
- sed -i \
- -e '/^importinc:/s|^|importinc:\nmanual_|' \
- -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
- common.mk || die
- sed -i \
- -e '/%.c/s: importinc$::' \
- common.mk lib/Makefile lib/util/Makefile || die
- sed -i \
- -e 's:pkg-config:$(PKG_CONFIG):' \
- GNUmakefile converter/other/Makefile other/pamx/Makefile || die
-
- # The postscript knob is currently bound up with a fork test.
- if ! use postscript ; then
- sed -i \
- -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \
- converter/other/Makefile generator/Makefile || die
- sed -i -r \
- -e 's:(pbmtextps|pnmtops|pstopnm).*::' \
- test/all-in-place.{ok,test} || die
- sed -i -e '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
-}
-
-src_configure() {
- # cannot chain the die with the heredoc
- # repoman tries to parse the heredoc and fails
- cat config.mk.in - >> config.mk <<-EOF
- # Misc crap
- BUILD_FIASCO = N
- SYMLINK = ln -sf
-
- # These vars let src_test work by default
- PKGDIR_DEFAULT = ${T}/netpbm
- RESULTDIR_DEFAULT = ${T}/netpbm-test
-
- # Toolchain options
- CC = $(tc-getCC) -Wall
- LD = \$(CC)
- CC_FOR_BUILD = $(tc-getBUILD_CC)
- LD_FOR_BUILD = \$(CC_FOR_BUILD)
- AR = $(tc-getAR)
- RANLIB = $(tc-getRANLIB)
- PKG_CONFIG = $(tc-getPKG_CONFIG)
-
- STRIPFLAG =
- CFLAGS_SHLIB = -fPIC
-
- LDRELOC = \$(LD) -r
- LDSHLIB = $(netpbm_ldshlib)
- LINKER_CAN_DO_EXPLICIT_LIBRARY = N # we can, but dont want to
- LINKERISCOMPILER = Y
- NETPBMLIBSUFFIX = $(netpbm_libsuffix)
- NETPBMLIBTYPE = $(netpbm_libtype)
- STATICLIB_TOO = $(usex static-libs Y N)
-
- # The var is called SSE, but the code is actually SSE2.
- WANT_SSE = $(usex cpu_flags_x86_sse2 Y N)
-
- # Gentoo build options
- TIFFLIB = $(netpbm_config tiff)
- # Let tiff worry about its own dependencies #395753
- TIFFLIB_NEEDS_JPEG = N
- TIFFLIB_NEEDS_Z = N
- JPEGLIB = $(netpbm_config jpeg)
- PNGLIB = $(netpbm_config png)
- ZLIB = -lz
- LINUXSVGALIB = $(netpbm_config svga vga)
- XML2_LIBS = $(netpbm_config xml xml2)
- JBIGLIB = $(netpbm_config jbig)
- JBIGHDR_DIR =
- JASPERLIB = NONE
- JASPERHDR_DIR =
- URTLIB = $(netpbm_config rle)
- URTHDR_DIR =
- X11LIB = $(netpbm_config X X11)
- X11HDR_DIR =
- EOF
- [[ $? -eq 0 ]] || die "writing config.mk failed"
-}
-
-src_compile() {
- emake -j1 pm_config.h version.h manual_importinc #149843
- emake
-}
-
-src_test() {
- # The code wants to install everything first and then test the result.
- emake install.{bin,lib,data}
- emake check
-}
-
-src_install() {
- # Subdir make targets like to use `mkdir` all over the place
- # without any actual dependencies, thus the -j1.
- emake -j1 package pkgdir="${ED}"/usr
-
- if [[ $(get_libdir) != "lib" ]] ; then
- mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die
- fi
-
- # Remove cruft that we don't need, and move around stuff we want
- rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
-
- dodir /usr/share
- mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
-
- doman userguide/*.[0-9]
- dodoc README
-
- cd doc || die
- dodoc HISTORY Netpbm.programming USERDOC
- docinto html
- dodoc -r *.html
-
- use doc && dodoc -r ../userguide/*.html
-}
diff --git a/media-libs/netpbm/netpbm-10.86.27.ebuild b/media-libs/netpbm/netpbm-10.86.27.ebuild
deleted file mode 100644
index f263c1e4370c..000000000000
--- a/media-libs/netpbm/netpbm-10.86.27.ebuild
+++ /dev/null
@@ -1,227 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic multilib toolchain-funcs
-
-DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
-HOMEPAGE="http://netpbm.sourceforge.net/"
-SRC_URI="https://github.com/ceamac/netpbm-make-dist/releases/download/v${PV}/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="doc jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
-# zlib USE flag is no longer used, enabled by default.
-# cannot remove it yet because of #801445
-
-BDEPEND="
- app-arch/xz-utils
- sys-devel/flex
- virtual/pkgconfig
-"
-# app-text/ghostscript-gpl is really needed for postscript
-# some utilities execute /usr/bin/gs
-RDEPEND="jbig? ( media-libs/jbigkit:= )
- jpeg? ( virtual/jpeg:0 )
- 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:0 )
- xml? ( dev-libs/libxml2 )
- X? ( x11-libs/libX11 )"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/netpbm-10.86.21-build.patch
- "${FILESDIR}"/netpbm-10.86.21-test.patch #450530
- "${FILESDIR}"/netpbm-10.86.21-misc-deps.patch
- "${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() {
- if use ${1} ; then
- [[ ${2} != "!" ]] && echo -l${2:-$1}
- else
- echo NONE
- fi
-}
-
-# 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
-}
-
-src_configure() {
- # cannot chain the die with the heredoc
- # repoman tries to parse the heredoc and fails
- cat config.mk.in - >> config.mk <<-EOF
- # Misc crap
- BUILD_FIASCO = N
- SYMLINK = ln -sf
-
- # These vars let src_test work by default
- PKGDIR_DEFAULT = ${T}/netpbm
- RESULTDIR_DEFAULT = ${T}/netpbm-test
-
- # Toolchain options
- CC = $(tc-getCC) -Wall
- LD = \$(CC)
- CC_FOR_BUILD = $(tc-getBUILD_CC)
- LD_FOR_BUILD = \$(CC_FOR_BUILD)
- AR = $(tc-getAR)
- RANLIB = $(tc-getRANLIB)
- PKG_CONFIG = $(tc-getPKG_CONFIG)
-
- STRIPFLAG =
- CFLAGS_SHLIB = -fPIC
- 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 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 = $($(tc-getPKG_CONFIG) --libs zlib)
- LINUXSVGALIB = $(netpbm_config svga vga)
- XML2_LIBS = $(netpbm_config xml xml2)
- JBIGLIB = $(netpbm_config jbig)
- JBIGHDR_DIR =
- JASPERLIB = NONE
- JASPERHDR_DIR =
- URTLIB = $(netpbm_config rle)
- URTHDR_DIR =
- X11LIB = $(netpbm_config X X11)
- X11HDR_DIR =
- EOF
- [[ $? -eq 0 ]] || die "writing config.mk failed"
-}
-
-src_compile() {
- emake -j1 pm_config.h version.h manual_importinc #149843
- emake
-}
-
-src_test() {
- # The code wants to install everything first and then test the result.
- emake install.{bin,lib,data}
- emake check
-}
-
-src_install() {
- # Subdir make targets like to use `mkdir` all over the place
- # without any actual dependencies, thus the -j1.
- emake -j1 package pkgdir="${ED}"/usr
-
- if [[ $(get_libdir) != "lib" ]] ; then
- mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die
- fi
-
- # Remove cruft that we don't need, and move around stuff we want
- rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
-
- dodir /usr/share
- mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
-
- doman userguide/*.[0-9]
- dodoc README
-
- cd doc || die
- dodoc HISTORY Netpbm.programming USERDOC
- docinto html
- dodoc -r *.html
-
- use doc && dodoc -r ../userguide/*.html
-}
diff --git a/media-libs/netpbm/netpbm-10.86.30.ebuild b/media-libs/netpbm/netpbm-10.86.30.ebuild
deleted file mode 100644
index 08e5db5c969b..000000000000
--- a/media-libs/netpbm/netpbm-10.86.30.ebuild
+++ /dev/null
@@ -1,229 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic multilib toolchain-funcs
-
-DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
-HOMEPAGE="http://netpbm.sourceforge.net/"
-SRC_URI="https://github.com/ceamac/netpbm-make-dist/releases/download/v${PV}/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-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"
-
-BDEPEND="
- app-arch/xz-utils
- sys-devel/flex
- virtual/pkgconfig
-"
-# app-text/ghostscript-gpl is really needed for postscript
-# some utilities execute /usr/bin/gs
-RDEPEND="jbig? ( media-libs/jbigkit:= )
- jpeg? ( virtual/jpeg:0 )
- 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:0 )
- xml? ( dev-libs/libxml2 )
- X? ( x11-libs/libX11 )"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/netpbm-10.86.21-build.patch
- "${FILESDIR}"/netpbm-10.86.21-test.patch #450530
- "${FILESDIR}"/netpbm-10.86.21-misc-deps.patch
- "${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() {
- if use ${1} ; then
- [[ ${2} != "!" ]] && echo -l${2:-$1}
- else
- echo NONE
- fi
-}
-
-# 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() {
- # cannot chain the die with the heredoc
- # repoman tries to parse the heredoc and fails
- cat config.mk.in - >> config.mk <<-EOF
- # Misc crap
- BUILD_FIASCO = N
- SYMLINK = ln -sf
-
- # These vars let src_test work by default
- PKGDIR_DEFAULT = ${T}/netpbm
- RESULTDIR_DEFAULT = ${T}/netpbm-test
-
- # Toolchain options
- CC = $(tc-getCC) -Wall
- LD = \$(CC)
- CC_FOR_BUILD = $(tc-getBUILD_CC)
- LD_FOR_BUILD = \$(CC_FOR_BUILD)
- AR = $(tc-getAR)
- RANLIB = $(tc-getRANLIB)
- PKG_CONFIG = $(tc-getPKG_CONFIG)
-
- STRIPFLAG =
- CFLAGS_SHLIB = -fPIC
- 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 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 = $($(tc-getPKG_CONFIG) --libs zlib)
- LINUXSVGALIB = $(netpbm_config svga vga)
- XML2_LIBS = $(netpbm_config xml xml2)
- JBIGLIB = $(netpbm_config jbig)
- JBIGHDR_DIR =
- JASPERLIB = NONE
- JASPERHDR_DIR =
- URTLIB = $(netpbm_config rle)
- URTHDR_DIR =
- X11LIB = $(netpbm_config X X11)
- X11HDR_DIR =
- EOF
- [[ $? -eq 0 ]] || die "writing config.mk failed"
-}
-
-src_compile() {
- emake -j1 pm_config.h version.h manual_importinc #149843
- emake
-}
-
-src_test() {
- # The code wants to install everything first and then test the result.
- emake install.{bin,lib,data}
- emake check
-}
-
-src_install() {
- # Subdir make targets like to use `mkdir` all over the place
- # without any actual dependencies, thus the -j1.
- emake -j1 package pkgdir="${ED}"/usr
-
- if [[ $(get_libdir) != "lib" ]] ; then
- mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die
- fi
-
- # Remove cruft that we don't need, and move around stuff we want
- rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
-
- dodir /usr/share
- mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
-
- doman userguide/*.[0-9]
- dodoc README
-
- cd doc || die
- dodoc HISTORY Netpbm.programming USERDOC
- docinto html
- dodoc -r *.html
- dodoc -r ../userguide/*.html
-}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2022-10-31 18:49 Viorel Munteanu
0 siblings, 0 replies; 11+ messages in thread
From: Viorel Munteanu @ 2022-10-31 18:49 UTC (permalink / raw
To: gentoo-commits
commit: e3d05a67121586a482c768abbcd94b5ddbd4d444
Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 8 06:38:30 2022 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Oct 31 18:49:08 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3d05a67
media-libs/netpbm: add 11.0.1
Closes: https://github.com/gentoo/gentoo/pull/27896
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
media-libs/netpbm/Manifest | 1 +
.../netpbm/files/netpbm-11.0.0-misc-deps.patch | 69 ++++++
media-libs/netpbm/netpbm-11.0.1.ebuild | 262 +++++++++++++++++++++
3 files changed, 332 insertions(+)
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index 2512a3cf512c..e3db9a3cba28 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -1 +1,2 @@
DIST netpbm-10.86.34.tar.xz 3698852 BLAKE2B 7ea0e93450fb0bdf50b1b498468dd32350f20c8e993cda3e0ffa942dcdeab775a532a4771b10c55c862340964a4520f51ea4916c20051d5140dbb0a9ce373860 SHA512 bbb4dc685a44c0d7733808edd938b1205891ae5cf312218ef717bf63053513058251a659e3cf9acc762b0aeec8da3fc8e8a05e1442591c87f5a1dce7f63ee870
+DIST netpbm-11.0.1.tar.xz 3767852 BLAKE2B 4bea578c9dc7da252817ab6dcb80d7dae462d271cc02d7d58a7608e02dbae57d2996908ab35bf341c5a4378a93bfb33f39e7cb90732b0b028a1bf616bcbd6b2e SHA512 18c9d2f91641b878e7c623f768f2740f0d7d29aae23a87ecc17ceaedd00b9a2d32863c7da6f05ccbeffea1ceadac897d9bfab86489bbb23ebf11a104d6b1991e
diff --git a/media-libs/netpbm/files/netpbm-11.0.0-misc-deps.patch b/media-libs/netpbm/files/netpbm-11.0.0-misc-deps.patch
new file mode 100644
index 000000000000..a68e2460482b
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-11.0.0-misc-deps.patch
@@ -0,0 +1,69 @@
+do not autoprobe deps when we disabled them
+
+--- a/converter/other/Makefile
++++ b/converter/other/Makefile
+@@ -22,6 +22,7 @@
+ # Also note that in both cases, the shell command fails if $(PKG_CONFIG)
+ # doesn't even exist.
+
++ifneq ($(XML2_LIBS),NONE)
+ TEST_PKGCONFIG_LIBXML2 := \
+ if $(PKG_CONFIG) libxml-2.0 --exists; then echo exists; fi
+
+@@ -38,6 +39,7 @@
+ XML2_CFLAGS=$(shell xml2-config --cflags)
+ endif
+ endif
++endif
+
+ SUBDIRS = jbig pnmtopalm jpeg2000 cameratopam pamtosvg
+ ifneq ($(BUILD_FIASCO), N)
+@@ -50,6 +52,7 @@
+ endif
+ endif
+
++ifneq ($(PNGLIB),NONE)
+ TEST_PKGCONFIG_LIBPNG := \
+ if $(PKG_CONFIG) libpng$(PNGVER) --exists; then echo exists; fi
+
+@@ -75,6 +78,7 @@
+ endif
+ endif
+ endif
++endif
+
+ ifneq ($(JPEGLIB),NONE)
+ ifneq ($(JPEGHDR_DIR)x,x)
+--- a/other/pamx/Makefile
++++ b/other/pamx/Makefile
+@@ -9,6 +9,7 @@
+
+ EXTERN_INCLUDE =
+
++ifneq ($(X11LIB),NONE)
+ TEST_PKGCONFIG_X11 := \
+ if $(PKG_CONFIG) x11 --exists; then echo exists; fi
+
+@@ -36,6 +37,7 @@
+ window.o \
+
+ endif
++endif
+
+ BINARIES = $(PORTBINARIES)
+
+@@ -49,12 +51,14 @@
+
+ include $(SRCDIR)/common.mk
+
++ifneq ($(X11LIB),NONE)
+ ifeq ($(shell $(TEST_PKGCONFIG_X11)),)
+ # Pkg-config has never heard of X11, or doesn't even exist
+ X11_LIBOPTS = $(shell $(LIBOPT) $(LIBOPTR) $(X11LIB))
+ else
+ X11_LIBOPTS = $(shell $(PKG_CONFIG) x11 --libs)
+ endif
++endif
+
+ pamx: image.o send.o window.o
+ pamx: ADDL_OBJECTS = image.o send.o window.o
diff --git a/media-libs/netpbm/netpbm-11.0.1.ebuild b/media-libs/netpbm/netpbm-11.0.1.ebuild
new file mode 100644
index 000000000000..b41a4e824170
--- /dev/null
+++ b/media-libs/netpbm/netpbm-11.0.1.ebuild
@@ -0,0 +1,262 @@
+# Copyright 1999-2022 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://github.com/ceamac/netpbm-make-dist/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="Artistic BSD GPL-2 IJG LGPL-2.1 MIT public-domain"
+SLOT="0/advanced"
+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:0 )
+ 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-11.0.0-misc-deps.patch
+)
+
+netpbm_libtype() {
+ case ${CHOST} in
+ *-darwin*) echo dylib;;
+ *) echo unixshared;;
+ esac
+}
+
+netpbm_libsuffix() {
+ local suffix=$(get_libname)
+ echo ${suffix//\.}
+}
+
+netpbm_ldshlib() {
+ case ${CHOST} in
+ *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';;
+ *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';;
+ esac
+}
+
+netpbm_config_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
+
+ # fix typo in a test
+ sed -i \
+ -e 's:^o#! /bin/sh:#! /bin/sh:' \
+ test/stdin-ppm3.test || 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.*::' \
+ -e 's:pbmtextps-dump.*::' \
+ -e 's:pbmtextps.*::' \
+ 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 || die
+
+ # Do not test png if not built
+ if ! use png ; then
+ sed -i -E \
+ -e 's:(pamtopng|pngtopam|pnmtopng).*::' \
+ test/all-in-place.{ok,test} || die
+ sed -i \
+ -e '/^$/d' \
+ test/all-in-place.ok || die
+
+ sed -i -E \
+ -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.*::' \
+ -e 's:winicon-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 ../userguide/*.html
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2023-01-02 16:30 Viorel Munteanu
0 siblings, 0 replies; 11+ messages in thread
From: Viorel Munteanu @ 2023-01-02 16:30 UTC (permalink / raw
To: gentoo-commits
commit: 1c7a04ecf47d2ec93dc6acc13d8d2dbe78ded1ce
Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 2 16:23:03 2023 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Jan 2 16:29:39 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c7a04ec
media-libs/netpbm: fix compilation with clang -O2
Closes: https://bugs.gentoo.org/885561
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
.../netpbm/files/netpbm-11.1.0-fix-clang-O2.patch | 26 ++++++++++++++++++++++
...etpbm-11.1.0.ebuild => netpbm-11.1.0-r1.ebuild} | 5 ++---
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/media-libs/netpbm/files/netpbm-11.1.0-fix-clang-O2.patch b/media-libs/netpbm/files/netpbm-11.1.0-fix-clang-O2.patch
new file mode 100644
index 000000000000..4427676b9b35
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-11.1.0-fix-clang-O2.patch
@@ -0,0 +1,26 @@
+When compiling with clang and -O2, local variable origJmpbufP with value
+changed after setjmp contains garbage after longjmp.
+
+According to glibc documentation, making it volatile should have fixed the
+issue, but it didn't. Static outside the function works.
+
+Bug: https://bugs.gentoo.org/885561
+
+--- a/lib/libpamread.c
++++ b/lib/libpamread.c
+@@ -25,6 +25,7 @@
+ #include "fileio.h"
+ #include "pam.h"
+
++static jmp_buf * origJmpbufP = NULL;
+
+ static void
+ readPbmRow(const struct pam * const pamP,
+@@ -35,7 +36,6 @@
+ "It says PBM format, but 'depth' member is not 1.");
+ else {
+ jmp_buf jmpbuf;
+- jmp_buf * origJmpbufP;
+ unsigned char * bitrow;
+
+ bitrow = (unsigned char *) pbm_allocrow(pbm_packed_bytes(pamP->width));
diff --git a/media-libs/netpbm/netpbm-11.1.0.ebuild b/media-libs/netpbm/netpbm-11.1.0-r1.ebuild
similarity index 98%
rename from media-libs/netpbm/netpbm-11.1.0.ebuild
rename to media-libs/netpbm/netpbm-11.1.0-r1.ebuild
index 7d44b7a5bd79..321a76b14293 100644
--- a/media-libs/netpbm/netpbm-11.1.0.ebuild
+++ b/media-libs/netpbm/netpbm-11.1.0-r1.ebuild
@@ -42,16 +42,14 @@ RDEPEND="
)
rle? ( media-libs/urt:= )
svga? ( media-libs/svgalib )
- tiff? ( >=media-libs/tiff-3.5.5:= )
+ tiff? ( media-libs/tiff )
xml? ( dev-libs/libxml2 )
X? ( x11-libs/libX11 )
"
-
DEPEND="
${RDEPEND}
x11-base/xorg-proto
"
-
BDEPEND="
app-arch/xz-utils
sys-devel/flex
@@ -61,6 +59,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/netpbm-10.86.21-build.patch
"${FILESDIR}"/netpbm-11.0.0-misc-deps.patch
+ "${FILESDIR}"/netpbm-11.1.0-fix-clang-O2.patch
)
netpbm_libtype() {
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2023-08-03 5:13 Viorel Munteanu
0 siblings, 0 replies; 11+ messages in thread
From: Viorel Munteanu @ 2023-08-03 5:13 UTC (permalink / raw
To: gentoo-commits
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 <phillips@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 <phillips@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
-}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2024-02-16 14:40 Viorel Munteanu
0 siblings, 0 replies; 11+ messages in thread
From: Viorel Munteanu @ 2024-02-16 14:40 UTC (permalink / raw
To: gentoo-commits
commit: 8b824d1f9769dfa4f8fd1ed99ecd1d87ce4d4e9e
Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 16 14:38:50 2024 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Feb 16 14:39:37 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b824d1f
media-libs/netpbm: fix tests on musl
Apply a patch from upstream to fix one test.
Disable the other broken tests on musl.
Backport one test from netpbm-11.5.2 to netpbm-11.2.7.
Closes: https://bugs.gentoo.org/907295
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
.../netpbm-11.2.7-fix-pnmcolormap2-test.patch | 213 +++++++++++++++++++++
.../files/netpbm-11.5.2-fix-tests-musl.patch | 157 +++++++++++++++
media-libs/netpbm/netpbm-11.2.7.ebuild | 6 +-
media-libs/netpbm/netpbm-11.5.2.ebuild | 5 +
4 files changed, 380 insertions(+), 1 deletion(-)
diff --git a/media-libs/netpbm/files/netpbm-11.2.7-fix-pnmcolormap2-test.patch b/media-libs/netpbm/files/netpbm-11.2.7-fix-pnmcolormap2-test.patch
new file mode 100644
index 000000000000..a3af51371767
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-11.2.7-fix-pnmcolormap2-test.patch
@@ -0,0 +1,213 @@
+Backport pnmcolormap2 test from 11.5.x to 11.2.x
+
+See also https://bugs.gentoo.org/907295
+
+--- a/test/pnmcolormap2.test
++++ b/test/pnmcolormap2.test
+@@ -5,51 +5,143 @@
+ tmpdir=${tmpdir:-/tmp}
+ map=${tmpdir}/map.ppm
+
+-echo "Test. Should print 'match' eight times."
+-# Threshold values (targetN=xx.xx) here were produced by calculating
+-# the S/N ratio with reduced colors.
++echo "Test. Should print 'match' eighteen times."
++
++# Threshold values (tgtN=xx.xx) were produced by calculating
++# the S/N ratio when the original image is compared against a
++# reference image with fewer colors than the target output image.
+
+ # colors in following tests / colors for calculating threshold
+-# 100 / 90
+-# 200 / 180
+-# 30 / 25
++# 256 / 224
++# 128 / 96 -splitspread
++# 128 / 108 other
++# 64 / 44 -center (default)
++# 64 / 48 -splitspread
++# 64 / 56 other
++
++# -center
++echo pnmcolormap 256
++tgt1=37.19; tgt2=37.86; tgt3=37.77
++pnmcolormap 256 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
++
++echo pnmcolormap 128
++tgt1=34.46; tgt2=35.61; tgt3=34.97
++pnmcolormap 128 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
++
++echo pnmcolormap 64
++tgt1=30.30; tgt2=33.10; tgt3=31.74
++pnmcolormap 64 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
++
++echo pnmcolormap -meancolor 256
++tgt1=38.36; tgt2=38.63; tgt3=38.95
++pnmcolormap -meancolor 256 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
++
++echo pnmcolormap -meancolor 128
++tgt1=35.86; tgt2=37.17; tgt3=36.65
++pnmcolormap -meancolor 128 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
++
++echo pnmcolormap -meancolor 64
++tgt1=33.64; tgt2=34.92; tgt3=34.44
++pnmcolormap -meancolor 64 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
++
++echo pnmcolormap -meanpixel 256
++tgt1=38.40; tgt2=38.65; tgt3=38.90
++pnmcolormap -meanpixel 256 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
++
++echo pnmcolormap -meanpixel 128
++tgt1=35.75; tgt2=37.13; tgt3=36.69
++pnmcolormap -meanpixel 128 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
++
++echo pnmcolormap -meanpixel 64
++tgt1=33.75; tgt2=34.79; tgt3=34.53
++pnmcolormap -meanpixel 64 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
++
++echo pnmcolormap -spreadluminosity 256
++tgt1=36.82; tgt2=36.87; tgt3=37.25
++pnmcolormap -spreadluminosity 256 testimg.ppm > ${map}
++pnmremap -mapfile=${map} testimg.ppm |\
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
++rm ${map}
+
+-pnmcolormap 100 testimg.ppm > ${map}
++echo pnmcolormap -spreadluminosity 128
++tgt1=34.61; tgt2=33.40; tgt3=34.66
++pnmcolormap -spreadluminosity 128 testimg.ppm > ${map}
+ pnmremap -mapfile=${map} testimg.ppm |\
+- pnmpsnr -target1=33.42 -target2=35.14 -target3=34.35 testimg.ppm -
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
+ rm ${map}
+
+-pnmcolormap -meancolor 100 testimg.ppm > ${map}
++echo pnmcolormap -spreadluminosity 64
++tgt1=32.35; tgt2=30.23; tgt3=32.35
++pnmcolormap -spreadluminosity 64 testimg.ppm > ${map}
+ pnmremap -mapfile=${map} testimg.ppm |\
+- pnmpsnr -target1=34.91 -target2=36.86 -target3=35.84 testimg.ppm -
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
+ rm ${map}
+
+-pnmcolormap -meanpixel 100 testimg.ppm > ${map}
++echo pnmcolormap -splitcolorct 256
++tgt1=37.55; tgt2=38.37; tgt3=38.04
++pnmcolormap -splitcolorct 256 testimg.ppm > ${map}
+ pnmremap -mapfile=${map} testimg.ppm |\
+- pnmpsnr -target1=34.95 -target2=36.77 -target3=35.81 testimg.ppm -
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
+ rm ${map}
+
+-pnmcolormap -spreadluminosity 100 testimg.ppm > ${map}
++echo pnmcolormap -splitcolorct 128
++tgt1=34.84; tgt2=35.72; tgt3=34.64
++pnmcolormap -splitcolorct 128 testimg.ppm > ${map}
+ pnmremap -mapfile=${map} testimg.ppm |\
+- pnmpsnr -target1=33.71 -target2=32.91 -target3=33.93 testimg.ppm -
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
+ rm ${map}
+
+-pnmcolormap -splitcolorct 100 testimg.ppm > ${map}
++echo pnmcolormap -splitcolorct 64
++tgt1=31.56; tgt2=33.74; tgt3=32.93
++pnmcolormap -splitcolorct 64 testimg.ppm > ${map}
+ pnmremap -mapfile=${map} testimg.ppm |\
+- pnmpsnr -target1=33.97 -target2=35.34 -target3=34.23 testimg.ppm -
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
+ rm ${map}
+
+-pnmcolormap -splitspread 100 testimg.ppm > ${map}
++echo pnmcolormap -splitspread 256
++tgt1=35.18; tgt2=37.26; tgt3=36.17
++pnmcolormap -splitspread 256 testimg.ppm > ${map}
+ pnmremap -mapfile=${map} testimg.ppm |\
+- pnmpsnr -target1=32.98 -target2=35.06 -target3=33.19 testimg.ppm -
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
+ rm ${map}
+
+-pnmcolormap 200 testimg.ppm > ${map}
++echo pnmcolormap -splitspread 128
++tgt1=33.18; tgt2=35.58; tgt3=33.71
++pnmcolormap -splitspread 128 testimg.ppm > ${map}
+ pnmremap -mapfile=${map} testimg.ppm |\
+- pnmpsnr -target1=36.14 -target2=36.87 -target3=36.79 testimg.ppm -
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
+ rm ${map}
+
+-pnmcolormap 30 testimg.ppm > ${map}
++echo pnmcolormap -splitspread 64
++tgt1=31.27; tgt2=33.03; tgt3=30.97
++pnmcolormap -splitspread 64 testimg.ppm > ${map}
+ pnmremap -mapfile=${map} testimg.ppm |\
+- pnmpsnr -target1=28.53 -target2=31.62 -target3=29.99 testimg.ppm -
++pnmpsnr -target1=${tgt1} -target2=${tgt2} -target3=${tgt3} testimg.ppm -
+ rm ${map}
+--- a/test/pnmcolormap2.ok
++++ b/test/pnmcolormap2.ok
+@@ -1,9 +1,37 @@
+-Test. Should print 'match' eight times.
++Test. Should print 'match' eighteen times.
++pnmcolormap 256
+ match
++pnmcolormap 128
+ match
++pnmcolormap 64
+ match
++pnmcolormap -meancolor 256
+ match
++pnmcolormap -meancolor 128
+ match
++pnmcolormap -meancolor 64
+ match
++pnmcolormap -meanpixel 256
+ match
++pnmcolormap -meanpixel 128
++match
++pnmcolormap -meanpixel 64
++match
++pnmcolormap -spreadluminosity 256
++match
++pnmcolormap -spreadluminosity 128
++match
++pnmcolormap -spreadluminosity 64
++match
++pnmcolormap -splitcolorct 256
++match
++pnmcolormap -splitcolorct 128
++match
++pnmcolormap -splitcolorct 64
++match
++pnmcolormap -splitspread 256
++match
++pnmcolormap -splitspread 128
++match
++pnmcolormap -splitspread 64
+ match
diff --git a/media-libs/netpbm/files/netpbm-11.5.2-fix-tests-musl.patch b/media-libs/netpbm/files/netpbm-11.5.2-fix-tests-musl.patch
new file mode 100644
index 000000000000..4d8bd6c3b74d
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-11.5.2-fix-tests-musl.patch
@@ -0,0 +1,157 @@
+Some tests are broken on musl.
+
+https://sourceforge.net/p/netpbm/code/4843/
+pnmindex, ppmtomitsu tests that don't use pnmcolormap
+
+So far, this only fixed ppmtomitsu.
+
+See also https://bugs.gentoo.org/907295
+
+--- a/test/pnmindex.ok
++++ b/test/pnmindex.ok
+@@ -7,12 +7,18 @@
+ 3099638253 5290
+ Test 4. Should print 1397700642 3160
+ 1397700642 3160
+-Test 5. Should print 2303488589 28514
+-2303488589 28514
+-Test 6. Should print 1706277976 100455
+-1706277976 100455
+-Test 7. Should print 801388440 100455
++Test 5. Should print 243472565 28514
++243472565 28514
++Test 6. Should print 801388440 100455
+ 801388440 100455
++Test 7. Should print 256 twice
++256
++256
++Test 8. Should print 100 twice
++100
++100
++Test 9. Should print match
++match
+ Test Invalid
+ Expected failure 1 (no output)
+ Expected failure 2 (no output)
+--- a/test/pnmindex.test
++++ b/test/pnmindex.test
+@@ -3,6 +3,9 @@
+ # Also requires: pamcat pamscale pbmtext pnmcolormap pnmindex
+ # Also requires: pnminvert pnmquant pnmremap
+
++tmpdir=${tmpdir:-/tmp}
++pnmindex256_ppm=${tmpdir}/pnmindex256.ppm
++
+ echo "Test 1. Should print 3391481002 889"
+ pnmindex maze.pbm | cksum
+
+@@ -17,18 +20,28 @@
+ pnmindex -size 20 -across=3 testgrid.pbm testgrid.pbm testgrid.pbm \
+ testgrid.pbm testgrid.pbm testgrid.pbm | cksum
+
+-echo "Test 5. Should print 2303488589 28514"
+-pnmindex testimg.ppm | cksum
++echo "Test 5. Should print 243472565 28514"
++pnmindex -noquant testimg.ppm | cksum
+
+-echo "Test 6. Should print 1706277976 100455"
+-pnmindex -size 50 -across=2 testimg.ppm testimg.ppm testimg.ppm \
+- testimg.ppm testimg.ppm testimg.ppm | cksum
+-
+-echo "Test 7. Should print 801388440 100455"
++echo "Test 6. Should print 801388440 100455"
+ pnmindex -size 50 -across=2 -noquant testimg.ppm testimg.ppm testimg.ppm \
+- testimg.ppm testimg.ppm testimg.ppm | cksum
++ testimg.ppm testimg.ppm testimg.ppm | tee ${pnmindex256_ppm} | cksum
+
++echo "Test 7. Should print 256 twice"
++pnmindex testimg.ppm | ppmhist -nomap -noheader | wc -l
++pnmindex -colors 256 testimg.ppm | ppmhist -nomap -noheader | wc -l
+
++echo "Test 8. Should print 100 twice"
++pnmindex -colors 100 testimg.ppm | ppmhist -nomap -noheader | wc -l
++pnmindex -colors 100 testimg.ppm testimg.ppm | ppmhist -nomap -noheader | wc -l
++
++
++echo "Test 9. Should print match"
++pnmindex -size 50 -across=2 -quant -colors=256 testimg.ppm testimg.ppm testimg.ppm \
++ testimg.ppm testimg.ppm testimg.ppm |\
++ pnmpsnr -rgb -target1=41.31 -target2=40.76 -target3=40.71 ${pnmindex256_ppm} -
++
++
+ echo "Test Invalid"
+
+ . ${srcdir}/test-invalid.inc
+--- a/test/ppmtomitsu.ok
++++ b/test/ppmtomitsu.ok
+@@ -1,9 +1,9 @@
+-Test 0. Should print 458455366 101484
+-458455366 101484
++Test 0. Should print 668243897 101532
++668243897 101532
+ Test 1. Should print 3110813682 101562
+ 3110813682 101562
+-Test 2. Should print 4168174994 34399
+-4168174994 34399
++Test 2. Should print 825518840 34209
++825518840 34209
+ Test 3. Should print 3201293405 310
+ 3201293405 310
+ Test 4. Should print 3354679572 752
+@@ -10,5 +10,5 @@
+ 3354679572 752
+ Test 5. Should print 3999654426 101549
+ 3999654426 101549
+-Test 6. Should print 4201246884 101549
+-4201246884 101549
++Test 6. Should print 3103038403 101549
++3103038403 101549
+--- a/test/ppmtomitsu.test
++++ b/test/ppmtomitsu.test
+@@ -1,31 +1,31 @@
+ #! /bin/sh
+ # This script tests: ppmtomitsu
+-# Also requires: pnmcolormap pnmremap
++# Also requires: pamseq pamdepth
+
+ tmpdir=${tmpdir:-/tmp}
+-testimg100_ppm=${tmpdir}/testimg100.ppm
++testimg216_ppm=${tmpdir}/testimg216.ppm
+
+-echo "Test 0. Should print 458455366 101484"
+-# equivalent to: Pnmquant 100 testimg.ppm
+-pnmcolormap 100 testimg.ppm | pnmremap -nofloyd -mapfile=- testimg.ppm |\
+- tee ${testimg100_ppm} | cksum
++echo "Test 0. Should print 668243897 101532"
+
++pamseq 3 5 -tupletype=RGB | pamdepth 255 | pnmremap -nofloyd -mapfile=- testimg.ppm |\
++ tee ${testimg216_ppm} | cksum
++
+ echo "Test 1. Should print 3110813682 101562"
+-ppmtomitsu testimg.ppm | cksum
++ppmtomitsu testimg.ppm | cksum
+
+-echo "Test 2. Should print 4168174994 34399"
+-ppmtomitsu ${testimg100_ppm} | cksum
++echo "Test 2. Should print 825518840 34209"
++ppmtomitsu ${testimg216_ppm} | cksum
+
+ echo "Test 3. Should print 3201293405 310"
+-ppmtomitsu testgrid.pbm | cksum
++ppmtomitsu testgrid.pbm | cksum
+
+ echo "Test 4. Should print 3354679572 752"
+-ppmtomitsu -tiny testgrid.pbm | cksum
++ppmtomitsu -tiny testgrid.pbm | cksum
+
+ echo "Test 5. Should print 3999654426 101549"
+-ppmtomitsu -tiny testimg.ppm | cksum
++ppmtomitsu -tiny testimg.ppm | cksum
+
+-echo "Test 6. Should print 4201246884 101549"
+-ppmtomitsu -tiny ${testimg100_ppm} | cksum
++echo "Test 6. Should print 3103038403 101549"
++ppmtomitsu -tiny ${testimg216_ppm} | cksum
+
+-rm ${testimg100_ppm}
++rm ${testimg216_ppm}
diff --git a/media-libs/netpbm/netpbm-11.2.7.ebuild b/media-libs/netpbm/netpbm-11.2.7.ebuild
index 3afe4523512a..df9c2909f438 100644
--- a/media-libs/netpbm/netpbm-11.2.7.ebuild
+++ b/media-libs/netpbm/netpbm-11.2.7.ebuild
@@ -57,6 +57,7 @@ PATCHES=(
"${FILESDIR}"/netpbm-10.86.21-build.patch
"${FILESDIR}"/netpbm-11.0.0-misc-deps.patch
"${FILESDIR}"/netpbm-11.1.0-fix-clang-O2.patch
+ "${FILESDIR}"/netpbm-11.2.7-fix-pnmcolormap2-test.patch
)
netpbm_libtype() {
@@ -160,10 +161,13 @@ src_prepare() {
fi
# this test requires LC_ALL=en_US.iso88591, not available on musl
+ # ppmpat-random is broken on musl
+ # bug #907295
if use elibc_musl; then
sed -i \
-e 's:pbmtext-iso88591.*::' \
- test/Test-Order || die
+ -e 's:ppmpat-random.*::' \
+ -i test/Test-Order || die
fi
}
diff --git a/media-libs/netpbm/netpbm-11.5.2.ebuild b/media-libs/netpbm/netpbm-11.5.2.ebuild
index 742eedc19d7d..0a74a2fd9cea 100644
--- a/media-libs/netpbm/netpbm-11.5.2.ebuild
+++ b/media-libs/netpbm/netpbm-11.5.2.ebuild
@@ -57,6 +57,7 @@ PATCHES=(
"${FILESDIR}"/netpbm-10.86.21-build.patch
"${FILESDIR}"/netpbm-11.0.0-misc-deps.patch
"${FILESDIR}"/netpbm-11.1.0-fix-clang-O2.patch
+ "${FILESDIR}"/netpbm-11.5.2-fix-tests-musl.patch
)
netpbm_libtype() {
@@ -155,9 +156,13 @@ src_prepare() {
fi
# this test requires LC_ALL=en_US.iso88591, not available on musl
+ # ppmpat-random and pnmindex are broken on musl
+ # bug #907295
if use elibc_musl; then
sed \
-e 's:pbmtext-iso88591.*::' \
+ -e 's:ppmpat-random.*::' \
+ -e 's:pnmindex.*::' \
-i test/Test-Order || die
fi
}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2024-11-25 7:00 Viorel Munteanu
0 siblings, 0 replies; 11+ messages in thread
From: Viorel Munteanu @ 2024-11-25 7:00 UTC (permalink / raw
To: gentoo-commits
commit: 0046dacd7f08dda225d176d5f3aecab90d36574e
Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 25 06:44:30 2024 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Nov 25 07:00:25 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0046dacd
media-libs/netpbm: drop 11.8.1-r1
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
media-libs/netpbm/Manifest | 1 -
.../netpbm/files/netpbm-11.8.1-fix-C23.patch | 14 --
media-libs/netpbm/netpbm-11.8.1-r1.ebuild | 259 ---------------------
3 files changed, 274 deletions(-)
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index 0dc817942a01..73a317b683e6 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -1,3 +1,2 @@
DIST netpbm-11.2.11.tar.xz 3782252 BLAKE2B 422b9cefee2a54a9c222236935291f0c8d1f13f064f4ebd277d0f92974b9ce3d7e3d9ae6a0410d767553704a03c2de14ca8456996a53fca0f95d61f9ae72605f SHA512 3d94c0c8c25873a16c78af960c964f5756b3e7a29463f001345956acc3bf1378b0b0b4fc0c57d7388dced0979ba4e8cee0def2200092544dd96fc7d04304660b
-DIST netpbm-11.8.1.tar.xz 3804004 BLAKE2B ed107d258a85c720de178a3e6488ad1b435135ec50227bb1e4ce9f3665a882a382c3a3e858e49055f88ee9bba6026b390291ad211a82299d03f41addaf93e7f9 SHA512 e4b1e8d7468fcd0233e50861e890669c788f95924edb6b6256f93b53d2ab16b7fd2c2099ca238b409fba7c764e51d54a9fbdbb22bb3bb1acf8296afdb807bd4f
DIST netpbm-11.8.2.tar.xz 3804800 BLAKE2B 9b5bb460c2fbe73495cbb304ea0e1a2a4406838cbb4d0769d2b8147f9ee6156d93852ad36a5ea57a7437b9a1a3cc9f102271163bc4d6bbd004c42c7f81be2318 SHA512 b048b242891cbe56851b3da342de1717e1ab435a327b4eeebb83023e2e7ae57ae66a232df344b4d2b0fb12bc6abcf13d9cec392f19ff06951023ee4c002f9f17
diff --git a/media-libs/netpbm/files/netpbm-11.8.1-fix-C23.patch b/media-libs/netpbm/files/netpbm-11.8.1-fix-C23.patch
deleted file mode 100644
index a749ec434d31..000000000000
--- a/media-libs/netpbm/files/netpbm-11.8.1-fix-C23.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://bugs.gentoo.org/943971
-
---- a/buildtools/libopt.c
-+++ b/buildtools/libopt.c
-@@ -89,7 +89,9 @@
- #include <stdlib.h>
- #include <stdio.h>
-
-+#if __STDC_VERSION__ < 202311L
- typedef unsigned char bool;
-+#endif
- #ifndef TRUE
- #define TRUE (1)
- #endif
diff --git a/media-libs/netpbm/netpbm-11.8.1-r1.ebuild b/media-libs/netpbm/netpbm-11.8.1-r1.ebuild
deleted file mode 100644
index 3626f909bb88..000000000000
--- a/media-libs/netpbm/netpbm-11.8.1-r1.ebuild
+++ /dev/null
@@ -1,259 +0,0 @@
-# Copyright 1999-2024 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 11.2.xx) on SLOT "0/stable"
-# and the advanced branch of their svn (currently versions 11.8.yy) 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
-
-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/advanced"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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
-# 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
- app-alternatives/lex
- virtual/pkgconfig
-"
-
-PATCHES=(
- "${FILESDIR}"/netpbm-10.86.21-build.patch
- "${FILESDIR}"/netpbm-11.0.0-misc-deps.patch
- "${FILESDIR}"/netpbm-11.1.0-fix-clang-O2.patch
- "${FILESDIR}"/netpbm-11.6.1-incompatible-pointer-types.patch
- "${FILESDIR}"/netpbm-11.7.2-lto.patch
- "${FILESDIR}"/netpbm-11.8.1-fix-C23.patch
-)
-
-netpbm_libtype() {
- case ${CHOST} in
- *-darwin*) echo dylib;;
- *) echo unixshared;;
- esac
-}
-
-netpbm_libsuffix() {
- local suffix=$(get_libname)
- echo ${suffix//\.}
-}
-
-netpbm_ldshlib() {
- case ${CHOST} in
- *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';;
- *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';;
- esac
-}
-
-netpbm_config_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 '/SUPPORT_SUBDIRS/s:urt::' -i 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 \
- -e '/^importinc:/s|^|importinc:\nmanual_|' \
- -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
- -i common.mk || die
- sed \
- -e '/%.c/s: importinc$::' \
- -i common.mk lib/Makefile lib/util/Makefile || die
- sed \
- -e 's:pkg-config:$(PKG_CONFIG):' \
- -i GNUmakefile converter/other/Makefile other/pamx/Makefile || die
-
- # The postscript knob is currently bound up with a fork test.
- if ! use postscript ; then
- sed \
- -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \
- -i converter/other/Makefile generator/Makefile || die
- sed -r \
- -e 's:(pbmtextps|pnmtops|pstopnm).*::' \
- -i test/all-in-place.{ok,test} || die
- sed \
- -e 's:lps-roundtrip.*::' \
- -e 's:pbmtextps-dump.*::' \
- -e 's:pbmtextps.*::' \
- -i test/Test-Order || die
- sed \
- -e '/^$/d' \
- -i test/all-in-place.ok || die
- sed \
- '2iexit 80' \
- -i test/ps-{alt-,flate-,}roundtrip.test || die
- fi
-
- # Do not test png if not built
- if ! use png ; then
- sed -E \
- -e 's:(pamtopng|pngtopam|pnmtopng).*::' \
- -i test/all-in-place.{ok,test} || die
- sed \
- -e '/^$/d' \
- -i test/all-in-place.ok || die
-
- sed -E \
- -e 's:(pamrgbatopng|pngtopnm).*::' \
- -i test/legacy-names.{ok,test} || die
- sed \
- -e '/^$/d' \
- -i test/legacy-names.ok || die
- sed \
- -e 's:png-roundtrip.*::' \
- -e 's:winicon-roundtrip.*::' \
- -i test/Test-Order || die
- fi
-
- # pbmtext-iso88591 requires LC_ALL=en_US.iso88591, not available on musl
- # pbmtext-utf8 requires locale, not available on musl
- # ppmpat-random and pnmindex are broken on musl
- # bug #907295
- if use elibc_musl; then
- sed \
- -e 's:pbmtext-iso88591.*::' \
- -e 's:pbmtext-utf8.*::' \
- -e 's:ppmpat-random.*::' \
- -e 's:pnmindex.*::' \
- -i 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 USERDOC
- docinto html
- dodoc -r ../userguide/*.html
-}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/
@ 2024-11-25 7:00 Viorel Munteanu
0 siblings, 0 replies; 11+ messages in thread
From: Viorel Munteanu @ 2024-11-25 7:00 UTC (permalink / raw
To: gentoo-commits
commit: 2c12cbbff28f541b3fd2eda8c78e43f891fe7440
Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 25 06:44:10 2024 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Nov 25 07:00:24 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c12cbbf
media-libs/netpbm: add 11.8.2
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
media-libs/netpbm/Manifest | 1 +
.../netpbm/files/netpbm-11.8.2-fix-C23.patch | 241 +++++++++++++++++++
media-libs/netpbm/netpbm-11.8.2.ebuild | 259 +++++++++++++++++++++
3 files changed, 501 insertions(+)
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index 37680d806ee2..0dc817942a01 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -1,2 +1,3 @@
DIST netpbm-11.2.11.tar.xz 3782252 BLAKE2B 422b9cefee2a54a9c222236935291f0c8d1f13f064f4ebd277d0f92974b9ce3d7e3d9ae6a0410d767553704a03c2de14ca8456996a53fca0f95d61f9ae72605f SHA512 3d94c0c8c25873a16c78af960c964f5756b3e7a29463f001345956acc3bf1378b0b0b4fc0c57d7388dced0979ba4e8cee0def2200092544dd96fc7d04304660b
DIST netpbm-11.8.1.tar.xz 3804004 BLAKE2B ed107d258a85c720de178a3e6488ad1b435135ec50227bb1e4ce9f3665a882a382c3a3e858e49055f88ee9bba6026b390291ad211a82299d03f41addaf93e7f9 SHA512 e4b1e8d7468fcd0233e50861e890669c788f95924edb6b6256f93b53d2ab16b7fd2c2099ca238b409fba7c764e51d54a9fbdbb22bb3bb1acf8296afdb807bd4f
+DIST netpbm-11.8.2.tar.xz 3804800 BLAKE2B 9b5bb460c2fbe73495cbb304ea0e1a2a4406838cbb4d0769d2b8147f9ee6156d93852ad36a5ea57a7437b9a1a3cc9f102271163bc4d6bbd004c42c7f81be2318 SHA512 b048b242891cbe56851b3da342de1717e1ab435a327b4eeebb83023e2e7ae57ae66a232df344b4d2b0fb12bc6abcf13d9cec392f19ff06951023ee4c002f9f17
diff --git a/media-libs/netpbm/files/netpbm-11.8.2-fix-C23.patch b/media-libs/netpbm/files/netpbm-11.8.2-fix-C23.patch
new file mode 100644
index 000000000000..c6aaf0288261
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-11.8.2-fix-C23.patch
@@ -0,0 +1,241 @@
+https://sourceforge.net/p/netpbm/code/4969/
+https://bugs.gentoo.org/943971
+
+--- a/buildtools/libopt.c
++++ b/buildtools/libopt.c
+@@ -85,18 +85,11 @@
+ # define SHLIBPREFIXLIST "lib"
+ #endif
+
++#include <stdbool.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+
+-typedef unsigned char bool;
+-#ifndef TRUE
+-#define TRUE (1)
+-#endif
+-#ifndef FALSE
+-#define FALSE (0)
+-#endif
+-
+ #ifdef DLLVERSTR
+ static const char * dllverstr = DLLVERSTR;
+ #else
+@@ -105,9 +98,9 @@
+
+ bool const explicit =
+ #ifdef EXPLICIT
+-TRUE
++true
+ #else
+-FALSE
++false
+ #endif
+ ;
+
+@@ -132,17 +125,17 @@
+ there is guaranteed always to be one null string at the end of the
+ array.
+
+- In case of error, return *errorP == TRUE and don't allocate any
+- storage. Otherwise, return *errorP = FALSE.
++ In case of error, return *errorP == true and don't allocate any
++ storage. Otherwise, return *errorP = false.
+ -----------------------------------------------------------------------------*/
+ char * prlist;
+
+ prlist = strdup(prefixlist);
+ if (prlist == NULL)
+- *errorP = TRUE;
++ *errorP = true;
+ else {
+ if (strlen(prlist) <= 0)
+- *errorP = TRUE;
++ *errorP = true;
+ else {
+ /* NOTE: Mac OS X, at least, does not have strtok_r().
+ 2001.09.24
+@@ -156,11 +149,11 @@
+ }
+ num_tokens = 0;
+ token = strtok(prlist, " ");
+- *errorP = FALSE; /* initial value */
++ *errorP = false; /* initial value */
+ while (token != NULL && num_tokens < MAX_PREFIXES && !*errorP) {
+ parsed_prefixes[num_tokens] = strdup (token);
+ if (parsed_prefixes[num_tokens] == NULL)
+- *errorP = TRUE;
++ *errorP = true;
+ num_tokens++;
+ token = strtok(NULL, " ");
+ }
+@@ -167,7 +160,7 @@
+ for (i = num_tokens; i < MAX_PREFIXES + 1 && !*errorP; i++) {
+ parsed_prefixes[i] = strdup("");
+ if (parsed_prefixes[i] == NULL)
+- *errorP = TRUE;
++ *errorP = true;
+ }
+ }
+ if (*errorP) {
+@@ -195,7 +188,7 @@
+ (The prefix always starts at the beginning of the filename).
+
+ Iff we don't find a valid library name prefix, return *prefix_good_p
+- == FALSE.
++ == false.
+
+ The list of valid prefixes is compiled in as the blank-delimited
+ string which is the value of the SHLIBPREFIXLIST macro.
+@@ -232,7 +225,7 @@
+ i = 0; /* start with the first entry in shlibprefixlist[] */
+ prefix_length = 0; /* initial value */
+ prefix = shlibprefixlist[i];
+- prefix_good = FALSE; /* initial value */
++ prefix_good = false; /* initial value */
+ while ( (*prefix != '\0' ) && !prefix_good ) {
+ /* stop condition: shlibprefixlist has MAX_PREFIXES+1 entries.
+ * we only ever put tokens in the 0..MAX_PREFIXES-1 positions.
+@@ -243,7 +236,7 @@
+ */
+ prefix_length = strlen(prefix);
+ if (strncmp(filename, prefix, prefix_length) == 0) {
+- prefix_good = TRUE;
++ prefix_good = true;
+ /* at this point, prefix is pointing to the correct
+ * entry, and prefix_length has the correct value.
+ * When we bail out of the while loop because of the
+@@ -280,16 +273,16 @@
+
+ E.g. for "libxyz.so", return "xyz".
+
+- return *valid_library_p == TRUE iff 'filename' validly names a library
++ return *valid_library_p == true iff 'filename' validly names a library
+ that can be expressed in a -l linker option.
+
+- return *static_p == TRUE iff 'filename' indicates a static library.
+- (but undefined if *valid_library_p != TRUE).
++ return *static_p == true iff 'filename' indicates a static library.
++ (but undefined if *valid_library_p != true).
+
+- return *error_p == TRUE iff some error such as out of memory prevents
++ return *error_p == true iff some error such as out of memory prevents
+ parsing.
+
+- Do not allocate any memory if *error_p == TRUE or *valid_library_p == FALSE.
++ Do not allocate any memory if *error_p == true or *valid_library_p == false.
+ -----------------------------------------------------------------------------*/
+ char *lastdot;
+ /* Pointer to last period in 'filename'. Null if none */
+@@ -306,21 +299,21 @@
+ /* This filename doesn't have any suffix, so we don't understand
+ it as a library filename.
+ */
+- *valid_library_p = FALSE;
+- *error_p = FALSE;
++ *valid_library_p = false;
++ *error_p = false;
+ } else {
+ unsigned int prefix_length;
+ bool prefix_good;
+
+ if (strcmp(lastdot + 1, "a") == 0)
+- *static_p = TRUE;
++ *static_p = true;
+ else
+- *static_p = FALSE;
++ *static_p = false;
+
+ parse_prefix(filename, &prefix_good, &prefix_length, error_p);
+ if (!*error_p) {
+ if (!prefix_good) {
+- *valid_library_p = FALSE;
++ *valid_library_p = false;
+ } else {
+ /* Extract everything between <prefix> and "." as
+ the library name root.
+@@ -329,7 +322,7 @@
+
+ libname = strdup(filename + prefix_length);
+ if (libname == NULL)
+- *error_p = TRUE;
++ *error_p = true;
+ else {
+ libname[lastdot - filename - prefix_length] = '\0';
+ if (strlen(dllverstr) > 0) {
+@@ -342,10 +335,10 @@
+ }
+ }
+ if (strlen(libname) == 0) {
+- *valid_library_p = FALSE;
++ *valid_library_p = false;
+ strfree(libname);
+ } else
+- *valid_library_p = TRUE;
++ *valid_library_p = true;
+ }
+ *libname_p = libname;
+ }
+@@ -378,14 +371,14 @@
+ */
+ *filename_p = strdup(filepath);
+ if (*filename_p == NULL)
+- *error_p = TRUE;
++ *error_p = true;
+ else {
+ directory = strdup("");
+ if (directory == NULL) {
+- *error_p = TRUE;
++ *error_p = true;
+ strfree(*filename_p);
+ } else
+- *error_p = FALSE;
++ *error_p = false;
+ }
+ } else {
+ /* Split the string at the slash we just found, into filename and
+@@ -393,14 +386,14 @@
+ */
+ *filename_p = strdup(lastslash+1);
+ if (*filename_p == NULL)
+- *error_p = TRUE;
++ *error_p = true;
+ else {
+ directory = strdup(filepath);
+ if (directory == NULL) {
+- *error_p = TRUE;
++ *error_p = true;
+ strfree(*filename_p);
+ } else {
+- *error_p = FALSE;
++ *error_p = false;
+ directory[lastslash - filepath] = '\0';
+ }
+ }
+@@ -504,12 +497,12 @@
+ char outputLine[1024];
+
+ strcpy(outputLine, ""); /* initial value */
+- runtime = FALSE; /* initial value */
+- error = FALSE; /* no error yet */
++ runtime = false; /* initial value */
++ error = false; /* no error yet */
+
+ for (arg = 1; arg < argc && !error; arg++) {
+ if (strcmp(argv[arg], "-runtime") == 0)
+- runtime = TRUE;
++ runtime = true;
+ else if (strcmp(argv[arg], "-quiet") == 0) {
+ /* Doesn't do anything today */
+ } else {
+@@ -519,7 +512,7 @@
+ if (!error) {
+ if (strlen(outputLine) + strlen(options) + 1 + 1 >
+ sizeof(outputLine))
+- error = TRUE;
++ error = true;
+ else {
+ strcat(outputLine, " ");
+ strcat(outputLine, options);
diff --git a/media-libs/netpbm/netpbm-11.8.2.ebuild b/media-libs/netpbm/netpbm-11.8.2.ebuild
new file mode 100644
index 000000000000..98f2becc519a
--- /dev/null
+++ b/media-libs/netpbm/netpbm-11.8.2.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2024 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 11.2.xx) on SLOT "0/stable"
+# and the advanced branch of their svn (currently versions 11.8.yy) 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
+
+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/advanced"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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
+# 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
+ app-alternatives/lex
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/netpbm-10.86.21-build.patch
+ "${FILESDIR}"/netpbm-11.0.0-misc-deps.patch
+ "${FILESDIR}"/netpbm-11.1.0-fix-clang-O2.patch
+ "${FILESDIR}"/netpbm-11.6.1-incompatible-pointer-types.patch
+ "${FILESDIR}"/netpbm-11.7.2-lto.patch
+ "${FILESDIR}"/netpbm-11.8.2-fix-C23.patch
+)
+
+netpbm_libtype() {
+ case ${CHOST} in
+ *-darwin*) echo dylib;;
+ *) echo unixshared;;
+ esac
+}
+
+netpbm_libsuffix() {
+ local suffix=$(get_libname)
+ echo ${suffix//\.}
+}
+
+netpbm_ldshlib() {
+ case ${CHOST} in
+ *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';;
+ *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';;
+ esac
+}
+
+netpbm_config_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 '/SUPPORT_SUBDIRS/s:urt::' -i 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 \
+ -e '/^importinc:/s|^|importinc:\nmanual_|' \
+ -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
+ -i common.mk || die
+ sed \
+ -e '/%.c/s: importinc$::' \
+ -i common.mk lib/Makefile lib/util/Makefile || die
+ sed \
+ -e 's:pkg-config:$(PKG_CONFIG):' \
+ -i GNUmakefile converter/other/Makefile other/pamx/Makefile || die
+
+ # The postscript knob is currently bound up with a fork test.
+ if ! use postscript ; then
+ sed \
+ -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \
+ -i converter/other/Makefile generator/Makefile || die
+ sed -r \
+ -e 's:(pbmtextps|pnmtops|pstopnm).*::' \
+ -i test/all-in-place.{ok,test} || die
+ sed \
+ -e 's:lps-roundtrip.*::' \
+ -e 's:pbmtextps-dump.*::' \
+ -e 's:pbmtextps.*::' \
+ -i test/Test-Order || die
+ sed \
+ -e '/^$/d' \
+ -i test/all-in-place.ok || die
+ sed \
+ '2iexit 80' \
+ -i test/ps-{alt-,flate-,}roundtrip.test || die
+ fi
+
+ # Do not test png if not built
+ if ! use png ; then
+ sed -E \
+ -e 's:(pamtopng|pngtopam|pnmtopng).*::' \
+ -i test/all-in-place.{ok,test} || die
+ sed \
+ -e '/^$/d' \
+ -i test/all-in-place.ok || die
+
+ sed -E \
+ -e 's:(pamrgbatopng|pngtopnm).*::' \
+ -i test/legacy-names.{ok,test} || die
+ sed \
+ -e '/^$/d' \
+ -i test/legacy-names.ok || die
+ sed \
+ -e 's:png-roundtrip.*::' \
+ -e 's:winicon-roundtrip.*::' \
+ -i test/Test-Order || die
+ fi
+
+ # pbmtext-iso88591 requires LC_ALL=en_US.iso88591, not available on musl
+ # pbmtext-utf8 requires locale, not available on musl
+ # ppmpat-random and pnmindex are broken on musl
+ # bug #907295
+ if use elibc_musl; then
+ sed \
+ -e 's:pbmtext-iso88591.*::' \
+ -e 's:pbmtext-utf8.*::' \
+ -e 's:ppmpat-random.*::' \
+ -e 's:pnmindex.*::' \
+ -i 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 USERDOC
+ docinto html
+ dodoc -r ../userguide/*.html
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-11-25 7:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-31 8:20 [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/, media-libs/netpbm/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-11-25 7:00 Viorel Munteanu
2024-11-25 7:00 Viorel Munteanu
2024-02-16 14:40 Viorel Munteanu
2023-08-03 5:13 Viorel Munteanu
2023-01-02 16:30 Viorel Munteanu
2022-10-31 18:49 Viorel Munteanu
2022-09-01 2:16 Sam James
2021-10-20 1:14 Sam James
2021-05-10 6:24 Joonas Niilola
2016-11-27 18:33 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox