summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2017-04-17 00:29:58 +0200
committerGilles Dartiguelongue <eva@gentoo.org>2017-04-17 12:30:35 +0200
commitf01aac108623402427a15be9b3f3d5947a53ebe4 (patch)
tree55547df630dfa3b844804c392c1cb4e00e329462 /app-text/gtranslator
parentwww-apps/novnc: [QA] Use complete path as second argument of dosym. (diff)
downloadgentoo-f01aac108623402427a15be9b3f3d5947a53ebe4.tar.gz
gentoo-f01aac108623402427a15be9b3f3d5947a53ebe4.tar.bz2
gentoo-f01aac108623402427a15be9b3f3d5947a53ebe4.zip
app-text/gtranslator: switch python requirements to python3
One of the last user of the libpeas python2 loader support. Kill gnome USE flag and replace it with more meaningful ones. Switch to EAPI=6. Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'app-text/gtranslator')
-rw-r--r--app-text/gtranslator/files/gtranslator-2.91.7-gi-silence.patch26
-rw-r--r--app-text/gtranslator/files/gtranslator-2.91.7-gucharmap-python3.patch51
-rw-r--r--app-text/gtranslator/gtranslator-2.91.7-r1.ebuild82
-rw-r--r--app-text/gtranslator/metadata.xml4
4 files changed, 163 insertions, 0 deletions
diff --git a/app-text/gtranslator/files/gtranslator-2.91.7-gi-silence.patch b/app-text/gtranslator/files/gtranslator-2.91.7-gi-silence.patch
new file mode 100644
index 000000000000..19a3a6d1e985
--- /dev/null
+++ b/app-text/gtranslator/files/gtranslator-2.91.7-gi-silence.patch
@@ -0,0 +1,26 @@
+From acc785dd63379f08f08b52fae9d7e5c5666495c8 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Mon, 17 Apr 2017 00:15:58 +0200
+Subject: [PATCH] Silence gobject-introspection warning on version-less imports
+
+---
+ plugins/charmap/charmap/__init__.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/plugins/charmap/charmap/__init__.py b/plugins/charmap/charmap/__init__.py
+index b504cb61..6f8c2b61 100644
+--- a/plugins/charmap/charmap/__init__.py
++++ b/plugins/charmap/charmap/__init__.py
+@@ -16,6 +16,9 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
++import gi
++gi.require_version('Gucharmap', '2.90')
++
+ from gi.repository import GObject, Gio, Pango, Gtk, Gtranslator, Gucharmap
+ from .panel import CharmapPanel
+ import sys
+--
+2.12.2
+
diff --git a/app-text/gtranslator/files/gtranslator-2.91.7-gucharmap-python3.patch b/app-text/gtranslator/files/gtranslator-2.91.7-gucharmap-python3.patch
new file mode 100644
index 000000000000..1ad491cf3c00
--- /dev/null
+++ b/app-text/gtranslator/files/gtranslator-2.91.7-gucharmap-python3.patch
@@ -0,0 +1,51 @@
+From 1e4d042f7e9b28a58bd09af5c97e4282441113d2 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Sun, 16 Apr 2017 23:48:29 +0200
+Subject: [PATCH 1/2] Switch gucharmap plugin to python3 loader
+
+---
+ plugins/charmap/charmap/__init__.py | 2 +-
+ plugins/charmap/gtr-charmap.plugin.desktop.in | 2 +-
+ src/gtr-plugins-engine.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/charmap/charmap/__init__.py b/plugins/charmap/charmap/__init__.py
+index 414157b1..b504cb61 100644
+--- a/plugins/charmap/charmap/__init__.py
++++ b/plugins/charmap/charmap/__init__.py
+@@ -17,7 +17,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ from gi.repository import GObject, Gio, Pango, Gtk, Gtranslator, Gucharmap
+-from panel import CharmapPanel
++from .panel import CharmapPanel
+ import sys
+ import gettext
+
+diff --git a/plugins/charmap/gtr-charmap.plugin.desktop.in b/plugins/charmap/gtr-charmap.plugin.desktop.in
+index 3949c5f6..a872a545 100644
+--- a/plugins/charmap/gtr-charmap.plugin.desktop.in
++++ b/plugins/charmap/gtr-charmap.plugin.desktop.in
+@@ -1,5 +1,5 @@
+ [Plugin]
+-Loader=python
++Loader=python3
+ Module=charmap
+ IAge=3
+ _Name=Character Map
+diff --git a/src/gtr-plugins-engine.c b/src/gtr-plugins-engine.c
+index 903ea735..8e41010a 100644
+--- a/src/gtr-plugins-engine.c
++++ b/src/gtr-plugins-engine.c
+@@ -64,7 +64,7 @@ gtr_plugins_engine_init (GtrPluginsEngine * engine)
+ GTR_TYPE_PLUGINS_ENGINE,
+ GtrPluginsEnginePrivate);
+
+- peas_engine_enable_loader (PEAS_ENGINE (engine), "python");
++ peas_engine_enable_loader (PEAS_ENGINE (engine), "python3");
+
+ engine->priv->plugin_settings = g_settings_new ("org.gnome.gtranslator.plugins");
+
+--
+2.12.2
+
diff --git a/app-text/gtranslator/gtranslator-2.91.7-r1.ebuild b/app-text/gtranslator/gtranslator-2.91.7-r1.ebuild
new file mode 100644
index 000000000000..f063cb8104cb
--- /dev/null
+++ b/app-text/gtranslator/gtranslator-2.91.7-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_LA_PUNT="yes"
+PYTHON_COMPAT=( python{3_4,3_5} )
+
+inherit gnome2 python-single-r1
+
+DESCRIPTION="An enhanced gettext po file editor for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Gtranslator"
+
+LICENSE="GPL-3+ FDL-1.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="+introspection gnome-dictionary gucharmap spell"
+REQUIRED_USE="gucharmap? ( introspection ${PYTHON_REQUIRED_USE} )"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.32:2[dbus]
+ >=x11-libs/gtk+-3.4.2:3[introspection?]
+ >=x11-libs/gtksourceview-3.0.0:3.0[introspection?]
+ >=dev-libs/gdl-3.6:3=
+ >=dev-libs/libxml2-2.4.12:2
+ >=dev-libs/json-glib-0.12.0
+ >=dev-libs/libpeas-1.2[gtk]
+ gnome-extra/libgda:5=
+ >=app-text/iso-codes-0.35
+
+ gnome-base/gsettings-desktop-schemas
+
+ gnome-dictionary? ( app-dicts/gnome-dictionary:= )
+ gucharmap? ( ${PYTHON_DEPS} )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.3 )
+ spell? ( app-text/gtkspell:3= )
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-themes/gnome-icon-theme-symbolic
+ gucharmap? (
+ >=dev-libs/libpeas-1.2[gtk,python,${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ gnome-extra/gucharmap:2.90[introspection]
+ x11-libs/gtk+:3[introspection] )
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-doc-am-1
+ >=dev-util/intltool-0.50.1
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+"
+# eautoreconf requires gnome-base/gnome-common, app-text/yelp-tools
+
+PATCHES=(
+ # Switch plugin to python3 loader
+ "${FILESDIR}"/${P}-gucharmap-python3.patch
+ # Silence g-i import warnings
+ "${FILESDIR}"/${P}-gi-silence.patch
+)
+
+pkg_setup() {
+ use gucharmap && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ DOCS="AUTHORS ChangeLog HACKING INSTALL NEWS README THANKS"
+
+ gnome2_src_prepare
+
+ if ! use gucharmap ; then
+ # don't install charmap plugin, it requires gnome-extra/gucharmap
+ sed -e 's:\scharmap\s: :g' -i plugins/Makefile.* ||
+ die "sed plugins/Makefile.* failed"
+ fi
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-static \
+ $(use_enable introspection) \
+ $(use_with gnome-dictionary dictionary) \
+ $(use_with spell gtkspell)
+}
diff --git a/app-text/gtranslator/metadata.xml b/app-text/gtranslator/metadata.xml
index a30a93b4b9d9..a6e15044678b 100644
--- a/app-text/gtranslator/metadata.xml
+++ b/app-text/gtranslator/metadata.xml
@@ -5,6 +5,10 @@
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
+ <use>
+ <flag name="gnome-dictionary">Enable plugin for dictionary lookups using <pkg>app-dicts/gnome-dictionary</pkg>.</flag>
+ <flag name="gucharmap">Enable plugin for unicode symbols selection using <pkg>gnome-extra/gucharmap</pkg>.</flag>
+ </use>
<upstream>
<remote-id type="sourceforge">gtranslator</remote-id>
</upstream>