summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichard <richard>2015-12-13 17:44:45 +0000
committerrichard <richard>2015-12-13 17:44:45 +0000
commit9fc83dff045c8a3e7ae423c0da6a90e22ee087f2 (patch)
tree9cd3e487d63959c74ee9fcad5f121319858446f6
parentb33dacd3840e9a6f5511f5e64f52afa3f394db9d (diff)
downloadpkgsrc-9fc83dff045c8a3e7ae423c0da6a90e22ee087f2.tar.gz
Prod graphviz to support both ghostscript agpl as well as gpl,
gs agpl enforces using gserrors.h which isn't installed by gs gpl.
-rw-r--r--graphics/graphviz/distinfo3
-rw-r--r--graphics/graphviz/patches/patch-plugin_gs_gvloadimage__gs.c34
2 files changed, 36 insertions, 1 deletions
diff --git a/graphics/graphviz/distinfo b/graphics/graphviz/distinfo
index 3bfa0660c84..7703e962d36 100644
--- a/graphics/graphviz/distinfo
+++ b/graphics/graphviz/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.55 2015/11/03 21:34:02 agc Exp $
+$NetBSD: distinfo,v 1.56 2015/12/13 17:44:45 richard Exp $
SHA1 (graphviz-2.38.0.tar.gz) = 053c771278909160916ca5464a0a98ebf034c6ef
RMD160 (graphviz-2.38.0.tar.gz) = a80c2fa6b9955444b2103a99167d7020b23e4c4e
@@ -10,4 +10,5 @@ SHA1 (patch-configure) = f772bedfac63c3b473ebae1621b72982a13fe5a3
SHA1 (patch-configure.ac) = ec844ae85b6be9cf095ec800df6983b061d62b5d
SHA1 (patch-lib_cgraph_scan.l) = 72cc178acb369007a4a672d20af196bb6b6df35b
SHA1 (patch-lib_gvc_Makefile.in) = 985ffe3efb0e7f876ece14dc0d2a719ec06357e2
+SHA1 (patch-plugin_gs_gvloadimage__gs.c) = b5b46a1e7dc52f163526c5b8b7e1b893d5500e3c
SHA1 (patch-plugin_xlib_gvdevice__xlib.c) = 932c337dcf9cb53d52f24c6c20818038ed169cd0
diff --git a/graphics/graphviz/patches/patch-plugin_gs_gvloadimage__gs.c b/graphics/graphviz/patches/patch-plugin_gs_gvloadimage__gs.c
new file mode 100644
index 00000000000..8a5f2661321
--- /dev/null
+++ b/graphics/graphviz/patches/patch-plugin_gs_gvloadimage__gs.c
@@ -0,0 +1,34 @@
+$NetBSD: patch-plugin_gs_gvloadimage__gs.c,v 1.1 2015/12/13 17:44:45 richard Exp $
+
+ghostscript-agpl enforces using gserrors.h which is not included
+by default in ghostscript-gpl, so conditionalise based upon which
+one is being used.
+
+--- plugin/gs/gvloadimage_gs.c.orig 2014-04-13 20:40:25.000000000 +0000
++++ plugin/gs/gvloadimage_gs.c
+@@ -72,6 +72,16 @@ static void gs_error(GVJ_t * job, const
+
+ assert (err < 0);
+
++#ifdef gserrors_INCLUDED /* ghostscript-agpl uses gserrors.h */
++ if (err >= gs_error_VMerror)
++ errsrc = "PostScript Level 1";
++ else if (err >= gs_error_unregistered)
++ errsrc = "PostScript Level 2";
++ else if (err >= gs_error_invalidid)
++ errsrc = "DPS error";
++ else
++ errsrc = "Ghostscript internal error";
++#else
+ if (err >= e_VMerror)
+ errsrc = "PostScript Level 1";
+ else if (err >= e_unregistered)
+@@ -80,7 +90,7 @@ static void gs_error(GVJ_t * job, const
+ errsrc = "DPS error";
+ else
+ errsrc = "Ghostscript internal error";
+-
++#endif
+ job->common->errorfn("%s: %s() returned: %d \"%s\" (%s)\n",
+ name, funstr, err, gs_error_names[-err - 1], errsrc);
+ }