public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/mozilla:master commit in: www-client/torbrowser/, www-client/torbrowser/files/
@ 2019-03-31 14:55 Jory Pratt
  0 siblings, 0 replies; only message in thread
From: Jory Pratt @ 2019-03-31 14:55 UTC (permalink / raw
  To: gentoo-commits

commit:     d364462a450ea11896b249eab5641a097f51b3a2
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 31 14:53:12 2019 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Sun Mar 31 14:53:12 2019 +0000
URL:        https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=d364462a

www-client/torbrowser: version bump, nre esr release

 www-client/torbrowser/Manifest                     |   7 +-
 www-client/torbrowser/files/99torbrowser.example   |  26 --
 www-client/torbrowser/files/README.tor-launcher    |  33 --
 www-client/torbrowser/files/Readme.md              |  20 --
 www-client/torbrowser/files/profile.cfg            |  42 ---
 www-client/torbrowser/files/torbrowser-lto.patch   |  32 ++
 .../torbrowser/files/torbrowser-profiledir.patch   |  44 +++
 .../files/torbrowser-rust_missing_docs.patch       |  21 ++
 www-client/torbrowser/metadata.xml                 |  46 ++-
 .../torbrowser/torbrowser-52.8.1_p756.ebuild       | 311 -----------------
 .../torbrowser/torbrowser-60.6.1.8.0.8.1.1.ebuild  | 368 +++++++++++++++++++++
 11 files changed, 491 insertions(+), 459 deletions(-)

diff --git a/www-client/torbrowser/Manifest b/www-client/torbrowser/Manifest
index 3599314..3a1fff6 100644
--- a/www-client/torbrowser/Manifest
+++ b/www-client/torbrowser/Manifest
@@ -1,3 +1,4 @@
-DIST tor-browser-linux32-7.5.6_en-US.tar.xz 70907548 BLAKE2B 226b4437ed18daffeee73670328585821853991a0cb4d9e466b49e34d9ff69e1f41f50f8a4768075e0fc43cbf55fcaddfb1c66a293f8ffd90bc73e4baa5c25a4 SHA512 7e68d88da5addc52b2c9f0ce07f192692739fb484f83c5e5c63327a87b1535cf92f4387de408244588d55f718fa9dbb4c3bbe4ad5e1dafa08e5e6da0ce191ca6
-DIST tor-browser-linux64-7.5.6_en-US.tar.xz 69094120 BLAKE2B 8b32b6d338f48df5b05f591979b5862074455628de32aea1bed993a51f43f2a1336efa23f4f1007781e93f33a4bbf5d61e46c3894f382417a81d3a31eaad316b SHA512 4697d82157321c2a15521e11f39953924336d29e9eb376931a0047a3060007715f3c29c568d592271a4d3ff090e9d20d82c295fad4f7579b9a3b51f48d476650
-DIST torbrowser-52.8-patches-01.tar.xz 17756 BLAKE2B 3bc3424bbc47feb4f6e7b09e6c72073a4ef18e3a7cd611555d3c80a7deb166ee1317062305eee4f75d17f3f505edaf639a3bd3ef74443d0a8c73304a780fe151 SHA512 edcf1e4fac5f78788ae3c9b81ae7f746fa04b9c76789e772006ead60a65e19c0bda9582f67f0a1f4fb9cfefc98e20d98d0d29194b0e18bc4c1b1eea578d19b60
+DIST firefox-60.6-patches-01.tar.xz 14548 BLAKE2B 412059a6db015fff0985e637768426f877b33bb6b649c54f1292780b9d871f8fe9bf8e6b150ec36ab3647b4501fa6aec821c089a5d6fa861402f05e948f1a9d4 SHA512 b97da7a7b65bbf53cb6b9f48fc6c07a32cefa9d4b4a79ce57df047f941f5269e21bf09fa56a5f31bbf757ed2d76f8a1fe01d2306c92d20cab979e0a21f895e64
+DIST tor-browser-60.6.1esr-8.0-1-build1.tar.gz 386384151 BLAKE2B 18c9a07296317a0e62e40939c9b839850069836f9d489910fc364e1e2929a3218d3a2fc8a521a59d8971b925a09e0c29820a964bc326b0143480f2839b9f72cf SHA512 9a39ed63494cd2be4952312d8160884f2fa35211f3ea54fc2e9dcc737236102938d8c17b3a112420d847b7c7e98d0f33f210afb3d0fd979e21f7e23769372b4b
+DIST tor-browser-linux32-8.0.8_en-US.tar.xz 76761628 BLAKE2B 0c21f3c5718da9fcfe8961a59cd98be495411ea85200294f1918aa9c27af25428e18d7b8a52bab1c27360e6ded221ea981554b7f4130ccd646bc9edb53039f43 SHA512 ebd2b93bdaf87d34cb03ecc2d0811d376a3942de9ea84b6f049358127e91c76aaef4bdd7fcaa9467660e907f9ee5d3fd239f80d7a1667fea2e9b5fbb80355d42
+DIST tor-browser-linux64-8.0.8_en-US.tar.xz 75228720 BLAKE2B 2e368225ca44868b700f1a6c8cb7a0f8f532adbca0f38d998741f5a8e24b76553ab861416724d0101b5b30a8bb305b96d308bfc6315619be4489a8f98ebc979a SHA512 a046d56280b24c3a524b894b94ecacd876d27f732bcc1744a5b194684b1477fcb468e6978a20bee456242708e7f9a4e58a7e82e58f31ed3b84f652689cec546e

diff --git a/www-client/torbrowser/files/99torbrowser.example b/www-client/torbrowser/files/99torbrowser.example
deleted file mode 100644
index 4fb07fa..0000000
--- a/www-client/torbrowser/files/99torbrowser.example
+++ /dev/null
@@ -1,26 +0,0 @@
-# /etc/env.d/99torbrowser
-#
-# The Tor ControlPort password should be given inside double quotes, inside
-# single quotes, i.e. if the ControlPort password is “secret” (without
-# curly quotes) then we must set the environment variable *exactly* like
-# this:
-# TOR_CONTROL_PASSWD='"secret"'
-# Yes, the variable MUST be double-quoted, then single-quoted, exactly as
-# shown. This is used by TorButton to authenticate to Tor's ControlPort, and
-# is necessary for using TB with a system-installed Tor
-
-TOR_CONTROL_PORT=9051
-TOR_CONTROL_HOST=127.0.0.1
-TOR_CONTROL_PASSWD='"secret"'
-#TOR_CONTROL_COOKIE_AUTH_FILE=/var/run/tor/control.authcookie
-
-# Environment variable to skip TorButton control port verification
-#TOR_SKIP_CONTROLPORTTEST=1
-
-# Environment variable to disable the "TorButton" -> "Open Network Settings..."
-# menu item.
-#TOR_NO_DISPLAY_NETWORK_SETTINGS=1
-
-# Environment variable to disable the "TorButton" -> "Check for Updates..."
-# menu item.
-#TOR_HIDE_UPDATE_CHECK_UI=1

diff --git a/www-client/torbrowser/files/README.tor-launcher b/www-client/torbrowser/files/README.tor-launcher
deleted file mode 100644
index 0683733..0000000
--- a/www-client/torbrowser/files/README.tor-launcher
+++ /dev/null
@@ -1,33 +0,0 @@
-Using a system-installed Tor process with Tor Browser:
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The Tor ControlPort password should be given inside double quotes, inside
-single quotes, i.e. if the ControlPort password is “secret” (without
-curly quotes) then we must set the environment variable *exactly* like
-this:
-
-TOR_CONTROL_PASSWD='"secret"'
-
-Yes, the variable MUST be double-quoted, then single-quoted, exactly as
-shown. This is used by TorButton and Tor Launcher to authenticate to Tor's
-ControlPort, and is necessary for using TB with a system-installed Tor.
-
-Additionally, if using a system-installed Tor, the following about:config
-options should be set (values in <> mean they are the value taken from your
-torrc):
-
-SETTING NAME                            VALUE
-network.security.ports.banned           [...],<SocksPort>,<ControlPort>
-network.proxy.socks                     127.0.0.1
-network.proxy.socks_port                <SocksPort>
-extensions.torbutton.inserted_button    true
-extensions.torbutton.launch_warning     false
-extensions.torbutton.loglevel           2
-extensions.torbutton.logmethod          0
-extensions.torlauncher.control_port      <ControlPort>
-extensions.torlauncher.loglevel          2
-extensions.torlauncher.logmethod         0
-extensions.torlauncher.prompt_at_startup false
-extensions.torlauncher.start_tor         false
-
-where the '[...]' in the banned_ports option means "leave anything that was
-already in the preference alone, just append the things specified after it".

diff --git a/www-client/torbrowser/files/Readme.md b/www-client/torbrowser/files/Readme.md
deleted file mode 100644
index 9227583..0000000
--- a/www-client/torbrowser/files/Readme.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Advanced torbutton functionality
-
-To get the advanced functionality of Torbutton (network information,
-new identity feature), `www-client/torbrowser` needs to access a control port.
-
-![Tor Onion Menu ](https://people.torproject.org/~mikeperry/images/OnionMenu.jpg)
-
-* If you use `www-client/torbrowser`, you need to **adjust and export** the environment variables from
-  [99torbrowser.example](https://github.com/MeisterP/torbrowser-overlay/blob/master/www-client/torbrowser/files/99torbrowser.example).
-  You can do this either with gentoo's `/etc/env.d`
-  [mechanism](https://wiki.gentoo.org/wiki/Handbook:X86/Working/EnvVar#Defining_variables_globally)
-  or on the command line.
-
-  _Tor Network Settings_ and _Check for Tor Browser Update_ functionality is not working with the `www-client/torbrowser`.
-
-* If you use `www-client/torbrowser-launcher`, make sure that the environment variables from
-  [99torbrowser.example](https://github.com/MeisterP/torbrowser-overlay/blob/master/www-client/torbrowser/files/99torbrowser.example)
-  are **unset** and that you **don't** have the system wide tor running on port `9150`.
-
-  With `www-client/torbrowser-launcher`, all menu entries are available and working.

diff --git a/www-client/torbrowser/files/profile.cfg b/www-client/torbrowser/files/profile.cfg
deleted file mode 100644
index d14309a..0000000
--- a/www-client/torbrowser/files/profile.cfg
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/FileUtils.jsm");
-
-var profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile);
-var certDBFile = profileDir.clone();
-certDBFile.append("cert8.db")
-// If cert8.db isn't there, it's a new profile
-if (!certDBFile.exists()) {
-  var defaultProfileDir = Services.dirsvc.get("GreD", Ci.nsIFile);
-  defaultProfileDir.append("defaults");
-  defaultProfileDir.append("profile");
-  try {
-    copyDir(defaultProfileDir, profileDir);
-  } catch (e) {
-    Components.utils.reportError(e);
-  }
-}
- 
-function copyDir(aOriginal, aDestination) {
-  var enumerator = aOriginal.directoryEntries;
-  while (enumerator.hasMoreElements()) {
-    var file = enumerator.getNext().QueryInterface(Components.interfaces.nsIFile);
-    if (file.isDirectory()) {
-      var subdir = aDestination.clone();
-      subdir.append(file.leafName);
-      try {
-        subdir.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
-        copyDir(file, subdir);
-      } catch (e) {
-        Components.utils.reportError(e);
-      }
-    } else {
-      try {
-        file.copyTo(aDestination, null);
-      } catch (e) {
-        Components.utils.reportError(e);
-      }
-    }
-  }
-}

diff --git a/www-client/torbrowser/files/torbrowser-lto.patch b/www-client/torbrowser/files/torbrowser-lto.patch
new file mode 100644
index 0000000..2db67db
--- /dev/null
+++ b/www-client/torbrowser/files/torbrowser-lto.patch
@@ -0,0 +1,32 @@
+--- a/security/sandbox/linux/moz.build
++++ b/security/sandbox/linux/moz.build
+@@ -102,7 +102,12 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
+ # gcc lto likes to put the top level asm in syscall.cc in a different partition
+ # from the function using it which breaks the build.  Work around that by
+ # forcing there to be only one partition.
+-if '-flto' in CONFIG['OS_CXXFLAGS'] and CONFIG['CC_TYPE'] != 'clang':
++lto=False
++for f in CONFIG['OS_CXXFLAGS']:
++    if f.startswith('-flto'):
++        lto=True
++        break
++if lto and CONFIG['CC_TYPE'] != 'clang':
+     LDFLAGS += ['--lto-partition=one']
+ 
+ if CONFIG['MOZ_ALSA']:
+--- a/build/unix/elfhack/moz.build
++++ b/build/unix/elfhack/moz.build
+@@ -14,7 +14,12 @@ if not CONFIG['CROSS_COMPILE']:
+         'test-ctors.c',
+     ]
+ 
+-    if '-flto' in CONFIG['OS_CFLAGS']:
++    lto=False
++    for f in CONFIG['OS_CFLAGS']:
++        if f.startswith('-flto'):
++            lto=True
++            break
++    if lto:
+         SOURCES['test-array.c'].flags += ['-fno-lto']
+         SOURCES['test-ctors.c'].flags += ['-fno-lto']
+ 

diff --git a/www-client/torbrowser/files/torbrowser-profiledir.patch b/www-client/torbrowser/files/torbrowser-profiledir.patch
new file mode 100644
index 0000000..bec2495
--- /dev/null
+++ b/www-client/torbrowser/files/torbrowser-profiledir.patch
@@ -0,0 +1,44 @@
+--- a/xpcom/io/TorFileUtils.cpp
++++ b/xpcom/io/TorFileUtils.cpp
+@@ -81,7 +81,7 @@
+   }
+ #endif
+ 
+-#elif defined(ANDROID)
++#elif defined(ANDROID) || defined(TOR_BROWSER_DATA_IN_HOME_DIR)
+   // Orfox stores data in the app home directory.
+   const char* homeDir = getenv("HOME");
+   if (!homeDir || !*homeDir)
+--- a/toolkit/xre/nsXREDirProvider.cpp
++++ b/toolkit/xre/nsXREDirProvider.cpp
+@@ -1283,6 +1283,9 @@
+ #if !defined(ANDROID)
+ #ifdef TOR_BROWSER_DATA_OUTSIDE_APP_DIR
+   rv = localDir->AppendNative(NS_LITERAL_CSTRING("Browser"));
++#elif defined(TOR_BROWSER_DATA_IN_HOME_DIR)
++  rv = localDir->AppendRelativeNativePath(NS_LITERAL_CSTRING(MOZ_USER_DIR
++                                        XPCOM_FILE_PATH_SEPARATOR "torbrowser"));
+ #else
+   rv = localDir->AppendRelativeNativePath(NS_LITERAL_CSTRING("Data"
+                                      XPCOM_FILE_PATH_SEPARATOR "Browser"));
+@@ -1291,7 +1294,20 @@
+ #endif
+ 
+   if (aLocal) {
++#ifndef TOR_BROWSER_DATA_IN_HOME_DIR
+     rv = localDir->AppendNative(NS_LITERAL_CSTRING("Caches"));
++#else
++    const char* cacheHome = getenv("XDG_CACHE_HOME");
++    if (cacheHome && *cacheHome) {
++      rv = NS_NewNativeLocalFile(nsDependentCString(cacheHome), true,
++                                 getter_AddRefs(localDir));
++    } else {
++      rv = NS_NewNativeLocalFile(nsDependentCString(PR_GetEnv("HOME")), true,
++                                 getter_AddRefs(localDir));
++      rv = localDir->AppendRelativeNativePath(NS_LITERAL_CSTRING(".cache"));
++    }
++    rv = localDir->AppendRelativeNativePath(NS_LITERAL_CSTRING("torbrowser"));
++#endif
+     NS_ENSURE_SUCCESS(rv, rv);
+   }
+ 

diff --git a/www-client/torbrowser/files/torbrowser-rust_missing_docs.patch b/www-client/torbrowser/files/torbrowser-rust_missing_docs.patch
new file mode 100644
index 0000000..6b38618
--- /dev/null
+++ b/www-client/torbrowser/files/torbrowser-rust_missing_docs.patch
@@ -0,0 +1,21 @@
+--- a/servo/components/style_traits/lib.rs
++++ b/servo/components/style_traits/lib.rs
+@@ -9,7 +9,7 @@
+ #![crate_name = "style_traits"]
+ #![crate_type = "rlib"]
+ 
+-#![deny(unsafe_code, missing_docs)]
++#![deny(unsafe_code)]
+ 
+ extern crate app_units;
+ #[macro_use] extern crate bitflags;
+--- a/servo/components/style/lib.rs
++++ b/servo/components/style/lib.rs
+@@ -23,7 +23,6 @@
+ //! [cssparser]: ../cssparser/index.html
+ //! [selectors]: ../selectors/index.html
+ 
+-#![deny(missing_docs)]
+ 
+ extern crate app_units;
+ extern crate arrayvec;

diff --git a/www-client/torbrowser/metadata.xml b/www-client/torbrowser/metadata.xml
index 86934b2..6c81206 100644
--- a/www-client/torbrowser/metadata.xml
+++ b/www-client/torbrowser/metadata.xml
@@ -1,28 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="person">
-	<email>poncho@spahan.ch</email>
-	<name>Poncho</name>
-</maintainer>
-<use>
-	<flag name="custom-optimization">Build with user-specified compiler optimizations
-		(-Os, -O0, -O1, -O2, -O3) from CFLAGS (unsupported)</flag>
-	<flag name="gtk2">Use the cairo-gtk2 rendering engine</flag>
-	<flag name="jemalloc">Enable or disable jemalloc</flag>
-	<flag name="system-cairo">Use the system-wide <pkg>x11-libs/cairo</pkg>
-		instead of bundled.</flag>
-	<flag name="system-harfbuzz">Use the system-wide <pkg>media-libs/harfbuzz</pkg>
-		and <pkg>media-gfx/graphite2</pkg> instead of bundled.</flag>
-	<flag name="system-icu">Use the system-wide <pkg>dev-libs/icu</pkg>
-		instead of bundled.</flag>
-	<flag name="system-jpeg">Use the system-wide <pkg>media-libs/libjpeg-turbo</pkg>
-		instead of bundled.</flag>
-	<flag name="system-libevent">Use the system-wide <pkg>dev-libs/libevent</pkg>
-		instead of bundled.</flag>
-	<flag name="system-libvpx">Use the system-wide <pkg>media-libs/libvpx</pkg>
-		instead of bundled.</flag>
-	<flag name="system-sqlite">Use the system-wide <pkg>dev-db/sqlite</pkg>
-		installation with secure-delete enabled</flag>
-</use>
+	<maintainer type="person">
+		<email>4nykey@gmail.com</email>
+	</maintainer>
+	<use>
+		<flag name="clang">Use Clang compiler instead of GCC</flag>
+		<flag name="custom-optimization">Fine-tune custom compiler
+			optimizations (-Os, -O0, -O1, -O2, -O3)</flag>
+		<flag name="hwaccel">Use hardware-accelerated rendering</flag>
+		<flag name="screenshot">Allow to disable screenshot extension in global profile</flag>
+		<flag name="system-harfbuzz">Use the system-wide <pkg>media-libs/harfbuzz</pkg>
+			and <pkg>media-gfx/graphite2</pkg> instead of bundled.</flag>
+		<flag name="system-icu">Use the system-wide <pkg>dev-libs/icu</pkg>
+			instead of bundled.</flag>
+		<flag name="system-jpeg">Use the system-wide <pkg>media-libs/libjpeg-turbo</pkg>
+			instead of bundled.</flag>
+		<flag name="system-libevent">Use the system-wide <pkg>dev-libs/libevent</pkg>
+			instead of bundled.</flag>
+		<flag name="system-libvpx">Use the system-wide <pkg>media-libs/libvpx</pkg>
+			instead of bundled.</flag>
+		<flag name="system-sqlite">Use the system-wide <pkg>dev-db/sqlite</pkg>
+			installation with secure-delete enabled</flag>
+	</use>
 </pkgmetadata>

diff --git a/www-client/torbrowser/torbrowser-52.8.1_p756.ebuild b/www-client/torbrowser/torbrowser-52.8.1_p756.ebuild
deleted file mode 100644
index 80a8947..0000000
--- a/www-client/torbrowser/torbrowser-52.8.1_p756.ebuild
+++ /dev/null
@@ -1,311 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-WANT_AUTOCONF="2.1"
-MOZ_ESR=1
-
-if [[ ${MOZ_ESR} == 1 ]]; then
-	# ESR releases have slightly different version numbers
-	MOZ_PV="${PV/_p*}esr"
-fi
-
-# see https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/firefox/config?h=maint-7.5#n4
-TOR_PV="7.5.6"
-EGIT_COMMIT="tor-browser-${MOZ_PV}-${TOR_PV%.*}-1-build1"
-
-# Patch version
-PATCH="${PN}-52.8-patches-01"
-
-MOZCONFIG_OPTIONAL_GTK2ONLY=1
-MOZCONFIG_OPTIONAL_WIFI=1
-
-inherit git-r3 check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v6.52 pax-utils autotools
-
-DESCRIPTION="The Tor Browser"
-HOMEPAGE="https://www.torproject.org/projects/torbrowser.html
-	https://gitweb.torproject.org/tor-browser.git"
-
-KEYWORDS="~amd64 ~x86"
-SLOT="0"
-# BSD license applies to torproject-related code like the patches
-# icons are under CCPL-Attribution-3.0
-LICENSE="BSD CC-BY-3.0 MPL-2.0 GPL-2 LGPL-2.1"
-IUSE="hardened test"
-
-EGIT_REPO_URI="https://git.torproject.org/tor-browser.git"
-EGIT_CLONE_TYPE="shallow"
-BASE_SRC_URI="https://dist.torproject.org/${PN}/${TOR_PV}"
-ARCHIVE_SRC_URI="https://archive.torproject.org/tor-package-archive/${PN}/${TOR_PV}"
-PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/${PATCH}.tar.xz )
-
-SRC_URI="${SRC_URI}
-	x86? ( ${BASE_SRC_URI}/tor-browser-linux32-${TOR_PV}_en-US.tar.xz
-		${ARCHIVE_SRC_URI}/tor-browser-linux32-${TOR_PV}_en-US.tar.xz )
-	amd64? ( ${BASE_SRC_URI}/tor-browser-linux64-${TOR_PV}_en-US.tar.xz
-		${ARCHIVE_SRC_URI}/tor-browser-linux64-${TOR_PV}_en-US.tar.xz )
-	${PATCH_URIS[@]}"
-
-ASM_DEPEND=">=dev-lang/yasm-1.1"
-
-RDEPEND="
-	>=dev-libs/nspr-4.19
-	!!<=www-client/torbrowser-45.5.1_p607"
-
-DEPEND="${RDEPEND}
-	${ASM_DEPEND}
-	virtual/opengl"
-
-QA_PRESTRIPPED="usr/lib*/${PN}/torbrowser"
-
-BUILD_OBJ_DIR="${S}/torsecure"
-
-pkg_setup() {
-	moz_pkgsetup
-
-	# These should *always* be cleaned up anyway
-	unset DBUS_SESSION_BUS_ADDRESS \
-		DISPLAY \
-		ORBIT_SOCKETDIR \
-		SESSION_MANAGER \
-		XDG_SESSION_COOKIE \
-		XAUTHORITY
-}
-
-pkg_pretend() {
-	# Ensure we have enough disk space to compile
-	if use debug || use test ; then
-		CHECKREQS_DISK_BUILD="8G"
-	else
-		CHECKREQS_DISK_BUILD="4G"
-	fi
-	check-reqs_pkg_setup
-}
-
-src_unpack() {
-	unpack ${A}
-	git-r3_src_unpack
-}
-
-src_prepare() {
-	# Apply gentoo firefox patches
-	eapply "${WORKDIR}/${PN}"
-
-	# Allow user to apply any additional patches without modifing ebuild
-	eapply_user
-
-	# Enable gnomebreakpad
-	if use debug ; then
-		sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
-			"${S}"/build/unix/run-mozilla.sh || die "sed failed!"
-	fi
-
-	# Ensure that our plugins dir is enabled as default
-	sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
-		"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
-	sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
-		"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
-
-	# Fix sandbox violations during make clean, bug 372817
-	sed -e "s:\(/no-such-file\):${T}\1:g" \
-		-i "${S}"/config/rules.mk \
-		-i "${S}"/nsprpub/configure{.in,} \
-		|| die
-
-	# Don't exit with error when some libs are missing which we have in
-	# system.
-	sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
-		-i "${S}"/browser/installer/Makefile.in || die
-
-	# Don't error out when there's no files to be removed:
-	sed 's@\(xargs rm\)$@\1 -f@' \
-		-i "${S}"/toolkit/mozapps/installer/packager.mk || die
-
-	# Keep codebase the same even if not using official branding
-	sed '/^MOZ_DEV_EDITION=1/d' \
-		-i "${S}"/browser/branding/aurora/configure.sh || die
-
-	# Allow user to apply any additional patches without modifing ebuild
-	eapply_user
-
-	# Autotools configure is now called old-configure.in
-	# This works because there is still a configure.in that happens to be for the
-	# shell wrapper configure script
-	eautoreconf old-configure.in
-
-	# Must run autoconf in js/src
-	cd "${S}"/js/src || die
-	eautoconf old-configure.in
-
-	# Need to update jemalloc's configure
-	cd "${S}"/memory/jemalloc/src || die
-	WANT_AUTOCONF= eautoconf
-}
-
-src_configure() {
-	MEXTENSIONS="default"
-
-	mozconfig_init
-	mozconfig_config
-
-	# Add full relro support for hardened
-	use hardened && append-ldflags "-Wl,-z,relro,-z,now"
-
-	mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
-
-	# Rename the install directory and the executable
-	mozconfig_annotate 'torbrowser' --with-app-name=torbrowser
-	mozconfig_annotate 'torbrowser' --with-app-basename=torbrowser
-	# see https://gitweb.torproject.org/tor-browser.git/tree/old-configure.in?h=tor-browser-52.6.0esr-7.5-2#n3917
-	mozconfig_annotate 'torbrowser' --with-tor-browser-version=${TOR_PV}
-	mozconfig_annotate 'torbrowser' --disable-tor-browser-update
-
-	# torbrowser uses a patched nss library
-	# see https://gitweb.torproject.org/tor-browser.git/log/security/nss?h=tor-browser-52.6.0esr-7.5-2
-	mozconfig_annotate 'torbrowser' --without-system-nspr
-	mozconfig_annotate 'torbrowser' --without-system-nss
-
-	echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
-	echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig
-
-	# Finalize and report settings
-	mozconfig_final
-
-	# workaround for funky/broken upstream configure...
-	SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
-	emake -f client.mk configure
-}
-
-src_compile() {
-	MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
-	emake -f client.mk realbuild
-}
-
-src_install() {
-	cd "${BUILD_OBJ_DIR}" || die
-
-	# Pax mark xpcshell for hardened support, only used for startupcache creation.
-	pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell
-
-	# see: https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/tor-browser/build?h=maint-7.5#n23
-	touch "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/extension-overrides.js" \
-		|| die
-
-	# see: https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/tor-browser/build?h=maint-7.5#n158
-	echo "pref(\"extensions.torlauncher.prompt_for_locale\", \"false\");" \
-		>> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/extension-overrides.js" \
-		|| die
-
-	echo "pref(\"intl.locale.matchOS\", \"false\");" \
-		>> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/extension-overrides.js" \
-		|| die
-
-	# see: https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/tor-browser/build?h=maint-7.5#n196
-	echo "pref(\"general.useragent.locale\", \"en-US\");" \
-		>> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/000-tor-browser.js" \
-		|| die
-
-	# Reenable defaults/profile functionality
-	# see: https://bugzilla.mozilla.org/show_bug.cgi?id=1234012
-	# see: https://mike.kaply.com/2016/05/24/default-profile-directory-doesnt-work-in-firefox-46/
-	echo "pref(\"general.config.filename\", \"profile.cfg\");" \
-		>> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/000-tor-browser.js" \
-		|| die
-
-	echo "pref(\"general.config.obscure_value\", 0);" \
-		>> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/000-tor-browser.js" \
-		|| die
-
-	insinto ${MOZILLA_FIVE_HOME}
-	doins "${FILESDIR}/profile.cfg"
-
-	MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
-	emake DESTDIR="${D}" install
-
-	# Install icons and .desktop for menu entry
-	local size sizes icon_path
-	sizes="16 24 32 48 256"
-	icon_path="${S}/browser/branding/official"
-	for size in ${sizes}; do
-		newicon -s ${size} "${icon_path}/default${size}.png" ${PN}.png
-	done
-	# The 128x128 icon has a different name
-	newicon -s 128 "${icon_path}/mozicon128.png" ${PN}.png
-	make_desktop_entry ${PN} "Tor Browser" ${PN} "Network;WebBrowser" "StartupWMClass=Torbrowser"
-
-	# Add StartupNotify=true bug 237317
-	if use startup-notification ; then
-		echo "StartupNotify=true" \
-			>> "${ED}/usr/share/applications/${PN}-${PN}.desktop" \
-			|| die
-	fi
-
-	# Required in order to use plugins and even run torbrowser on hardened.
-	pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{torbrowser,torbrowser-bin,plugin-container}
-
-	# Profile without the tor-launcher extension
-	# see: https://trac.torproject.org/projects/tor/ticket/10160
-	local profile_dir="${WORKDIR}/tor-browser_en-US/Browser/TorBrowser/Data/Browser/profile.default"
-
-	docompress -x "${EROOT}/usr/share/doc/${PF}/tor-launcher@torproject.org.xpi"
-	dodoc "${profile_dir}/extensions/tor-launcher@torproject.org.xpi"
-	rm "${profile_dir}/extensions/tor-launcher@torproject.org.xpi" || die "Failed to remove torlauncher extension"
-
-	insinto ${MOZILLA_FIVE_HOME}/defaults/profile
-	doins -r "${profile_dir}"/{extensions,preferences,bookmarks.html}
-
-	# see: https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/RelativeLink/start-tor-browser#n301
-	dodoc "${FILESDIR}/README.tor-launcher"
-	dodoc "${WORKDIR}/tor-browser_en-US/Browser/TorBrowser/Docs/ChangeLog.txt"
-
-	# see: https://trac.torproject.org/projects/tor/ticket/11751#comment:2
-	# see: https://github.com/Whonix/anon-ws-disable-stacked-tor/blob/master/usr/lib/anon-ws-disable-stacked-tor/torbrowser.sh
-	dodoc "${FILESDIR}/99torbrowser.example"
-}
-
-pkg_preinst() {
-	gnome2_icon_savelist
-
-	# if the apulse libs are available in MOZILLA_FIVE_HOME then apulse
-	# doesn't need to be forced into the LD_LIBRARY_PATH
-	if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then
-		einfo "APULSE found - Generating library symlinks for sound support"
-		local lib
-		pushd "${ED}"${MOZILLA_FIVE_HOME} &>/dev/null || die
-		for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do
-			# a quickpkg rolled by hand will grab symlinks as part of the package,
-			# so we need to avoid creating them if they already exist.
-			if ! [ -L ${lib##*/} ]; then
-				ln -s "${lib}" ${lib##*/} || die
-			fi
-		done
-		popd &>/dev/null || die
-	fi
-}
-
-pkg_postinst() {
-	gnome2_icon_cache_update
-
-	if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then
-		elog "Apulse was detected at merge time on this system and so it will always be"
-		elog "used for sound.  If you wish to use pulseaudio instead please unmerge"
-		elog "media-sound/apulse."
-	fi
-
-	if [[ -z ${REPLACING_VERSIONS} ]]; then
-		ewarn "This patched firefox build is _NOT_ recommended by Tor upstream but uses"
-		ewarn "the exact same sources. Use this only if you know what you are doing!"
-		elog "Torbrowser uses port 9150 to connect to Tor. You can change the port"
-		elog "in the connection settings to match your setup."
-		elog ""
-		elog "To get the advanced functionality of Torbutton (network information,"
-		elog "new identity), Torbrowser needs to access a control port."
-		elog "See 99torbrowser.example in /usr/share/doc/${PF} and"
-		elog "https://github.com/MeisterP/torbrowser-overlay/blob/master/Readme.md"
-		elog "for further information."
-	fi
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-}

diff --git a/www-client/torbrowser/torbrowser-60.6.1.8.0.8.1.1.ebuild b/www-client/torbrowser/torbrowser-60.6.1.8.0.8.1.1.ebuild
new file mode 100644
index 0000000..9034134
--- /dev/null
+++ b/www-client/torbrowser/torbrowser-60.6.1.8.0.8.1.1.ebuild
@@ -0,0 +1,368 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WANT_AUTOCONF="2.1"
+
+PYTHON_COMPAT=( python3_{5,6,7} )
+PYTHON_REQ_USE='ncurses,sqlite,ssl,threads(+)'
+MOZCONFIG_OPTIONAL_WIFI=1
+
+LLVM_MAX_SLOT=8
+
+inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils llvm \
+		mozconfig-v6.${PV%%.*} pax-utils xdg-utils autotools
+inherit eapi7-ver
+
+MOZ_PV="$(ver_cut 1-3)esr"
+# https://dist.torproject.org/torbrowser
+TOR_PV="$(ver_cut 4-6)"
+if [[ -z ${PV%%*_alpha} ]]; then
+	TOR_PV="$(ver_rs 2 a ${TOR_PV})"
+else
+	KEYWORDS="~amd64 ~x86"
+fi
+TOR_PV="${TOR_PV%.0}"
+# https://gitweb.torproject.org/tor-browser.git/refs/tags
+GIT_TAG="$(ver_cut 4-5)-$(ver_cut 7-8)"
+GIT_TAG="tor-browser-${MOZ_PV}-$(ver_rs 3 '-build' ${GIT_TAG})"
+
+DESCRIPTION="The Tor Browser"
+HOMEPAGE="
+https://www.torproject.org/projects/torbrowser.html
+https://gitweb.torproject.org/tor-browser.git
+"
+
+SLOT="0"
+# BSD license applies to torproject-related code like the patches
+# icons are under CCPL-Attribution-3.0
+LICENSE="BSD CC-BY-3.0 MPL-2.0 GPL-2 LGPL-2.1"
+IUSE="hardened hwaccel jack -screenshot selinux test"
+
+SRC_URI="mirror://tor/dist/${PN}/${TOR_PV}"
+PATCH="firefox-${PV%%.*}.6-patches-01"
+PATCH=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/${PATCH}.tar.xz )
+SRC_URI="
+	https://gitweb.torproject.org/tor-browser.git/snapshot/${GIT_TAG}.tar.gz
+	-> ${GIT_TAG}.tar.gz
+	x86? (
+		${SRC_URI}/tor-browser-linux32-${TOR_PV}_en-US.tar.xz
+	)
+	amd64? (
+		${SRC_URI}/tor-browser-linux64-${TOR_PV}_en-US.tar.xz
+	)
+	${PATCH[@]}
+"
+RESTRICT="primaryuri"
+
+RDEPEND="
+	system-icu? ( >=dev-libs/icu-60.2 )
+	jack? ( virtual/jack )
+	selinux? ( sec-policy/selinux-mozilla )
+"
+DEPEND="
+	${RDEPEND}
+	>=sys-devel/llvm-4.0.1
+	>=sys-devel/clang-4.0.1
+	>=dev-lang/yasm-1.1
+	virtual/opengl
+"
+RDEPEND="
+	${RDEPEND}
+	>=net-vpn/tor-0.3.3.9
+"
+
+S="${WORKDIR}/${GIT_TAG}"
+
+QA_PRESTRIPPED="usr/lib*/${PN}/${PN}/${PN}"
+
+BUILD_OBJ_DIR="${WORKDIR}/tb"
+
+llvm_check_deps() {
+	if ! has_version "sys-devel/clang:${LLVM_SLOT}" ; then
+		ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..."
+		return 1
+	fi
+
+	if use clang ; then
+		if ! has_version "=sys-devel/lld-${LLVM_SLOT}*" ; then
+			ewarn "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..."
+			return 1
+		fi
+	fi
+
+	einfo "Will use LLVM slot ${LLVM_SLOT}!"
+}
+
+pkg_setup() {
+	moz_pkgsetup
+
+	# Avoid PGO profiling problems due to enviroment leakage
+	# These should *always* be cleaned up anyway
+	unset DBUS_SESSION_BUS_ADDRESS \
+		DISPLAY \
+		ORBIT_SOCKETDIR \
+		SESSION_MANAGER \
+		XDG_SESSION_COOKIE \
+		XAUTHORITY
+
+	append-cppflags "-DTOR_BROWSER_DATA_IN_HOME_DIR"
+	MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}/${PN}"
+
+	addpredict /proc/self/oom_score_adj
+
+	llvm_pkg_setup
+}
+
+pkg_pretend() {
+	# Ensure we have enough disk space to compile
+	CHECKREQS_DISK_BUILD="4G"
+
+	check-reqs_pkg_setup
+}
+
+src_prepare() {
+	local PATCHES=(
+		"${WORKDIR}"/firefox
+		"${FILESDIR}"/${PN}-profiledir.patch
+		"${FILESDIR}"/${PN}-lto.patch
+		"${FILESDIR}"/${PN}-rust_missing_docs.patch
+	)
+
+	sed \
+		-e '/Unknown option: %s/ s:raise InvalidOptionError:print:' \
+		-i python/mozbuild/mozbuild/configure/__init__.py
+
+	# Enable gnomebreakpad
+	if use debug ; then
+		sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
+			"${S}"/build/unix/run-mozilla.sh || die "sed failed!"
+	fi
+
+	# Ensure that our plugins dir is enabled as default
+	sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
+		"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
+	sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
+		"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
+
+	# Fix sandbox violations during make clean, bug 372817
+	sed -e "s:\(/no-such-file\):${T}\1:g" \
+		-i "${S}"/config/rules.mk \
+		-i "${S}"/nsprpub/configure{.in,} \
+		|| die
+
+	# Don't exit with error when some libs are missing which we have in
+	# system.
+	sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
+		-i "${S}"/browser/installer/Makefile.in || die
+
+	# Don't error out when there's no files to be removed:
+	sed 's@\(xargs rm\)$@\1 -f@' \
+		-i "${S}"/toolkit/mozapps/installer/packager.mk || die
+
+	# Keep codebase the same even if not using official branding
+	sed '/^MOZ_DEV_EDITION=1/d' \
+		-i "${S}"/browser/branding/aurora/configure.sh || die
+
+	default
+
+	# Autotools configure is now called old-configure.in
+	# This works because there is still a configure.in that happens to be for the
+	# shell wrapper configure script
+	eautoreconf old-configure.in
+
+	# Must run autoconf in js/src
+	cd "${S}"/js/src || die
+	eautoconf old-configure.in
+}
+
+src_configure() {
+	MEXTENSIONS="default"
+
+	# Add information about TERM to output (build.log) to aid debugging
+	# blessings problems
+	if [[ -n "${TERM}" ]] ; then
+		einfo "TERM is set to: \"${TERM}\""
+	else
+		einfo "TERM is unset."
+	fi
+
+	####################################
+	#
+	# mozconfig, CFLAGS and CXXFLAGS setup
+	#
+	####################################
+
+	mozconfig_init
+	mozconfig_config
+
+	# enable JACK, bug 600002
+	mozconfig_use_enable jack
+
+	# Add full relro support for hardened
+	if use hardened; then
+		append-ldflags "-Wl,-z,relro,-z,now"
+		mozconfig_use_enable hardened hardening
+	fi
+
+	# Disable built-in ccache support to avoid sandbox violation, #665420
+	# Use FEATURES=ccache instead!
+	mozconfig_annotate '' --without-ccache
+	sed -i -e 's/ccache_stats = None/return None/' \
+		python/mozbuild/mozbuild/controller/building.py || \
+		die "Failed to disable ccache stats call"
+
+	mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
+
+	# allow elfhack to work in combination with unstripped binaries
+	# when they would normally be larger than 2GiB.
+	append-ldflags "-Wl,--compress-debug-sections=zlib"
+
+	if use clang ; then
+		# https://bugzilla.mozilla.org/show_bug.cgi?id=1423822
+		mozconfig_annotate 'elf-hack is broken when using Clang' --disable-elf-hack
+	fi
+
+	echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
+	echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig
+
+	# Default mozilla_five_home no longer valid option
+	sed '/with-default-mozilla-five-home=/d' -i "${S}"/.mozconfig
+	# Rename the install directory and the executable
+	mozconfig_annotate 'torbrowser' --libdir="${EPREFIX}"/usr/$(get_libdir)/${PN}
+	mozconfig_annotate 'torbrowser' --with-app-name=${PN}
+	mozconfig_annotate 'torbrowser' --with-app-basename=${PN}
+	mozconfig_annotate 'torbrowser' --disable-tor-browser-update
+	mozconfig_annotate 'torbrowser' --with-tor-browser-version=${TOR_PV}
+	mozconfig_annotate 'torbrowser' --disable-tor-browser-data-outside-app-dir
+	mozconfig_annotate 'torbrowser' --with-branding=browser/branding/official
+	mozconfig_annotate 'torbrowser' --disable-maintenance-service
+	mozconfig_annotate 'torbrowser' --disable-webrtc
+	mozconfig_annotate 'torbrowser' --disable-eme
+
+	mozconfig_annotate 'torbrowser' --without-system-nspr
+	mozconfig_annotate 'torbrowser' --without-system-nss
+
+	# Finalize and report settings
+	mozconfig_final
+
+	# workaround for funky/broken upstream configure...
+	SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \
+	./mach configure || die
+}
+
+src_compile() {
+	MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \
+	BUILD_VERBOSE_LOG=1 \
+	./mach build --verbose || die
+}
+
+src_install() {
+	local profile_dir="${WORKDIR}/tor-browser_en-US/Browser/TorBrowser/Data/Browser/profile.default"
+	cd "${BUILD_OBJ_DIR}" || die
+
+	cat "${profile_dir}"/bookmarks.html > \
+		dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html
+
+	# Pax mark xpcshell for hardened support, only used for startupcache creation.
+	pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell
+
+	touch "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
+		|| die
+
+	mozconfig_install_prefs \
+		"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js"
+
+	# Augment this with hwaccel prefs
+	if use hwaccel ; then
+		printf 'pref("%s", true);\npref("%s", true);\n' \
+		layers.acceleration.force-enabled webgl.force-enabled >> \
+		"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
+		|| die
+	fi
+
+	if ! use screenshot; then
+		echo "pref(\"extensions.screenshots.disabled\", true);" >> \
+			"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
+			|| die
+	fi
+
+	sed -e '/extensions\.autoDisableScopes/s:\<0\>:3:' \
+		-i "${BUILD_OBJ_DIR}"/dist/bin/browser/defaults/preferences/000-tor-browser.js \
+		|| die
+
+	cd "${S}"
+	MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \
+	DESTDIR="${D}" ./mach install || die
+
+	# Install icons and .desktop for menu entry
+	local size icon_path
+	icon_path="${S}/browser/branding/official"
+	for size in 16 32 48 64 128 256; do
+		newicon -s ${size} "${icon_path}/default${size}.png" ${PN}.png
+	done
+	make_desktop_entry ${PN} "Tor Browser" ${PN} "Network;WebBrowser" "StartupWMClass=Torbrowser"
+
+	# Add StartupNotify=true bug 237317
+	if use startup-notification ; then
+		echo "StartupNotify=true"\
+			 >> "${ED}/usr/share/applications/${PN}-${PN}.desktop" \
+			|| die
+	fi
+
+	# Required in order to use plugins and even run torbrowser on hardened.
+	pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{${PN},${PN}-bin,plugin-container}
+
+	# Profile without the tor-launcher extension
+	# see: https://trac.torproject.org/projects/tor/ticket/10160
+
+	rm "${profile_dir}/extensions/tor-launcher@torproject.org.xpi" || die \
+		"Failed to remove torlauncher extension"
+
+	insinto ${MOZILLA_FIVE_HOME}/browser
+	doins -r "${profile_dir}"/extensions
+
+	dodoc "${WORKDIR}/tor-browser_en-US/Browser/TorBrowser/Docs/ChangeLog.txt"
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+
+	# if the apulse libs are available in MOZILLA_FIVE_HOME then apulse
+	# doesn't need to be forced into the LD_LIBRARY_PATH
+	if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then
+		einfo "APULSE found - Generating library symlinks for sound support"
+		local lib
+		pushd "${ED}"${MOZILLA_FIVE_HOME} &>/dev/null || die
+		for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do
+			# a quickpkg rolled by hand will grab symlinks as part of the package,
+			# so we need to avoid creating them if they already exist.
+			if ! [ -L ${lib##*/} ]; then
+				ln -s "${lib}" ${lib##*/} || die
+			fi
+		done
+		popd &>/dev/null || die
+	fi
+}
+
+pkg_postinst() {
+	ewarn "This patched firefox build is _NOT_ recommended by Tor upstream but uses"
+	ewarn "the exact same sources. Use this only if you know what you are doing!"
+	elog "Torbrowser uses port 9150 to connect to Tor. You can change the port"
+	elog "in the connection settings to match your setup."
+
+	gnome2_icon_cache_update
+	xdg_desktop_database_update
+
+	if use pulseaudio && has_version ">=media-sound/apulse-0.1.9"; then
+		elog "Apulse was detected at merge time on this system and so it will always be"
+		elog "used for sound.  If you wish to use pulseaudio instead please unmerge"
+		elog "media-sound/apulse."
+		elog
+	fi
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+	xdg_desktop_database_update
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-31 14:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-31 14:55 [gentoo-commits] proj/mozilla:master commit in: www-client/torbrowser/, www-client/torbrowser/files/ Jory Pratt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox