public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexandre Restovtsev" <tetromino@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gnome:master commit in: app-text/gtranslator/
Date: Fri, 24 Jun 2011 17:35:52 +0000 (UTC)	[thread overview]
Message-ID: <58a2a61be16b022eccf984c0b6b140486e965cf4.tetromino@gentoo> (raw)

commit:     58a2a61be16b022eccf984c0b6b140486e965cf4
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Sun Jun 19 09:23:44 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Sun Jun 19 09:38:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=58a2a61b

app-text/gtranslator: fix charmap plugin

In an IRC conversation with nirbheek, it became apparent that the
gtranslator ebuild does not take into account the program's charmap
plugin, written in python. As a result, make the following changes
to the ebuild:
* add correct dependencies (gucharmap:2.90[introspection] etc.) for
the charmap plugin when USE=gnome, and python_mod_optimize it.
* don't install the plugin when USE=-gnome.
* drop the separate introspection flag from IUSE; the only possible
reason for introspecting gtranslator is to run the charmap plugin.

---
 app-text/gtranslator/gtranslator-2.90.5.ebuild |   46 ++++++++++++++++++++----
 1 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/app-text/gtranslator/gtranslator-2.90.5.ebuild b/app-text/gtranslator/gtranslator-2.90.5.ebuild
index e738fdd..a053685 100644
--- a/app-text/gtranslator/gtranslator-2.90.5.ebuild
+++ b/app-text/gtranslator/gtranslator-2.90.5.ebuild
@@ -7,7 +7,7 @@ GCONF_DEBUG="no"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="gnome? 2"
 
-inherit eutils gnome2 python
+inherit eutils gnome2 multilib python
 
 DESCRIPTION="An enhanced gettext po file editor for GNOME"
 HOMEPAGE="http://gtranslator.sourceforge.net/"
@@ -15,9 +15,9 @@ HOMEPAGE="http://gtranslator.sourceforge.net/"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE="doc gnome +introspection"
+IUSE="doc gnome"
 
-RDEPEND="
+COMMON_DEPEND="
 	>=dev-libs/glib-2.28.0:2
 	>=x11-libs/gtk+-3.0.3:3
 	>=x11-libs/gtksourceview-3.0.0:3.0
@@ -30,9 +30,16 @@ RDEPEND="
 
 	gnome-base/gsettings-desktop-schemas
 
-	gnome? ( gnome-extra/gnome-utils )
-	introspection? ( >=dev-libs/gobject-introspection-0.9.3 )"
-DEPEND="${RDEPEND}
+	gnome? (
+		dev-libs/glib:2[introspection]
+		gnome-extra/gnome-utils
+		x11-libs/gtk+:3[introspection] )"
+RDEPEND="${COMMON_DEPEND}
+	gnome? (
+		>=dev-libs/libpeas-1.0.0[gtk,python]
+		dev-python/pygobject[introspection]
+		gnome-extra/gucharmap:2.90[introspection] )"
+DEPEND="${COMMON_DEPEND}
 	>=app-text/scrollkeeper-0.1.4
 	>=dev-util/intltool-0.40
 	>=sys-devel/gettext-0.17
@@ -48,5 +55,30 @@ pkg_setup() {
 		--disable-static
 		--without-gtkspell
 		$(use_with gnome dictionary)
-		$(use_enable introspection)"
+		$(use_enable gnome introspection)"
+}
+
+src_prepare() {
+	gnome2_src_prepare
+
+	# disable pyc compiling
+	ln -sfn $(type -P true) py-compile
+	if ! use gnome; 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
+}
+
+pkg_postinst() {
+	gnome2_pkg_postinst
+	if use gnome; then
+		python_need_rebuild
+		python_mod_optimize /usr/$(get_libdir)/gtranslator/plugins
+	fi
+}
+
+pkg_postrm() {
+	gnome2_pkg_postrm
+	use gnome && python_mod_cleanup /usr/$(get_libdir)/gtranslator/plugins
 }



             reply	other threads:[~2011-06-24 17:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24 17:35 Alexandre Restovtsev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-06 16:44 [gentoo-commits] proj/gnome:master commit in: app-text/gtranslator/ Alexandre Rostovtsev
2011-10-23  8:41 Alexandre Restovtsev
2011-08-24  2:08 Alexandre Restovtsev
2011-06-24 17:35 Alexandre Restovtsev
2011-05-21 16:41 Nirbheek Chauhan
2011-05-06  0:53 Nirbheek Chauhan
2011-04-29 18:29 Nirbheek Chauhan
2011-04-05  0:57 Nirbheek Chauhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58a2a61be16b022eccf984c0b6b140486e965cf4.tetromino@gentoo \
    --to=tetromino@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox