pkgsrc/graphics/xv/patches/patch-ad
he 351592d780 Instead of separately integrating several different patches, instead
pull in the Jumbo patches from http://www.sonic.net/~roelofs/greg_xv.html.

As far as I can see this covers all our existing patches for added
functionality, although I cannot claim that I have tested each and
every one of them in the new version.

These patches disable a number of image formats that I think are less
common, which have potential heap overflows in the code due to in-
sufficient validation of image dimensions.

The version of the Jumbo patch used here is the 20050501 version.

Package revision bumped to nb10.
2005-08-10 16:50:18 +00:00

79 lines
1.9 KiB
Text

$NetBSD: patch-ad,v 1.9 2005/08/10 16:50:18 he Exp $
--- Imakefile.orig 2005-07-29 15:14:59.000000000 +0200
+++ Imakefile
@@ -6,13 +6,15 @@
/* if, for whatever reason, you're unable to get the JPEG library to compile
* on your machine, *COMMENT OUT* the following line
*/
-#define HaveJpeg
+/* #define HaveJpeg */
+#define UseInstalledJpeg
/* if, for whatever reason, you're unable to get the TIFF library to compile
* on your machine, *COMMENT OUT* the following line
*/
-#define HaveTiff
+/* #define HaveTiff */
+#define UseInstalledTiff
/* if, for whatever reason, you're unable to get the PDS/VICAR support
@@ -124,16 +126,30 @@ MGCSFX = -DMGCSFXDIR=\"$(MGCSFXDIR)\"
JPEG = -DDOJPEG
JPEGDIR = jpeg
LIBJPEG = $(JPEGDIR)/libjpeg.a
+DEPLIBJPEG = $(LIBJPEG)
JPEGINCLUDE = -I$(JPEGDIR)
#endif
+#ifdef UseInstalledJpeg
+JPEG = -DDOJPEG
+LIBJPEG = $(LDFLAGS) -L$(LOCALBASE)/lib -Wl,-R$(LOCALBASE)/lib -ljpeg
+JPEGINCLUDE = -I$(LOCALBASE)/include
+#endif
+
#ifdef HaveTiff
TIFF = -DDOTIFF
TIFFDIR = tiff
LIBTIFF = $(TIFFDIR)/libtiff.a
+DEPLIBTIFF = $(LIBTIFF)
TIFFINCLUDE = -I$(TIFFDIR)
#endif
+#ifdef UseInstalledTiff
+TIFF = -DDOTIFF
+LIBTIFF = -L$(LOCALBASE)/lib -ltiff -ljpeg -lz
+TIFFINCLUDE = -I$(LOCALBASE)/include
+#endif
+
#ifdef HavePDS
PDS = -DDOPDS
#endif
@@ -149,8 +165,8 @@ SYS_LIBRARIES= -lm
#endif
-DEPLIBS = $(LIBJPEG) $(LIBTIFF)
-LOCAL_LIBRARIES = $(XLIB) $(DEPLIBS)
+DEPLIBS = $(DEPLIBJPEG) $(DEPLIBTIFF)
+LOCAL_LIBRARIES = $(XLIB) $(LIBJPEG) $(LIBTIFF)
DEFINES= $(SCO) $(UNIX) $(NODIRENT) $(VPRINTF) $(TIMERS) \
$(HPUX7) $(JPEG) $(TIFF) $(PDS) $(DXWM) $(RAND) \
@@ -194,10 +210,10 @@ OBJS5= xvpictoppm.o
PROGRAMS= xv bggen vdcomp xcmap xvpictoppm
-all::
- @echo ""
- @echo " Did you remember to 'make depend' first?"
- @echo ""
+#all::
+# @echo ""
+# @echo " Did you remember to 'make depend' first?"
+# @echo ""
#if defined(HaveJpeg) || defined(HaveTiff)