summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2025-09-14 14:27:54 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2025-09-17 12:34:52 +0900
commit91188fc691175ce44a2f4ef7aeb911b4c135e984 (patch)
tree89468d6cfdc280bb7d371ea5e2e1f799ec8b2905 /gnu
parent7841acc422300c86a24e7e1d9358a1ae2a845956 (diff)
gnu: torbrowser: Decouple from IceCat patches.
In preparation for updating IceCat. * gnu/packages/patches/torbrowser-use-system-wide-dir.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/tor-browsers.scm (make-torbrowser): Adjust accordingly. Change-Id: I56ae81480a96d815d6b3fe5fc3befb1f1c74483f
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/torbrowser-use-system-wide-dir.patch36
-rw-r--r--gnu/packages/tor-browsers.scm2
3 files changed, 38 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 1128a954666..2b602e5c40e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2364,6 +2364,7 @@ dist_patch_DATA = \
2364 %D%/packages/patches/tlf-support-hamlib-4.2+.patch \ 2364 %D%/packages/patches/tlf-support-hamlib-4.2+.patch \
2365 %D%/packages/patches/tofi-32bit-compat.patch \ 2365 %D%/packages/patches/tofi-32bit-compat.patch \
2366 %D%/packages/patches/torbrowser-compare-paths.patch \ 2366 %D%/packages/patches/torbrowser-compare-paths.patch \
2367 %D%/packages/patches/torbrowser-use-system-wide-dir.patch \
2367 %D%/packages/patches/torbrowsers-add-store-to-rdd-allowlist.patch \ 2368 %D%/packages/patches/torbrowsers-add-store-to-rdd-allowlist.patch \
2368 %D%/packages/patches/tpetra-remove-duplicate-using.patch \ 2369 %D%/packages/patches/tpetra-remove-duplicate-using.patch \
2369 %D%/packages/patches/transcode-ffmpeg.patch \ 2370 %D%/packages/patches/transcode-ffmpeg.patch \
diff --git a/gnu/packages/patches/torbrowser-use-system-wide-dir.patch b/gnu/packages/patches/torbrowser-use-system-wide-dir.patch
new file mode 100644
index 00000000000..223467a9c10
--- /dev/null
+++ b/gnu/packages/patches/torbrowser-use-system-wide-dir.patch
@@ -0,0 +1,36 @@
1Replace "/usr/lib/mozilla" (the system-wide directory for extensions and
2native manifests) with "$ICECAT_SYSTEM_DIR".
3
4--- a/toolkit/xre/nsXREDirProvider.cpp
5+++ b/toolkit/xre/nsXREDirProvider.cpp
6@@ -296,24 +296,12 @@ nsresult nsXREDirProvider::GetBackgroundTasksProfilesRootDir(
7 static nsresult GetSystemParentDirectory(nsIFile** aFile) {
8 nsresult rv;
9 nsCOMPtr<nsIFile> localDir;
10-# if defined(XP_MACOSX)
11- rv = GetOSXFolderType(kOnSystemDisk, kApplicationSupportFolderType,
12- getter_AddRefs(localDir));
13- if (NS_SUCCEEDED(rv)) {
14- rv = localDir->AppendNative("Mozilla"_ns);
15- }
16-# else
17- constexpr auto dirname =
18-# ifdef HAVE_USR_LIB64_DIR
19- "/usr/lib64/mozilla"_ns
20-# elif defined(__OpenBSD__) || defined(__FreeBSD__)
21- "/usr/local/lib/mozilla"_ns
22-# else
23- "/usr/lib/mozilla"_ns
24-# endif
25- ;
26- rv = NS_NewNativeLocalFile(dirname, false, getter_AddRefs(localDir));
27-# endif
28+
29+ const char* systemParentDir = getenv("ICECAT_SYSTEM_DIR");
30+ if (!systemParentDir || !*systemParentDir) return NS_ERROR_FAILURE;
31+
32+ rv = NS_NewNativeLocalFile(nsDependentCString(systemParentDir), false,
33+ getter_AddRefs(localDir));
34
35 if (NS_SUCCEEDED(rv)) {
36 localDir.forget(aFile);
diff --git a/gnu/packages/tor-browsers.scm b/gnu/packages/tor-browsers.scm
index 12763a99cab..8459048e075 100644
--- a/gnu/packages/tor-browsers.scm
+++ b/gnu/packages/tor-browsers.scm
@@ -376,7 +376,7 @@ Browser.")
376 (search-patch 376 (search-patch
377 "torbrowsers-add-store-to-rdd-allowlist.patch")) 377 "torbrowsers-add-store-to-rdd-allowlist.patch"))
378 #$(local-file 378 #$(local-file
379 (search-patch "icecat-use-system-wide-dir.patch")))))) 379 (search-patch "torbrowser-use-system-wide-dir.patch"))))))
380 (add-after 'apply-guix-specific-patches 'remove-bundled-libraries 380 (add-after 'apply-guix-specific-patches 'remove-bundled-libraries
381 (lambda _ 381 (lambda _
382 ;; Remove bundled libraries that we don't use, since they may 382 ;; Remove bundled libraries that we don't use, since they may