Gentoo Archives: gentoo-commits

From: Remi Cardona <remi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: app-editors/gedit/
Date: Fri, 28 Nov 2014 08:13:51
Message-Id: 1417162177.283fe267dd73c0cc07156647dafd156c82f3b8c3.remi@gentoo
1 commit: 283fe267dd73c0cc07156647dafd156c82f3b8c3
2 Author: RĂ©mi Cardona <remi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 27 23:56:59 2014 +0000
4 Commit: Remi Cardona <remi <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 28 08:09:37 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=283fe267
7
8 app-editors/gedit: Fix python handling
9
10 In gedit/gedit-plugins-engine.c, we can see that:
11
12 - gedit loads python through libpeas (so that's the only version of
13 python it supports),
14 - gedit's introspection data is indeed private and unavailable outside
15 gedit's python interpreter for plugins.
16
17 So here are the changes done to this ebuild:
18
19 - drop support for python 3.2, add support for 3.4,
20 - change deps to make sure gedit's python version matches that of
21 libpeas,
22 - adapt ebuild to a regular build with python_setup doing the python
23 selection.
24
25 Note: using python-single-r1 was impossible because libpeas still
26 supports python2. Using that eclass would have forced users to disable
27 python2 support.
28
29 ---
30 app-editors/gedit/gedit-3.14.1.ebuild | 45 ++++++++++++++---------------------
31 1 file changed, 18 insertions(+), 27 deletions(-)
32
33 diff --git a/app-editors/gedit/gedit-3.14.1.ebuild b/app-editors/gedit/gedit-3.14.1.ebuild
34 index 2d9be1a..d41d63e 100644
35 --- a/app-editors/gedit/gedit-3.14.1.ebuild
36 +++ b/app-editors/gedit/gedit-3.14.1.ebuild
37 @@ -5,7 +5,7 @@
38 EAPI="5"
39 GCONF_DEBUG="no"
40 GNOME2_LA_PUNT="yes" # plugins are dlopened
41 -PYTHON_COMPAT=( python3_{2,3} )
42 +PYTHON_COMPAT=( python3_{3,4} )
43 VALA_MIN_API_VERSION="0.26"
44 VALA_USE_DEPEND="vapigen"
45
46 @@ -18,7 +18,7 @@ LICENSE="GPL-2+ CC-BY-SA-3.0"
47 SLOT="0"
48
49 IUSE="+introspection +python spell vala"
50 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
51 +REQUIRED_USE="python? ( || ( $(python_gen_useflags 'python3*') ) )"
52
53 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux"
54
55 @@ -44,14 +44,14 @@ COMMON_DEPEND="
56 >=x11-libs/gtk+-3:3[introspection]
57 >=x11-libs/gtksourceview-3.6:3.0[introspection]
58 dev-python/pycairo[${PYTHON_USEDEP}]
59 - >=dev-python/pygobject-3:3[cairo,${PYTHON_USEDEP}] )
60 + >=dev-python/pygobject-3:3[cairo,${PYTHON_USEDEP}]
61 + dev-libs/libpeas[${PYTHON_USEDEP}] )
62 spell? (
63 >=app-text/enchant-1.2:=
64 >=app-text/iso-codes-0.35 )
65 "
66 RDEPEND="${COMMON_DEPEND}
67 x11-themes/gnome-icon-theme-symbolic
68 - python? ( dev-libs/libpeas[${PYTHON_USEDEP}] )
69 "
70 DEPEND="${COMMON_DEPEND}
71 ${vala_depend}
72 @@ -65,6 +65,10 @@ DEPEND="${COMMON_DEPEND}
73 "
74 # yelp-tools, gnome-common needed to eautoreconf
75
76 +pkg_setup() {
77 + use python && python_setup
78 +}
79 +
80 src_prepare() {
81 # FIXME: Not able to set some metadata
82 #sed -e '/g_test_add_func/d' \
83 @@ -72,30 +76,20 @@ src_prepare() {
84
85 vala_src_prepare
86 gnome2_src_prepare
87 -
88 - python_copy_sources
89 }
90
91 src_configure() {
92 DOCS="AUTHORS BUGS ChangeLog MAINTAINERS NEWS README"
93
94 - local myconf
95 - myconf="
96 - --disable-deprecations
97 - --enable-updater
98 - --enable-gvfs-metadata
99 - $(use_enable introspection)
100 - $(use_enable spell)
101 - $(use_enable vala)
102 - $(use_enable python)
103 + gnome2_src_configure \
104 + --disable-deprecations \
105 + --enable-updater \
106 + --enable-gvfs-metadata \
107 + $(use_enable introspection) \
108 + $(use_enable spell) \
109 + $(use_enable vala) \
110 + $(use_enable python) \
111 ITSTOOL=$(type -P true)
112 - "
113 -
114 - if use python ; then
115 - python_parallel_foreach_impl gnome2_src_configure ${myconf}
116 - else
117 - gnome2_src_configure ${myconf}
118 - fi
119 }
120
121 src_test() {
122 @@ -107,9 +101,6 @@ src_test() {
123 }
124
125 src_install() {
126 - if use python ; then
127 - python_foreach_impl gnome2_src_install
128 - else
129 - gnome2_src_install
130 - fi
131 + # manually set pyoverridesdir due to bug #524018 and AM_PATH_PYTHON limitations
132 + gnome2_src_install pyoverridesdir="$(python_get_sitedir)/gi/overrides"
133 }