aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2020-02-11 07:54:13 -0600
committerJory Pratt <anarchy@gentoo.org>2020-02-11 07:54:13 -0600
commita40e26529d1ece4f215fe579a859c5902aed7570 (patch)
tree3fe716e4eb2b4a3f1f638847d04464155b20e589
parentRevert "www-client/torbrowser: drop unsupported package from overlay" (diff)
downloadmozilla-a40e2652.tar.gz
mozilla-a40e2652.tar.bz2
mozilla-a40e2652.zip
www-client/torbrowser: drop unsupported package from overlay
Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
-rw-r--r--www-client/torbrowser/Manifest4
-rw-r--r--www-client/torbrowser/files/icon/torbrowser.desktop9
-rw-r--r--www-client/torbrowser/files/torbrowser-60.5.0-Change_the_default_Firefox_profile_directory.patch425
-rw-r--r--www-client/torbrowser/files/torbrowser-60.5.0-Do_not_store_data_in_the_app_bundle.patch189
-rw-r--r--www-client/torbrowser/metadata.xml26
-rw-r--r--www-client/torbrowser/torbrowser-60.6.1.8.0.9.1.3.ebuild367
6 files changed, 0 insertions, 1020 deletions
diff --git a/www-client/torbrowser/Manifest b/www-client/torbrowser/Manifest
deleted file mode 100644
index ccc59e04..00000000
--- a/www-client/torbrowser/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST firefox-60.6-patches-07.tar.xz 37404 BLAKE2B 5516ff768bee0253131381fdba3e08785ab31bb29e44ad7f7e2956fb7624fafc9bf22f892ddbd0617e5e7d18500686a9975a60ea77d23a2853f35936cd142030 SHA512 3c4160e632155b0a239e22d0c1b1c701545b0f6d0915f9bdcf3b8431cee1abf650191ffafc5c3224a61279c8b1b52a80444c811a3914e16127411991c963292b
-DIST tor-browser-60.6.1esr-8.0-1-build3.tar.gz 386385947 BLAKE2B ad979d6ceacf10588abd1d90bd4c561b5cc3a22a1296f32ee479f3732bb09aa84909cceb248d962aaac07faefbf34112fb8a914fcb74f6f5cf44205dafeab5af SHA512 5a49ded40cee8fecf57e716f4eb7f3df960ebfee2565dc8f26f1bad19a38e963be8e697a63c14fdc615d56bdcd429aeee20564198d199be499e978ba9cf47e63
-DIST tor-browser-linux32-8.0.9_en-US.tar.xz 76801980 BLAKE2B 7b3c65e77e010f62ecbfd96632db1918046f677a1dce59caaa5d8329fd0c89da7b18766461af732ac4352f450afc6b5affe8ad812250a2e22a7fc2e7796f46cf SHA512 f5f5a454e6c97dad9c56471d921eae84a922a5208608ef06d8ef6c4bd0215c08df94b24dbedf61b3557a2aa8773d963b449da7b1bb782bbe58165526d05f5ec4
-DIST tor-browser-linux64-8.0.9_en-US.tar.xz 75266932 BLAKE2B 881dc32d4a52eee3035dc0817255cc45eaddb24f78070fcd5b5697626bc0815209103f9457df0ba3eda4149b59c1ace8a3d309a75734e90bd8a75fd568d92e57 SHA512 239703e2791481ab1ec14b38633541bceb422040101b04e84a4a9adc96f7dbef9ffa98b61a40c0533157d0c93dd4e9df36ced03ddb50490819fb8d0d19ccc5a3
diff --git a/www-client/torbrowser/files/icon/torbrowser.desktop b/www-client/torbrowser/files/icon/torbrowser.desktop
deleted file mode 100644
index ecfabde7..00000000
--- a/www-client/torbrowser/files/icon/torbrowser.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Name=@NAME@
-Comment=Web Browser
-Exec=torbrowser %u
-Icon=@ICON@
-Terminal=false
-Type=Application
-MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
-Categories=Network;WebBrowser
diff --git a/www-client/torbrowser/files/torbrowser-60.5.0-Change_the_default_Firefox_profile_directory.patch b/www-client/torbrowser/files/torbrowser-60.5.0-Change_the_default_Firefox_profile_directory.patch
deleted file mode 100644
index 3559402e..00000000
--- a/www-client/torbrowser/files/torbrowser-60.5.0-Change_the_default_Firefox_profile_directory.patch
+++ /dev/null
@@ -1,425 +0,0 @@
-From e5b0afd7fee16e7f755095b8b85296fe401fb04d Mon Sep 17 00:00:00 2001
-From: Poncho <poncho@spahan.ch>
-Date: Wed, 30 Jan 2019 09:55:48 +0100
-Subject: [PATCH 2/4] Revert "Bug 9173: Change the default Firefox profile
- directory to be TBB-relative."
-
-This reverts commit b82691c60b6a3ade6939b0f68f28de1e3c120292.
----
- toolkit/xre/nsXREDirProvider.cpp | 147 +++++++++++++++++++------
- toolkit/xre/nsXREDirProvider.h | 12 +-
- xpcom/io/nsAppFileLocationProvider.cpp | 97 ++++++++++------
- 3 files changed, 181 insertions(+), 75 deletions(-)
-
-diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
-index dbbaffd2a15f..00ee37ce9b5f 100644
---- a/toolkit/xre/nsXREDirProvider.cpp
-+++ b/toolkit/xre/nsXREDirProvider.cpp
-@@ -32,7 +32,6 @@
- #include "nsArrayEnumerator.h"
- #include "nsEnumeratorUtils.h"
- #include "nsReadableUtils.h"
--#include "nsXPCOMPrivate.h" // for XPCOM_FILE_PATH_SEPARATOR
-
- #include "SpecialSystemDirectory.h"
-
-@@ -215,6 +214,9 @@ nsresult nsXREDirProvider::GetUserProfilesRootDir(nsIFile** aResult) {
- nsresult rv = GetUserDataDirectory(getter_AddRefs(file), false);
-
- if (NS_SUCCEEDED(rv)) {
-+#if !defined(XP_UNIX) || defined(XP_MACOSX)
-+ rv = file->AppendNative(NS_LITERAL_CSTRING("Profiles"));
-+#endif
- // We must create the profile directory here if it does not exist.
- nsresult tmp = EnsureDirectoryExists(file);
- if (NS_FAILED(tmp)) {
-@@ -230,6 +232,9 @@ nsresult nsXREDirProvider::GetUserProfilesLocalDir(nsIFile** aResult) {
- nsresult rv = GetUserDataDirectory(getter_AddRefs(file), true);
-
- if (NS_SUCCEEDED(rv)) {
-+#if !defined(XP_UNIX) || defined(XP_MACOSX)
-+ rv = file->AppendNative(NS_LITERAL_CSTRING("Profiles"));
-+#endif
- // We must create the profile directory here if it does not exist.
- nsresult tmp = EnsureDirectoryExists(file);
- if (NS_FAILED(tmp)) {
-@@ -1332,42 +1337,84 @@ nsresult nsXREDirProvider::GetProfileDir(nsIFile** aResult) {
- nsresult nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile,
- bool aLocal) {
- // Copied from nsAppFileLocationProvider (more or less)
-- NS_ENSURE_ARG_POINTER(aFile);
-+ nsresult rv;
- nsCOMPtr<nsIFile> localDir;
-
-- nsresult rv = GetAppDir()->Clone(getter_AddRefs(localDir));
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- int levelsToRemove = 1; // In FF21+, appDir points to browser subdirectory.
- #if defined(XP_MACOSX)
-- levelsToRemove += 2;
-+ FSRef fsRef;
-+ OSType folderType;
-+ if (aLocal) {
-+ folderType = kCachedDataFolderType;
-+ } else {
-+#ifdef MOZ_THUNDERBIRD
-+ folderType = kDomainLibraryFolderType;
-+#else
-+ folderType = kApplicationSupportFolderType;
- #endif
-- while (localDir && (levelsToRemove > 0)) {
-- // When crawling up the hierarchy, components named "." do not count.
-- nsAutoCString removedName;
-- rv = localDir->GetNativeLeafName(removedName);
-- NS_ENSURE_SUCCESS(rv, rv);
-- bool didRemove = !removedName.Equals(".");
--
-- // Remove a directory component.
-- nsCOMPtr<nsIFile> parentDir;
-- rv = localDir->GetParent(getter_AddRefs(parentDir));
-- NS_ENSURE_SUCCESS(rv, rv);
-- localDir = parentDir;
-- if (didRemove) --levelsToRemove;
- }
-+ OSErr err = ::FSFindFolder(kUserDomain, folderType, kCreateFolder, &fsRef);
-+ NS_ENSURE_FALSE(err, NS_ERROR_FAILURE);
-
-- if (!localDir) return NS_ERROR_FAILURE;
-+ rv = NS_NewNativeLocalFile(EmptyCString(), true, getter_AddRefs(localDir));
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ nsCOMPtr<nsILocalFileMac> dirFileMac = do_QueryInterface(localDir);
-+ NS_ENSURE_TRUE(dirFileMac, NS_ERROR_UNEXPECTED);
-
-- rv = localDir->AppendRelativeNativePath(
-- NS_LITERAL_CSTRING("TorBrowser" XPCOM_FILE_PATH_SEPARATOR
-- "Data" XPCOM_FILE_PATH_SEPARATOR "Browser"));
-+ rv = dirFileMac->InitWithFSRef(&fsRef);
- NS_ENSURE_SUCCESS(rv, rv);
-
-+ localDir = do_QueryInterface(dirFileMac, &rv);
-+#elif defined(XP_IOS)
-+ nsAutoCString userDir;
-+ if (GetUIKitDirectory(aLocal, userDir)) {
-+ rv = NS_NewNativeLocalFile(userDir, true, getter_AddRefs(localDir));
-+ } else {
-+ rv = NS_ERROR_FAILURE;
-+ }
-+ NS_ENSURE_SUCCESS(rv, rv);
-+#elif defined(XP_WIN)
-+ nsString path;
- if (aLocal) {
-- rv = localDir->AppendNative(NS_LITERAL_CSTRING("Caches"));
-- NS_ENSURE_SUCCESS(rv, rv);
-+ rv = GetShellFolderPath(FOLDERID_LocalAppData, path);
-+ if (NS_FAILED(rv)) rv = GetRegWindowsAppDataFolder(aLocal, path);
-+ }
-+ if (!aLocal || NS_FAILED(rv)) {
-+ rv = GetShellFolderPath(FOLDERID_RoamingAppData, path);
-+ if (NS_FAILED(rv)) {
-+ if (!aLocal) rv = GetRegWindowsAppDataFolder(aLocal, path);
-+ }
-+ }
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ rv = NS_NewLocalFile(path, true, getter_AddRefs(localDir));
-+#elif defined(XP_UNIX)
-+ const char* homeDir = getenv("HOME");
-+ if (!homeDir || !*homeDir) return NS_ERROR_FAILURE;
-+
-+#ifdef ANDROID /* We want (ProfD == ProfLD) on Android. */
-+ aLocal = false;
-+#endif
-+
-+ if (aLocal) {
-+ // If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache.
-+ const char* cacheHome = getenv("XDG_CACHE_HOME");
-+ if (cacheHome && *cacheHome) {
-+ rv = NS_NewNativeLocalFile(nsDependentCString(cacheHome), true,
-+ getter_AddRefs(localDir));
-+ } else {
-+ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true,
-+ getter_AddRefs(localDir));
-+ if (NS_SUCCEEDED(rv))
-+ rv = localDir->AppendNative(NS_LITERAL_CSTRING(".cache"));
-+ }
-+ } else {
-+ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true,
-+ getter_AddRefs(localDir));
- }
-+#else
-+#error "Don't know how to get product dir on your platform"
-+#endif
-
- NS_IF_ADDREF(*aFile = localDir);
- return rv;
-@@ -1537,23 +1584,39 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
- }
-
- nsAutoCString profile;
-+ nsAutoCString appName;
-+ nsAutoCString vendor;
- if (gAppData->profile) {
- profile = gAppData->profile;
-+ } else {
-+ appName = gAppData->name;
-+ vendor = gAppData->vendor;
- }
-
-- nsresult rv = NS_ERROR_FAILURE;
-+ nsresult rv;
-
- #if defined(XP_MACOSX)
- if (!profile.IsEmpty()) {
- rv = AppendProfileString(aFile, profile.get());
-- NS_ENSURE_SUCCESS(rv, rv);
-+ } else {
-+ // Note that MacOS ignores the vendor when creating the profile hierarchy -
-+ // all application preferences directories live alongside one another in
-+ // ~/Library/Application Support/
-+ rv = aFile->AppendNative(appName);
- }
-+ NS_ENSURE_SUCCESS(rv, rv);
-
- #elif defined(XP_WIN)
- if (!profile.IsEmpty()) {
- rv = AppendProfileString(aFile, profile.get());
-- NS_ENSURE_SUCCESS(rv, rv);
-+ } else {
-+ if (!vendor.IsEmpty()) {
-+ rv = aFile->AppendNative(vendor);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+ }
-+ rv = aFile->AppendNative(appName);
- }
-+ NS_ENSURE_SUCCESS(rv, rv);
-
- #elif defined(ANDROID)
- // The directory used for storing profiles
-@@ -1563,6 +1626,11 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
- rv = aFile->AppendNative(nsDependentCString("mozilla"));
- NS_ENSURE_SUCCESS(rv, rv);
- #elif defined(XP_UNIX)
-+ nsAutoCString folder;
-+ // Make it hidden (by starting with "."), except when local (the
-+ // profile is already under ~/.cache or XDG_CACHE_HOME).
-+ if (!aLocal) folder.Assign('.');
-+
- if (!profile.IsEmpty()) {
- // Skip any leading path characters
- const char* profileStart = profile.get();
-@@ -1570,16 +1638,29 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
-
- // On the off chance that someone wanted their folder to be hidden don't
- // let it become ".."
-- if (*profileStart == '.') profileStart++;
-+ if (*profileStart == '.' && !aLocal) profileStart++;
-
-- // Make it hidden (by starting with ".").
-- nsAutoCString folder(".");
- folder.Append(profileStart);
- ToLowerCase(folder);
-
- rv = AppendProfileString(aFile, folder.BeginReading());
-- NS_ENSURE_SUCCESS(rv, rv);
-+ } else {
-+ if (!vendor.IsEmpty()) {
-+ folder.Append(vendor);
-+ ToLowerCase(folder);
-+
-+ rv = aFile->AppendNative(folder);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ folder.Truncate();
-+ }
-+
-+ folder.Append(appName);
-+ ToLowerCase(folder);
-+
-+ rv = aFile->AppendNative(folder);
- }
-+ NS_ENSURE_SUCCESS(rv, rv);
-
- #else
- #error "Don't know how to get profile path on your platform"
-diff --git a/toolkit/xre/nsXREDirProvider.h b/toolkit/xre/nsXREDirProvider.h
-index 6b92f3812882..5060b33cdded 100644
---- a/toolkit/xre/nsXREDirProvider.h
-+++ b/toolkit/xre/nsXREDirProvider.h
-@@ -48,15 +48,15 @@ class nsXREDirProvider final : public nsIDirectoryServiceProvider2,
-
- void DoShutdown();
-
-- nsresult GetUserAppDataDirectory(nsIFile** aFile) {
-+ static nsresult GetUserAppDataDirectory(nsIFile** aFile) {
- return GetUserDataDirectory(aFile, false);
- }
-- nsresult GetUserLocalDataDirectory(nsIFile** aFile) {
-+ static nsresult GetUserLocalDataDirectory(nsIFile** aFile) {
- return GetUserDataDirectory(aFile, true);
- }
-
- // GetUserDataDirectory gets the profile path from gAppData.
-- nsresult GetUserDataDirectory(nsIFile** aFile, bool aLocal);
-+ static nsresult GetUserDataDirectory(nsIFile** aFile, bool aLocal);
-
- /* make sure you clone it, if you need to do stuff to it */
- nsIFile* GetGREDir() { return mGREDir; }
-@@ -90,9 +90,9 @@ class nsXREDirProvider final : public nsIDirectoryServiceProvider2,
- protected:
- nsresult GetFilesInternal(const char* aProperty,
- nsISimpleEnumerator** aResult);
-- nsresult GetUserDataDirectoryHome(nsIFile** aFile, bool aLocal);
-- nsresult GetSysUserExtensionsDirectory(nsIFile** aFile);
-- nsresult GetSysUserExtensionsDevDirectory(nsIFile** aFile);
-+ static nsresult GetUserDataDirectoryHome(nsIFile** aFile, bool aLocal);
-+ static nsresult GetSysUserExtensionsDirectory(nsIFile** aFile);
-+ static nsresult GetSysUserExtensionsDevDirectory(nsIFile** aFile);
- #if defined(XP_UNIX) || defined(XP_MACOSX)
- static nsresult GetSystemExtensionsDirectory(nsIFile** aFile);
- #endif
-diff --git a/xpcom/io/nsAppFileLocationProvider.cpp b/xpcom/io/nsAppFileLocationProvider.cpp
-index 2aa5482f5789..f1491595a8ea 100644
---- a/xpcom/io/nsAppFileLocationProvider.cpp
-+++ b/xpcom/io/nsAppFileLocationProvider.cpp
-@@ -14,7 +14,6 @@
- #include "nsISimpleEnumerator.h"
- #include "prenv.h"
- #include "nsCRT.h"
--#include "nsXPCOMPrivate.h" // for XPCOM_FILE_PATH_SEPARATOR
- #if defined(MOZ_WIDGET_COCOA)
- #include <Carbon/Carbon.h>
- #include "nsILocalFileMac.h"
-@@ -248,8 +247,9 @@ nsresult nsAppFileLocationProvider::CloneMozBinDirectory(nsIFile** aLocalFile) {
- // GetProductDirectory - Gets the directory which contains the application data
- // folder
- //
--// UNIX and WIN : <App Folder>/TorBrowser/Data/Browser
--// Mac : <App Folder>/../../TorBrowser/Data/Browser
-+// UNIX : ~/.mozilla/
-+// WIN : <Application Data folder on user's machine>\Mozilla
-+// Mac : :Documents:Mozilla:
- //----------------------------------------------------------------------------------------
- nsresult nsAppFileLocationProvider::GetProductDirectory(nsIFile** aLocalFile,
- bool aLocal) {
-@@ -261,45 +261,49 @@ nsresult nsAppFileLocationProvider::GetProductDirectory(nsIFile** aLocalFile,
- bool exists;
- nsCOMPtr<nsIFile> localDir;
-
-- rv = CloneMozBinDirectory(getter_AddRefs(localDir));
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- int levelsToRemove = 1; // In FF21+, bin dir points to browser subdirectory.
--#if defined(XP_MACOSX)
-- levelsToRemove += 2;
--#endif
-- while (localDir && (levelsToRemove > 0)) {
-- // When crawling up the hierarchy, components named "." do not count.
-- nsAutoCString removedName;
-- rv = localDir->GetNativeLeafName(removedName);
-- NS_ENSURE_SUCCESS(rv, rv);
-- bool didRemove = !removedName.Equals(".");
--
-- // Remove a directory component.
-- nsCOMPtr<nsIFile> parentDir;
-- rv = localDir->GetParent(getter_AddRefs(parentDir));
-- NS_ENSURE_SUCCESS(rv, rv);
-- localDir = parentDir;
--
-- if (didRemove) {
-- --levelsToRemove;
-- }
-+#if defined(MOZ_WIDGET_COCOA)
-+ FSRef fsRef;
-+ OSType folderType =
-+ aLocal ? (OSType)kCachedDataFolderType : (OSType)kDomainLibraryFolderType;
-+ OSErr err = ::FSFindFolder(kUserDomain, folderType, kCreateFolder, &fsRef);
-+ if (err) {
-+ return NS_ERROR_FAILURE;
- }
--
-+ NS_NewLocalFile(EmptyString(), true, getter_AddRefs(localDir));
- if (!localDir) {
- return NS_ERROR_FAILURE;
- }
--
-- rv = localDir->AppendRelativeNativePath(
-- NS_LITERAL_CSTRING("TorBrowser" XPCOM_FILE_PATH_SEPARATOR
-- "Data" XPCOM_FILE_PATH_SEPARATOR "Browser"));
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (aLocal) {
-- rv = localDir->AppendNative(NS_LITERAL_CSTRING("Caches"));
-- NS_ENSURE_SUCCESS(rv, rv);
-+ nsCOMPtr<nsILocalFileMac> localDirMac(do_QueryInterface(localDir));
-+ rv = localDirMac->InitWithFSRef(&fsRef);
-+ if (NS_FAILED(rv)) {
-+ return rv;
-+ }
-+#elif defined(XP_WIN)
-+ nsCOMPtr<nsIProperties> directoryService =
-+ do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
-+ if (NS_FAILED(rv)) {
-+ return rv;
-+ }
-+ const char* prop = aLocal ? NS_WIN_LOCAL_APPDATA_DIR : NS_WIN_APPDATA_DIR;
-+ rv = directoryService->Get(prop, NS_GET_IID(nsIFile),
-+ getter_AddRefs(localDir));
-+ if (NS_FAILED(rv)) {
-+ return rv;
-+ }
-+#elif defined(XP_UNIX)
-+ rv = NS_NewNativeLocalFile(nsDependentCString(PR_GetEnv("HOME")), true,
-+ getter_AddRefs(localDir));
-+ if (NS_FAILED(rv)) {
-+ return rv;
- }
-+#else
-+#error dont_know_how_to_get_product_dir_on_your_platform
-+#endif
-
-+ rv = localDir->AppendRelativeNativePath(DEFAULT_PRODUCT_DIR);
-+ if (NS_FAILED(rv)) {
-+ return rv;
-+ }
- rv = localDir->Exists(&exists);
-
- if (NS_SUCCEEDED(rv) && !exists) {
-@@ -318,6 +322,10 @@ nsresult nsAppFileLocationProvider::GetProductDirectory(nsIFile** aLocalFile,
- //----------------------------------------------------------------------------------------
- // GetDefaultUserProfileRoot - Gets the directory which contains each user
- // profile dir
-+//
-+// UNIX : ~/.mozilla/
-+// WIN : <Application Data folder on user's machine>\Mozilla\Profiles
-+// Mac : :Documents:Mozilla:Profiles:
- //----------------------------------------------------------------------------------------
- nsresult nsAppFileLocationProvider::GetDefaultUserProfileRoot(
- nsIFile** aLocalFile, bool aLocal) {
-@@ -333,6 +341,23 @@ nsresult nsAppFileLocationProvider::GetDefaultUserProfileRoot(
- return rv;
- }
-
-+#if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN)
-+ // These 3 platforms share this part of the path - do them as one
-+ rv = localDir->AppendRelativeNativePath(NS_LITERAL_CSTRING("Profiles"));
-+ if (NS_FAILED(rv)) {
-+ return rv;
-+ }
-+
-+ bool exists;
-+ rv = localDir->Exists(&exists);
-+ if (NS_SUCCEEDED(rv) && !exists) {
-+ rv = localDir->Create(nsIFile::DIRECTORY_TYPE, 0775);
-+ }
-+ if (NS_FAILED(rv)) {
-+ return rv;
-+ }
-+#endif
-+
- localDir.forget(aLocalFile);
-
- return rv;
---
-2.19.2
-
diff --git a/www-client/torbrowser/files/torbrowser-60.5.0-Do_not_store_data_in_the_app_bundle.patch b/www-client/torbrowser/files/torbrowser-60.5.0-Do_not_store_data_in_the_app_bundle.patch
deleted file mode 100644
index a4e6ae9f..00000000
--- a/www-client/torbrowser/files/torbrowser-60.5.0-Do_not_store_data_in_the_app_bundle.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-From 0e4105afea7b10cf20ab20cb41b187d7d690ff46 Mon Sep 17 00:00:00 2001
-From: Poncho <poncho@spahan.ch>
-Date: Wed, 30 Jan 2019 09:55:25 +0100
-Subject: [PATCH 1/4] Revert "Bug 13252: Do not store data in the app bundle"
-
-This reverts commit 2ee4d81a2fbcac90996f4f4a99633a0b2d7019bb.
----
- toolkit/xre/nsXREDirProvider.cpp | 43 ++++++++++++---------
- toolkit/xre/nsXREDirProvider.h | 6 ---
- xpcom/io/nsAppFileLocationProvider.cpp | 53 +++++++++++++++-----------
- 3 files changed, 55 insertions(+), 47 deletions(-)
-
-diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
-index d811da50b63d..dbbaffd2a15f 100644
---- a/toolkit/xre/nsXREDirProvider.cpp
-+++ b/toolkit/xre/nsXREDirProvider.cpp
-@@ -44,8 +44,6 @@
- #include "mozilla/Preferences.h"
- #include "mozilla/Telemetry.h"
-
--#include "TorFileUtils.h"
--
- #include <stdlib.h>
-
- #ifdef XP_WIN
-@@ -1337,18 +1335,34 @@ nsresult nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile,
- NS_ENSURE_ARG_POINTER(aFile);
- nsCOMPtr<nsIFile> localDir;
-
-- nsresult rv = GetTorBrowserUserDataDir(getter_AddRefs(localDir));
-+ nsresult rv = GetAppDir()->Clone(getter_AddRefs(localDir));
- NS_ENSURE_SUCCESS(rv, rv);
-
--#if !defined(ANDROID)
--#ifdef TOR_BROWSER_DATA_OUTSIDE_APP_DIR
-- rv = localDir->AppendNative(NS_LITERAL_CSTRING("Browser"));
--#else
-- rv = localDir->AppendRelativeNativePath(
-- NS_LITERAL_CSTRING("Data" XPCOM_FILE_PATH_SEPARATOR "Browser"));
-+ int levelsToRemove = 1; // In FF21+, appDir points to browser subdirectory.
-+#if defined(XP_MACOSX)
-+ levelsToRemove += 2;
- #endif
-+ while (localDir && (levelsToRemove > 0)) {
-+ // When crawling up the hierarchy, components named "." do not count.
-+ nsAutoCString removedName;
-+ rv = localDir->GetNativeLeafName(removedName);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+ bool didRemove = !removedName.Equals(".");
-+
-+ // Remove a directory component.
-+ nsCOMPtr<nsIFile> parentDir;
-+ rv = localDir->GetParent(getter_AddRefs(parentDir));
-+ NS_ENSURE_SUCCESS(rv, rv);
-+ localDir = parentDir;
-+ if (didRemove) --levelsToRemove;
-+ }
-+
-+ if (!localDir) return NS_ERROR_FAILURE;
-+
-+ rv = localDir->AppendRelativeNativePath(
-+ NS_LITERAL_CSTRING("TorBrowser" XPCOM_FILE_PATH_SEPARATOR
-+ "Data" XPCOM_FILE_PATH_SEPARATOR "Browser"));
- NS_ENSURE_SUCCESS(rv, rv);
--#endif
-
- if (aLocal) {
- rv = localDir->AppendNative(NS_LITERAL_CSTRING("Caches"));
-@@ -1433,15 +1447,6 @@ nsresult nsXREDirProvider::GetUserDataDirectory(nsIFile** aFile, bool aLocal) {
- return NS_OK;
- }
-
--nsresult nsXREDirProvider::GetTorBrowserUserDataDir(nsIFile** aFile) {
-- NS_ENSURE_ARG_POINTER(aFile);
-- nsCOMPtr<nsIFile> exeFile;
-- bool per = false;
-- nsresult rv = GetFile(XRE_EXECUTABLE_FILE, &per, getter_AddRefs(exeFile));
-- NS_ENSURE_SUCCESS(rv, rv);
-- return TorBrowser_GetUserDataDir(exeFile, aFile);
--}
--
- nsresult nsXREDirProvider::EnsureDirectoryExists(nsIFile* aDirectory) {
- bool exists;
- nsresult rv = aDirectory->Exists(&exists);
-diff --git a/toolkit/xre/nsXREDirProvider.h b/toolkit/xre/nsXREDirProvider.h
-index 6fe9d9ecbce5..6b92f3812882 100644
---- a/toolkit/xre/nsXREDirProvider.h
-+++ b/toolkit/xre/nsXREDirProvider.h
-@@ -87,12 +87,6 @@ class nsXREDirProvider final : public nsIDirectoryServiceProvider2,
- */
- nsresult GetProfileDir(nsIFile** aResult);
-
-- /**
-- * Get the TorBrowser user data directory by calling the
-- * TorBrowser_GetUserDataDir() utility function.
-- */
-- nsresult GetTorBrowserUserDataDir(nsIFile** aFile);
--
- protected:
- nsresult GetFilesInternal(const char* aProperty,
- nsISimpleEnumerator** aResult);
-diff --git a/xpcom/io/nsAppFileLocationProvider.cpp b/xpcom/io/nsAppFileLocationProvider.cpp
-index 3906c6590090..2aa5482f5789 100644
---- a/xpcom/io/nsAppFileLocationProvider.cpp
-+++ b/xpcom/io/nsAppFileLocationProvider.cpp
-@@ -27,8 +27,6 @@
- #include <sys/param.h>
- #endif
-
--#include "TorFileUtils.h"
--
- // WARNING: These hard coded names need to go away. They need to
- // come from localizable resources
-
-@@ -250,14 +248,8 @@ nsresult nsAppFileLocationProvider::CloneMozBinDirectory(nsIFile** aLocalFile) {
- // GetProductDirectory - Gets the directory which contains the application data
- // folder
- //
--#ifdef TOR_BROWSER_DATA_OUTSIDE_APP_DIR
--// UNIX and WIN : <App Folder>/../TorBrowser-Data/Browser
--// Mac : <App Folder>/../../../TorBrowser-Data/Browser OR
--// ~/Library/Application Support/TorBrowser-Data/Browser
--#else
- // UNIX and WIN : <App Folder>/TorBrowser/Data/Browser
- // Mac : <App Folder>/../../TorBrowser/Data/Browser
--#endif
- //----------------------------------------------------------------------------------------
- nsresult nsAppFileLocationProvider::GetProductDirectory(nsIFile** aLocalFile,
- bool aLocal) {
-@@ -265,25 +257,42 @@ nsresult nsAppFileLocationProvider::GetProductDirectory(nsIFile** aLocalFile,
- return NS_ERROR_INVALID_ARG;
- }
-
-- nsresult rv = NS_ERROR_UNEXPECTED;
-+ nsresult rv;
- bool exists;
-- nsCOMPtr<nsIFile> localDir, exeFile;
-+ nsCOMPtr<nsIFile> localDir;
-
-- nsCOMPtr<nsIProperties> directoryService(
-- do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
-- NS_ENSURE_SUCCESS(rv, rv);
-- rv = directoryService->Get(XRE_EXECUTABLE_FILE, NS_GET_IID(nsIFile),
-- getter_AddRefs(exeFile));
-- NS_ENSURE_SUCCESS(rv, rv);
-- rv = TorBrowser_GetUserDataDir(exeFile, getter_AddRefs(localDir));
-+ rv = CloneMozBinDirectory(getter_AddRefs(localDir));
- NS_ENSURE_SUCCESS(rv, rv);
-
--#ifdef TOR_BROWSER_DATA_OUTSIDE_APP_DIR
-- rv = localDir->AppendNative(NS_LITERAL_CSTRING("Browser"));
--#else
-- rv = localDir->AppendRelativeNativePath(
-- NS_LITERAL_CSTRING("Data" XPCOM_FILE_PATH_SEPARATOR "Browser"));
-+ int levelsToRemove = 1; // In FF21+, bin dir points to browser subdirectory.
-+#if defined(XP_MACOSX)
-+ levelsToRemove += 2;
- #endif
-+ while (localDir && (levelsToRemove > 0)) {
-+ // When crawling up the hierarchy, components named "." do not count.
-+ nsAutoCString removedName;
-+ rv = localDir->GetNativeLeafName(removedName);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+ bool didRemove = !removedName.Equals(".");
-+
-+ // Remove a directory component.
-+ nsCOMPtr<nsIFile> parentDir;
-+ rv = localDir->GetParent(getter_AddRefs(parentDir));
-+ NS_ENSURE_SUCCESS(rv, rv);
-+ localDir = parentDir;
-+
-+ if (didRemove) {
-+ --levelsToRemove;
-+ }
-+ }
-+
-+ if (!localDir) {
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ rv = localDir->AppendRelativeNativePath(
-+ NS_LITERAL_CSTRING("TorBrowser" XPCOM_FILE_PATH_SEPARATOR
-+ "Data" XPCOM_FILE_PATH_SEPARATOR "Browser"));
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (aLocal) {
---
-2.19.2
-
diff --git a/www-client/torbrowser/metadata.xml b/www-client/torbrowser/metadata.xml
deleted file mode 100644
index 6c812064..00000000
--- a/www-client/torbrowser/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <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-60.6.1.8.0.9.1.3.ebuild b/www-client/torbrowser/torbrowser-60.6.1.8.0.9.1.3.ebuild
deleted file mode 100644
index 4582ae23..00000000
--- a/www-client/torbrowser/torbrowser-60.6.1.8.0.9.1.3.ebuild
+++ /dev/null
@@ -1,367 +0,0 @@
-# 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 desktop 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/${PN}/${TOR_PV}"
-PATCH="firefox-${PV%%.*}.6-patches-07"
-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"
-
-ASM_DEPEND=">=dev-lang/yasm-1.1"
-
-RDEPEND="
- >=dev-libs/nss-3.36.7
- >=dev-libs/nspr-4.19
- >=net-vpn/tor-0.3.3.9
- system-icu? ( >=dev-libs/icu-60.2 )
- jack? ( virtual/jack )
- selinux? ( sec-policy/selinux-mozilla )"
-
-DEPEND="
- ${RDEPEND}
- amd64? ( ${ASM_DEPEND} virtual/opengl )
- x86? ( ${ASM_DEPEND} virtual/opengl )"
-
-RESTRICT="!test? ( test )"
-
-S="${WORKDIR}/${GIT_TAG}"
-
-QA_PRESTRIPPED="usr/lib*/${PN}/${PN}"
-
-BUILD_OBJ_DIR="${WORKDIR}/torbrowser-build"
-
-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
-
- 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
-
- # Revert "Change the default Firefox profile directory to be TBB-relative"
- "${FILESDIR}"/torbrowser-60.5.0-Do_not_store_data_in_the_app_bundle.patch
- "${FILESDIR}"/torbrowser-60.5.0-Change_the_default_Firefox_profile_directory.patch
- )
-
- # 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="${EPREFIX}"/usr/bin/xargs" >> "${S}"/.mozconfig
-
- # Use .mozconfig settings from torbrowser (setting this here since it gets overwritten by mozcoreconf-v6.eclass)
- # see https://gitweb.torproject.org/tor-browser.git/tree/.mozconfig?h=tor-browser-60.2.0esr-8.0-1
- echo "mk_add_options MOZ_APP_DISPLAYNAME=\"Tor Browser\"" >> "${S}"/.mozconfig
- echo "mk_add_options MOZILLA_OFFICIAL=1" >> "${S}"/.mozconfig
- echo "mk_add_options BUILD_OFFICIAL=1" >> "${S}"/.mozconfig
- mozconfig_annotate 'torbrowser' --enable-official-branding
- mozconfig_annotate 'torbrowser' --disable-webrtc
- mozconfig_annotate 'torbrowser' --disable-eme
- mozconfig_annotate 'torbrowser' --enable-proxy-bypass-protection
-
- # Rename the binary and set the profile location
- mozconfig_annotate 'torbrowser' --with-app-name="${PN}"
- mozconfig_annotate 'torbrowser' --with-app-basename="${PN}"
-
- # see https://gitweb.torproject.org/tor-browser.git/tree/old-configure.in?h=tor-browser-60.2.0esr-8.0-1#n3205
- mozconfig_annotate 'torbrowser' --with-tor-browser-version="${TOR_PV}"
- mozconfig_annotate 'torbrowser' --disable-tor-browser-update
-
- echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
- echo "mk_add_options XARGS="${EPREFIX}"/usr/bin/xargs" >> "${S}"/.mozconfig
-
- # Default mozilla_five_home no longer valid option
- sed '/with-default-mozilla-five-home=/d' -i "${S}"/.mozconfig
-
- # 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 \
- ./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
-
- # Must ensure we use bundled nss/nspr during signing and not system
- 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 name
- icon_path="${S}/browser/branding/official"
- name="Tor Browser"
- for size in 16 32 48 64 128 256; do
- newicon -s ${size} "${icon_path}/default${size}.png" ${PN}.png
- done
- newicon "${icon_path}/default48.png" "${icon}.png"
- newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop"
- sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${PN}:" \
- "${ED}/usr/share/applications/${PN}.desktop" || die
-
- # Add StartupNotify=true bug 237317
- if use startup-notification ; then
- echo "StartupNotify=true"\
- >> "${ED}/usr/share/applications/${PN}.desktop" \
- || die
- fi
-
- # Required in order to use plugins and even run torbrowser on hardened.
- pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{${PN},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
-}