Gentoo Archives: gentoo-commits

From: Alexandre Restovtsev <tetromino@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: app-misc/tracker/
Date: Sun, 02 Oct 2011 23:03:40
Message-Id: c0b25ee88ea9365b3c870a007dc2e15023861d20.tetromino@gentoo
1 commit: c0b25ee88ea9365b3c870a007dc2e15023861d20
2 Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
3 AuthorDate: Sun Oct 2 22:50:40 2011 +0000
4 Commit: Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
5 CommitDate: Sun Oct 2 22:56:12 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=c0b25ee8
7
8 app-misc/tracker: rename firefox USE flag, support firefox-bin, thunderbird-bin
9
10 Rename firefox USE flag to firefox-bookmarks; the firefox USE flag was
11 being automatically enabled in desktop profiles, which was not a good
12 idea because it has noticeable side effects on browser performance (i.e.
13 occasional stutters), and some people have reported that it even makes
14 firefox crash.
15
16 Also, support firefox-bin and thunderbird-bin by setting up the
17 appropriate symlinks. Instead of the former configure sedding hack,
18 have the ebuild create wrapper scripts that are the equivalent of
19 max("firefox --version", "firefox-bin --version") and similarly for
20 thunderbird. This also allows us to avoid an eautoreconf.
21
22 ---
23 ...r-0.12.3-r1.ebuild => tracker-0.12.3-r2.ebuild} | 70 +++++++++++++++-----
24 1 files changed, 53 insertions(+), 17 deletions(-)
25
26 diff --git a/app-misc/tracker/tracker-0.12.3-r1.ebuild b/app-misc/tracker/tracker-0.12.3-r2.ebuild
27 similarity index 76%
28 rename from app-misc/tracker/tracker-0.12.3-r1.ebuild
29 rename to app-misc/tracker/tracker-0.12.3-r2.ebuild
30 index 681bd8b..c5620f8 100644
31 --- a/app-misc/tracker/tracker-0.12.3-r1.ebuild
32 +++ b/app-misc/tracker/tracker-0.12.3-r2.ebuild
33 @@ -8,7 +8,7 @@ GNOME2_LA_PUNT="yes"
34 GNOME_TARBALL_SUFFIX="xz"
35 PYTHON_DEPEND="2:2.6"
36
37 -inherit autotools eutils gnome2 linux-info multilib python
38 +inherit eutils gnome2 linux-info multilib python versionator
39
40 DESCRIPTION="A tagging metadata database, search tool and indexer"
41 HOMEPAGE="http://www.tracker-project.org/"
42 @@ -17,14 +17,13 @@ LICENSE="GPL-2"
43 SLOT="0"
44 KEYWORDS="~amd64 ~x86"
45 # USE="doc" is managed by eclass.
46 -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
47 +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
48
49 # Test suite highly disfunctional, loops forever
50 # putting aside for now
51 RESTRICT="test"
52
53 # vala is built with debug by default (see VALAFLAGS)
54 -# FIXME: what about firefox-bin and thunderbird-bin?
55 # According to NEWS, introspection is non-optional
56 # glibc-2.12 needed for SCHED_IDLE (see bug #385003)
57 RDEPEND="
58 @@ -49,7 +48,9 @@ RDEPEND="
59 >=gnome-extra/evolution-data-server-2.91.90 )
60 elibc_glibc? ( >=sys-libs/glibc-2.12 )
61 exif? ( >=media-libs/libexif-0.6 )
62 - firefox? ( >=www-client/firefox-4.0 )
63 + firefox-bookmarks? ( || (
64 + >=www-client/firefox-4.0
65 + >=www-client/firefox-bin-4.0 ) )
66 flac? ( >=media-libs/flac-1.2.1 )
67 flickr? ( net-libs/rest:0.7 )
68 gif? ( media-libs/giflib )
69 @@ -81,7 +82,9 @@ RDEPEND="
70 >=x11-libs/gtk+-2.12:2 )
71 playlist? ( dev-libs/totem-pl-parser )
72 rss? ( net-libs/libgrss )
73 - thunderbird? ( >=mail-client/thunderbird-5.0 )
74 + thunderbird? ( || (
75 + >=mail-client/thunderbird-5.0
76 + >=mail-client/thunderbird-bin-5.0 ) )
77 tiff? ( media-libs/tiff )
78 vorbis? ( >=media-libs/libvorbis-0.22 )
79 xine? ( >=media-libs/xine-lib-1 )
80 @@ -166,8 +169,8 @@ pkg_setup() {
81 $(use_enable applet tracker-search-bar)
82 $(use_enable eds miner-evolution)
83 $(use_enable exif libexif)
84 - $(use_enable firefox miner-firefox)
85 - $(use_with firefox firefox-plugin-dir ${EPREFIX}/usr/$(get_libdir)/firefox/extensions)
86 + $(use_enable firefox-bookmarks miner-firefox)
87 + $(use_with firefox-bookmarks firefox-plugin-dir ${EPREFIX}/usr/$(get_libdir)/firefox/extensions)
88 $(use_enable flac libflac)
89 $(use_enable flickr miner-flickr)
90 $(use_enable gnome-keyring)
91 @@ -194,6 +197,9 @@ pkg_setup() {
92 $(use_enable xmp exempi)"
93 # $(use_enable strigi libstreamanalyzer)
94
95 + use firefox-bookmarks && G2CONF="${G2CONF} FIREFOX=./firefox-version.sh"
96 + use thunderbird && G2CONF="${G2CONF} THUNDERBIRD=./thunderbird-version.sh"
97 +
98 DOCS="AUTHORS ChangeLog NEWS README"
99
100 python_set_active_version 2
101 @@ -207,22 +213,18 @@ src_prepare() {
102 find "${S}" -name "*.pyc" -delete
103 python_convert_shebangs -r 2 tests utils examples
104
105 - # Don't run firefox or thunderbird. It results in access violations on some
106 - # setups (bug #385347) and does nothing useful on Gentoo.
107 - local ff_version=$(best_version www-client/firefox)
108 - ff_version=${ff_version#www-client/firefox-}
109 - local tb_version=$(best_version mail-client/thunderbird)
110 - tb_version=${tb_version#mail-client/thunderbird-}
111 - sed -e "s:firefox_version=.*:firefox_version='${ff_version}':" \
112 - -e "s:thunderbird_version=.*:thunderbird_version='${tb_version}':" \
113 - -i configure.ac || die "sed failed"
114 + # Don't run 'firefox --version' or 'thunderbird --version'; it results in
115 + # access violations on some setups (bug #385347).
116 + use firefox-bookmarks && create_version_script \
117 + "www-client/firefox" "Mozilla Firefox" firefox-version.sh
118 + use thunderbird && create_version_script \
119 + "mail-client/thunderbird" "Mozilla Thunderbird" thunderbird-version.sh
120
121 # FIXME: report broken tests
122 sed -e '/\/libtracker-miner\/tracker-password-provider\/setting/,+1 s:^\(.*\)$:/*\1*/:' \
123 -e '/\/libtracker-miner\/tracker-password-provider\/getting/,+1 s:^\(.*\)$:/*\1*/:' \
124 -i tests/libtracker-miner/tracker-password-provider-test.c || die
125
126 - eautoreconf
127 gnome2_src_prepare
128 }
129
130 @@ -230,3 +232,37 @@ src_test() {
131 unset DBUS_SESSION_BUS_ADDRESS
132 Xemake check XDG_DATA_HOME="${T}" XDG_CONFIG_HOME="${T}" || die "tests failed"
133 }
134 +
135 +src_install() {
136 + gnome2_src_install
137 +
138 + # Manually symlink extensions for {firefox,thunderbird}-bin
139 + if use firefox-bookmarks; then
140 + dosym /usr/share/xul-ext/trackerfox \
141 + /usr/$(get_libdir)/firefox-bin/extensions/trackerfox@×××××××.org || die
142 + fi
143 +
144 + if use thunderbird; then
145 + dosym /usr/share/xul-ext/trackerbird \
146 + /usr/$(get_libdir)/thunderbird-bin/extensions/trackerbird@×××××××.org || die
147 + fi
148 +}
149 +
150 +create_version_script() {
151 + # Create script $3 that prints "$2 MAX(VERSION($1), VERSION($1-bin))"
152 +
153 + local v=$(best_version ${1})
154 + v=${v#${1}-}
155 + local vbin=$(best_version ${1}-bin)
156 + vbin=${vbin#${1}-bin-}
157 +
158 + if [[ -z ${v} ]]; then
159 + v=${vbin}
160 + else
161 + version_compare ${v} ${vbin}
162 + [[ $? -eq 1 ]] && v=${vbin}
163 + fi
164 +
165 + echo -e "#!/bin/sh\necho $2 $v" > "$3" || die
166 + chmod +x "$3" || die
167 +}