From 856d045a2756a0f81fee535076a9d401fc075f59 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 23 Sep 2014 10:01:27 +0100 Subject: [PATCH] 9.15. No longer need iccprofiles-initdir, gs694154, crash, sys-zlib, or trio-g patches. Resolves: rhbz#1145482 --- .gitignore | 1 + ghostscript-crash.patch | 21 ---------------- ghostscript-gs694154.patch | 12 --------- ghostscript-iccprofiles-initdir.patch | 35 --------------------------- ghostscript-runlibfileifexists.patch | 16 ++++++------ ghostscript-sys-zlib.patch | 24 ------------------ ghostscript-trio-g.patch | 25 ------------------- ghostscript.spec | 34 +++++++------------------- sources | 2 +- 9 files changed, 19 insertions(+), 151 deletions(-) delete mode 100644 ghostscript-crash.patch delete mode 100644 ghostscript-gs694154.patch delete mode 100644 ghostscript-iccprofiles-initdir.patch delete mode 100644 ghostscript-sys-zlib.patch delete mode 100644 ghostscript-trio-g.patch diff --git a/.gitignore b/.gitignore index 4615f44..2ef664d 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ ghostscript-8.71.tar.xz /ghostscript-9.10-cleaned.tar.bz2 /ghostscript-9.12-cleaned.tar.bz2 /ghostscript-9.14-cleaned.tar.bz2 +/ghostscript-9.15-cleaned.tar.bz2 diff --git a/ghostscript-crash.patch b/ghostscript-crash.patch deleted file mode 100644 index 4cd24e8..0000000 --- a/ghostscript-crash.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up ghostscript-9.10/psi/ialloc.c.crash ghostscript-9.10/psi/ialloc.c ---- ghostscript-9.10/psi/ialloc.c.crash 2013-08-30 11:37:28.000000000 +0100 -+++ ghostscript-9.10/psi/ialloc.c 2014-06-04 10:47:58.294526685 +0100 -@@ -160,6 +160,7 @@ gs_alloc_ref_array(gs_ref_memory_t * mem - uint num_refs, client_name_t cname) - { - ref *obj; -+ int i; - - /* If we're allocating a run of refs already, */ - /* and we aren't about to overflow the maximum run length, use it. */ -@@ -224,6 +225,9 @@ gs_alloc_ref_array(gs_ref_memory_t * mem - cp->where = (ref_packed *)obj; - } - } -+ for (i = 0; i < num_refs; i++) { -+ make_null(&(obj[i])); -+ } - make_array(parr, attrs | mem->space, num_refs, obj); - return 0; - } diff --git a/ghostscript-gs694154.patch b/ghostscript-gs694154.patch deleted file mode 100644 index 248aebb..0000000 --- a/ghostscript-gs694154.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ghostscript-9.12/base/gsicc.c.gs694154 ghostscript-9.12/base/gsicc.c ---- ghostscript-9.12/base/gsicc.c.gs694154 2014-03-25 08:52:16.000000000 +0000 -+++ ghostscript-9.12/base/gsicc.c 2014-03-26 11:32:31.406034840 +0000 -@@ -468,6 +468,8 @@ gx_remap_ICC_imagelab(const gs_client_co - cmm_dev_profile_t *dev_profile; - - code = dev_proc(dev, get_profile)(dev, &dev_profile); -+ if (dev_profile == NULL) -+ return gs_throw(gs_error_Fatal, "Attempting to do ICC remap with no profile"); - num_des_comps = gsicc_get_device_profile_comps(dev_profile); - rendering_params.black_point_comp = pis->blackptcomp; - rendering_params.graphics_type_tag = dev->graphics_type_tag; diff --git a/ghostscript-iccprofiles-initdir.patch b/ghostscript-iccprofiles-initdir.patch deleted file mode 100644 index b47511c..0000000 --- a/ghostscript-iccprofiles-initdir.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -up ghostscript-9.06/base/gsicc_manage.c.iccprofiles-initdir ghostscript-9.06/base/gsicc_manage.c ---- ghostscript-9.06/base/gsicc_manage.c.iccprofiles-initdir 2012-08-09 13:58:22.102364807 +0100 -+++ ghostscript-9.06/base/gsicc_manage.c 2012-08-09 14:09:24.495864641 +0100 -@@ -38,6 +38,7 @@ - #include "gsicc_create.h" - #include "gpmisc.h" - #include "gxdevice.h" -+#include "gxiodev.h" - - #define ICC_HEADER_SIZE 128 - -@@ -2176,8 +2177,21 @@ gs_currenticcdirectory(const gs_state * - const gs_lib_ctx_t *lib_ctx = pgs->memory->gs_lib_ctx; - - if (lib_ctx->profiledir == NULL) { -- pval->data = (const byte *)rfs; -- pval->size = strlen(rfs); -+ int have_rom_device = 0; -+ int i; -+ -+ for (i = 0; i < gx_io_device_table_count; i++) { -+ const gx_io_device *iodev = lib_ctx->io_device_table[i]; -+ const char *dname = iodev->dname; -+ -+ if (dname && strlen(dname) == 5 && !memcmp("%rom%", dname, 5)) { -+ have_rom_device = 1; -+ break; -+ } -+ } -+ -+ pval->data = (const byte *)(have_rom_device ? rfs : ""); -+ pval->size = strlen((const char *)pval->data); - pval->persistent = true; - } else { - pval->data = (const byte *)(lib_ctx->profiledir); diff --git a/ghostscript-runlibfileifexists.patch b/ghostscript-runlibfileifexists.patch index 03b731c..a7dbf46 100644 --- a/ghostscript-runlibfileifexists.patch +++ b/ghostscript-runlibfileifexists.patch @@ -1,6 +1,6 @@ -diff -up ghostscript-9.12/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscript-9.12/Resource/Init/gs_fonts.ps ---- ghostscript-9.12/Resource/Init/gs_fonts.ps.runlibfileifexists 2014-03-25 08:52:16.000000000 +0000 -+++ ghostscript-9.12/Resource/Init/gs_fonts.ps 2014-03-26 12:01:48.248748767 +0000 +diff -up ghostscript-9.15/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscript-9.15/Resource/Init/gs_fonts.ps +--- ghostscript-9.15/Resource/Init/gs_fonts.ps.runlibfileifexists 2014-09-22 11:17:33.000000000 +0100 ++++ ghostscript-9.15/Resource/Init/gs_fonts.ps 2014-09-23 09:45:44.029511858 +0100 @@ -95,10 +95,19 @@ userdict /Fontmap .FontDirectory maxleng % stack: dict file fontname filename|aliasname 1 index type /stringtype eq @@ -24,10 +24,10 @@ diff -up ghostscript-9.12/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscri } { % This is a real entry. % Read and pop tokens until a semicolon. -diff -up ghostscript-9.12/Resource/Init/gs_init.ps.runlibfileifexists ghostscript-9.12/Resource/Init/gs_init.ps ---- ghostscript-9.12/Resource/Init/gs_init.ps.runlibfileifexists 2014-03-25 08:52:16.000000000 +0000 -+++ ghostscript-9.12/Resource/Init/gs_init.ps 2014-03-26 12:01:48.248748767 +0000 -@@ -681,6 +681,14 @@ systemdict /internaldict dup .makeintern +diff -up ghostscript-9.15/Resource/Init/gs_init.ps.runlibfileifexists ghostscript-9.15/Resource/Init/gs_init.ps +--- ghostscript-9.15/Resource/Init/gs_init.ps.runlibfileifexists 2014-09-22 11:17:33.000000000 +0100 ++++ ghostscript-9.15/Resource/Init/gs_init.ps 2014-09-23 09:45:44.030511863 +0100 +@@ -684,6 +684,14 @@ systemdict /internaldict dup .makeintern { /undefinedfilename signalerror } ifelse } bind def @@ -42,7 +42,7 @@ diff -up ghostscript-9.12/Resource/Init/gs_init.ps.runlibfileifexists ghostscrip /selectdevice { finddevice setdevice .setdefaultscreen } bind def /signalerror % signalerror - -@@ -849,6 +857,7 @@ userdict /.currentresourcefile //null pu +@@ -852,6 +860,7 @@ userdict /.currentresourcefile //null pu } bind def % Temporarily substitute it for the real runlibfile. /.runlibfile /runlibfile load def diff --git a/ghostscript-sys-zlib.patch b/ghostscript-sys-zlib.patch deleted file mode 100644 index d33895a..0000000 --- a/ghostscript-sys-zlib.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up ghostscript-9.12/configure.ac.sys-zlib ghostscript-9.12/configure.ac ---- ghostscript-9.12/configure.ac.sys-zlib 2014-03-26 11:48:54.983972222 +0000 -+++ ghostscript-9.12/configure.ac 2014-03-26 11:49:36.807230531 +0000 -@@ -854,7 +854,7 @@ AC_MSG_CHECKING([for local zlib source]) - dnl zlib is needed for language level 3, and libpng - # we must define ZLIBDIR regardless because png.mak does a -I$(ZLIBDIR) - # this seems a harmless default --ZLIBDIR=src -+ZLIBDIR=$includedir - AUX_SHARED_ZLIB= - - if test -d $srcdir/zlib; then -diff -up ghostscript-9.12/configure.sys-zlib ghostscript-9.12/configure ---- ghostscript-9.12/configure.sys-zlib 2014-03-26 11:49:45.547284521 +0000 -+++ ghostscript-9.12/configure 2014-03-26 11:49:56.171350127 +0000 -@@ -6254,7 +6254,7 @@ fi - $as_echo_n "checking for local zlib source... " >&6; } - # we must define ZLIBDIR regardless because png.mak does a -I$(ZLIBDIR) - # this seems a harmless default --ZLIBDIR=src -+ZLIBDIR=$includedir - AUX_SHARED_ZLIB= - - if test -d $srcdir/zlib; then diff --git a/ghostscript-trio-g.patch b/ghostscript-trio-g.patch deleted file mode 100644 index 18247c2..0000000 --- a/ghostscript-trio-g.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up ghostscript-9.14/trio/trio.c.trio-g ghostscript-9.14/trio/trio.c ---- ghostscript-9.14/trio/trio.c.trio-g 2014-03-26 12:53:48.000000000 +0000 -+++ ghostscript-9.14/trio/trio.c 2014-08-15 10:10:39.714065073 +0100 -@@ -3172,6 +3172,9 @@ TRIO_ARGS6((self, number, flags, width, - if (integerNumber > epsilon) - { - integerDigits += (int)TrioLogarithm(integerNumber, base); -+ /* Deal with the dangers of casting long double to int */ -+ if (integerNumber - TrioPower (base, integerDigits) >= 0) -+ integerDigits++; - } - - fractionDigits = precision; -@@ -3255,6 +3258,11 @@ TRIO_ARGS6((self, number, flags, width, - integerDigits = (integerNumber > epsilon) - ? 1 + (int)TrioLogarithm(integerNumber, base) - : 1; -+ -+ /* Deal with the dangers of casting long double to int */ -+ if (integerNumber - TrioPower (base, integerDigits) >= 0) -+ integerDigits++; -+ - if (flags & FLAGS_FLOAT_G) - { - if (flags & FLAGS_ALTERNATIVE) diff --git a/ghostscript.spec b/ghostscript.spec index bff3b05..8e38338 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -1,11 +1,11 @@ -%define gs_ver 9.14 -%define gs_dot_ver 9.14 +%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 interpreter and renderer Name: ghostscript Version: %{gs_ver} -Release: 6%{?dist} +Release: 1%{?dist} # Included CMap data is Redistributable, no modification permitted, # see http://bugzilla.redhat.com/487510 @@ -27,12 +27,7 @@ Patch3: ghostscript-noopt.patch Patch4: ghostscript-runlibfileifexists.patch Patch5: ghostscript-icc-missing-check.patch Patch6: ghostscript-Fontmap.local.patch -Patch7: ghostscript-iccprofiles-initdir.patch -Patch9: ghostscript-wrf-snprintf.patch -Patch10: ghostscript-gs694154.patch -Patch11: ghostscript-sys-zlib.patch -Patch12: ghostscript-crash.patch -Patch13: ghostscript-trio-g.patch +Patch7: ghostscript-wrf-snprintf.patch Requires: urw-fonts >= 1.1, ghostscript-fonts Requires: poppler-data @@ -124,23 +119,8 @@ rm -rf expat freetype icclib jasper jpeg jpegxr lcms lcms2 libpng openjpeg zlib # package manifest. %patch6 -p1 -# Don't assume %%rom%% device is available for initial ICC profile dir. -%patch7 -p1 -b .iccprofiles-initdir - # Use more caution when converting floats to strings (bug #980085). -%patch9 -p1 -b .wrf-snprintf - -# Use upstream patch to fix gs segfault (bug #1036428). -%patch10 -p1 -b .gs694154 - -# Fix build when using system zlib. -%patch11 -p1 -b .sys-zlib - -# Prevent memory handling crash. -%patch12 -p1 -b .crash - -# Fix double-to-string conversion on e.g. ppc64 (bug #1014772). -%patch13 -p1 -b .trio-g +%patch7 -p1 -b .wrf-snprintf # Convert manual pages to UTF-8 from8859_1() { @@ -333,6 +313,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgs.so %changelog +* Tue Sep 23 2014 Tim Waugh 9.15-1 +- 9.15. No longer need iccprofiles-initdir, gs694154, crash, sys-zlib, + or trio-g patches. + * Tue Sep 9 2014 Tim Waugh - No need to apply patch for already-applied gdevcups-debug-uninit. diff --git a/sources b/sources index 379d980..b563000 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ 2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz dfc93dd2aaaf2b86d2fd55f654c13261 adobe-cmaps-200406.tar.gz -20880993fe6f8745ffa029215fb1d474 ghostscript-9.14-cleaned.tar.bz2 +9fec54ad60a6c6358257d591312df039 ghostscript-9.15-cleaned.tar.bz2