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