freebsd-ports/print/ghostscript9-agpl-base/files/patch-Makefile.in
Hiroki Sato 27470e1676 - Split ghostscript into X11-independent and -dependent parts:
* print/ghostscript{7,8,9,9-agpl}-base

   Installs Ghostscript binary, libgs, and related files.
   These ports do not depend on X11 libraries (i.e. x11* devices
   are not available).  USES=ghostscript will set dependency on
   one of them depending on GHOSTSCRIPT_DEFAULT.

   The default device is set to "display" or "bbox".

 * print/ghostscript{7,8,9,9-agpl}-x11

   Installs a shared library which provides X11 support to
   the installed Ghostscript binaries.  x11* devices will be
   enabled when the library is available.

   This depends on *-base (RUN_DEPENDS).  USES=ghostscript:x11
   will set dependency on one of them.

- Fix integer overflow reported as CVE-2015-3228.

- Update Uses/ghostscript.mk:

 * Add x11 keyword.  nox11 keyword is now obsolete.

 * Use packagename in *_DEPENDS line to prevent relationship between
   -base and -x11 packages from being broken.

- Fix x11/nox11 keyword and bump PORTREVISION in ports using
  USES=ghostscript to update dependency of pre-compiled packages.
2015-08-22 17:48:35 +00:00

144 lines
4 KiB
Text

--- Makefile.in.orig 2014-03-26 21:53:48.000000000 +0900
+++ Makefile.in 2014-11-23 17:01:12.000000000 +0900
@@ -52,9 +52,9 @@
# the directories also define the default search path for the
# initialization files (gs_*.ps) and the fonts.
-INSTALL = $(GLSRCDIR)/instcopy -c
-INSTALL_PROGRAM = $(INSTALL) -m 755
-INSTALL_DATA = $(INSTALL) -m 644
+INSTALL_PROGRAM = ${BSD_INSTALL_PROGRAM}
+INSTALL_SCRIPT = ${BSD_INSTALL_SCRIPT}
+INSTALL_DATA = ${BSD_INSTALL_DATA}
INSTALL_SHARED = @INSTALL_SHARED@
prefix = @prefix@
@@ -199,7 +199,7 @@
# some older JPEG streams that violate the standard. If the JPEG
# library built from local sources, the patch will be applied.
-SHARE_JPEG=@SHARE_LIBJPEG@
+SHARE_JPEG=1
JPEG_NAME=jpeg
# Define the directory where the PNG library sources are stored,
@@ -207,12 +207,12 @@
# You may need to change this if the libpng version changes.
# See png.mak for more information.
-SHARE_LIBPNG=@SHARE_LIBPNG@
+SHARE_LIBPNG=1
PNGSRCDIR=@LIBPNGDIR@
LIBPNG_NAME=png
# libtiff
-SHARE_LIBTIFF=@SHARE_LIBTIFF@
+SHARE_LIBTIFF=1
TIFFSRCDIR=@LIBTIFFDIR@
TIFFCONFDIR=@LIBTIFFCONFDIR@
TIFFPLATFORM=unix
@@ -222,7 +222,7 @@
# Define the directory where the zlib sources are stored.
# See zlib.mak for more information.
-SHARE_ZLIB=@SHARE_ZLIB@
+SHARE_ZLIB=1
ZSRCDIR=@ZLIBDIR@
#ZLIB_NAME=gz
ZLIB_NAME=z
@@ -249,7 +249,7 @@
JPX_LIB=@JPX_DECODER@
SHARE_JPX=@SHARE_JPX@
JPXSRCDIR=@JPXDIR@
-JPX_CFLAGS=@JPX_AUTOCONF_CFLAGS@
+JPX_CFLAGS=@JPX_AUTOCONF_CFLAGS@ -ffast-math -DOPJ_STATIC -std=c99
# uncomment the following three lines and one of the last two to
# compile in the Luratech lwf_jp2 codec
@@ -336,7 +336,7 @@
# Define the added flags for standard, debugging, profiling
# and shared object builds.
-CFLAGS_STANDARD=@OPT_CFLAGS@
+CFLAGS_STANDARD?=@OPT_CFLAGS@
CFLAGS_DEBUG=@DBG_CFLAGS@
CFLAGS_PROFILE=-pg @OPT_CFLAGS@
CFLAGS_SO=@DYNAMIC_CFLAGS@
@@ -389,8 +389,8 @@
# Solaris may need -lnsl -lsocket -lposix4.
# (Libraries required by individual drivers are handled automatically.)
-EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@
-AUXEXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @AUX_SHARED_ZLIB@
+EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ -Wl,-export-dynamic
+AUXEXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @AUX_SHARED_ZLIB@ -Wl,-export-dynamic
# Define the standard libraries to search at the end of linking.
# Most platforms require -lpthread for the POSIX threads library;
@@ -434,7 +434,7 @@
# the pthread library. Otherwise use SYNC=nosync
#SYNC=posync
#SYNC=nosync
-SYNC=@SYNC@
+SYNC=nosync
# programs we use
RM=rm -f
@@ -528,28 +528,27 @@
#DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev
#DEVICE_DEVS21=$(DD)spotcmyk.dev $(DD)devicen.dev $(DD)xcf.dev $(DD)psdcmyk.dev $(DD)psdrgb.dev $(DD)psdcmykog.dev $(DD)fpng.dev
DEVICE_DEVS=$(DISPLAY_DEV) @X11_DEVS@
-DEVICE_DEVS1=@F_DEVS@
-DEVICE_DEVS2=@P_DEVS@
-DEVICE_DEVS3=@CUPS_DEVS@
-DEVICE_DEVS4=@IJS_DEVS@
-DEVICE_DEVS5=@OMNIDEVS@
-DEVICE_DEVS6=@PNG_DEVS@
-DEVICE_DEVS7=@JBIG2_DEVS@
-DEVICE_DEVS8=
-DEVICE_DEVS9=@XPS_DEVS@
-DEVICE_DEVS10=
-DEVICE_DEVS11=
-DEVICE_DEVS12=
-DEVICE_DEVS13=
-DEVICE_DEVS14=
-DEVICE_DEVS15=
-DEVICE_DEVS16=
-DEVICE_DEVS17=
-DEVICE_DEVS18=
-DEVICE_DEVS19=
-DEVICE_DEVS20=
-DEVICE_DEVS21=
-
+#DEVICE_DEVS1=@F_DEVS@
+#DEVICE_DEVS2=@P_DEVS@
+#DEVICE_DEVS3=@CUPS_DEVS@
+#DEVICE_DEVS4=@IJS_DEVS@
+#DEVICE_DEVS5=@OMNIDEVS@
+#DEVICE_DEVS6=@PNG_DEVS@
+#DEVICE_DEVS7=@JBIG2_DEVS@
+#DEVICE_DEVS8=
+#DEVICE_DEVS9=@XPS_DEVS@
+#DEVICE_DEVS10=
+#DEVICE_DEVS11=
+#DEVICE_DEVS12=
+#DEVICE_DEVS13=
+#DEVICE_DEVS14=
+#DEVICE_DEVS15=
+#DEVICE_DEVS16=
+#DEVICE_DEVS17=
+#DEVICE_DEVS18=
+#DEVICE_DEVS19=
+#DEVICE_DEVS20=
+#DEVICE_DEVS21=
# Shared library target to build.
GS_SHARED_OBJS=@DYNAMIC_DEVS@
@@ -592,6 +591,7 @@
# ---------------- End of platform-specific section ---------------- #
INSTALL_CONTRIB=@INSTALL_CONTRIB@
+include $(GLSRCDIR)/drivers.mak
include $(GLSRCDIR)/unixhead.mak
include $(GLSRCDIR)/gs.mak
include $(GLSRCDIR)/trio.mak