summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2017-05-11 00:33:45 -0500
committerMatthias Maier <tamiko@gentoo.org>2017-05-11 00:33:45 -0500
commit6c57d091a0e723d3182b0de13a7f1df7d54a9d6f (patch)
tree1624bcf48672f8e8d195dd4500453cf88188f948
parentnet-misc/spice-gtk: remove WANT_AUTOMAKE, bug #613600 (diff)
downloadgentoo-6c57d091a0e723d3182b0de13a7f1df7d54a9d6f.tar.gz
gentoo-6c57d091a0e723d3182b0de13a7f1df7d54a9d6f.tar.bz2
gentoo-6c57d091a0e723d3182b0de13a7f1df7d54a9d6f.zip
net-misc/spice-gtk: fix compile error, bug #604828
Fix a compilation issue ./.../libspice-client-glib-2.0.so: undefined reference to `minor' by applying the corresponding upstream patch. Thanks to Erik and Alexander for the patches. Package-Manager: Portage-2.3.5, Repoman-2.3.2
-rw-r--r--net-misc/spice-gtk/files/spice-gtk-0.33-sys-sysmacros.h.patch44
-rw-r--r--net-misc/spice-gtk/spice-gtk-0.33-r2.ebuild (renamed from net-misc/spice-gtk/spice-gtk-0.33-r1.ebuild)12
2 files changed, 50 insertions, 6 deletions
diff --git a/net-misc/spice-gtk/files/spice-gtk-0.33-sys-sysmacros.h.patch b/net-misc/spice-gtk/files/spice-gtk-0.33-sys-sysmacros.h.patch
new file mode 100644
index 000000000000..902ee9dd0292
--- /dev/null
+++ b/net-misc/spice-gtk/files/spice-gtk-0.33-sys-sysmacros.h.patch
@@ -0,0 +1,44 @@
+From a27a83da30d58511b2a5f2cdb13ebd4fca7a3d0a Mon Sep 17 00:00:00 2001
+From: Pavel Grunt <pgrunt@redhat.com>
+Date: Tue, 1 Nov 2016 17:08:01 +0100
+Subject: [PATCH] Adjust include header to new location of macros
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+minor & major macros were moved to sysmacros.h
+
+usbutil.c: In function ‘spice_usbutil_get_sysfs_attribute’:
+usbutil.c:110:14: warning: ‘__major_from_sys_types’ is deprecated:
+ In the GNU C Library, `major' is defined by <sys/sysmacros.h>.
+ For historical compatibility, it is currently defined by
+ <sys/types.h> as well, but we plan to remove this soon.
+ To use `major', include <sys/sysmacros.h> directly.
+ If you did not intend to use a system-defined macro `major',
+ you should #undef it after including <sys/types.h>.
+ [-Wdeprecated-declarations]
+ major(stat_buf.st_rdev), minor(stat_buf.st_rdev), attribute);
+
+Acked-by: Victor Toso <victortoso@redhat.com>
+---
+ src/usbutil.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/usbutil.c b/src/usbutil.c
+index 7bfbe44..b68a2e1 100644
+--- a/src/usbutil.c
++++ b/src/usbutil.c
+@@ -30,7 +30,10 @@
+ #ifdef __linux__
+ #include <stdio.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
++#ifndef major /* major and minor macros were moved to sys/sysmacros.h from sys/types.h */
+ #include <sys/types.h>
++#endif
+ #include <sys/stat.h>
+ #endif
+ #include "usbutil.h"
+--
+2.10.2
+
diff --git a/net-misc/spice-gtk/spice-gtk-0.33-r1.ebuild b/net-misc/spice-gtk/spice-gtk-0.33-r2.ebuild
index 2001af98eda2..26dba5b782f0 100644
--- a/net-misc/spice-gtk/spice-gtk-0.33-r1.ebuild
+++ b/net-misc/spice-gtk/spice-gtk-0.33-r2.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=6
GCONF_DEBUG="no"
VALA_MIN_API_VERSION="0.14"
VALA_USE_DEPEND="vapigen"
@@ -73,14 +73,14 @@ DEPEND="${RDEPEND}
vala? ( $(vala_depend) )
"
-# Hard-deps while building from git:
-# dev-lang/vala:0.14
-# dev-lang/perl
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.33-sys-sysmacros.h.patch
+)
src_prepare() {
- epatch_user
+ default
- AT_NO_RECURSIVE="yes" eautoreconf
+ eautoreconf
use vala && vala_src_prepare
}