Browse Source

ghostscript-9.15-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9252 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 9 years ago
parent
commit
0203b79a59
1 changed files with 84 additions and 80 deletions
  1. 84 80
      g/ghostscript/ghostscript-vl.spec

+ 84 - 80
g/ghostscript/ghostscript-vl.spec

@@ -1,16 +1,25 @@
-%define gs_ver 8.71
-%define gs_dot_ver 8.71
+%define gs_ver 9.15
+%define gs_dot_ver 9.15
 %{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}}
 Summary: A PostScript(TM) interpreter and renderer.
 Summary(ja): 日本語 PostScript(TM) インタプリタ/レンダラ/ビュア
 Name: ghostscript
 Version: %{gs_ver}
-Release: 6%{?_dist_release}
+Release: 1%{?_dist_release}
 
-License: GPLv2
+# Included CMap data is Redistributable, no modification permitted,
+# see http://bugzilla.redhat.com/487510
+License: AGPLv3+ and Redistributable, no modification permitted
 URL: http://www.ghostscript.com/
 Group: Applications/Publishing
-Source0: ghostscript-%{gs_ver}.tar.gz
+Source0: ghostscript-%{gs_ver}-cleaned-1.tar.bz2
+# ghostscript contains code we cannot ship due to licensing concerns.
+# Therefore we use this script to remove it before shipping the
+# tarball.
+# Download the upstream tarball and invoke this script while in the
+# tarball's directory:
+Source1: generate-tarball.sh
+Source2: CIDFnmap
 Source4: cidfmap
 Source5: cidfmap.ja
 
@@ -20,45 +29,36 @@ Source10: Changelog.gs7.vine
 Patch1: ghostscript-multilib.patch
 Patch2: ghostscript-scripts.patch
 Patch3: ghostscript-noopt.patch
-Patch4: ghostscript-fPIC.patch
-Patch5: ghostscript-runlibfileifexists.patch
-Patch6: ghostscript-system-jasper.patch
-Patch7: ghostscript-pksmraw.patch
-Patch12: ghostscript-8.64_CVE-2009-4270.patch
+Patch4: ghostscript-runlibfileifexists.patch
+Patch5: ghostscript-icc-missing-check.patch
+Patch6: ghostscript-Fontmap.local.patch
+Patch7: ghostscript-wrf-snprintf.patch
+Patch8: ghostscript-system-openjpeg2.patch
 
 # buildfix
 Patch20: ghostscript-8.71-fix-build-executables.patch
 
-# ps2pdfwr
-# use NeverEmbeddedFontList/AlwaysEmbeddedFontList
-Patch200: ghostscript-8.64-ps2pdfwr.patch
-
-# eplaser fix
-# http://tyche.pu-toyama.ac.jp/~a-urasim/gs/
-Patch1000: ghostscript-8.63-eplaser-fix.patch
-
-# cups-raster fix
-Patch2000: fix691203.patch
-
-# security fixes
-Patch3000: ghostscript-8.71_CVE-2012-4405.patch
-
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRequires: xz
 BuildRequires: libjpeg-devel, libXt-devel
-BuildRequires: zlib-devel, libpng-devel, unzip, gtk2-devel
+BuildRequires: zlib-devel, libpng-devel, unzip, gtk3-devel
 BuildRequires: glib2-devel, gnutls-devel
 # Omni requires libxml
 BuildRequires: libxml2-devel
 BuildRequires: libtiff-devel
 BuildRequires: cups-devel >= 1.1.13
 BuildRequires: libtool
-BuildRequires: jasper-devel
-BuildRequires: krb5-devel
-BuildRequires: libpaper-devel
+#BuildRequires: jasper-devel
+BuildRequires: dbus-devel
+BuildRequires: poppler-data
+BuildRequires: lcms2-devel
+BuildRequires: openjpeg2-devel
 %{?_with_freetype:BuildRequires: freetype2-devel}
 
 Requires: urw-fonts
+Requires: ghostscript-fonts
+Requires: poppler-data
 
 Obsoletes: hpijs <= 1.7.1-2vl5
 #Provides: hpijs
@@ -135,7 +135,7 @@ A GTK-enabled version of Ghostscript, called 'gsx'.
 
 %prep
 %setup -q -n %{name}-%{gs_ver}
-rm -rf libpng zlib jpeg jasper
+rm -rf expat freetype icclib jasper jpeg jpegxr lcms lcms2 libpng openjpeg zlib cups/libs
 
 # Fix ijs-config not to have multilib conflicts (bug #192672)
 %patch1 -p1 -b .multilib
@@ -146,53 +146,48 @@ rm -rf libpng zlib jpeg jasper
 # Build igcref.c with -O0 to work around bug #150771.
 %patch3 -p1 -b .noopt
 
-# Fix shared library build.
-%patch4 -p1 -b .fPIC
-
 # Define .runlibfileifexists.
-%patch5 -p1
-
-%patch6 -p1 -b .system-jasper
+%patch4 -p1
 
-# Fix pksmraw output (bug #308211).  Still needed in 8.63.
-%patch7 -p1 -b .pksmraw
+# Fixed missing error check when setting ICC profile.
+%patch5 -p1 -b .icc-missing-check
 
-# Applied patch to fix CVE-2009-4270 (bug #540760)
-%patch12 -p1 -b .CVE-2009-4270
-
-# buildfix
-%patch20 -p1 -b .buildfix
 
+# Restored Fontmap.local patch, incorrectly dropped after
+# ghostscript-8.15.4-3 (bug #610301).
+# Note: don't use -b here to avoid the backup file ending up in the
+# package manifest.
+%patch6 -p1
 
-# ps2pdfwr
-%patch200 -p1 -b .embeded-fontlist
+# Use more caution when converting floats to strings (bug #980085).
+%patch7 -p1 -b .wrf-snprintf
 
-# eplaser fix
-%patch1000 -p1 -b .eplaser-fix
-
-# cups-raster fix
-%patch2000 -p1 -b .cups-raster
-
-# security fixes
-%patch3000 -p1 -b .CVE-2012-4405
+%patch8 -p1 -b .system-openjpeg2
 
 
 # Convert manual pages to UTF-8
 from8859_1() {
-	iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
-	mv "${1}_" "$1"
+        iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
+        mv "${1}_" "$1"
 }
-for i in man/de/*.1; do from8859_1 "$i"; done
+for i in man/de/*.1; do
+  if [ "$(file --brief --mime-encoding "$i")" = iso-8859-1 ]; then
+    from8859_1 "$i"
+  fi
+done
+
+# Convert ps files to UTF-8
+for i in examples/cjk/gsc*.ps; do from8859_1 "$i"; done
 
 %build
 # Compile without strict aliasing opts due to these files:
-# gdevescv.c gdevl4v.c gdevopvp.c gdevbbox.c gdevdbit.c gdevddrw.c 
-# gdevp14.c gdevpdfd.c gdevpdfi.c gdevpdfo.c gdevpdft.c gdevpdfv.c 
-# gdevpdte.c gdevpdtt.c gdevps.c gdevpx.c gscoord.c gscparam.c gscrd.c 
-# gsdps1.c gsimage.c gspath1.c gsptype1.c gsptype2.c gstype2.c 
-# gstype42.c gxccache.c gxchar.c gxclimag.c gxclpath.c gxfcopy.c 
-# gximag3x.c gximage3.c gxipixel.c gxshade1.c gxstroke.c gxtype1.c 
-# ibnum.c iscanbin.c zchar1.c zchar.c zcharx.c zfapi.c zfont32.c 
+# gdevescv.c gdevl4v.c gdevopvp.c gdevbbox.c gdevdbit.c gdevddrw.c
+# gdevp14.c gdevpdfd.c gdevpdfi.c gdevpdfo.c gdevpdft.c gdevpdfv.c
+# gdevpdte.c gdevpdtt.c gdevps.c gdevpx.c gscoord.c gscparam.c gscrd.c
+# gsdps1.c gsimage.c gspath1.c gsptype1.c gsptype2.c gstype2.c
+# gstype42.c gxccache.c gxchar.c gxclimag.c gxclpath.c gxfcopy.c
+# gximag3x.c gximage3.c gxipixel.c gxshade1.c gxstroke.c gxtype1.c
+# ibnum.c iscanbin.c zchar1.c zchar.c zcharx.c zfapi.c zfont32.c
 # zfunc0.c zfunc3.c zfunc4.c zpcolor.c zshade.c
 EXTRACFLAGS="-fno-strict-aliasing"
 
@@ -205,12 +200,15 @@ for path in \
 	%{_datadir}/fonts \
 	%{_datadir}/%{name}/conf.d \
 	%{_sysconfdir}/%{name} \
-	%{_sysconfdir}/%{name}/%{gs_dot_ver}
+	%{_sysconfdir}/%{name}/%{gs_dot_ver} \
+	%{_datadir}/poppler/cMap/*
 do
   FONTPATH="$FONTPATH${FONTPATH:+:}$path"
 done
+autoconf --force
 %configure --with-ijs --enable-dynamic --with-fontpath="$FONTPATH" \
 	--with-drivers=ALL --disable-compile-inits --with-system-libtiff \
+	--with-install-cups \
 	CFLAGS="$CFLAGS $EXTRACFLAGS"
 
 # Build IJS
@@ -234,6 +232,7 @@ make %{?_smp_mflags} \
 make %{?_smp_mflags} \
      RPM_OPT_FLAGS="$RPM_OPT_FLAGS $EXTRAFLAGS" prefix=%{_prefix}
 %endif
+make cups
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -270,28 +269,31 @@ ln -sf gs $RPM_BUILD_ROOT/usr/bin/ghostscript
 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/Resource/Init/cidfmap{,.GS}
 # Install our own cidfmap to allow the separated
 # cidfmap which the font packages own.
+install -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/Resource/Init/CIDFnmap
 install -m0644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/Resource/Init/cidfmap
 
-# Header files.
-mkdir -p $RPM_BUILD_ROOT%{_includedir}/ghostscript
-install -m0644 base/errors.h $RPM_BUILD_ROOT%{_includedir}/ghostscript
+# Documentation
+install -m0644 doc/COPYING $RPM_BUILD_ROOT%{_docdir}/%{name}-%{gs_dot_ver}
 
-# cjk examples
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/examples/cjk
-install -m0644 examples/cjk/* $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/examples/cjk/
+# Don't ship .la files
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 
-# Don't ship pkgconfig files.
-rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/ijs.pc
+# Don't ship .a files
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
 
 # Don't ship ijs example client or server
 rm -f $RPM_BUILD_ROOT%{_bindir}/ijs_{client,server}_example
 
-# Don't ship two copies of Resource.  Just the versioned one will do.
-rm -rf $RPM_BUILD_ROOT%{_datadir}/ghostscript/Resource
-
 # Don't ship URW fonts; we already have them.
 rm -rf $RPM_BUILD_ROOT%{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Font
 
+# cjk examples
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/examples/cjk
+install -m0644 examples/cjk/* $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_dot_ver}/examples/cjk/
+
+# Don't ship two copies of Resource.  Just the versioned one will do.
+rm -rf $RPM_BUILD_ROOT%{_datadir}/ghostscript/Resource
+
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/conf.d
 mkdir -p $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}
 touch $RPM_BUILD_ROOT/etc/ghostscript/%{gs_dot_ver}/Fontmap.local
@@ -309,8 +311,8 @@ find $RPM_BUILD_ROOT%{_mandir}/de/man1 -type l | xargs rm -f
 # Don't ship fixmswrd.pl as it pulls in perl (bug #463948).
 rm -f $RPM_BUILD_ROOT%{_bindir}/fixmswrd.pl
 
-# Don't ship .la files
-rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+# Don't ship CMaps (instead poppler-data paths are in search path).
+rm -f $RPM_BUILD_ROOT%{_datadir}/ghostscript/%{gs_dot_ver}/Resource/CMap/*
 
 MAIN_PWD=`pwd`
 (cd $RPM_BUILD_ROOT; find ./usr/share/ghostscript/%{gs_dot_ver}/Resource -type f | \
@@ -341,15 +343,13 @@ rm -rf $RPM_BUILD_ROOT
 %config %{_datadir}/ghostscript/conf.d/cidfmap.ja
 %{_datadir}/ghostscript/%{gs_dot_ver}/examples
 %{_datadir}/ghostscript/%{gs_dot_ver}/lib
+%{_datadir}/ghostscript/%{gs_dot_ver}/iccprofiles
 %{_mandir}/man*/*
 %lang(de) %{_mandir}/de/man*/*
 %{_libdir}/libgs.so.*
 %{_libdir}/libijs-*.so*
 %dir %{_libdir}/%{name}
 %{_libdir}/%{name}/%{gs_dot_ver}/
-%{_libdir}/cups/filter/*
-%{_datadir}/cups/model/pxl*
-%{_sysconfdir}/cups/*
 
 %files doc
 %defattr(-,root,root)
@@ -366,11 +366,15 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_includedir}/ijs
 %{_includedir}/ijs/*
 %{_bindir}/ijs-config
+%{_libdir}/pkgconfig/ijs.pc
 %{_libdir}/libijs.so
-%{_libdir}/libijs.a
 %{_libdir}/libgs.so
 
 %changelog
+* Wed Dec 24 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.15-1
+- new upstream release.
+- imported patches from RawHide.
+
 * Thu Sep 20 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 8.71-6
 - add patch3000 for fix CVE-2012-4405 (icc)
 - add Vendor/Distri tags