dev-libs/dee: fix sandbox issue and build with gcc-6
authorGilles Dartiguelongue <eva@gentoo.org>
Sun, 13 Nov 2016 00:28:37 +0000 (01:28 +0100)
committerGilles Dartiguelongue <eva@gentoo.org>
Sun, 13 Nov 2016 00:29:58 +0000 (01:29 +0100)
Port to gnome2.eclass and EAPI=6. Fix to follow Gnome team conventions.
Apply patch submitted upstream to fix build with gcc-6.

Gentoo-Bug: 586604
Gentoo-Bug: 594112

Package-Manager: portage-2.3.2

dev-libs/dee/dee-1.2.7-r1.ebuild [new file with mode: 0644]
dev-libs/dee/dee-1.2.7.ebuild
dev-libs/dee/files/dee-1.2.7-gcc-6-build.patch [new file with mode: 0644]

diff --git a/dev-libs/dee/dee-1.2.7-r1.ebuild b/dev-libs/dee/dee-1.2.7-r1.ebuild
new file mode 100644 (file)
index 0000000..a5b9987
--- /dev/null
@@ -0,0 +1,85 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit gnome2 python-r1 vala
+
+DESCRIPTION="Provide objects allowing to create Model-View-Controller type programs across DBus"
+HOMEPAGE="https://launchpad.net/dee/"
+SRC_URI="https://launchpad.net/dee/1.0/${PV}/+download/${P}.tar.gz"
+
+SLOT="0/4"
+LICENSE="GPL-3"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug examples +icu introspection static-libs test"
+
+REQUIRED_USE="introspection? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+       dev-libs/glib:2
+       icu? ( dev-libs/icu:= )
+       introspection? (
+               ${PYTHON_DEPS}
+               >=dev-libs/gobject-introspection-0.10.2:=
+       )
+"
+DEPEND="${RDEPEND}
+       $(vala_depend)
+       >=dev-util/gtk-doc-am-1.8
+       virtual/pkgconfig
+       test? (
+               >=dev-libs/gtx-0.2.2
+               dev-util/dbus-test-runner
+       )
+"
+
+src_prepare() {
+       # Fix build with gcc-6, bug #594112
+       eapply "${FILESDIR}"/${PN}-1.2.7-gcc-6-build.patch
+
+       sed \
+               -e 's:VALA_API_GEN:VAPIGEN:g' \
+               -i vapi/Makefile.{am,in} || die
+
+       sed \
+               -e '/SUBDIRS/ s:bindings::g' \
+               -i Makefile.{am,in} || die
+
+       vala_src_prepare
+       gnome2_src_prepare
+
+       sed \
+               -e '/GCC_FLAGS/ s:-g::' \
+               -e 's:VALA_API_GEN:VAPIGEN:g' \
+               -i configure || die
+
+}
+
+src_configure() {
+       gnome2_src_configure \
+               $(use_enable debug trace-log) \
+               $(use_enable icu) \
+               $(use_enable introspection) \
+               $(use_enable static-libs static) \
+               $(use_enable test tests)
+}
+
+src_install() {
+       gnome2_src_install
+
+       if use examples ; then
+               insinto /usr/share/doc/${PN}/
+               doins -r examples
+       fi
+
+       if use introspection ; then
+               install_gi_override() {
+                       python_moduleinto "$(python_get_sitedir)/gi/overrides"
+                       python_domodule "${S}"/bindings/python/Dee.py
+               }
+               python_foreach_impl install_gi_override
+       fi
+}
index d401a6301860e56ffb245f248b5a493b754a32fd..10eeb5858edc424c7b2feabdd5d865244bf3bb4f 100644 (file)
@@ -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$
 
@@ -26,7 +26,7 @@ RDEPEND="
        dev-libs/icu:=
        introspection? (
                ${PYTHON_DEPS}
-               dev-libs/gobject-introspection
+               dev-libs/gobject-introspection:=
                )"
 DEPEND="${RDEPEND}
        $(vala_depend)
diff --git a/dev-libs/dee/files/dee-1.2.7-gcc-6-build.patch b/dev-libs/dee/files/dee-1.2.7-gcc-6-build.patch
new file mode 100644 (file)
index 0000000..047ce40
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/src/dee-serializable-model.c     2013-09-16 20:21:20.000000000 +0200
++++ b/src/dee-serializable-model.c     2016-05-08 16:49:03.525140126 +0200
+@@ -1326,9 +1326,10 @@
+ 
+   pos = 0;
+   _iter = dee_model_get_first_iter (self);
+-  while (!dee_model_is_last (self, iter) && iter != _iter)
++  while (!dee_model_is_last (self, iter) && iter != _iter) {
+     _iter = dee_model_next (self, _iter);
+     pos++;
++  }
+ 
+   if (iter == _iter)
+     return pos;