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-misc/tracker/
Date: Sun,  2 Oct 2011 23:03:30 +0000 (UTC)	[thread overview]
Message-ID: <c0b25ee88ea9365b3c870a007dc2e15023861d20.tetromino@gentoo> (raw)

commit:     c0b25ee88ea9365b3c870a007dc2e15023861d20
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Sun Oct  2 22:50:40 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Sun Oct  2 22:56:12 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=c0b25ee8

app-misc/tracker: rename firefox USE flag, support firefox-bin, thunderbird-bin

Rename firefox USE flag to firefox-bookmarks; the firefox USE flag was
being automatically enabled in desktop profiles, which was not a good
idea because it has noticeable side effects on browser performance (i.e.
occasional stutters), and some people have reported that it even makes
firefox crash.

Also, support firefox-bin and thunderbird-bin by setting up the
appropriate symlinks. Instead of the former configure sedding hack,
have the ebuild create wrapper scripts that are the equivalent of
max("firefox --version", "firefox-bin --version") and similarly for
thunderbird. This also allows us to avoid an eautoreconf.

---
 ...r-0.12.3-r1.ebuild => tracker-0.12.3-r2.ebuild} |   70 +++++++++++++++-----
 1 files changed, 53 insertions(+), 17 deletions(-)

diff --git a/app-misc/tracker/tracker-0.12.3-r1.ebuild b/app-misc/tracker/tracker-0.12.3-r2.ebuild
similarity index 76%
rename from app-misc/tracker/tracker-0.12.3-r1.ebuild
rename to app-misc/tracker/tracker-0.12.3-r2.ebuild
index 681bd8b..c5620f8 100644
--- a/app-misc/tracker/tracker-0.12.3-r1.ebuild
+++ b/app-misc/tracker/tracker-0.12.3-r2.ebuild
@@ -8,7 +8,7 @@ GNOME2_LA_PUNT="yes"
 GNOME_TARBALL_SUFFIX="xz"
 PYTHON_DEPEND="2:2.6"
 
-inherit autotools eutils gnome2 linux-info multilib python
+inherit eutils gnome2 linux-info multilib python versionator
 
 DESCRIPTION="A tagging metadata database, search tool and indexer"
 HOMEPAGE="http://www.tracker-project.org/"
@@ -17,14 +17,13 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 # USE="doc" is managed by eclass.
-IUSE="applet doc eds elibc_glibc exif firefox flac flickr gif gnome-keyring gsf gstreamer gtk iptc +jpeg laptop mp3 nautilus networkmanager pdf playlist rss test thunderbird +tiff upnp +vorbis xine +xml xmp" # qt4 strigi
+IUSE="applet doc eds elibc_glibc exif firefox-bookmarks flac flickr gif gnome-keyring gsf gstreamer gtk iptc +jpeg laptop mp3 nautilus networkmanager pdf playlist rss test thunderbird +tiff upnp +vorbis xine +xml xmp" # qt4 strigi
 
 # Test suite highly disfunctional, loops forever
 # putting aside for now
 RESTRICT="test"
 
 # vala is built with debug by default (see VALAFLAGS)
-# FIXME: what about firefox-bin and thunderbird-bin?
 # According to NEWS, introspection is non-optional
 # glibc-2.12 needed for SCHED_IDLE (see bug #385003)
 RDEPEND="
@@ -49,7 +48,9 @@ RDEPEND="
 		>=gnome-extra/evolution-data-server-2.91.90 )
 	elibc_glibc? ( >=sys-libs/glibc-2.12 )
 	exif? ( >=media-libs/libexif-0.6 )
-	firefox? ( >=www-client/firefox-4.0 )
+	firefox-bookmarks? ( || (
+		>=www-client/firefox-4.0
+		>=www-client/firefox-bin-4.0 ) )
 	flac? ( >=media-libs/flac-1.2.1 )
 	flickr? ( net-libs/rest:0.7 )
 	gif? ( media-libs/giflib )
@@ -81,7 +82,9 @@ RDEPEND="
 		>=x11-libs/gtk+-2.12:2 )
 	playlist? ( dev-libs/totem-pl-parser )
 	rss? ( net-libs/libgrss )
-	thunderbird? ( >=mail-client/thunderbird-5.0 )
+	thunderbird? ( || (
+		>=mail-client/thunderbird-5.0
+		>=mail-client/thunderbird-bin-5.0 ) )
 	tiff? ( media-libs/tiff )
 	vorbis? ( >=media-libs/libvorbis-0.22 )
 	xine? ( >=media-libs/xine-lib-1 )
@@ -166,8 +169,8 @@ pkg_setup() {
 		$(use_enable applet tracker-search-bar)
 		$(use_enable eds miner-evolution)
 		$(use_enable exif libexif)
-		$(use_enable firefox miner-firefox)
-		$(use_with firefox firefox-plugin-dir ${EPREFIX}/usr/$(get_libdir)/firefox/extensions)
+		$(use_enable firefox-bookmarks miner-firefox)
+		$(use_with firefox-bookmarks firefox-plugin-dir ${EPREFIX}/usr/$(get_libdir)/firefox/extensions)
 		$(use_enable flac libflac)
 		$(use_enable flickr miner-flickr)
 		$(use_enable gnome-keyring)
@@ -194,6 +197,9 @@ pkg_setup() {
 		$(use_enable xmp exempi)"
 	#	$(use_enable strigi libstreamanalyzer)
 
+	use firefox-bookmarks && G2CONF="${G2CONF} FIREFOX=./firefox-version.sh"
+	use thunderbird && G2CONF="${G2CONF} THUNDERBIRD=./thunderbird-version.sh"
+
 	DOCS="AUTHORS ChangeLog NEWS README"
 
 	python_set_active_version 2
@@ -207,22 +213,18 @@ src_prepare() {
 	find "${S}" -name "*.pyc" -delete
 	python_convert_shebangs -r 2 tests utils examples
 
-	# Don't run firefox or thunderbird. It results in access violations on some
-	# setups (bug #385347) and does nothing useful on Gentoo.
-	local ff_version=$(best_version www-client/firefox)
-	ff_version=${ff_version#www-client/firefox-}
-	local tb_version=$(best_version mail-client/thunderbird)
-	tb_version=${tb_version#mail-client/thunderbird-}
-	sed -e "s:firefox_version=.*:firefox_version='${ff_version}':" \
-		-e "s:thunderbird_version=.*:thunderbird_version='${tb_version}':" \
-		-i configure.ac || die "sed failed"
+	# Don't run 'firefox --version' or 'thunderbird --version'; it results in
+	# access violations on some setups (bug #385347).
+	use firefox-bookmarks && create_version_script \
+		"www-client/firefox" "Mozilla Firefox" firefox-version.sh
+	use thunderbird && create_version_script \
+		"mail-client/thunderbird" "Mozilla Thunderbird" thunderbird-version.sh
 
 	# FIXME: report broken tests
 	sed -e '/\/libtracker-miner\/tracker-password-provider\/setting/,+1 s:^\(.*\)$:/*\1*/:' \
 		-e '/\/libtracker-miner\/tracker-password-provider\/getting/,+1 s:^\(.*\)$:/*\1*/:' \
 		-i tests/libtracker-miner/tracker-password-provider-test.c || die
 
-	eautoreconf
 	gnome2_src_prepare
 }
 
@@ -230,3 +232,37 @@ src_test() {
 	unset DBUS_SESSION_BUS_ADDRESS
 	Xemake check XDG_DATA_HOME="${T}" XDG_CONFIG_HOME="${T}" || die "tests failed"
 }
+
+src_install() {
+	gnome2_src_install
+
+	# Manually symlink extensions for {firefox,thunderbird}-bin
+	if use firefox-bookmarks; then
+		dosym /usr/share/xul-ext/trackerfox \
+			/usr/$(get_libdir)/firefox-bin/extensions/trackerfox@bustany.org || die
+	fi
+
+	if use thunderbird; then
+		dosym /usr/share/xul-ext/trackerbird \
+			/usr/$(get_libdir)/thunderbird-bin/extensions/trackerbird@bustany.org || die
+	fi
+}
+
+create_version_script() {
+	# Create script $3 that prints "$2 MAX(VERSION($1), VERSION($1-bin))"
+
+	local v=$(best_version ${1})
+	v=${v#${1}-}
+	local vbin=$(best_version ${1}-bin)
+	vbin=${vbin#${1}-bin-}
+
+	if [[ -z ${v} ]]; then
+		v=${vbin}
+	else
+		version_compare ${v} ${vbin}
+		[[ $? -eq 1 ]] && v=${vbin}
+	fi
+
+	echo -e "#!/bin/sh\necho $2 $v" > "$3" || die
+	chmod +x "$3" || die
+}



             reply	other threads:[~2011-10-02 23:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02 23:03 Alexandre Restovtsev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-16 21:08 [gentoo-commits] proj/gnome:master commit in: app-misc/tracker/ Mart Raudsepp
2018-04-22 16:51 Sobhan Mohammadpour
2018-04-21 18:44 Sobhan Mohammadpour
2016-04-08 20:47 Ole Reifschneider
2015-05-17 15:39 Gilles Dartiguelongue
2015-05-17 15:39 Gilles Dartiguelongue
2015-05-17 14:52 Gilles Dartiguelongue
2014-12-26 21:53 Gilles Dartiguelongue
2014-12-14 22:46 Gilles Dartiguelongue
2014-11-23 19:37 Gilles Dartiguelongue
2014-10-26 23:39 Gilles Dartiguelongue
2014-04-20 22:57 Gilles Dartiguelongue
2012-04-02  6:43 Alexandre Restovtsev
2012-03-15 15:44 Nirbheek Chauhan
2011-10-23  8:41 Alexandre Restovtsev
2011-10-18  7:37 Alexandre Restovtsev
2011-10-14 20:01 Alexandre Restovtsev
2011-10-11  6:40 Alexandre Restovtsev
2011-10-03 21:45 Alexandre Restovtsev
2011-10-02 11:27 Alexandre Restovtsev
2011-10-02  8:20 Alexandre Restovtsev
2011-10-01 23:56 Alexandre Restovtsev
2011-10-01 19:04 Alexandre Restovtsev

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=c0b25ee88ea9365b3c870a007dc2e15023861d20.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