From 81400706f7574b6d139d2e26f11a24b04e847933 Mon Sep 17 00:00:00 2001 From: grant Date: Sun, 21 Aug 2005 04:47:24 +0000 Subject: fix build on Solaris: - use graphics/jasper instead of built-in jasper which has little hope of building on Solaris - use putenv() instead of setenv() - fix abuse of _XOPEN_SOURCE no PKGREVISION bump as no dependency change except on Solaris, where this didn't build before. --- graphics/netpbm/Makefile | 11 ++++++++++- graphics/netpbm/distinfo | 6 ++++-- graphics/netpbm/patches/patch-aa | 37 ++++++++++++++++++++++++------------- graphics/netpbm/patches/patch-ah | 15 +++++++++++++++ graphics/netpbm/patches/patch-ai | 20 ++++++++++++++++++++ 5 files changed, 73 insertions(+), 16 deletions(-) create mode 100644 graphics/netpbm/patches/patch-ah create mode 100644 graphics/netpbm/patches/patch-ai (limited to 'graphics') diff --git a/graphics/netpbm/Makefile b/graphics/netpbm/Makefile index 2a1ba04ef88..ed9d70e1653 100644 --- a/graphics/netpbm/Makefile +++ b/graphics/netpbm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.120 2005/08/06 14:07:07 salo Exp $ +# $NetBSD: Makefile,v 1.121 2005/08/21 04:47:24 grant Exp $ DISTNAME= netpbm-10.28 CATEGORIES= graphics @@ -46,6 +46,15 @@ SUBST_FILES.bash= converter/other/anytopnm \ MAKE_ENV+= BUILD_FIASCO=N .endif +.if ${OPSYS} == "SunOS" +. include "../../graphics/jasper/buildlink3.mk" +MAKE_ENV+= JASPERLIB="${LDFLAGS} -ljasper" +MAKE_ENV+= JASPERHDR_DIR=${CPPFLAGS:Q} +.else +MAKE_ENV+= JASPERLIB='$$(INTERNAL_JASPERLIB)' +MAKE_ENV+= JASPERHDR_DIR='$$(INTERNAL_JASPERHDR_DIR)' +.endif + pre-configure: ${CP} ${WRKSRC}/Makefile.config.in ${WRKSRC}/Makefile.config diff --git a/graphics/netpbm/distinfo b/graphics/netpbm/distinfo index 1db786ade2e..740d10c5570 100644 --- a/graphics/netpbm/distinfo +++ b/graphics/netpbm/distinfo @@ -1,11 +1,13 @@ -$NetBSD: distinfo,v 1.39 2005/08/06 14:07:07 salo Exp $ +$NetBSD: distinfo,v 1.40 2005/08/21 04:47:24 grant Exp $ SHA1 (netpbm-10.28.tgz) = d7800fe932c8a44f21b109f794985209976a2ef3 RMD160 (netpbm-10.28.tgz) = b369f54352e3a4bb1515fab61aeac016a6e9f2eb Size (netpbm-10.28.tgz) = 2324750 bytes -SHA1 (patch-aa) = 92a760abe800648e76a3468d1e145b51022c01aa +SHA1 (patch-aa) = 113be91facd060cd4b788db9df30d0f1f55d6bcb SHA1 (patch-ab) = ebab5f2ec96539058a8fbd79bf7867d1a49e02fd SHA1 (patch-ac) = 07f109139bf30da22b05d00189cbb7b4a5f8f05a SHA1 (patch-ae) = 33a5be2843dd85b530f5e6ba496cd0380cd5edd1 SHA1 (patch-af) = 46628beae66aae69db29d3e06d7d751e6a0f9e68 SHA1 (patch-ag) = 155547027efb0390ac898c63bcec657fa311bbac +SHA1 (patch-ah) = 85a73499bc3f675168fce521e738389f03ffde5a +SHA1 (patch-ai) = 1d8c9585a08f96422f4180719ecc26e305929c62 diff --git a/graphics/netpbm/patches/patch-aa b/graphics/netpbm/patches/patch-aa index ee29dbc0ec3..a568e2cffff 100644 --- a/graphics/netpbm/patches/patch-aa +++ b/graphics/netpbm/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ +$NetBSD: patch-aa,v 1.32 2005/08/21 04:47:24 grant Exp $ ---- Makefile.config.in.orig 2005-01-12 21:50:04.000000000 -0600 +--- Makefile.config.in.orig 2005-05-25 06:15:26.000000000 +1000 +++ Makefile.config.in @@ -24,7 +24,7 @@ DEFAULT_TARGET = nonmerge # and skip it on those systems unless you want to debug it and fix it. @@ -20,7 +20,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ # The linker. LD = $(CC) -@@ -86,7 +86,7 @@ LD_FOR_BUILD = $(LD) +@@ -92,7 +92,7 @@ LD_FOR_BUILD = $(LD) # MAKE is set automatically by Make to what was used to invoke Make. @@ -29,7 +29,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ #Solaris: #INSTALL = /usr/ucb/install #Tru64: -@@ -98,7 +98,7 @@ INSTALL = $(SRCDIR)/buildtools/install.s +@@ -104,7 +104,7 @@ INSTALL = $(SRCDIR)/buildtools/install.s # STRIPFLAG is the option you pass to the above install program to make it # strip unnecessary information out of binaries. @@ -38,7 +38,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ # If you don't want to strip the binaries, just leave it null: #STRIPFLAG = -@@ -117,8 +117,10 @@ MANPAGE_FORMAT = nroff +@@ -123,8 +123,10 @@ MANPAGE_FORMAT = nroff AR = ar RANLIB = ranlib # IRIX, SCO don't have Ranlib: @@ -51,7 +51,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ # Solaris: # LEX = flex -e # Or just skip parts that need Lex: -@@ -204,7 +206,7 @@ EXE = +@@ -210,7 +212,7 @@ EXE = # Here, $(SONAME) resolves to the soname for the shared library being created. # The following are gcc options. This works on GNU libc systems. @@ -60,7 +60,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ # You need -nostart instead of -shared on BeOS. Though the BeOS compiler is # ostensibly gcc, it has the -nostart option, which is not mentioned in gcc # documentation and doesn't exist in at least one non-BeOS installation. -@@ -237,6 +239,18 @@ LDRELOC = NONE +@@ -243,6 +245,18 @@ LDRELOC = NONE #LDRELOC = ld --reloc #LDRELOC = ld -r @@ -79,7 +79,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ # On older systems, you have to make shared libraries out of position # independent code, so you need -fpic or fPIC here. (The rule is: if -@@ -255,11 +269,23 @@ LDRELOC = NONE +@@ -265,11 +279,23 @@ LDRELOC = NONE CFLAGS_SHLIB = # Solaris or SunOS with gcc, and NetBSD: #CFLAGS_SHLIB = -fpic @@ -104,7 +104,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ # SHLIB_CLIB is the link option to include the C library in a shared library, # normally "-lc". On typical systems, this serves no purpose. On some, # though, it causes information about which C library to use to be recorded -@@ -328,8 +354,8 @@ TIFFHDR_DIR = +@@ -338,8 +364,8 @@ TIFFHDR_DIR = #TIFFLIB = libtiff.so #TIFFHDR_DIR = /usr/include/libtiff #NetBSD: @@ -115,7 +115,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ # OSF, Tru64: #TIFFLIB = /usr/local1/DEC/lib/libtiff.so #TIFFHDR_DIR = /usr/local1/DEC/include -@@ -359,8 +385,8 @@ JPEGHDR_DIR = +@@ -369,8 +395,8 @@ JPEGHDR_DIR = #JPEGLIB = libjpeg.so #JPEGHDR_DIR = /usr/include/jpeg # Netbsd: @@ -126,7 +126,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ # OSF, Tru64: #JPEGLIB = /usr/local1/DEC/libjpeg.so #JPEGHDR_DIR = /usr/local1/DEC/include -@@ -384,8 +410,8 @@ PNGVER = +@@ -394,8 +420,8 @@ PNGVER = #PNGLIB = libpng$(PNGVER).so #PNGHDR_DIR = /usr/include/libpng$(PNGVER) # NetBSD: @@ -137,7 +137,7 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ # OSF/Tru64: #PNGLIB = /usr/local1/DEC/lib/libpng$(PNGVER).so #PNGHDR_DIR = /usr/local1/DEC/include -@@ -395,8 +421,8 @@ PNGVER = +@@ -405,8 +431,8 @@ PNGVER = # NONE for the PNG library, it doesn't matter what you specify here -- # it won't get used. @@ -148,7 +148,18 @@ $NetBSD: patch-aa,v 1.31 2005/06/30 15:58:59 minskim Exp $ #ZLIB = libz.so # The JBIG lossless image compression library (aka JBIG-KIT): -@@ -437,7 +463,7 @@ OMIT_NETWORK = +@@ -415,8 +441,8 @@ JBIGLIB = $(BUILDDIR)/converter/other/jb + JBIGHDR_DIR = $(SRCDIR)/converter/other/jbig + + # The Jasper JPEG-2000 image compression library (aka JasPer): +-JASPERLIB = $(INTERNAL_JASPERLIB) +-JASPERHDR_DIR = $(INTERNAL_JASPERHDR_DIR) ++#JASPERLIB = $(INTERNAL_JASPERLIB) ++#JASPERHDR_DIR = $(INTERNAL_JASPERHDR_DIR) + # JASPERDEPLIBS is the libraries (-l options or file names) on which + # The Jasper library depends -- i.e. what you have to link into any + # executable that links in the Jasper library. +@@ -452,7 +478,7 @@ OMIT_NETWORK = # built into the standard C library, so this can be null. This is irrelevant # if OMIT_NETWORK is "y". diff --git a/graphics/netpbm/patches/patch-ah b/graphics/netpbm/patches/patch-ah new file mode 100644 index 00000000000..fccae0e638e --- /dev/null +++ b/graphics/netpbm/patches/patch-ah @@ -0,0 +1,15 @@ +$NetBSD: patch-ah,v 1.5 2005/08/21 04:47:24 grant Exp $ + +--- converter/other/cameratopam/camera.c.orig 2005-04-12 02:23:36.000000000 +1000 ++++ converter/other/cameratopam/camera.c +@@ -18,6 +18,10 @@ + + #include "camera.h" + ++#ifdef __sun ++#define setenv(x, y, z) putenv(x"="y) ++#endif ++ + #if HAVE_INT64 + typedef int64_t INT64; + static bool const have64BitArithmetic = true; diff --git a/graphics/netpbm/patches/patch-ai b/graphics/netpbm/patches/patch-ai new file mode 100644 index 00000000000..939e276a3f9 --- /dev/null +++ b/graphics/netpbm/patches/patch-ai @@ -0,0 +1,20 @@ +$NetBSD: patch-ai,v 1.5 2005/08/21 04:47:24 grant Exp $ + +--- converter/other/cameratopam/cameratopam.c.orig 2005-04-13 02:20:46.000000000 +1000 ++++ converter/other/cameratopam/cameratopam.c +@@ -6,6 +6,7 @@ + information on copyright and licensing. + */ + ++#include + #define _XOPEN_SOURCE /* Make sure unistd.h contains swab() */ + #define _BSD_SOURCE /* Make sure string.h containst strcasecmp() */ + #include +@@ -19,7 +20,6 @@ + #include + #include + #include +-#include + + #ifdef __CYGWIN__ + #include -- cgit v1.2.3