Accepting request 338022 from home:jsmeix:branches:Printing

Ghostscript 9.18 upstream fix for http://bugs.ghostscript.com/show_bug.cgi?id=696246

OBS-URL: https://build.opensuse.org/request/show/338022
OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript?expand=0&rev=58
This commit is contained in:
Johannes Meixner 2015-10-12 09:24:10 +00:00 committed by Git OBS Bridge
parent a1523b6cd0
commit 1bb98aba3f
5 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,47 @@
--- devices/gdevijs.c.orig 2015-10-05 10:21:11.000000000 +0200
+++ devices/gdevijs.c 2015-10-12 10:17:53.000000000 +0200
@@ -827,6 +827,10 @@ gsijs_open(gx_device *dev)
if (code < 0)
return code;
+ while (dev->child)
+ dev = dev->child;
+ ijsdev = (gx_device_ijs *)dev;
+
if (use_outputfd) {
/* Note: dup() may not be portable to all interesting IJS
platforms. In that case, this branch should be #ifdef'ed out.
--- base/gdevdflt.c.orig 2015-10-05 10:21:11.000000000 +0200
+++ base/gdevdflt.c 2015-10-12 10:21:11.000000000 +0200
@@ -17,6 +17,8 @@
#include "math_.h"
#include "memory_.h"
#include "gx.h"
+#include "gsstruct.h"
+#include "gxobj.h"
#include "gserrors.h"
#include "gsropt.h"
#include "gxcomp.h"
@@ -1294,6 +1296,11 @@ int gx_device_subclass(gx_device *dev_to
ptr1 = ((char *)new_prototype) + sizeof(gx_device);
memcpy(ptr, ptr1, new_prototype->params_size - sizeof(gx_device));
+ /* We have to patch up the "type" parameters that the memory manage/garbage
+ * collector will use, as well.
+ */
+ (((obj_header_t *)dev_to_subclass) - 1)->o_type = new_prototype->stype;
+
/* If the original device's stype structure was dynamically allocated, we need
* to 'fixup' the contents, it's procs need to point to the new device's procs
* for instance.
--- base/lib.mak.orig 2015-10-05 10:21:11.000000000 +0200
+++ base/lib.mak 2015-10-12 10:22:51.000000000 +0200
@@ -1210,7 +1210,7 @@ $(GLOBJ)gdevdsha.$(OBJ) : $(GLSRC)gdevds
$(GLOBJ)gdevdflt.$(OBJ) : $(GLSRC)gdevdflt.c $(AK) $(gx_h)\
$(gserrors_h) $(gsropt_h) $(gxcomp_h) $(gxdevice_h) $(gxdevsop_h) $(math__h)\
- $(MAKEDIRS)
+ $(gsstruct_h) $(gxobj_h) $(MAKEDIRS)
$(GLCC) $(GLO_)gdevdflt.$(OBJ) $(C_) $(GLSRC)gdevdflt.c
$(GLOBJ)gdevdgbr.$(OBJ) : $(GLSRC)gdevdgbr.c $(AK) $(gx_h)\

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 12 10:26:52 CEST 2015 - jsmeix@suse.de
- fix_ijs_and_x11_for_FirstPage_and_LastPage.patch
fixes the Ghostscript device ijs and the x11* devices
so that they also work when -dFirstPage/-dLastPage is used,
see http://bugs.ghostscript.com/show_bug.cgi?id=696246
-------------------------------------------------------------------
Tue Oct 6 10:21:22 CEST 2015 - jsmeix@suse.de

View File

@ -63,6 +63,11 @@ Release: 0
# MD5 checksum for Source0: 33a47567d7a591c00a253caddd12a88a
Source0: http://downloads.ghostscript.com/public/ghostscript-%{version}.tar.gz
# Patch0...Patch9 is for patches from upstream:
# Patch1 fix_ijs_and_x11_for_FirstPage_and_LastPage.patch
# fixes the Ghostscript device ijs and the x11* devices
# so that they also work when -dFirstPage/-dLastPage is used,
# see http://bugs.ghostscript.com/show_bug.cgi?id=696246
Patch1: fix_ijs_and_x11_for_FirstPage_and_LastPage.patch
# Source10...Source99 is for sources from SUSE which are intended for upstream:
# Patch10...Patch99 is for patches from SUSE which are intended for upstream:
# Patch11 ppc64le-support.patch is a remainder of the previous patch
@ -140,6 +145,11 @@ This package contains the development files for Minimal Ghostscript.
# Be quiet when unpacking and
# use a directory name matching Source0 to make it work also for ghostscript-mini:
%setup -q -n ghostscript-%{tarball_version}
# Patch1 fix_ijs_and_x11_for_FirstPage_and_LastPage.patch
# fixes the Ghostscript device ijs and the x11* devices
# so that they also work when -dFirstPage/-dLastPage is used,
# see http://bugs.ghostscript.com/show_bug.cgi?id=696246
%patch1 -b fix_ijs_and_x11_for_FirstPage_and_LastPage.orig
# Patch11 ppc64le-support.patch is a remainder of the previous patch
# now the hunk for LCMS (lcms/include/lcms.h) is removed
# because LCMS 1.x is removed since Ghostscript 9.16

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 12 10:26:52 CEST 2015 - jsmeix@suse.de
- fix_ijs_and_x11_for_FirstPage_and_LastPage.patch
fixes the Ghostscript device ijs and the x11* devices
so that they also work when -dFirstPage/-dLastPage is used,
see http://bugs.ghostscript.com/show_bug.cgi?id=696246
-------------------------------------------------------------------
Tue Oct 6 10:21:22 CEST 2015 - jsmeix@suse.de

View File

@ -83,6 +83,11 @@ Release: 0
# MD5 checksum for Source0: 33a47567d7a591c00a253caddd12a88a
Source0: http://downloads.ghostscript.com/public/ghostscript-%{version}.tar.gz
# Patch0...Patch9 is for patches from upstream:
# Patch1 fix_ijs_and_x11_for_FirstPage_and_LastPage.patch
# fixes the Ghostscript device ijs and the x11* devices
# so that they also work when -dFirstPage/-dLastPage is used,
# see http://bugs.ghostscript.com/show_bug.cgi?id=696246
Patch1: fix_ijs_and_x11_for_FirstPage_and_LastPage.patch
# Source10...Source99 is for sources from SUSE which are intended for upstream:
# Patch10...Patch99 is for patches from SUSE which are intended for upstream:
# Patch11 ppc64le-support.patch is a remainder of the previous patch
@ -277,6 +282,11 @@ This package contains the development files for Ghostscript.
# Be quiet when unpacking and
# use a directory name matching Source0 to make it work also for ghostscript-mini:
%setup -q -n ghostscript-%{tarball_version}
# Patch1 fix_ijs_and_x11_for_FirstPage_and_LastPage.patch
# fixes the Ghostscript device ijs and the x11* devices
# so that they also work when -dFirstPage/-dLastPage is used,
# see http://bugs.ghostscript.com/show_bug.cgi?id=696246
%patch1 -b fix_ijs_and_x11_for_FirstPage_and_LastPage.orig
# Patch11 ppc64le-support.patch is a remainder of the previous patch
# now the hunk for LCMS (lcms/include/lcms.h) is removed
# because LCMS 1.x is removed since Ghostscript 9.16