summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/icecat-fhs-configure-option.patch
blob: 6c1e4b8b835ae477698e50bebc4c11b6314e788b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Upstream-status: https://phabricator.services.mozilla.com/D263231

diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index 6162d68699dd..193272588caa 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -1351,3 +1351,17 @@ option(
     help="Object code libraries in DIR",
 )
 set_config("libdir", depends("--libdir")(lambda ldir: ldir[0]))
+
+# Support for using platform-specific standard (FHS-like) locations.
+option(
+    "--enable-fhs",
+    default=True,
+    help="Enable the search of standard platform-specific (FHS-like) locations",
+)
+
+@depends("--enable-fhs")
+def use_fhs(value):
+    return bool(value)
+
+set_config("USE_FHS", use_fhs)
+set_define("USE_FHS", use_fhs)
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index 547cc4c255c4..79133c879be4 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -295,6 +295,9 @@ static nsresult GetSystemParentDirectory(nsIFile** aFile) {
     localDir.forget(aFile);
     return rv;
   }
+#  ifndef USE_FHS
+  return rv;
+#  endif
 
   // ... falling back to the conventional fixed location otherwise.
 #  if defined(XP_MACOSX)