Update of /cvsroot/fink/dists/10.7/stable/main/finkinfo/graphics In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20539
Added Files: netpbm11-shlibs.info netpbm11-shlibs.patch netpbm11-shlibs_testrandom.patch netpbm11-shlibs_vasprintf.patch Log Message: new pkg netpbm11 so that netpbm is available on > 10.8 --- NEW FILE: netpbm11-shlibs.info --- Package: netpbm11-shlibs Version: 10.63.01 Revision: 1 BuildDepends: << fink (>= 0.30.0), fink-package-precedence, libiconv-dev, libjasper.1, libjbig, libjpeg9, libpng16, libtiff5, libxml2 << Conflicts: netpbm (<< 9.25-1) Source: http://www.snaggledworks.com/fink/src/netpbm-%v.tar.bz2 Source-MD5: cb3ba5df38090b5964f1ec6531a0008a Source-Checksum: SHA1(1d2daa089027c7475237b9b2ef0af54d7d3e7a7e) #NoSetMAKEFLAGS: true #NoSetLDFLAGS: true #SetLIBRARY_PATH: %p/lib PatchFile: %n.patch PatchFile-MD5: 2567d5df273bab53aa4c3f085574a5a9 PatchFile2: %n_testrandom.patch PatchFile2-MD5: 747fc168453de4cc9ec33e7b9f9f283b # fixed in 10.63.02 (r PatchFile3: %n_vasprintf.patch PatchFile3-MD5: b9b080b96b46bee81a514bfdc23cd32f # fixed in 10.63.0? PatchScript: << sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1 cat config.mk.in Makefile.config.fink >config.mk patch -p0 < %{PatchFile2} patch -p0 < %{PatchFile3} << CompileScript: << make fink-package-precedence --depfile-ext='\.d' --prohibit-bdep=netpbm,netpbm10,netpbm11 . << InfoTest: << TestDepends: gawk ### can't run test on just built files, so have to make the internal ### package in InstallScript, and then make the tests. So touch this ### file to say we need to 'make check' in install script. TestScript: touch %b/INSTALL_MAKE_CHECK << InstallScript: << #!/bin/sh -ev # pkgdir = where 'make package' sends everything # resultdir = test results location on 'make check' make package pkgdir=`pwd`/package resultdir=`pwd`/test-out SYMLINK='ln -s' # run tests now if needed if [ -f %b/INSTALL_MAKE_CHECK ]; then # ppmhist.test fails, so disable until a solution is found. perl -pi -e 's|ppmhist.test|# ppmhist.test|g' %b/test/Test-Order chmod u+x %b/test/*.test export DYLD_LIBRARY_PATH=%b/package/lib make check pkgdir=`pwd`/package resultdir=`pwd`/test-out || exit 2 fi install -d -m 755 %i/share %i/share/netpbm printf "package\n%i\n\n\n\n%i/share/netpbm\n\n\n\n" | ./installnetpbm rm -rf %i/share/man/web mv %i/bin/doc.url %i/share/netpbm perl -pi -e 's|%i|%p|g' %i/lib/pkgconfig/netpbm.pc << SplitOff: << Package: netpbm-bin Depends: << %N (= %v-%r), libiconv, libjasper.1-shlibs, libjbig-shlibs, libjpeg9-shlibs, libpng16-shlibs, libtiff5-shlibs, libxml2-shlibs << # Replaces netpbm10 because man3 and man5 dirs were previously installed # in the wrong SplitOff. Replaces: netpbm10 (<< 10.47.44-2) Files: << bin share/man/man1 share/man/man5 share/netpbm << DocFiles: README doc/* << SplitOff2: << Package: netpbm11 Depends: %N (= %v-%r) Conflicts: << netpbm, netpbm10, netpbm11 << # Replaces netpbm-bin because man3 and man5 dirs were previously installed # in the wrong SplitOff. Replaces: << netpbm-bin (<< 10.47.44-2), netpbm, netpbm10, netpbm11 << BuildDependsOnly: True Files: << include share/man/man3 lib/libnetpbm.dylib lib/pkgconfig << DocFiles: README doc/* << Shlibs: %p/lib/libnetpbm.11.dylib 12.0.0 %n (>= 10.62.07-1) DocFiles: README doc/* Description: Graphics manipulation programs and libraries DescPort: << Security patches thanks to Tomoaki Okayama: CVE-2005-2978: netpbm-10.26.12-pnmtopng-CAN-2005-2978.patch (from SUSE) CVE-2005-3662: netpbm-10.26.12-pnmtopng-overflow.patch (from SUSE) << License: OSI-Approved Homepage: http://netpbm.sourceforge.net Maintainer: Hanspeter Niederstrasser <nie...@users.sourceforge.net> DescPackaging: << Tarball generated with these commands: svn checkout -r 1974 http://svn.code.sf.net/p/netpbm/code/advanced/ netpbm-10.63.01 tar cfj netpbm-10.63.01.tar.bz2 netpbm-10.63.01 nieder: Change from 'stable' to 'advanced' trees, which leads to a libN=11 bump. Data files are put into %p/share/netpbm and belong to -bin SplitOff. This matches Debian's layout. PatchFile2 from svn r1976, which fixes these errors: unrecognized option '--testrandom'. Recognized options are: -randomseed -maxval PatchFile3 simplified from r1993/4 and email with upstream. << --- NEW FILE: netpbm11-shlibs.patch --- diff -ruN netpbm-10.63.01-orig/Makefile.config.fink netpbm-10.63.01/Makefile.config.fink --- netpbm-10.63.01-orig/Makefile.config.fink 1969-12-31 19:00:00.000000000 -0500 +++ netpbm-10.63.01/Makefile.config.fink 2013-07-23 07:52:54.000000000 -0400 @@ -0,0 +1,22 @@ +# +# Configuration for fink +# Copied from a manual run of ./configure (plus some additions) + +DEFAULT_TARGET = nonmerge +NETPBMLIBTYPE = dylib +NETPBMLIBSUFFIX = dylib +STATICLIB_TOO = n +NETPBMLIB_RUNTIME_PATH = @PREFIX@/lib +CC = cc -no-cpp-precomp +CFLAGS = -O3 -ffast-math -pedantic -fno-common -Wall -Wno-uninitialized -Wmissing-declarations -Wimplicit -Wwrite-strings -Wmissing-prototypes -Wundef -Wno-unknown-pragmas -MD +CFLAGS_SHLIB = -fno-common +LDSHLIB = -dynamiclib -install_name $(NETPBMLIB_RUNTIME_PATH)/libnetpbm.$(MAJ).dylib -compatibility_version $$(($(MAJ)+1)) -current_version $$(($(MAJ)+1)).$(MIN) +LINKERISCOMPILER = Y +CFLAGS_SHLIB += -fPIC +TIFFLIB = libtiff.dylib +JPEGLIB = libjpeg.dylib +PNGLIB = libpng.dylib +ZLIB = libz.dylib +JBIGLIB = libjbig.dylib +JASPERLIB = libjasper.dylib + diff -ruN netpbm-10.63.01-orig/buildtools/installnetpbm.pl netpbm-10.63.01/buildtools/installnetpbm.pl --- netpbm-10.63.01-orig/buildtools/installnetpbm.pl 2013-07-23 07:45:39.000000000 -0400 +++ netpbm-10.63.01/buildtools/installnetpbm.pl 2013-07-23 08:02:43.000000000 -0400 @@ -120,7 +120,7 @@ } elsif ($ENV{OSTYPE} && $ENV{OSTYPE} eq "msdosdjgpp") { $default = "/dev/env/DJDIR"; } else { - $default = "/usr/local/netpbm"; + $default = "@PREFIX@"; } my $response = prompt("install prefix", $default); @@ -766,7 +766,7 @@ my $manDir; while (!$manDir) { - my $default = "$prefix/man"; + my $default = "$prefix/share/man"; my $response = prompt("man page directory", $default); @@ -965,9 +965,9 @@ print("\n"); - removeObsoleteManPage($manDir); +# removeObsoleteManPage($manDir); - makeInManwebPath("$manDir/web"); +# makeInManwebPath("$manDir/web"); $$mandirR = $manDir; } diff -ruN netpbm-10.63.01-orig/converter/other/pnmtopng.c netpbm-10.63.01/converter/other/pnmtopng.c --- netpbm-10.63.01-orig/converter/other/pnmtopng.c 2013-07-23 07:45:48.000000000 -0400 +++ netpbm-10.63.01/converter/other/pnmtopng.c 2013-07-23 08:04:49.000000000 -0400 @@ -529,7 +529,7 @@ unsigned int * const bestMatchP) { unsigned int paletteIndex; - unsigned int bestIndex; + unsigned int bestIndex = 0; unsigned int bestMatch; assert(paletteSize > 0); @@ -1598,9 +1598,9 @@ colorhist_vector chv; unsigned int colors; - gray * alphas_of_color[MAXPALETTEENTRIES]; + gray * alphas_of_color[MAXPALETTEENTRIES + 1]; unsigned int alphas_first_index[MAXPALETTEENTRIES]; - unsigned int alphas_of_color_cnt[MAXPALETTEENTRIES]; + unsigned int alphas_of_color_cnt[MAXPALETTEENTRIES + 1]; getChv(ifP, rasterPos, cols, rows, maxval, format, MAXCOLORS, &chv, &colors); @@ -2651,7 +2651,7 @@ /* The color part of the color/alpha palette passed to the PNG compressor */ - unsigned int paletteSize; + unsigned int paletteSize = MAXCOLORS; gray transPnm[MAXCOLORS]; png_byte trans[MAXCOLORS]; diff -ruN netpbm-10.63.01-orig/pm_config.in.h netpbm-10.63.01/pm_config.in.h --- netpbm-10.63.01-orig/pm_config.in.h 2013-07-23 07:45:53.000000000 -0400 +++ netpbm-10.63.01/pm_config.in.h 2013-07-23 08:06:14.000000000 -0400 @@ -60,9 +60,9 @@ ** hex and decimal forms to specify colors (see ppm/pgmtoppm.1 for details). */ #define RGB_DB_PATH \ -"/usr/share/netpbm/rgb.txt:" \ +"@PREFIX@/share/netpbm/rgb.txt:" \ "/usr/lib/X11/rgb.txt:" \ -"/usr/share/X11/rgb.txt:" \ +"/usr/X11/share/X11/rgb.txt:" \ "/usr/X11R6/lib/X11/rgb.txt" /* CONFIGURE: This is the name of an environment variable that tells diff -uNr netpbm-10.62.02/test/Execute-Tests netpbm-10.62.02.fink/test/Execute-Tests --- netpbm-10.62.02/test/Execute-Tests 2013-07-21 10:22:52.000000000 -0400 +++ netpbm-10.62.02.fink/test/Execute-Tests 2013-07-21 12:31:26.000000000 -0400 @@ -63,7 +63,7 @@ if [ -z $tmpdir ] then - tmpdir_created=$(mktemp -d) || exit 1; + tmpdir_created=$(mktemp -d -t netpbm) || exit 1; export tmpdir=${tmpdir_created} else tmpdir_created=""; @@ -177,7 +177,7 @@ echo ================== echo "All tests done." -date -R -u +date -u # Exit with status 0 if all supported tests succeeded, 1 otherwise. --- NEW FILE: netpbm11-shlibs_testrandom.patch --- Property changes on: test/pamchannel.test ___________________________________________________________________ Added: svn:executable + * Index: test/pgmnoise.test =================================================================== --- test/pgmnoise.test (revision 1975) +++ test/pgmnoise.test (revision 1977) @@ -5,7 +5,7 @@ # We first check whether random number generator is glibc rand(). # If not, this test is skipped. -${PBM_TESTPREFIX}pgmnoise --testrandom +testrandom case $? in 81) @@ -18,5 +18,5 @@ echo "Skipping: random number generator is not glibc." 1>&2 exit 80;; - *) exit 1;; # pgmnoise --testrandom failed + *) exit 1;; # testrandom failed esac Property changes on: test/pgmnoise.test ___________________________________________________________________ Added: svn:executable + * Index: test/ppmforge.test =================================================================== --- test/ppmforge.test (revision 1975) +++ test/ppmforge.test (revision 1977) @@ -1,11 +1,10 @@ #! /bin/bash # This script tests: ppmforge -# Also requires: pgmnoise # Use small x y values to avoid floating point issues. -${PBM_BINPREFIX}pgmnoise --testrandom --quiet +testrandom -q case $? in 81) # Test 1: Should print: 3634219838 196623 @@ -16,5 +15,5 @@ echo "Skipping: random number generator is not glibc." 1>&2 exit 80;; - *) exit 1;; # pgmnoise --testrandom failed + *) exit 1;; # testrandom failed esac Property changes on: test/ppmforge.test ___________________________________________________________________ Added: svn:executable + * Index: test/ppmrough.test =================================================================== --- test/ppmrough.test (revision 1975) +++ test/ppmrough.test (revision 1977) @@ -1,9 +1,8 @@ #! /bin/bash # This script tests: ppmrough -# Also requires: pgmnoise -${PBM_BINPREFIX}pgmnoise --testrandom --quiet +testrandom -q case $? in 81) # Should print: 378403602 30015 @@ -14,5 +13,5 @@ echo "Skipping: random number generator is not glibc." 1>&2 exit 80;; - *) exit 1;; # pgmnoise --testrandom failed + *) exit 1;; # testrandom failed esac Property changes on: test/ppmrough.test ___________________________________________________________________ Added: svn:executable + * Index: test/pgmcrater.test =================================================================== --- test/pgmcrater.test (revision 1975) +++ test/pgmcrater.test (revision 1977) @@ -1,6 +1,5 @@ #! /bin/bash # This script tests: pgmcrater -# Also requires: pgmnoise # This test is sensitive to differences in floating point math. # With GCC slight results start to appear with -number 75 in @@ -14,7 +13,7 @@ # The slight differences in the image file are not discernable by # the naked eye. -${PBM_BINPREFIX}pgmnoise --testrandom --quiet +testrandom -q case $? in 81) # Should print: 3828822912 65551 @@ -25,5 +24,5 @@ echo "Skipping: random number generator is not glibc." 1>&2 exit 80;; - *) exit 1;; # pgmnoise --testrandom failed + *) exit 1;; # testrandom failed esac Property changes on: test/pgmcrater.test ___________________________________________________________________ Added: svn:executable + * Index: test/ppmpat.test =================================================================== --- test/ppmpat.test (revision 1975) +++ test/ppmpat.test (revision 1977) @@ -1,11 +1,10 @@ #! /bin/bash # This script tests: ppmpat -# Also requires: pgmnoise # TODO: Write tests for squig and poles. It appears that they are # sensitive to differences in floating point math. -${PBM_BINPREFIX}pgmnoise --testrandom --quiet +testrandom -q case $? in 81) # Test 1. Should print: 4008533639 781 @@ -31,5 +30,5 @@ echo "Skipping: random number generator is not glibc." 1>&2 exit 80;; - *) exit 1;; # pgmnoise --testrandom failed + *) exit 1;; # testrandom failed esac Property changes on: test/gif-quant-roundtrip.test ___________________________________________________________________ Added: svn:executable + * Index: test/all-in-place.ok =================================================================== --- test/all-in-place.ok (revision 1975) +++ test/all-in-place.ok (revision 1977) @@ -324,13 +324,13 @@ thinkjettopbm: ok tifftopnm: ok wbmptopbm: ok +winicontopam: ok winicontoppm: ok xbmtopbm: ok ximtoppm: ok xpmtoppm: ok xvminitoppm: ok xwdtopnm: ok -winicontopam: ok ybmtopbm: ok yuvsplittoppm: ok yuvtoppm: ok Property changes on: test/winicon-roundtrip.test ___________________________________________________________________ Added: svn:executable + * Index: buildtools/testrandom.c =================================================================== --- buildtools/testrandom.c (revision 0) +++ buildtools/testrandom.c (revision 1977) @@ -0,0 +1,130 @@ +/*============================================================================= + testrandom +=============================================================================== + Test for the random number generator type by generating 5 values with rand() + and comparing them against values in a table. + + Currently only recognizes ISO glibc rand(). + + Options: + -q : quiet mode + -v : verbose mode : Use to generate values for new table +=============================================================================*/ +#include <stdio.h> +#include <stdlib.h> + +/* Exit values */ +#define EXIT_ERROR 1 +#define EXIT_UNKNOWN 80 +#define ISO_GLIBC 81 +/* 82-90: reserved */ + +typedef enum {QUIET=0, NORMAL=1, VERBOSE=2} VerbosityLevel; + +/* On some Sun systems RAND_MAX is not defined */ +#ifndef RAND_MAX +#define RAND_MAX 0 +#endif + +#define SEED 3791 + +static struct { + int const type; + /* Exit value for this rand() function */ + int const randMax; + /* Usually 0x7fffffff, sometimes 0x7fff */ + /* Other values are possible; 0 means undefined */ + unsigned int const res[5]; + /* Sample values returned from our tests */ + const char * const name; + /* Name for this rand() function */ +} rTable[2] = { + { ISO_GLIBC, /* glibc rand() */ + 0x7fffffff, /* 31 bits */ + { 217313873, 969144303, 1757357552, 1096307597, 818311031 }, + "ISO C glibc rand() or equivalent" }, + + /* Insert additional entries here */ + + { 0, /* terminating code */ + 0, + {0, 0, 0, 0, 0}, NULL /* unknown type */} +}; + + + +static void +parseCommandLine(int const argc, + const char * const argv[], + VerbosityLevel * const verbosityP) { + + *verbosityP = NORMAL; /* Initial value */ + + if (argc == 2) { + if (argv[1][0] == '-' && argv[1][2] == '\0') { + switch ( argv[1][1] ) { + case 'v' : *verbosityP = VERBOSE; break; + case 'q' : *verbosityP = QUIET ; break; + default : fprintf (stderr, + "Error: Unrecognized argument: %s\n", argv[1]); + exit (EXIT_ERROR); + } + } + } + if (argc > 2 ) { + fprintf (stderr, "Error: Too many arguments.\n"); + exit (EXIT_ERROR); + } +} + + + +int +main(int const argc, const char * const argv[]) { + + unsigned int i; + unsigned int res[5]; + VerbosityLevel verbosity; + + parseCommandLine(argc, argv, &verbosity); + + if (verbosity == VERBOSE) { + if (RAND_MAX > 0) + fprintf(stderr, "RAND_MAX = 0x%x (%d)\n", RAND_MAX, RAND_MAX); + else + fprintf(stderr, "RAND_MAX is undefined\n"); + } + + /* Set seed for pseudo-random number generator */ + if (verbosity == VERBOSE) + fprintf(stderr, "Generating samples. Seed=%u\n", SEED); + + srand(SEED); + + /* Generate five samples and store in array res[] */ + for (i = 0; i < 5; ++i) { + res[i] = rand(); + if (verbosity == VERBOSE) + fprintf (stderr, "%d\n",res[i]); + } + + /* Look for a match in table */ + for (i = 0; rTable[i].type != 0; ++i) { + if (rTable[i].randMax == RAND_MAX && rTable[i].res[0] == res[0] && + rTable[i].res[1] == res[1] && rTable[i].res[2] == res[2] && + rTable[i].res[3] == res[3] && rTable[i].res[4] == res[4]) { + if (verbosity != QUIET) + fprintf(stderr, + "Random number generator is %s.\n", rTable[i].name); + + exit(rTable[i].type); + } + } + /* No matches */ + if (verbosity != QUIET) + fprintf(stderr, "Random number generator is of unknown type.\n"); + exit(EXIT_UNKNOWN); +} + + + Index: buildtools/Makefile =================================================================== --- buildtools/Makefile (revision 1975) +++ buildtools/Makefile (revision 1977) @@ -9,11 +9,21 @@ MERGE_OBJECTS = # These are programs that are used by the make files: -PROGS = libopt typegen endiangen +BUILDPROGS = libopt typegen endiangen +# Ideally, this directory would not contain anything but build tools, which +# means they would all be built to run in the build environment, not the +# target environment. But we have no other convenient place for test tools, +# so we put them here and build them for the target environment. +TESTPROGS = testrandom + +PROGS = $(BUILDPROGS) $(TESTPROGS) + all: $(PROGS) -BINARIES = +PORTBINARIES = $(TESTPROGS) +BINARIES = $(PORTBINARIES) +OBJECTS = $(BINARIES:%=%.o) SCRIPTS = OMIT_BUILDTOOL_RULE = 1 @@ -36,7 +46,7 @@ typegen.o endiangen.o:%.o:%.c $(CC_FOR_BUILD) -c -o $@ $(CFLAGS_FOR_BUILD) $< -$(PROGS):%:%.o +$(BUILDPROGS):%:%.o $(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $< distclean clean: cleanlocal Property changes on: buildtools ___________________________________________________________________ Modified: svn:ignore - Makefile.depend importinc endiangen libopt typegen depend.mk + Makefile.depend importinc endiangen libopt typegen depend.mk testrandom --- NEW FILE: netpbm11-shlibs_vasprintf.patch --- Index: lib/util/vasprintf.c =================================================================== --- lib/util/vasprintf.c (revision 1982) +++ lib/util/vasprintf.c (working copy) @@ -7,7 +7,7 @@ #include "nstring.h" -#if (defined(__GLIBC__) || defined(__GNU_LIBRARY__)) +#if (defined(__GLIBC__) || defined(__GNU_LIBRARY__) || defined(__APPLE__)) #define HAVE_VASPRINTF 1 #else #define HAVE_VASPRINTF 0 ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs