media-libs/ganv: fix compilation with USE=-fdgl
authorBen de Groot <yngwin@gentoo.org>
Fri, 28 Aug 2015 13:46:48 +0000 (21:46 +0800)
committerBen de Groot <yngwin@gentoo.org>
Fri, 28 Aug 2015 13:47:20 +0000 (21:47 +0800)
Upstream patch supplied by Karl Lindén. Adding him as proxy maintainer.

Bug: 556518

Package-Manager: portage-2.2.20.1

media-libs/ganv/files/ganv-1.4.2-no-fdgl.patch [new file with mode: 0644]
media-libs/ganv/ganv-1.4.2.ebuild
media-libs/ganv/metadata.xml

diff --git a/media-libs/ganv/files/ganv-1.4.2-no-fdgl.patch b/media-libs/ganv/files/ganv-1.4.2-no-fdgl.patch
new file mode 100644 (file)
index 0000000..17cc243
--- /dev/null
@@ -0,0 +1,42 @@
+Index: src/Canvas.cpp
+===================================================================
+--- src/Canvas.cpp     (revision 5479)
++++ src/Canvas.cpp     (revision 5480)
+@@ -760,6 +760,18 @@
+ }
+ #endif
++inline uint64_t
++get_monotonic_time()
++{
++#if GLIB_CHECK_VERSION(2, 28, 0)
++      return g_get_monotonic_time();
++#else
++      GTimeVal time;
++      g_get_current_time(&time);
++      return time.tv_sec + time.tv_usec;
++#endif
++}
++
+ #ifdef GANV_FDGL
+ inline Region
+@@ -788,18 +800,6 @@
+       b->impl->force = vec_sub(b->impl->force, f);
+ }
+-inline uint64_t
+-get_monotonic_time()
+-{
+-#if GLIB_CHECK_VERSION(2, 28, 0)
+-      return g_get_monotonic_time();
+-#else
+-      GTimeVal time;
+-      g_get_current_time(&time);
+-      return time.tv_sec + time.tv_usec;
+-#endif
+-}
+-
+ gboolean
+ GanvCanvasImpl::layout_iteration()
+ {
index 11adbd7c294965295ad9cda546426ab56c076afc..d29a09de0eea485940b38f7868461c37ee105131 100644 (file)
@@ -5,7 +5,7 @@
 EAPI=5
 PYTHON_COMPAT=( python2_7 )
 PYTHON_REQ_USE='threads(+)'
-inherit waf-utils python-any-r1
+inherit eutils waf-utils python-any-r1
 
 DESCRIPTION="A GTK+ widget for interactive graph-like environments"
 HOMEPAGE="http://drobilla.net/software/ganv/"
@@ -27,6 +27,10 @@ DEPEND="${RDEPEND}
 
 DOCS=( AUTHORS NEWS README )
 
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-no-fdgl.patch
+}
+
 src_configure() {
        waf-utils_src_configure \
                $(use graphviz || echo "--no-graphviz") \
index bd43bef08dd3ab41b44a24f7c73936027e860d5a..8f0e433951ee10fc8dac92957d4e8e530eae0ab6 100644 (file)
@@ -1,6 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
+  <maintainer>
+    <email>karl.j.linden@gmail.com</email>
+    <name>Karl Lindén</name>
+  </maintainer>
   <herd>proaudio</herd>
   <use>
     <flag name="fdgl">Use experimental force-directed graph layout</flag>