dev-libs/dee: fix sandbox issue and build with gcc-6

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
This commit is contained in:
Gilles Dartiguelongue
2016-11-13 01:28:37 +01:00
parent 8b341e9fa9
commit 86eb107fa6
3 changed files with 101 additions and 2 deletions

View File

@@ -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
}

View 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)

View File

@@ -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;