+++ /dev/null
---- ghostscript-8.51/configure.ac.am 2005-01-25 02:19:34.000000000 +0100
-+++ ghostscript-8.51/configure.ac 2005-07-19 22:12:23.000000000 +0200
-@@ -147,6 +147,32 @@
- GCFLAGS="$GCFLAGS -DGX_COLOR_INDEX_TYPE=\"$uint64_type\""
- fi
-
-+dnl look for default font path...
-+AC_ARG_WITH(fontpath, [ --with-fontpath set font path for gs],fontpath="$withval",fontpath="")
-+
-+dnl Fix "prefix" variable...
-+if test "x$prefix" = xNONE; then
-+ prefix=/usr/local
-+fi
-+
-+dnl Fix "datadir" variable...
-+if test "x$datadir" = 'x${prefix}/share'; then
-+ datadir="$prefix/share"
-+fi
-+ dnl Fix "fontpath" variable...
-+if test "x$fontpath" = "x"; then
-+# These font directories are used by various Linux distributions...
-+ fontpath="$datadir/fonts/default/ghostscript"
-+ fontpath="${fontpath}:$datadir/fonts/default/Type1"
-+ fontpath="${fontpath}:$datadir/fonts/default/TrueType"
-+ # These font directories are used by IRIX...
-+ fontpath="${fontpath}:/usr/lib/DPS/outline/base"
-+ # These font directories are used by Solaris...
-+ fontpath="${fontpath}:/usr/openwin/lib/X11/fonts/Type1"
-+ fontpath="${fontpath}:/usr/openwin/lib/X11/fonts/TrueType"
-+fi
-+
-+AC_SUBST(fontpath)
-
- dnl --------------------------------------------------
- dnl Check for libraries
---- ghostscript-8.51/src/Makefile.in~ 2004-12-01 09:17:19.000000000 +0100
-+++ ghostscript-8.51/src/Makefile.in 2005-07-21 13:46:26.000000000 +0200
-@@ -70,7 +70,7 @@
- # Define the default directory/ies for the runtime
- # initialization and font files. Separate multiple directories with a :.
-
--GS_LIB_DEFAULT=$(gsdatadir)/lib:$(gsdatadir)/Resource:$(gsdir)/fonts
-+GS_LIB_DEFAULT=$(gsdatadir)/lib:$(gsdatadir)/Resource:$(gsdir)/fonts:@fontpath@
-
- # Define the default directory for cached data files
- # this must be a single path.
--- /dev/null
+--- ghostscript-8.71/configure.ac.orig 2010-09-12 10:34:12.879128431 +0200
++++ ghostscript-8.71/configure.ac 2010-09-12 19:34:10.199128431 +0200
+@@ -402,7 +402,7 @@
+ PNGDEVS="$PNGDEVS_ALL"
+ else
+ AC_MSG_RESULT([no])
+- AC_CHECK_LIB(png, png_check_sig, [
++ AC_CHECK_LIB(png, png_sig_cmp, [
+ AC_CHECK_HEADERS(png.h, [
+ SHARE_LIBPNG=1
+ PNGDEVS="$PNGDEVS_ALL"
--- /dev/null
+--- ghostscript-8.71/base/unix-aux.mak.orig 2009-01-08 10:17:18.000000000 +0100
++++ ghostscript-8.71/base/unix-aux.mak 2010-09-12 20:04:42.987128431 +0200
+@@ -77,13 +77,24 @@
+ $(GENINIT_XE): $(GLSRC)geninit.c $(AK) $(GENINIT_DEPS)
+ $(CCAUX) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENINIT_XE) $(GLSRC)geninit.c
+
++ifeq ($(SHARE_ZLIB),1)
++MKROMFS_OBJS= $(GLOBJ)gscdefs.$(OBJ) $(GLOBJ)gsmisc.$(OBJ) \
++ $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gslibctx.$(OBJ) $(GLOBJ)gp_getnv.$(OBJ) \
++ $(GLOBJ)gp_unix.$(OBJ) $(GLOBJ)gp_unifs.$(OBJ) $(GLOBJ)gp_unifn.$(OBJ) \
++ $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gsutil.$(OBJ)
++else
+ MKROMFS_OBJS=$(MKROMFS_ZLIB_OBJS) $(GLOBJ)gscdefs.$(OBJ) $(GLOBJ)gsmisc.$(OBJ) \
+ $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gslibctx.$(OBJ) $(GLOBJ)gp_getnv.$(OBJ) \
+ $(GLOBJ)gp_unix.$(OBJ) $(GLOBJ)gp_unifs.$(OBJ) $(GLOBJ)gp_unifn.$(OBJ) \
+ $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gsutil.$(OBJ)
++endif
+
+ $(MKROMFS_XE): $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS)
++ifeq ($(SHARE_ZLIB),1)
++ $(CCAUX) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE) $(MKROMFS_OBJS) -lm -lz $(EXTRALIBS)
++else
+ $(CCAUX) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE) $(MKROMFS_OBJS) -lm $(EXTRALIBS)
++endif
+
+ # Query the environment to construct gconfig_.h.
+ # The "else true;" is required because Ultrix's implementation of sh -e
Patch0: %{name}-missquotes.patch
Patch1: %{name}-setuid.patch
Patch2: %{name}-time_h.patch
-Patch3: %{name}-am.patch
+Patch3: %{name}-libpng14.patch
+Patch4: %{name}-system-zlib.patch
# no device for cdj850 in non-espgs ghostscript
# look for patch in old spec for GNU ghostscript
#Patch4: %{name}-gdevcd8-fixes.patch
# for gsx
%{?with_gtk:BuildRequires: gtk+-devel}
BuildRequires: libpaper-devel
-BuildRequires: libpng-devel >= 1.0.8
+BuildRequires: libpng-devel >= 1.2.42
BuildRequires: libstdc++-devel
-BuildRequires: libtiff-devel
+BuildRequires: libtiff-devel >= 3.9.2
BuildRequires: libtool
BuildRequires: pkgconfig
# Required by 'gdevvglb' device.
BuildRequires: tetex-dvips
BuildRequires: xorg-lib-libXext-devel
BuildRequires: xorg-lib-libXt-devel
+BuildRequires: zlib-devel >= 1.2.3
Obsoletes: ghostscript-afpl
Obsoletes: ghostscript-gpl
Obsoletes: ghostscript-esp
%patch0 -p1
%patch1 -p1
%patch2 -p1
-#%patch3 -p1
-#%%patch4 -p1
-#%%patch5 -p1
+%patch3 -p1
+%patch4 -p1
%build
-# workarounds
%if %{with system_jbig2dec}
-if [ -d jbig2dec ]; then
- rm -rf jbig2dec
-fi
+%{__rm} -r jbig2dec
%endif
+# use system libs (sources contain unmodified zlib 1.2.3 and libpng 1.2.42)
+%{__rm} -r libpng zlib
+# jpeg is built with different configuration (D_MAX_BLOCKS_IN_MCU=64), jasper is modified
cd jasper
%{__libtoolize}
%{__aclocal}