rebase to new version 10.0.0 (#2128814)

This commit is contained in:
Richard Lescak 2023-01-24 09:59:41 +01:00
parent ebdac3030c
commit e5f608f403
9 changed files with 9 additions and 153 deletions

1
.gitignore vendored
View File

@ -61,3 +61,4 @@ ghostscript-8.71.tar.xz
/ghostscript-9.54.0.tar.xz
/ghostscript-9.55.0.tar.xz
/ghostscript-9.56.1.tar.xz
/ghostscript-10.0.0.tar.xz

View File

@ -1,18 +0,0 @@
base/gsicc_lcms2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/gsicc_lcms2.c b/base/gsicc_lcms2.c
index ccf1d7051..9badb6dee 100644
--- a/base/gsicc_lcms2.c
+++ b/base/gsicc_lcms2.c
@@ -462,7 +462,7 @@ int
gscms_transform_color(gx_device *dev, gsicc_link_t *icclink, void *inputcolor,
void *outputcolor, int num_bytes)
{
- return gscms_transformm_color_const(dev, icclink, inputcolor, outputcolor, num_bytes);
+ return gscms_transform_color_const(dev, icclink, inputcolor, outputcolor, num_bytes);
}
int
--
2.33.0

View File

@ -1,12 +0,0 @@
diff -up ghostscript-9.55.0/base/gdevdbit.c.fix-gx_default_copy_alpha-calling-get_bits_rectangle ghostscript-9.55.0/base/gdevdbit.c
--- ghostscript-9.55.0/base/gdevdbit.c.fix-gx_default_copy_alpha-calling-get_bits_rectangle 2021-12-30 18:39:58.655089208 -0500
+++ ghostscript-9.55.0/base/gdevdbit.c 2021-12-30 18:40:57.458462173 -0500
@@ -379,7 +379,7 @@ gx_default_copy_alpha(gx_device * dev, c
int l_xprev = x;
gs_get_bits_params_t params;
- params.options = (GB_ALIGN_ANY |
+ params.options = (GB_ALIGN_STANDARD |
(GB_RETURN_COPY | GB_RETURN_POINTER) |
GB_OFFSET_0 |
GB_RASTER_STANDARD | GB_PACKING_CHUNKY |

View File

@ -1,35 +0,0 @@
From 50e114295a65cceac49123f359e24f2f5007110a Mon Sep 17 00:00:00 2001
Message-Id: <50e114295a65cceac49123f359e24f2f5007110a.1662477568.git.mjg@fedoraproject.org>
From: Ken Sharp <ken.sharp@artifex.com>
Date: Tue, 6 Sep 2022 14:39:33 +0100
Subject: [PATCH] GhostPDF + GS - fix PDFFitPage with square MediaBox
Bug #705849 "New PDF interpreter errors out with PDFFitPage"
If the input PDF file had square media then we would correctly decide
we did not need to rotate the media for a better fit, but we left the
values we would normally use to calculate if rotation was required on
the operand stack, resulting in an error.
Pop the unused values.
Signed-off-by: Michael J Gruber <mjg@fedoraproject.org>
---
Resource/Init/pdf_main.ps | 1 +
1 file changed, 1 insertion(+)
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
index 3259c0fe3..27eb7ab33 100644
--- a/Resource/Init/pdf_main.ps
+++ b/Resource/Init/pdf_main.ps
@@ -364,6 +364,7 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
3 1 roll eq
or % square media or square page, no point in rotating
{
+ pop pop pop pop
//false
}
{
--
2.37.2.827.g188294c313

View File

@ -1,76 +0,0 @@
From 61ee992bf2e132da2168754f587fcf163a68eb12 Mon Sep 17 00:00:00 2001
Message-Id: <61ee992bf2e132da2168754f587fcf163a68eb12.1666169658.git.mjg@fedoraproject.org>
From: Ken Sharp <ken.sharp@artifex.com>
Date: Thu, 19 May 2022 16:59:05 +0100
Subject: [PATCH] GhostPDF - use proper bounds check for subfunctions of type 3
Bug #705225 "Gradients not rendered with the new PDF interpreter"
The files in question have some remarkably complicated functions used
to define a shading. One has a type 3 stitching function with 33 type 2
subfunctions, to define basically a blue fill....
The Domain of the shading is, additionally, unusual ranging from
negative to positive instead of the more usual 0 to N for the parametric
variable.
The problem is that we were comparing the Domain of each subfunction
against the Domain of the shading function, when in fact each sub
function uses the relevant Encode parameter of the type 3 function
and it is this that we should be checking against the Domain of the sub
function.
---
pdf/pdf_func.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/pdf/pdf_func.c b/pdf/pdf_func.c
index 9537152ed..6e2d4e4e9 100644
--- a/pdf/pdf_func.c
+++ b/pdf/pdf_func.c
@@ -560,6 +560,18 @@ pdfi_build_function_3(pdf_context *ctx, gs_function_params_t * mnDR,
params.Functions = (const gs_function_t * const *)ptr;
+ code = pdfi_make_float_array_from_dict(ctx, (float **)&params.Bounds, function_dict, "Bounds");
+ if (code < 0)
+ goto function_3_error;
+
+ code = pdfi_make_float_array_from_dict(ctx, (float **)&params.Encode, function_dict, "Encode");
+ if (code < 0)
+ goto function_3_error;
+
+ if (code != 2 * params.k)
+ goto function_3_error;
+ code = 0;
+
for (i = 0; i < params.k; ++i) {
pdf_obj * rsubfn = NULL;
@@ -578,23 +590,12 @@ pdfi_build_function_3(pdf_context *ctx, gs_function_params_t * mnDR,
if (code < 0)
goto function_3_error;
- code = pdfi_build_sub_function(ctx, &ptr[i], shading_domain, num_inputs, rsubfn, page_dict);
+ code = pdfi_build_sub_function(ctx, &ptr[i], &params.Encode[i * 2], num_inputs, rsubfn, page_dict);
pdfi_countdown(rsubfn);
if (code < 0)
goto function_3_error;
}
- code = pdfi_make_float_array_from_dict(ctx, (float **)&params.Bounds, function_dict, "Bounds");
- if (code < 0)
- goto function_3_error;
-
- code = pdfi_make_float_array_from_dict(ctx, (float **)&params.Encode, function_dict, "Encode");
- if (code < 0)
- goto function_3_error;
-
- if (code != 2 * params.k)
- goto function_3_error;
-
if (params.Range == 0)
params.n = params.Functions[0]->params.n;
--
2.38.0.124.g8fc341881c

View File

@ -44,8 +44,8 @@
Name: ghostscript
Summary: Interpreter for PostScript language & PDF
Version: 9.56.1
Release: 7%{?dist}
Version: 10.0.0
Release: 1%{?dist}
License: AGPLv3+
@ -103,10 +103,9 @@ BuildRequires: make
# Upstream patches -- official upstream patches released by upstream since the
# ---------------- last rebase that are necessary for any reason:
#Patch000: example000.patch
Patch000: ghostscript-9.56-fix-PDFFitPage-with-square-MediaBox.patch
Patch001: ghostscript-9.56.1-Fix-color-info-juggling-with-x11-devices.patch
Patch002: ghostscript-9.56.1-use-proper-bounds-check-for-subfunctions-of.patch
Patch003: ghostscript-9.56.1-Deal-with-different-VM-modes-during-CIDFont-loading.patch
Patch001: ghostscript-10.0.0-Fix-color-info-juggling-with-x11-devices.patch
Patch002: ghostscript-10.0.0-Deal-with-different-VM-modes-during-CIDFont-loading.patch
# Downstream patches -- these should be always included when doing rebase:
# ------------------
@ -437,11 +436,8 @@ done
# =============================================================================
%changelog
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 9.56.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sun Jan 8 2023 Tom Callaway <spot@fedoraproject.org> - 9.56.1-6
- rebuild for libpaper v2
* Mon Jan 23 2023 Richard Lescak <rlescak@redhat.com> - 10.0.0-1
- rebase to new version 10.0.0 (#2128814)
* Thu Oct 27 2022 Richard Lescak <rlescak@redhat.com> - 9.56.1-5
- fix loading of CIDFonts (#2137856)

View File

@ -1 +1 @@
SHA512 (ghostscript-9.56.1.tar.xz) = fe5a5103c081dd87cf8b3e0bbbd0df004c0e4e04e41bded7c70372916e6e26249a0e8fa434b561292964c5f3820ee6c60ef1557827a6efb5676012ccb73ded85
SHA512 (ghostscript-10.0.0.tar.xz) = 660252841e9b24c411bc92d0eb104de464686131e70051f60108db1a6ecfe2ada2ccacbeed8f2ac84bf69338ad75c850e814c9ac4e0351943f9989d66b3b082d