Gentoo Archives: gentoo-commits

From: "Julian Ospald (hasufell)" <hasufell@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/torbrowser: torbrowser-13.0.ebuild ChangeLog torbrowser-10.0.5.ebuild
Date: Sat, 30 Jun 2012 20:43:21
Message-Id: 20120630204311.4EE9A2004C@flycatcher.gentoo.org
1 hasufell 12/06/30 20:43:11
2
3 Modified: ChangeLog
4 Added: torbrowser-13.0.ebuild
5 Removed: torbrowser-10.0.5.ebuild
6 Log:
7 version bump, also fixes bug #423343
8
9 (Portage version: 2.2.0_alpha114/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.5 www-client/torbrowser/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/torbrowser/ChangeLog?rev=1.5&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/torbrowser/ChangeLog?rev=1.5&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/torbrowser/ChangeLog?r1=1.4&r2=1.5
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/torbrowser/ChangeLog,v
21 retrieving revision 1.4
22 retrieving revision 1.5
23 diff -u -r1.4 -r1.5
24 --- ChangeLog 6 Jun 2012 22:21:08 -0000 1.4
25 +++ ChangeLog 30 Jun 2012 20:43:10 -0000 1.5
26 @@ -1,6 +1,55 @@
27 # ChangeLog for www-client/torbrowser
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/torbrowser/ChangeLog,v 1.4 2012/06/06 22:21:08 hasufell Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/torbrowser/ChangeLog,v 1.5 2012/06/30 20:43:10 hasufell Exp $
31 +
32 +*torbrowser-13.0 (30 Jun 2012)
33 +
34 + 30 Jun 2012; Julian Ospald <hasufell@g.o>
35 + +files/torbrowser-patches/0007-Disable-SSL-Session-ID-tracking.patch,
36 + +files/torbrowser-patches/0008-Provide-an-observer-event-to-close-persistent-
37 + connec.patch,
38 + +files/torbrowser-patches/0009-Limit-device-and-system-specific-CSS-Media-Que
39 + ries.patch,
40 + +files/torbrowser-patches/0010-Rebrand-Firefox-to-TorBrowser.patch,
41 + +files/torbrowser-patches/0011-Make-Download-manager-memory-only.patch,
42 + +files/torbrowser-patches/0012-Add-DDG-and-StartPage-to-Omnibox.patch,
43 + +files/torbrowser-patches/0013-Make-nsICacheService.EvictEntries-synchronous.
44 + patch, +files/torbrowser-patches/0014-Prevent-WebSocket-DNS-leak.patch,
45 + +files/torbrowser-patches/0015-Make-Tor-Browser-exit-when-not-launched-from-V
46 + idalia.patch,
47 + +files/torbrowser-patches/0016-Limit-the-number-of-fonts-per-document.patch,
48 + +files/torbrowser-patches/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patc
49 + h,
50 + +files/torbrowser-patches/0020-Fix-internal-compile-error-for-sub-ancient-GCC
51 + s.patch,
52 + -files/torbrowser-patches/0007-Make-Tor-Browser-exit-when-not-launched-from-V
53 + idalia.patch,
54 + -files/torbrowser-patches/0008-Disable-SSL-Session-ID-tracking.patch,
55 + -files/torbrowser-patches/0009-Provide-an-observer-event-to-close-persistent-
56 + connec.patch,
57 + -files/torbrowser-patches/0010-Provide-client-values-only-to-CSS-Media-Querie
58 + s.patch,
59 + -files/torbrowser-patches/0011-Limit-the-number-of-fonts-per-document.patch,
60 + -files/torbrowser-patches/0012-Rebrand-Firefox-to-TorBrowser.patch,
61 + -files/torbrowser-patches/0013-Make-Download-manager-memory-only.patch,
62 + -files/torbrowser-patches/0014-Add-DDG-and-StartPage-to-Omnibox.patch,
63 + -files/torbrowser-patches/0015-Make-nsICacheService.EvictEntries-synchronous.
64 + patch, -files/torbrowser-patches/0016-Prevent-WebSocket-DNS-leak.patch,
65 + -files/torbrowser-patches/0018-Add-HTTP-auth-headers-before-the-modify-reques
66 + t-obse.patch,
67 + files/torbrowser-patches/0001-Block-Components.interfaces-lookupMethod-from-c
68 + onten.patch,
69 + files/torbrowser-patches/0002-Make-Permissions-Manager-memory-only.patch,
70 + -torbrowser-10.0.5.ebuild,
71 + files/torbrowser-patches/0003-Make-Intermediate-Cert-Store-memory-only.patch,
72 + files/torbrowser-patches/0004-Add-a-string-based-cacheKey.patch,
73 + files/torbrowser-patches/0005-Block-all-plugins-except-flash.patch,
74 + files/torbrowser-patches/0006-Make-content-pref-service-memory-only-clearable
75 + .patch,
76 + files/torbrowser-patches/0017-Randomize-HTTP-request-order-and-pipeline-depth
77 + .patch, +torbrowser-13.0.ebuild,
78 + +files/torbrowser-patches/0019-Fix-Firefox-13-build-process.patch:
79 + version bump, also fixes bug #423343
80
81 *torbrowser-10.0.5 (06 Jun 2012)
82
83
84
85
86 1.1 www-client/torbrowser/torbrowser-13.0.ebuild
87
88 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/torbrowser/torbrowser-13.0.ebuild?rev=1.1&view=markup
89 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/torbrowser/torbrowser-13.0.ebuild?rev=1.1&content-type=text/plain
90
91 Index: torbrowser-13.0.ebuild
92 ===================================================================
93 # Copyright 1999-2012 Gentoo Foundation
94 # Distributed under the terms of the GNU General Public License v2
95 # $Header: /var/cvsroot/gentoo-x86/www-client/torbrowser/torbrowser-13.0.ebuild,v 1.1 2012/06/30 20:43:10 hasufell Exp $
96
97 EAPI="3"
98 VIRTUALX_REQUIRED="pgo"
99 WANT_AUTOCONF="2.1"
100 MOZ_ESR=""
101
102 MY_PN="firefox"
103 # latest version of the torbrowser-bundle we use the profile-folder from
104 # https://www.torproject.org/dist/torbrowser/linux/
105 TB_V="2.2.37-1"
106
107 MOZ_P="${MY_PN}-${PV}"
108
109 if [[ ${MOZ_ESR} == 1 ]]; then
110 # ESR releases have slightly version numbers
111 MOZ_P="${MOZ_P}esr"
112 fi
113
114 # Patch version
115 PATCH="${MY_PN}-13.0-patches-0.2"
116 # Upstream ftp release URI that's used by mozlinguas.eclass
117 # We don't use the http mirror because it deletes old tarballs.
118 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${MY_PN}/releases/"
119
120 inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils autotools python virtualx
121
122 DESCRIPTION="Torbrowser without vidalia or tor, includes profile and extensions"
123 HOMEPAGE="https://www.torproject.org/projects/torbrowser.html.en"
124
125 # may work on other arches, but untested
126 KEYWORDS="~amd64 ~x86"
127 SLOT="0"
128 # BSD license applies to torproject-related code like the patches
129 # GPL-2 and MIT applies to the extensions
130 # icons are under CCPL-Attribution-3.0
131 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )
132 BSD
133 GPL-2
134 MIT
135 CCPL-Attribution-3.0"
136 IUSE="bindist +crashreporter +ipc pgo selinux system-sqlite +webm"
137
138 SRC_URI="${SRC_URI}
139 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
140 ${MOZ_FTP_URI}/${PV}/source/${MOZ_P}.source.tar.bz2
141 amd64? ( https://www.torproject.org/dist/${PN}/linux/tor-browser-gnu-linux-x86_64-${TB_V}-dev-en-US.tar.gz )
142 x86? ( https://www.torproject.org/dist/${PN}/linux/tor-browser-gnu-linux-i686-${TB_V}-dev-en-US.tar.gz )"
143
144 ASM_DEPEND=">=dev-lang/yasm-1.1"
145
146 # Mesa 7.10 needed for WebGL + bugfixes
147 RDEPEND="
148 >=sys-devel/binutils-2.16.1
149 >=dev-libs/nss-3.13.5
150 >=dev-libs/nspr-4.9.1
151 >=dev-libs/glib-2.26:2
152 >=media-libs/mesa-7.10
153 >=media-libs/libpng-1.5.9[apng]
154 virtual/libffi
155 system-sqlite? ( >=dev-db/sqlite-3.7.10[fts3,secure-delete,threadsafe,unlock-notify,debug=] )
156 webm? ( >=media-libs/libvpx-1.0.0
157 media-libs/alsa-lib )
158 crashreporter? ( net-misc/curl )
159 selinux? ( sec-policy/selinux-mozilla )"
160 # We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason
161 DEPEND="${RDEPEND}
162 virtual/pkgconfig
163 pgo? (
164 =dev-lang/python-2*[sqlite]
165 >=sys-devel/gcc-4.5 )
166 webm? ( x86? ( ${ASM_DEPEND} )
167 amd64? ( ${ASM_DEPEND} )
168 virtual/opengl )"
169
170 if [[ ${MOZ_ESR} == 1 ]]; then
171 S="${WORKDIR}/mozilla-esr${PV%%.*}"
172 else
173 S="${WORKDIR}/mozilla-release"
174 fi
175
176 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/${MY_PN}/firefox"
177
178 pkg_setup() {
179 moz_pkgsetup
180
181 # Avoid PGO profiling problems due to enviroment leakage
182 # These should *always* be cleaned up anyway
183 unset DBUS_SESSION_BUS_ADDRESS \
184 DISPLAY \
185 ORBIT_SOCKETDIR \
186 SESSION_MANAGER \
187 XDG_SESSION_COOKIE \
188 XAUTHORITY
189
190 if ! use bindist; then
191 einfo
192 elog "You are enabling official branding. You may not redistribute this build"
193 elog "to any users on your network or the internet. Doing so puts yourself into"
194 elog "a legal problem with Mozilla Foundation"
195 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
196 fi
197
198 if use pgo; then
199 einfo
200 ewarn "You will do a double build for profile guided optimization."
201 ewarn "This will result in your build taking at least twice as long as before."
202 fi
203
204 # Ensure we have enough disk space to compile
205 if use pgo || use debug || use test ; then
206 CHECKREQS_DISK_BUILD="8G"
207 else
208 CHECKREQS_DISK_BUILD="4G"
209 fi
210 check-reqs_pkg_setup
211 }
212
213 src_prepare() {
214 # Apply our patches
215 EPATCH_EXCLUDE="6012_fix_shlibsign.patch 6013_fix_abort_declaration.patch" \
216 EPATCH_SUFFIX="patch" \
217 EPATCH_FORCE="yes" \
218 epatch "${WORKDIR}/firefox"
219
220 # Torbrowser patches for firefox 10.0.5esr, check regularly/for every version-bump
221 # https://gitweb.torproject.org/torbrowser.git/history/HEAD:/src/current-patches
222 # exclude vidalia patch, cause we don't force the user to use it
223 EPATCH_EXCLUDE="0015-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch" \
224 EPATCH_SUFFIX="patch" \
225 EPATCH_FORCE="yes" \
226 epatch "${FILESDIR}/${PN}-patches"
227
228 # Allow user to apply any additional patches without modifing ebuild
229 epatch_user
230
231 # Enable gnomebreakpad
232 if use debug ; then
233 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
234 "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
235 fi
236
237 # Disable gnomevfs extension
238 sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \
239 -e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \
240 || die "Failed to remove gnomevfs extension"
241
242 # Ensure that plugins dir is enabled as default
243 # and is different from firefox-location
244 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/${PN}/${MY_PN}/plugins:" \
245 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"
246
247 # Fix sandbox violations during make clean, bug 372817
248 sed -e "s:\(/no-such-file\):${T}\1:g" \
249 -i "${S}"/config/rules.mk \
250 -i "${S}"/js/src/config/rules.mk \
251 -i "${S}"/nsprpub/configure{.in,} \
252 || die
253
254 #Fix compilation with curl-7.21.7 bug 376027
255 sed -e '/#include <curl\/types.h>/d' \
256 -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
257 -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
258 -i "${S}"/config/system-headers \
259 -i "${S}"/js/src/config/system-headers || die "Sed failed"
260
261 eautoreconf
262 }
263
264 src_configure() {
265 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}/${MY_PN}"
266 MEXTENSIONS="default"
267
268 ####################################
269 #
270 # mozconfig, CFLAGS and CXXFLAGS setup
271 #
272 ####################################
273
274 mozconfig_init
275 mozconfig_config
276
277 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
278 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)/${PN}
279 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
280 mozconfig_annotate '' --disable-gconf
281 mozconfig_annotate '' --disable-mailnews
282 mozconfig_annotate '' --enable-canvas
283 mozconfig_annotate '' --enable-safe-browsing
284 mozconfig_annotate '' --with-system-png
285 mozconfig_annotate '' --enable-system-ffi
286
287 # Other ff-specific settings
288 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
289 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
290
291 mozconfig_use_enable system-sqlite
292
293 # Allow for a proper pgo build
294 if use pgo; then
295 echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
296 fi
297
298 # Finalize and report settings
299 mozconfig_final
300
301 if [[ $(gcc-major-version) -lt 4 ]]; then
302 append-cxxflags -fno-stack-protector
303 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
304 if use amd64 || use x86; then
305 append-flags -mno-avx
306 fi
307 fi
308 }
309
310 src_compile() {
311 if use pgo; then
312 addpredict /root
313 addpredict /etc/gconf
314 # Reset and cleanup environment variables used by GNOME/XDG
315 gnome2_environment_reset
316
317 # Firefox tries to use dri stuff when it's run, see bug 380283
318 shopt -s nullglob
319 cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
320 if test -n "${cards}"; then
321 # FOSS drivers are fine
322 addpredict "${cards}"
323 else
324 cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
325 if test -n "${cards}"; then
326 # Binary drivers seem to cause access violations anyway, so
327 # let's use indirect rendering so that the device files aren't
328 # touched at all. See bug 394715.
329 export LIBGL_ALWAYS_INDIRECT=1
330 addpredict "${cards}"
331 fi
332 fi
333 shopt -u nullglob
334
335 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
336 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
337 Xemake -f client.mk profiledbuild || die "Xemake failed"
338 else
339 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
340 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
341 emake -f client.mk || die "emake failed"
342 fi
343 }
344
345 src_install() {
346 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}/${MY_PN}"
347
348 # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc.
349 local obj_dir="$(echo */config.log)"
350 obj_dir="${obj_dir%/*}"
351 cd "${S}/${obj_dir}"
352
353 # Pax mark xpcshell for hardened support, only used for startupcache creation.
354 pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell
355
356 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
357 emake DESTDIR="${D}" install || die "emake install failed"
358
359 # remove default symlink in /usr/bin, because we add a proper wrapper-script later
360 rm "${ED}"/usr/bin/${MY_PN} || die "Failed to remove binary-symlink"
361 # we dont want development stuff for this kind of build, might as well
362 # conflict with other firefox-builds
363 rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} || \
364 die "Failed to remove sdk and headers"
365
366 # Required in order to use plugins and even run firefox on hardened.
367 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
368
369 # Plugins dir
370 keepdir /usr/$(get_libdir)/${PN}/${MY_PN}/plugins
371
372 # Install pre-configured Torbrowser-profile
373 insinto /usr/share/${PN}
374 doins -r "${WORKDIR}"/tor-browser_en-US/Data/profile || die
375
376 # create wrapper to start torbrowser
377 make_wrapper ${PN} "/usr/$(get_libdir)/${PN}/${MY_PN}/${MY_PN} -no-remote -profile ~/.${PN}/profile"
378
379 newicon -s 128 "${WORKDIR}"/tor-browser_en-US/App/Firefox/icons/mozicon128.png ${PN}.png
380 make_desktop_entry ${PN} "Torbrowser" ${PN} "Network;WebBrowser"
381 dodoc "${WORKDIR}"/tor-browser_en-US/Docs/changelog
382 }
383
384 pkg_preinst() {
385 gnome2_icon_savelist
386 }
387
388 pkg_postinst() {
389 ewarn "This patched firefox build is _NOT_ recommended by TOR upstream but uses"
390 ewarn "the exact same patches (excluding Vidalia-patch). Use this only if you know"
391 ewarn "what you are doing!"
392 einfo ""
393 elog "Copy the folder contents from /usr/share/${PN}/profile into ~/.${PN}/profile and run '${PN}'."
394 einfo
395 elog "This profile folder includes pre-configuration recommended by upstream,"
396 elog "as well as the extensions Torbutton, NoScript and HTTPS-Everywhere."
397 elog "If you want to start from scratch just create the directories '~/.${PN}/profile'."
398 einfo
399 elog "The update check when you first start ${PN} does not recognize this version."
400 einfo
401
402 gnome2_icon_cache_update
403 }
404
405 pkg_postrm() {
406 gnome2_icon_cache_update
407 }