Skip to content

Commit

Permalink
media-gfx/graphviz: Add conditional macro definition
Browse files Browse the repository at this point in the history
Gentoo-bug: 574484
* Merged the 3 following upstream commits into one patch:
- ellson/MOTHBALLED-graphviz@8da5396
- ellson/MOTHBALLED-graphviz@f97c86e
- ellson/MOTHBALLED-graphviz@c3e9169

Package-Manager: portage-2.3.0
  • Loading branch information
SoapGentoo committed Aug 26, 2016
1 parent f077caf commit eece125
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
32 changes: 32 additions & 0 deletions media-gfx/graphviz/files/graphviz-2.38.0-ghostscript-9.18.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 8da53964edec8a665c3996d483df243eb150c2c4 Mon Sep 17 00:00:00 2001
From: Jakob Nixdorf <[email protected]>
Date: Fri, 22 Jan 2016 20:10:42 +0100
Subject: [PATCH] Fix build with ghostscript-9.18.

--- a/plugin/gs/gvloadimage_gs.c
+++ b/plugin/gs/gvloadimage_gs.c
@@ -32,6 +32,24 @@
#include <ghostscript/ierrors.h>
#include <cairo/cairo.h>

+
+/**
+ * Ensure compatibility with Ghostscipt versions newer than 9.18
+ * while maintaining compatibility with the older versions.
+ **/
+
+#ifndef e_VMerror
+#define e_VMerror gs_error_VMerror
+#endif
+
+#ifndef e_unregistered
+#define e_unregistered gs_error_unregistered
+#endif
+
+#ifndef e_invalidid
+#define e_invalidid gs_error_invalidid
+#endif
+
#ifdef WIN32
#define NUL_FILE "nul"
#else
7 changes: 4 additions & 3 deletions media-gfx/graphviz/graphviz-2.38.0-r1.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

Expand Down Expand Up @@ -140,7 +140,8 @@ pkg_setup() {
src_prepare() {
epatch \
"${FILESDIR}"/${PN}-2.34.0-Xaw-configure.patch \
"${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch
"${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch \
"${FILESDIR}"/${PN}-2.38.0-ghostscript-9.18.patch

# ToDo: Do the same thing for examples and/or
# write a patch for a configuration-option
Expand All @@ -155,7 +156,7 @@ src_prepare() {
# This is an old version of libtool
# use the ./configure option to exclude its use, and
# delete the dir since we don't need to eautoreconf it
rm -rf libltdl
rm -rf libltdl || die

# no nls, no gettext, no iconv macro, so disable it
use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
Expand Down

0 comments on commit eece125

Please sign in to comment.