diff options
author | Rémi Cardona <remi@gentoo.org> | 2014-11-28 00:56:59 +0100 |
---|---|---|
committer | Rémi Cardona <remi@gentoo.org> | 2014-11-28 09:09:37 +0100 |
commit | 283fe267dd73c0cc07156647dafd156c82f3b8c3 (patch) | |
tree | f3765e8d43d48196b642a676fd10e73f617d6419 /app-editors | |
parent | net-libs/libsoup-gnome: port multilib support from gentoo (diff) | |
download | gnome-283fe267dd73c0cc07156647dafd156c82f3b8c3.tar.gz gnome-283fe267dd73c0cc07156647dafd156c82f3b8c3.tar.bz2 gnome-283fe267dd73c0cc07156647dafd156c82f3b8c3.zip |
app-editors/gedit: Fix python handling
In gedit/gedit-plugins-engine.c, we can see that:
- gedit loads python through libpeas (so that's the only version of
python it supports),
- gedit's introspection data is indeed private and unavailable outside
gedit's python interpreter for plugins.
So here are the changes done to this ebuild:
- drop support for python 3.2, add support for 3.4,
- change deps to make sure gedit's python version matches that of
libpeas,
- adapt ebuild to a regular build with python_setup doing the python
selection.
Note: using python-single-r1 was impossible because libpeas still
supports python2. Using that eclass would have forced users to disable
python2 support.
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/gedit/gedit-3.14.1.ebuild | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/app-editors/gedit/gedit-3.14.1.ebuild b/app-editors/gedit/gedit-3.14.1.ebuild index 2d9be1a6..d41d63e4 100644 --- a/app-editors/gedit/gedit-3.14.1.ebuild +++ b/app-editors/gedit/gedit-3.14.1.ebuild @@ -5,7 +5,7 @@ EAPI="5" GCONF_DEBUG="no" GNOME2_LA_PUNT="yes" # plugins are dlopened -PYTHON_COMPAT=( python3_{2,3} ) +PYTHON_COMPAT=( python3_{3,4} ) VALA_MIN_API_VERSION="0.26" VALA_USE_DEPEND="vapigen" @@ -18,7 +18,7 @@ LICENSE="GPL-2+ CC-BY-SA-3.0" SLOT="0" IUSE="+introspection +python spell vala" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +REQUIRED_USE="python? ( || ( $(python_gen_useflags 'python3*') ) )" 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" @@ -44,14 +44,14 @@ COMMON_DEPEND=" >=x11-libs/gtk+-3:3[introspection] >=x11-libs/gtksourceview-3.6:3.0[introspection] dev-python/pycairo[${PYTHON_USEDEP}] - >=dev-python/pygobject-3:3[cairo,${PYTHON_USEDEP}] ) + >=dev-python/pygobject-3:3[cairo,${PYTHON_USEDEP}] + dev-libs/libpeas[${PYTHON_USEDEP}] ) spell? ( >=app-text/enchant-1.2:= >=app-text/iso-codes-0.35 ) " RDEPEND="${COMMON_DEPEND} x11-themes/gnome-icon-theme-symbolic - python? ( dev-libs/libpeas[${PYTHON_USEDEP}] ) " DEPEND="${COMMON_DEPEND} ${vala_depend} @@ -65,6 +65,10 @@ DEPEND="${COMMON_DEPEND} " # yelp-tools, gnome-common needed to eautoreconf +pkg_setup() { + use python && python_setup +} + src_prepare() { # FIXME: Not able to set some metadata #sed -e '/g_test_add_func/d' \ @@ -72,30 +76,20 @@ src_prepare() { vala_src_prepare gnome2_src_prepare - - python_copy_sources } src_configure() { DOCS="AUTHORS BUGS ChangeLog MAINTAINERS NEWS README" - local myconf - myconf=" - --disable-deprecations - --enable-updater - --enable-gvfs-metadata - $(use_enable introspection) - $(use_enable spell) - $(use_enable vala) - $(use_enable python) + gnome2_src_configure \ + --disable-deprecations \ + --enable-updater \ + --enable-gvfs-metadata \ + $(use_enable introspection) \ + $(use_enable spell) \ + $(use_enable vala) \ + $(use_enable python) \ ITSTOOL=$(type -P true) - " - - if use python ; then - python_parallel_foreach_impl gnome2_src_configure ${myconf} - else - gnome2_src_configure ${myconf} - fi } src_test() { @@ -107,9 +101,6 @@ src_test() { } src_install() { - if use python ; then - python_foreach_impl gnome2_src_install - else - gnome2_src_install - fi + # manually set pyoverridesdir due to bug #524018 and AM_PATH_PYTHON limitations + gnome2_src_install pyoverridesdir="$(python_get_sitedir)/gi/overrides" } |