commit:     6c57d091a0e723d3182b0de13a7f1df7d54a9d6f
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu May 11 05:33:45 2017 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu May 11 05:33:45 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c57d091

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

 .../files/spice-gtk-0.33-sys-sysmacros.h.patch     | 44 ++++++++++++++++++++++
 ...gtk-0.33-r1.ebuild => spice-gtk-0.33-r2.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 00000000000..902ee9dd029
--- /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 <pgr...@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 <victort...@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
similarity index 96%
rename from net-misc/spice-gtk/spice-gtk-0.33-r1.ebuild
rename to net-misc/spice-gtk/spice-gtk-0.33-r2.ebuild
index 2001af98eda..26dba5b782f 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
 }

Reply via email to