aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-07-06 23:33:57 +0200
committerMarius Bakke <marius@gnu.org>2022-07-16 23:25:18 +0200
commit22b9a056ea0ebc77bd191e486f0bf3d1263add5b (patch)
treed5a5a4b4cfee3b539e899f11053764cc6672df6d
parent55e3b5fa2aeed6cb964ba55c001ce9d8610d3e05 (diff)
downloadguix-22b9a056ea0ebc77bd191e486f0bf3d1263add5b.tar.gz
guix-22b9a056ea0ebc77bd191e486f0bf3d1263add5b.zip
gnu: ghostscript: Update to 9.56.1.
* gnu/packages/ghostscript.scm (ghostscript): Update to 9.56.1. [arguments]: Remove #:parallel-tests?. Remove trailing #t's. * gnu/packages/patches/ghostscript-no-header-creationdate.patch, gnu/packages/patches/ghostscript-no-header-id.patch, gnu/packages/patches/ghostscript-no-header-uuid.patch: Rebase on 9.56.1.
-rw-r--r--gnu/packages/ghostscript.scm30
-rw-r--r--gnu/packages/patches/ghostscript-no-header-creationdate.patch20
-rw-r--r--gnu/packages/patches/ghostscript-no-header-id.patch29
-rw-r--r--gnu/packages/patches/ghostscript-no-header-uuid.patch11
4 files changed, 40 insertions, 50 deletions
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index f2d23c6e8a..d61f391189 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -148,7 +148,7 @@ printing, and psresize, for adjusting page sizes.")
(define-public ghostscript
(package
(name "ghostscript")
- (version "9.54.0")
+ (version "9.56.1")
(source
(origin
(method url-fetch)
@@ -158,7 +158,7 @@ printing, and psresize, for adjusting page sizes.")
"/ghostscript-" version ".tar.xz"))
(sha256
(base32
- "0fvfvv6di5s6j4sy4gaw65klm23dby39bkdjxxq4w3v0vqyb9dy2"))
+ "1r5qash65m6ignki6z72q4rlai9ka99xrxnmqd19n02has00cd6l"))
(patches (search-patches "ghostscript-no-header-creationdate.patch"
"ghostscript-no-header-id.patch"
"ghostscript-no-header-uuid.patch"))
@@ -170,19 +170,11 @@ printing, and psresize, for adjusting page sizes.")
;; Likewise for the thread-safe lcms2 fork called "lcms2art".
'(begin
(for-each delete-file-recursively '("freetype" "jbig2dec" "jpeg"
- "libpng" "tiff" "zlib"))
- #t))))
+ "libpng" "tiff" "zlib"))))))
(build-system gnu-build-system)
(outputs '("out" "doc")) ;19 MiB of HTML/PS doc + examples
(arguments
`(#:disallowed-references ("doc")
- ;; XXX: Starting with version 9.27, building the tests in parallel
- ;; occasionally fails like this:
- ;; In file included from ./base/memory_.h:23:0,
- ;; from ./obj/gsmd5.h:1,
- ;; from ./obj/gsmd5.c:56:
- ;; ./base/std.h:25:10: fatal error: arch.h: No such file or directory
- #:parallel-tests? #f
#:configure-flags
(list (string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %outputs "out") "/lib")
@@ -195,7 +187,6 @@ printing, and psresize, for adjusting page sizes.")
(string-append "--with-fontpath="
(assoc-ref %build-inputs "font-ghostscript")
"/share/fonts/type1/ghostscript")
-
,@(if (%current-target-system)
'(;; Specify the native compiler, which is used to build 'echogs'
;; and other intermediary tools when cross-compiling; see
@@ -212,8 +203,7 @@ printing, and psresize, for adjusting page sizes.")
(lambda* (#:key outputs #:allow-other-keys)
;; The configure script refuses to function if the directory
;; specified as -rpath does not already exist.
- (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))
- #t))
+ (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))))
(add-after 'configure 'remove-doc-reference
(lambda _
;; Don't retain a reference to the 'doc' output in 'gs'.
@@ -221,21 +211,18 @@ printing, and psresize, for adjusting page sizes.")
;; 'gs --help', so this change is fine.
(substitute* "base/gscdef.c"
(("GS_DOCDIR")
- "\"~/.guix-profile/share/doc/ghostscript\""))
- #t))
+ "\"~/.guix-profile/share/doc/ghostscript\""))))
(add-after 'configure 'patch-config-files
(lambda _
(substitute* "base/unixhead.mak"
- (("/bin/sh") (which "sh")))
- #t))
+ (("/bin/sh") (which "sh")))))
,@(if (%current-target-system)
`((add-after 'configure 'add-native-lz
(lambda _
;; Add missing '-lz' for native tools such as 'mkromfs'.
(substitute* "Makefile"
(("^AUXEXTRALIBS=(.*)$" _ value)
- (string-append "AUXEXTRALIBS = -lz " value "\n")))
- #t)))
+ (string-append "AUXEXTRALIBS = -lz " value "\n"))))))
'())
(replace 'build
(lambda _
@@ -250,8 +237,7 @@ printing, and psresize, for adjusting page sizes.")
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
;; Some programs depend on having a 'gs' binary available.
- (symlink "gsc" (string-append out "/bin/gs"))
- #t))))))
+ (symlink "gsc" (string-append out "/bin/gs"))))))))
(native-inputs
`(("perl" ,perl)
("pkg-config" ,pkg-config) ;needed for freetype
diff --git a/gnu/packages/patches/ghostscript-no-header-creationdate.patch b/gnu/packages/patches/ghostscript-no-header-creationdate.patch
index b19f3ab5d9..493693b78d 100644
--- a/gnu/packages/patches/ghostscript-no-header-creationdate.patch
+++ b/gnu/packages/patches/ghostscript-no-header-creationdate.patch
@@ -6,11 +6,11 @@ not write out the "/ID" field (if that's permissible).
Upstream does not want to do this.
See: https://bugs.ghostscript.com/show_bug.cgi?id=698208
-diff --git a/orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c b/bb/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c
-index 0fb067e..b342e2c 100644
---- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c
-+++ gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c
-@@ -305,6 +305,9 @@ pdf_initialize_ids(gx_device_pdf * pdev)
+diff --git a/devices/vector/gdevpdf.c b/devices/vector/gdevpdf.c
+index cb268f62e..c5abefde2 100644
+--- a/devices/vector/gdevpdf.c
++++ b/devices/vector/gdevpdf.c
+@@ -425,6 +425,9 @@ pdf_initialize_ids(gx_device_pdf * pdev)
* date and time, rather than (for example) %%CreationDate from the
* PostScript file. We think this is wrong, but we do the same.
*/
@@ -20,9 +20,11 @@ index 0fb067e..b342e2c 100644
{
struct tm tms;
time_t t;
---- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c
-+++ gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c
-@@ -692,6 +692,9 @@
+diff --git a/devices/vector/gdevpdfe.c b/devices/vector/gdevpdfe.c
+index ec011d8ba..f083f1e93 100644
+--- a/devices/vector/gdevpdfe.c
++++ b/devices/vector/gdevpdfe.c
+@@ -696,6 +696,9 @@ pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
pdf_xml_attribute_name(s, "xmlns:xmp");
pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/");
pdf_xml_tag_end(s);
@@ -32,7 +34,7 @@ index 0fb067e..b342e2c 100644
{
pdf_xml_tag_open_beg(s, "xmp:ModifyDate");
pdf_xml_tag_end(s);
-@@ -700,6 +701,9 @@
+@@ -704,6 +707,9 @@ pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
pdf_xml_tag_close(s, "xmp:ModifyDate");
pdf_xml_newline(s);
}
diff --git a/gnu/packages/patches/ghostscript-no-header-id.patch b/gnu/packages/patches/ghostscript-no-header-id.patch
index 45fc95fd6e..ef518b0fb2 100644
--- a/gnu/packages/patches/ghostscript-no-header-id.patch
+++ b/gnu/packages/patches/ghostscript-no-header-id.patch
@@ -6,38 +6,39 @@ not write out the "/ID" field (if that's permissible).
Upstream does not want to do this.
See: https://bugs.ghostscript.com/show_bug.cgi?id=698208
-diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c
---- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c 2017-07-09 23:30:28.960479189 +0200
-+++ gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c 2017-07-09 23:34:34.306524488 +0200
-@@ -1810,8 +1810,11 @@
+diff --git a/devices/vector/gdevpdf.c b/devices/vector/gdevpdf.c
+index c5abefde2..3859fc088 100644
+--- a/devices/vector/gdevpdf.c
++++ b/devices/vector/gdevpdf.c
+@@ -1909,8 +1909,11 @@ static int pdf_linearise(gx_device_pdf *pdev, pdf_linearisation_t *linear_params
* +1 for the linearisation dict and +1 for the primary hint stream.
*/
linear_params->FirsttrailerOffset = gp_ftell(linear_params->Lin_File.file);
-- gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n \n",
+- gs_snprintf(LDict, sizeof(LDict), "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n \n",
- linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber, fileID, fileID, 0);
-+ gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R",
++ gs_snprintf(LDict, sizeof(LDict), "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R",
+ linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber);
+ if (pdev->OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 && strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */
-+ gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID);
-+ gs_sprintf(LDict, "/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n \n", 0);
++ gs_snprintf(LDict, sizeof(LDict), "/ID[%s%s]", fileID, fileID);
++ gs_snprintf(LDict, sizeof(LDict), "/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n \n", 0);
gp_fwrite(LDict, strlen(LDict), 1, linear_params->Lin_File.file);
/* Write document catalog (Part 4) */
-@@ -2346,8 +2349,11 @@
+@@ -2445,8 +2448,11 @@ static int pdf_linearise(gx_device_pdf *pdev, pdf_linearisation_t *linear_params
if (code != 0)
return_error(gs_error_ioerror);
-- gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n",
+- gs_snprintf(LDict, sizeof(LDict), "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n",
- linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber, fileID, fileID, mainxref);
-+ gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R",
++ gs_snprintf(LDict, sizeof(LDict), "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R",
+ linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber);
+ if (pdev->OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 || strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */
-+ gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID);
-+ gs_sprintf(LDict, "/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n", mainxref);
++ gs_snprintf(LDict, sizeof(LDict), "/ID[%s%s]", fileID, fileID);
++ gs_snprintf(LDict, sizeof(LDict), "/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n", mainxref);
gp_fwrite(LDict, strlen(LDict), 1, linear_params->sfile);
code = gp_fseek(linear_params->sfile, pdev->ResourceUsage[HintStreamObj].LinearisedOffset, SEEK_SET);
-@@ -3012,10 +3018,12 @@
+@@ -3139,10 +3145,12 @@ pdf_close(gx_device * dev)
stream_puts(s, "trailer\n");
pprintld3(s, "<< /Size %ld /Root %ld 0 R /Info %ld 0 R\n",
pdev->next_id, Catalog_id, Info_id);
diff --git a/gnu/packages/patches/ghostscript-no-header-uuid.patch b/gnu/packages/patches/ghostscript-no-header-uuid.patch
index f4b55764c8..b277a4bc2e 100644
--- a/gnu/packages/patches/ghostscript-no-header-uuid.patch
+++ b/gnu/packages/patches/ghostscript-no-header-uuid.patch
@@ -8,10 +8,11 @@ field value as "".
Upstream does not want to do this.
See: https://bugs.ghostscript.com/show_bug.cgi?id=698208
-diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c aa/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c
---- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c 2017-07-09 23:30:28.960479189 +0200
-+++ gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c 2017-07-10 01:04:12.252478276 +0200
-@@ -620,7 +620,7 @@
+diff --git a/devices/vector/gdevpdfe.c b/devices/vector/gdevpdfe.c
+index f083f1e93..a19c64ac0 100644
+--- a/devices/vector/gdevpdfe.c
++++ b/devices/vector/gdevpdfe.c
+@@ -624,7 +624,7 @@ pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
return code;
/* PDF/A XMP reference recommends setting UUID to empty. If not empty must be a URI */
@@ -20,7 +21,7 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c aa/gnu-ghostscrip
instance_uuid[0] = 0x00;
cre_date_time_len = pdf_get_docinfo_item(pdev, "/CreationDate", cre_date_time, sizeof(cre_date_time));
-@@ -720,14 +720,17 @@
+@@ -730,14 +730,17 @@ pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
pdf_xml_tag_close(s, "rdf:Description");
pdf_xml_newline(s);