No longer need iccprofiles-initdir, gs694154, crash, sys-zlib, or
trio-g patches.

Resolves: rhbz#1145482
This commit is contained in:
Tim Waugh 2014-09-23 10:01:27 +01:00
parent 7a4fe39464
commit 856d045a27
9 changed files with 19 additions and 151 deletions

1
.gitignore vendored
View File

@ -43,3 +43,4 @@ ghostscript-8.71.tar.xz
/ghostscript-9.10-cleaned.tar.bz2 /ghostscript-9.10-cleaned.tar.bz2
/ghostscript-9.12-cleaned.tar.bz2 /ghostscript-9.12-cleaned.tar.bz2
/ghostscript-9.14-cleaned.tar.bz2 /ghostscript-9.14-cleaned.tar.bz2
/ghostscript-9.15-cleaned.tar.bz2

View File

@ -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;
}

View File

@ -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;

View File

@ -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);

View File

@ -1,6 +1,6 @@
diff -up ghostscript-9.12/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscript-9.12/Resource/Init/gs_fonts.ps diff -up ghostscript-9.15/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscript-9.15/Resource/Init/gs_fonts.ps
--- ghostscript-9.12/Resource/Init/gs_fonts.ps.runlibfileifexists 2014-03-25 08:52:16.000000000 +0000 --- ghostscript-9.15/Resource/Init/gs_fonts.ps.runlibfileifexists 2014-09-22 11:17:33.000000000 +0100
+++ ghostscript-9.12/Resource/Init/gs_fonts.ps 2014-03-26 12:01:48.248748767 +0000 +++ ghostscript-9.15/Resource/Init/gs_fonts.ps 2014-09-23 09:45:44.029511858 +0100
@@ -95,10 +95,19 @@ userdict /Fontmap .FontDirectory maxleng @@ -95,10 +95,19 @@ userdict /Fontmap .FontDirectory maxleng
% stack: dict file fontname filename|aliasname % stack: dict file fontname filename|aliasname
1 index type /stringtype eq 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. % This is a real entry.
% Read and pop tokens until a semicolon. % 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 diff -up ghostscript-9.15/Resource/Init/gs_init.ps.runlibfileifexists ghostscript-9.15/Resource/Init/gs_init.ps
--- ghostscript-9.12/Resource/Init/gs_init.ps.runlibfileifexists 2014-03-25 08:52:16.000000000 +0000 --- ghostscript-9.15/Resource/Init/gs_init.ps.runlibfileifexists 2014-09-22 11:17:33.000000000 +0100
+++ ghostscript-9.12/Resource/Init/gs_init.ps 2014-03-26 12:01:48.248748767 +0000 +++ ghostscript-9.15/Resource/Init/gs_init.ps 2014-09-23 09:45:44.030511863 +0100
@@ -681,6 +681,14 @@ systemdict /internaldict dup .makeintern @@ -684,6 +684,14 @@ systemdict /internaldict dup .makeintern
{ /undefinedfilename signalerror } { /undefinedfilename signalerror }
ifelse ifelse
} bind def } bind def
@ -42,7 +42,7 @@ diff -up ghostscript-9.12/Resource/Init/gs_init.ps.runlibfileifexists ghostscrip
/selectdevice /selectdevice
{ finddevice setdevice .setdefaultscreen } bind def { finddevice setdevice .setdefaultscreen } bind def
/signalerror % <object> <errorname> signalerror - /signalerror % <object> <errorname> signalerror -
@@ -849,6 +857,7 @@ userdict /.currentresourcefile //null pu @@ -852,6 +860,7 @@ userdict /.currentresourcefile //null pu
} bind def } bind def
% Temporarily substitute it for the real runlibfile. % Temporarily substitute it for the real runlibfile.
/.runlibfile /runlibfile load def /.runlibfile /runlibfile load def

View File

@ -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

View File

@ -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)

View File

@ -1,11 +1,11 @@
%define gs_ver 9.14 %define gs_ver 9.15
%define gs_dot_ver 9.14 %define gs_dot_ver 9.15
%{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}} %{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}}
Summary: A PostScript interpreter and renderer Summary: A PostScript interpreter and renderer
Name: ghostscript Name: ghostscript
Version: %{gs_ver} Version: %{gs_ver}
Release: 6%{?dist} Release: 1%{?dist}
# Included CMap data is Redistributable, no modification permitted, # Included CMap data is Redistributable, no modification permitted,
# see http://bugzilla.redhat.com/487510 # see http://bugzilla.redhat.com/487510
@ -27,12 +27,7 @@ Patch3: ghostscript-noopt.patch
Patch4: ghostscript-runlibfileifexists.patch Patch4: ghostscript-runlibfileifexists.patch
Patch5: ghostscript-icc-missing-check.patch Patch5: ghostscript-icc-missing-check.patch
Patch6: ghostscript-Fontmap.local.patch Patch6: ghostscript-Fontmap.local.patch
Patch7: ghostscript-iccprofiles-initdir.patch Patch7: ghostscript-wrf-snprintf.patch
Patch9: ghostscript-wrf-snprintf.patch
Patch10: ghostscript-gs694154.patch
Patch11: ghostscript-sys-zlib.patch
Patch12: ghostscript-crash.patch
Patch13: ghostscript-trio-g.patch
Requires: urw-fonts >= 1.1, ghostscript-fonts Requires: urw-fonts >= 1.1, ghostscript-fonts
Requires: poppler-data Requires: poppler-data
@ -124,23 +119,8 @@ rm -rf expat freetype icclib jasper jpeg jpegxr lcms lcms2 libpng openjpeg zlib
# package manifest. # package manifest.
%patch6 -p1 %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). # Use more caution when converting floats to strings (bug #980085).
%patch9 -p1 -b .wrf-snprintf %patch7 -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
# Convert manual pages to UTF-8 # Convert manual pages to UTF-8
from8859_1() { from8859_1() {
@ -333,6 +313,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libgs.so %{_libdir}/libgs.so
%changelog %changelog
* Tue Sep 23 2014 Tim Waugh <twaugh@redhat.com> 9.15-1
- 9.15. No longer need iccprofiles-initdir, gs694154, crash, sys-zlib,
or trio-g patches.
* Tue Sep 9 2014 Tim Waugh <twaugh@redhat.com> * Tue Sep 9 2014 Tim Waugh <twaugh@redhat.com>
- No need to apply patch for already-applied gdevcups-debug-uninit. - No need to apply patch for already-applied gdevcups-debug-uninit.

View File

@ -1,3 +1,3 @@
2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz 2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz
dfc93dd2aaaf2b86d2fd55f654c13261 adobe-cmaps-200406.tar.gz dfc93dd2aaaf2b86d2fd55f654c13261 adobe-cmaps-200406.tar.gz
20880993fe6f8745ffa029215fb1d474 ghostscript-9.14-cleaned.tar.bz2 9fec54ad60a6c6358257d591312df039 ghostscript-9.15-cleaned.tar.bz2