[147359] trunk/dports/print/libspectre

devans at macports.org devans at macports.org
Sat Apr 2 07:01:38 PDT 2016


Revision: 147359
          https://trac.macports.org/changeset/147359
Author:   devans at macports.org
Date:     2016-04-02 07:01:38 -0700 (Sat, 02 Apr 2016)
Log Message:
-----------
libspectre: patch to fix build for ghostscript 9.18+ (#51031).

Modified Paths:
--------------
    trunk/dports/print/libspectre/Portfile

Added Paths:
-----------
    trunk/dports/print/libspectre/files/
    trunk/dports/print/libspectre/files/patch-ghostscript-9.18.diff

Modified: trunk/dports/print/libspectre/Portfile
===================================================================
--- trunk/dports/print/libspectre/Portfile	2016-04-02 13:51:11 UTC (rev 147358)
+++ trunk/dports/print/libspectre/Portfile	2016-04-02 14:01:38 UTC (rev 147359)
@@ -27,6 +27,8 @@
 depends_lib     port:ghostscript \
                 path:lib/pkgconfig/cairo.pc:cairo
 
+patchfiles      patch-ghostscript-9.18.diff
+
 variant docs description "Build documentation" {
     depends_build   port:doxygen \
                     path:bin/dot:graphviz

Added: trunk/dports/print/libspectre/files/patch-ghostscript-9.18.diff
===================================================================
--- trunk/dports/print/libspectre/files/patch-ghostscript-9.18.diff	                        (rev 0)
+++ trunk/dports/print/libspectre/files/patch-ghostscript-9.18.diff	2016-04-02 14:01:38 UTC (rev 147359)
@@ -0,0 +1,45 @@
+Fixed error namespace for >=ghostscript-gpl-9.18
+
+https://trac.macports.org/ticket/51031
+http://bugs.ghostscript.com/show_bug.cgi?id=696317
+https://bugs.freedesktop.org/show_bug.cgi?id=92637
+https://bugs.gentoo.org/563540
+
+--- libspectre/spectre-gs.c
++++ libspectre/spectre-gs.c
+@@ -43,12 +43,12 @@
+ 	
+ 	if (code <= -100) {
+ 		switch (code) {
+-			case e_Fatal:
++			case gs_error_Fatal:
+ 				fprintf (stderr, "fatal internal error %d", code);
+ 				return TRUE;
+ 				break;
+ 
+-			case e_ExecStackUnderflow:
++			case gs_error_ExecStackUnderflow:
+ 				fprintf (stderr, "stack overflow %d", code);
+ 				return TRUE;
+ 				break;
+@@ -109,9 +109,9 @@
+ 		set = _spectre_strdup_printf ("%d %d translate\n", -x, -y);
+ 		error = gsapi_run_string_continue (ghostscript_instance, set, strlen (set),
+ 						   0, &exit_code);
+-		error = error == e_NeedInput ? 0 : error;
++		error = error == gs_error_NeedInput ? 0 : error;
+ 		free (set);
+-		if (error != e_NeedInput && critic_error_code (error)) {
++		if (error != gs_error_NeedInput && critic_error_code (error)) {
+ 			fclose (fd);
+ 			return FALSE;
+ 		}
+@@ -126,7 +126,7 @@
+ 		read = fread (buf, sizeof (char), to_read, fd);
+ 		error = gsapi_run_string_continue (ghostscript_instance,
+ 						   buf, read, 0, &exit_code);
+-		error = error == e_NeedInput ? 0 : error;
++		error = error == gs_error_NeedInput ? 0 : error;
+ 		left -= read;
+ 	}
+ 	
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160402/d8ecc12b/attachment.html>


More information about the macports-changes mailing list