# HG changeset patch
# User John Donoghue
# Date 1423170249 18000
#      Thu Feb 05 16:04:09 2015 -0500
# Node ID 4d5f579873aaa7e2f03da081db99cefd00abf3bb
# Parent  e23a847089274752bd35de30eadbdaaaeb291515
ghostscript: update to 9.15

* src/ghostscript-mingw-i686-makefile: update to prebuilt file for this version

* src/ghostscript.mk: update version, checksum

* src/mingw-ghostscript-1-win.patch: new file

* dist-files.mk: add src/mingw-ghostscript-1-win.patch

diff -r e23a84708927 -r 4d5f579873aa dist-files.mk
--- a/dist-files.mk	Sat Feb 14 15:32:40 2015 -0500
+++ b/dist-files.mk	Thu Feb 05 16:04:09 2015 -0500
@@ -318,6 +318,7 @@
   mingw-cfitsio-1-fixes.patch \
   mingw-epstool-1-fixes.patch \
   mingw-fontconfig-ln_s.patch \
+  mingw-ghostscript-1-win.patch \
   mingw-glib-1-fixes.patch \
   mingw-glib-2-fixes.patch \
   mingw-hdf5-1.patch \
diff -r e23a84708927 -r 4d5f579873aa src/ghostscript-mingw-i686-makefile
--- a/src/ghostscript-mingw-i686-makefile	Sat Feb 14 15:32:40 2015 -0500
+++ b/src/ghostscript-mingw-i686-makefile	Thu Feb 05 16:04:09 2015 -0500
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 Artifex Software, Inc.
+# Copyright (C) 2001-2014 Artifex Software, Inc.
 # All Rights Reserved.
 #
 # This software is provided AS-IS with no warranty, either express or
@@ -25,8 +25,11 @@
 
 BINDIR=./$(BUILDDIRPREFIX)bin
 GLSRCDIR=./base
+DEVSRCDIR=./devices
 GLGENDIR=./$(BUILDDIRPREFIX)obj
 GLOBJDIR=./$(BUILDDIRPREFIX)obj
+DEVGENDIR=./$(BUILDDIRPREFIX)obj
+DEVOBJDIR=./$(BUILDDIRPREFIX)obj
 AUXDIR=$(GLGENDIR)/aux_
 PSSRCDIR=./psi
 PSLIBDIR=./lib
@@ -77,17 +80,6 @@
 exdir=$(gsdatadir)/examples
 GS_DOCDIR=$(docdir)
 
-# Define install location for 'cups' device/filter support
-CUPSCFLAGS=
-CUPSLIBS=
-CUPSLIBDIRS=
-CUPSSERVERBIN=
-CUPSSERVERROOT=
-CUPSDATA=
-CUPSPDFTORASTER=0
-
-CUPSINSTTARGET=
-
 # Choose whether to compile the .ps initialization files into the executable.
 # See gs.mak for details.
 
@@ -150,11 +142,14 @@
 # -DHAVE_SSE2
 #       use sse2 intrinsics
 
-CAPOPT=  -DHAVE_FILE64     -DHAVE_SETLOCALE   -DHAVE_BSWAP32  -DHAVE_STRERROR
+CAPOPT=  -DHAVE_FILE64  -DHAVE_SETLOCALE -DHAVE_BSWAP32  -DHAVE_STRERROR
 
 # Define the name of the executable file.
 
 GS=gs.exe
+GS_SO_BASE=gs
+XE=.exe
+XEAUX=.exe
 
 # Define the directories for debugging and profiling binaries, relative to
 # the standard binaries.
@@ -168,10 +163,11 @@
 # in linking to a shared implementation.
 
 FT_BRIDGE=1
-SHARE_FT=0
-FTSRCDIR=freetype
-FT_CFLAGS=-Ifreetype/include
-FT_LIBS=
+SHARE_FT=1
+FTSRCDIR=./freetype
+#FT_CFLAGS=-I./freetype/include
+FT_CFLAGS=-I$(prefix)/include/freetype2
+FT_LIBS=-lfreetype
 FT_CONFIG_SYSTEM_ZLIB=
 
 # Define whether to compile in UFST. Note that freetype will/must be disabled.
@@ -197,7 +193,7 @@
 # You may need to change this if the IJG library version changes.
 # See jpeg.mak for more information.
 
-JSRCDIR=jpeg
+JSRCDIR=./jpeg
 
 # Note: if a shared library is used, it may not contain the
 # D_MAX_BLOCKS_IN_MCU patch, and thus may not be able to read
@@ -213,12 +209,13 @@
 # See png.mak for more information.
 
 SHARE_LIBPNG=1
-PNGSRCDIR=
+PNGSRCDIR=libpng
 LIBPNG_NAME=png
 
 # libtiff
 SHARE_LIBTIFF=1
-TIFFSRCDIR=
+TIFFSRCDIR=./tiff
+TIFFCONFDIR=
 TIFFPLATFORM=unix
 TIFFCONFIG_SUFFIX=
 LIBTIFF_NAME=tiff
@@ -226,7 +223,7 @@
 # Define the directory where the zlib sources are stored.
 # See zlib.mak for more information.
 
-SHARE_ZLIB=0
+SHARE_ZLIB=1
 ZSRCDIR=zlib
 #ZLIB_NAME=gz
 ZLIB_NAME=z
@@ -235,7 +232,7 @@
 # JBIG2_LIB=jbig2dec
 JBIG2_LIB=jbig2dec
 SHARE_JBIG2=0
-JBIG2SRCDIR=jbig2dec
+JBIG2SRCDIR=./jbig2dec
 JBIG2_CFLAGS=-DHAVE_STDINT_H=1
 
 # uncomment the following three lines and one of the last two to
@@ -252,8 +249,8 @@
 # and source location and configuration flags for compiling in
 JPX_LIB=openjpeg
 SHARE_JPX=0
-JPXSRCDIR=openjpeg
-JPX_CFLAGS=-DUSE_OPENJPEG_JP2 -D"memalign(a,b)=malloc(b)"
+JPXSRCDIR=./openjpeg
+JPX_CFLAGS=-D"memalign(a,b)=malloc(b)" -DUSE_JPIP -DUSE_OPENJPEG_JP2  -DOPJ_HAVE_INTTYPES_H=1  
 
 # uncomment the following three lines and one of the last two to
 # compile in the Luratech lwf_jp2 codec
@@ -274,7 +271,7 @@
 LCMSSRCDIR=
 LCMS2SRCDIR=lcms2
 LCMS_CFLAGS=
-LCMS2_CFLAGS= 
+LCMS2_CFLAGS=
 
 # Which CMS are we using?
 # Options are currently lcms or lcms2
@@ -289,18 +286,31 @@
 IJSSRCDIR=src
 IJSEXECTYPE=unix
 
+# Define install location for 'cups' device/filter support
+CUPSLIBS=
+CUPSLIBDIRS=
+CUPSSERVERBIN=
+CUPSSERVERROOT=
+CUPSDATA=
+CUPSPDFTORASTER=0
 
 SHARE_LCUPS=1
 LCUPS_NAME=cups
-LCUPSSRCDIR=cups
+LCUPSSRCDIR=./cups
 LCUPSBUILDTYPE=
 CUPS_CC=$(CC)
 
 SHARE_LCUPSI=1
 LCUPSI_NAME=cupsimage
-LCUPSISRCDIR=cups
+LCUPSISRCDIR=./cups
 CUPS_CC=$(CC)
 
+CUPSCFLAGS= -DSHARE_LCUPS=$(SHARE_LCUPS) -DSHARE_LCUPSI=$(SHARE_LCUPSI)
+
+TRIOSRCDIR=./trio
+AC_TRIO_CFLAGS=    
+TRIO_CFLAGS=$(TRIO_XCFLAGS) $(AC_TRIO_CFLAGS)
+SHARE_TRIO=0
 
 # Define how to build the library archives.  (These are not used in any
 # standard configuration.)
@@ -323,7 +333,7 @@
 CCAUXLD=$(CCAUX)
 
 # Define the default gcc flags.
-GCFLAGS=  -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_INTTYPES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long long"  -DNOCONTRIB -DUSE_LIBICONV_GNU
+GCFLAGS=-Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=2 -DHAVE_DIRENT_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_INTTYPES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -DNOCONTRIB -DUSE_LIBICONV_GNU -DGS_NO_UTF8=1 -DHAVE_FSEEKO=1
 
 # Define the added flags for standard, debugging, profiling 
 # and shared object builds.
@@ -370,7 +380,9 @@
 # AC_LDFLAGS from autoconf
 AC_LDFLAGS=
 
-LDFLAGS= $(AC_LDFLAGS) $(XLDFLAGS)
+LDFLAGS=$(AC_LDFLAGS) $(XLDFLAGS)
+
+LDFLAGS_SO=-shared  -Wl,--out-implib=$(BINDIR)/lib$(GS_SO_BASE).dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import
 
 # Define any extra libraries to link into the executable.
 # ISC Unix 2.2 wants -linet.
@@ -379,8 +391,8 @@
 # Solaris may need -lnsl -lsocket -lposix4.
 # (Libraries required by individual drivers are handled automatically.)
 
-EXTRALIBS=$(XTRALIBS) -lm  -liconv   
-AUXEXTRALIBS=$(XTRALIBS) -lm
+EXTRALIBS=$(XTRALIBS) -lm  -liconv -lfreetype
+AUXEXTRALIBS=$(XTRALIBS) -lm -lz
 
 # Define the standard libraries to search at the end of linking.
 # Most platforms require -lpthread for the POSIX threads library;
@@ -437,7 +449,9 @@
 # on virtually every Unix-a-like system, this is "so",
 # but Apple just had to be different, so it's now set
 # by configure
-DYNANIC_LIB_EXT =       so
+SO_LIB_EXT=
+DLL_EXT=.dll
+SO_LIB_VERSION_SEPARATOR=-
 
 #CAIRO_CFLAGS	=	@CAIRO_CFLAGS@
 #CAIRO_LIBS	=	@CAIRO_LIBS@
@@ -446,11 +460,11 @@
 
 # Choose the language feature(s) to include.  See gs.mak for details.
 
-FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev $(PSD)jbig2.dev $(PSD)jpx.dev 
+FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev $(PSD)jbig2.dev $(PSD)jpx.dev $(GLD)ramfs.dev
 #FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev
 #FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(GLD)pipe.dev
 # The following is strictly for testing.
-FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)stocht.dev $(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev $(PSD)jbig2.dev $(PSD)jpx.dev 
+FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)stocht.dev $(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev $(PSD)jbig2.dev $(PSD)jpx.dev $(GLD)ramfs.dev
 #FEATURE_DEVS=$(FEATURE_DEVS_ALL)
 
 # The list of resources to be included in the %rom% file system.
@@ -503,26 +517,26 @@
 #DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev
 #DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
 #DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiff48nc.dev $(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiff64nc $(DD)tiffsep.dev $(DD)tiffsep1.dev
-#DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
+#DEVICE_DEVS12=$(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
 #DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev
 #DEVICE_DEVS13=@PNGDEVS@
 #DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev
-#DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev $(DD)epswrite.dev $(DD)txtwrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
+#DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)ps2write.dev $(DD)eps2write.dev $(DD)txtwrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
 #DEVICE_DEVS16=$(DD)bbox.dev
 
 #DEVICE_DEVS17=
 #DEVICE_DEVS18=
 #DEVICE_DEVS19=
 #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
+#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) 
-DEVICE_DEVS1=$(DD)bit.dev $(DD)bitcmyk.dev $(DD)bitrgb.dev $(DD)bitrgbtags.dev $(DD)bmp16.dev $(DD)bmp16m.dev $(DD)bmp256.dev $(DD)bmp32b.dev $(DD)bmpgray.dev $(DD)bmpmono.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)ccr.dev $(DD)cif.dev $(DD)devicen.dev $(DD)epswrite.dev $(DD)inferno.dev $(DD)jpeg.dev $(DD)jpegcmyk.dev $(DD)jpeggray.dev $(DD)mgr4.dev $(DD)mgr8.dev $(DD)mgrgray2.dev $(DD)mgrgray4.dev $(DD)mgrgray8.dev $(DD)mgrmono.dev $(DD)miff24.dev $(DD)pam.dev $(DD)pamcmyk32.dev $(DD)pamcmyk4.dev $(DD)pbm.dev $(DD)pbmraw.dev $(DD)pcx16.dev $(DD)pcx24b.dev $(DD)pcx256.dev $(DD)pcx2up.dev $(DD)pcxcmyk.dev $(DD)pcxgray.dev $(DD)pcxmono.dev $(DD)pdfwrite.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev $(DD)plan.dev $(DD)plan9bm.dev $(DD)planc.dev $(DD)plang.dev $(DD)plank.dev $(DD)planm.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)ps2write.dev $(DD)psdcmyk.dev $(DD)psdf.dev $(DD)psdrgb.dev $(DD)psgray.dev $(DD)psmono.dev $(DD)psrgb.dev $(DD)pswrite.dev $(DD)sgirgb.dev $(DD)spotcmyk.dev $(DD)sunhmono.dev $(DD)svgwrite.dev $(DD)txtwrite.dev $(DD)xcf.dev 
-DEVICE_DEVS2=$(DD)ap3250.dev $(DD)appledmp.dev $(DD)atx23.dev $(DD)atx24.dev $(DD)atx38.dev $(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev $(DD)cdeskjet.dev $(DD)cdj500.dev $(DD)cdj550.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cljet5.dev $(DD)cljet5c.dev $(DD)cljet5pr.dev $(DD)coslw2p.dev $(DD)coslwxl.dev $(DD)cp50.dev $(DD)declj250.dev $(DD)deskjet.dev $(DD)dj505j.dev $(DD)djet500.dev $(DD)djet500c.dev $(DD)dnj650c.dev $(DD)eps9high.dev $(DD)eps9mid.dev $(DD)epson.dev $(DD)epsonc.dev $(DD)escp.dev $(DD)fs600.dev $(DD)hl7x0.dev $(DD)ibmpro.dev $(DD)imagen.dev $(DD)iwhi.dev $(DD)iwlo.dev $(DD)iwlq.dev $(DD)jetp3852.dev $(DD)laserjet.dev $(DD)lbp8.dev $(DD)lips3.dev $(DD)lj250.dev $(DD)lj3100sw.dev $(DD)lj4dith.dev $(DD)lj4dithp.dev $(DD)lj5gray.dev $(DD)lj5mono.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev $(DD)ljet4pjl.dev $(DD)ljetplus.dev $(DD)lp2563.dev $(DD)lp8000.dev $(DD)lq850.dev $(DD)lxm5700m.dev $(DD)m8510.dev $(DD)necp6.dev $(DD)oce9050.dev $(DD)oki182.dev $(DD)okiibm.dev $(DD)paintjet.dev $(DD)photoex.dev $(DD)picty180.dev $(DD)pj.dev $(DD)pjetxl.dev $(DD)pjxl.dev $(DD)pjxl300.dev $(DD)pxlcolor.dev $(DD)pxlmono.dev $(DD)r4081.dev $(DD)rinkj.dev $(DD)sj48.dev $(DD)st800.dev $(DD)stcolor.dev $(DD)t4693d2.dev $(DD)t4693d4.dev $(DD)t4693d8.dev $(DD)tek4696.dev $(DD)uniprint.dev 
+DEVICE_DEVS1=$(DD)bit.dev $(DD)bitcmyk.dev $(DD)bitrgb.dev $(DD)bitrgbtags.dev $(DD)bmp16.dev $(DD)bmp16m.dev $(DD)bmp256.dev $(DD)bmp32b.dev $(DD)bmpgray.dev $(DD)bmpmono.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)ccr.dev $(DD)cif.dev $(DD)devicen.dev $(DD)eps2write.dev $(DD)fpng.dev $(DD)inferno.dev $(DD)ink_cov.dev $(DD)inkcov.dev $(DD)jpeg.dev $(DD)jpegcmyk.dev $(DD)jpeggray.dev $(DD)mgr4.dev $(DD)mgr8.dev $(DD)mgrgray2.dev $(DD)mgrgray4.dev $(DD)mgrgray8.dev $(DD)mgrmono.dev $(DD)miff24.dev $(DD)pam.dev $(DD)pamcmyk32.dev $(DD)pamcmyk4.dev $(DD)pbm.dev $(DD)pbmraw.dev $(DD)pcx16.dev $(DD)pcx24b.dev $(DD)pcx256.dev $(DD)pcx2up.dev $(DD)pcxcmyk.dev $(DD)pcxgray.dev $(DD)pcxmono.dev $(DD)pdfwrite.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev $(DD)plan.dev $(DD)plan9bm.dev $(DD)planc.dev $(DD)plang.dev $(DD)plank.dev $(DD)planm.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)ps2write.dev $(DD)psdcmyk.dev $(DD)psdcmykog.dev $(DD)psdf.dev $(DD)psdrgb.dev $(DD)sgirgb.dev $(DD)spotcmyk.dev $(DD)sunhmono.dev $(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiff32nc.dev $(DD)tiff48nc.dev $(DD)tiff64nc.dev $(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tiffgray.dev $(DD)tifflzw.dev $(DD)tiffpack.dev $(DD)tiffs.dev $(DD)tiffscaled.dev $(DD)tiffsep.dev $(DD)tiffsep1.dev $(DD)txtwrite.dev $(DD)xcf.dev $(DD)xpswrite.dev 
+DEVICE_DEVS2=$(DD)ap3250.dev $(DD)appledmp.dev $(DD)atx23.dev $(DD)atx24.dev $(DD)atx38.dev $(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev $(DD)cdeskjet.dev $(DD)cdj500.dev $(DD)cdj550.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cljet5.dev $(DD)cljet5c.dev $(DD)cljet5pr.dev $(DD)coslw2p.dev $(DD)coslwxl.dev $(DD)cp50.dev $(DD)declj250.dev $(DD)deskjet.dev $(DD)dj505j.dev $(DD)djet500.dev $(DD)djet500c.dev $(DD)dnj650c.dev $(DD)eps9high.dev $(DD)eps9mid.dev $(DD)epson.dev $(DD)epsonc.dev $(DD)escp.dev $(DD)fs600.dev $(DD)hl7x0.dev $(DD)ibmpro.dev $(DD)imagen.dev $(DD)itk24i.dev $(DD)itk38.dev $(DD)iwhi.dev $(DD)iwlo.dev $(DD)iwlq.dev $(DD)jetp3852.dev $(DD)laserjet.dev $(DD)lbp8.dev $(DD)lips3.dev $(DD)lj250.dev $(DD)lj3100sw.dev $(DD)lj4dith.dev $(DD)lj4dithp.dev $(DD)lj5gray.dev $(DD)lj5mono.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev $(DD)ljet4pjl.dev $(DD)ljetplus.dev $(DD)lp2563.dev $(DD)lp8000.dev $(DD)lq850.dev $(DD)lxm5700m.dev $(DD)m8510.dev $(DD)necp6.dev $(DD)oce9050.dev $(DD)oki182.dev $(DD)okiibm.dev $(DD)paintjet.dev $(DD)photoex.dev $(DD)picty180.dev $(DD)pj.dev $(DD)pjetxl.dev $(DD)pjxl.dev $(DD)pjxl300.dev $(DD)pxlcolor.dev $(DD)pxlmono.dev $(DD)r4081.dev $(DD)rinkj.dev $(DD)sj48.dev $(DD)st800.dev $(DD)stcolor.dev $(DD)t4693d2.dev $(DD)t4693d4.dev $(DD)t4693d8.dev $(DD)tek4696.dev $(DD)uniprint.dev 
 DEVICE_DEVS3=
 DEVICE_DEVS4=
 DEVICE_DEVS5=
 DEVICE_DEVS6=$(DD)png16.dev $(DD)png16m.dev $(DD)png256.dev $(DD)png48.dev $(DD)pngalpha.dev $(DD)pnggray.dev $(DD)pngmono.dev 
-DEVICE_DEVS7=$(PSD)jbig2.dev
+DEVICE_DEVS7=
 DEVICE_DEVS8=
 DEVICE_DEVS9=
 DEVICE_DEVS10=
@@ -569,7 +583,6 @@
 CC_SHARED=$(CC_) 
 
 LD_SET_DT_SONAME=-soname=
-FOR_MAC=
 
 # MAKEDIRS = the dependency on ALL object files (must be the last one on
 # the line. Requires GNU make to make it an 'order only' dependency
@@ -583,6 +596,7 @@
 INSTALL_CONTRIB=
 include $(GLSRCDIR)/unixhead.mak
 include $(GLSRCDIR)/gs.mak
+include $(GLSRCDIR)/trio.mak
 # psromfs.mak must precede lib.mak
 include $(PSSRCDIR)/psromfs.mak
 include $(GLSRCDIR)/lib.mak
@@ -602,8 +616,8 @@
 include $(GLSRCDIR)/ijs.mak
 
 
-include $(GLSRCDIR)/devs.mak
-include $(GLSRCDIR)/contrib.mak
+include $(DEVSRCDIR)/devs.mak
+include $(DEVSRCDIR)/contrib.mak
 include $(GLSRCDIR)/unix-aux.mak
 include $(GLSRCDIR)/unixlink.mak
 include $(GLSRCDIR)/unix-dll.mak
@@ -613,16 +627,12 @@
 
 
 # Clean up after the autotools scripts
-# configure.ac and Makefile.in are symlinks from a subdir 
-# (created by autogen.sh) and so are safe to remove
 distclean : clean config-clean soclean pgclean debugclean mementoclean
 	-$(RM_) -r $(BINDIR) $(GLOBJDIR) $(PSOBJDIR) $(AUXDIR)
 	-$(RM_) -r autom4te.cache
 	-$(RM_) config.log config.status
+	-$(RM_) -r $(TIFFCONFDIR)
 	-$(RM_) Makefile
-# The following is *very* poor - we shouldn't be creating derived files in
-# the source directory, but for now.....
-	-$(RM_) $(TIFFSRCDIR)$(D)libtiff$(D)tif_config.h $(TIFFSRCDIR)$(D)libtiff$(D)tiffconf.h
 
 # a debug-clean target for consistency with the ghostpdl builds
 debug-clean : debugclean
@@ -630,9 +640,7 @@
 memento-clean : mementoclean
 
 maintainer-clean : distclean
-	-$(RM_) configure.ac
 	-$(RM_) configure
-	-$(RM_) Makefile.in
 
 check : default
 	$(NO_OP)
diff -r e23a84708927 -r 4d5f579873aa src/ghostscript.mk
--- a/src/ghostscript.mk	Sat Feb 14 15:32:40 2015 -0500
+++ b/src/ghostscript.mk	Thu Feb 05 16:04:09 2015 -0500
@@ -3,10 +3,10 @@
 
 PKG             := ghostscript
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 9.07
-$(PKG)_CHECKSUM := 550a85e73b7213d8ae41ea06523661638b4bc1a2
+$(PKG)_VERSION  := 9.15
+$(PKG)_CHECKSUM := f53bcc47e912c7bffc2ced62ed9311376fb18bab
 $(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
-$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.bz2
+$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
 $(PKG)_URL      := http://downloads.ghostscript.com/public/$($(PKG)_FILE)
 $(PKG)_DEPS     := jpeg lcms libpng tiff zlib
 ifeq ($(MXE_WINDOWS_BUILD),no)
@@ -56,6 +56,8 @@
       ## so we generate the files then replace them with files from a
       ## mingw native build.
       define $(PKG)_BUILD
+        mv '$(1)/zlib' '$(1)/zlib.x'
+        mv '$(1)/freetype' '$(1)/freetype.x'
         cp '$(TOP_DIR)/src/ghostscript-mingw-i686-makefile' '$(1)/Makefile'
         $(MAKE) -C '$(1)' TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' obj/arch.h obj/gconfig_.h
         cp '$(TOP_DIR)/src/ghostscript-mingw-i686-arch.h' '$(1)/obj/arch.h'
diff -r e23a84708927 -r 4d5f579873aa src/mingw-ghostscript-1-win.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/mingw-ghostscript-1-win.patch	Thu Feb 05 16:04:09 2015 -0500
@@ -0,0 +1,34 @@
+diff -ur ghostscript-9.15.orig/base/gp_unifs.c ghostscript-9.15/base/gp_unifs.c
+--- ghostscript-9.15.orig/base/gp_unifs.c	2015-02-15 10:31:35.198127593 -0500
++++ ghostscript-9.15/base/gp_unifs.c	2015-02-15 13:11:28.950483663 -0500
+@@ -80,6 +80,14 @@
+     int prefix_length = strlen(prefix);
+     int len = gp_file_name_sizeof - prefix_length - 8;
+     FILE *fp;
++#ifdef __MINGW32__
++    // add 'b' to ensure in binary mode
++    char tmpmode[32];
++ 
++    strcpy(tmpmode, mode);
++    strcat(tmpmode,"b");
++    mode = tmpmode;
++#endif
+ 
+     if (gp_file_name_is_absolute(prefix, prefix_length))
+         *fname = 0;
+@@ -148,6 +156,15 @@
+ FILE *
+ gp_fopen(const char *fname, const char *mode)
+ {
++#ifdef __MINGW32__
++    // add 'b' to ensure in binary mode
++    char tmpmode[32];
++ 
++    strcpy(tmpmode, mode);
++    strcat(tmpmode,"b");
++    mode = tmpmode;
++#endif
++
+     return fopen(fname, mode);
+ }
+ 
