mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
[Backport release-25.05] buildMozillaMach: restore MOZ_SYSTEM_DIR patch (#437257)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
|
||||
index 6db876975187..5882c5d7f1d6 100644
|
||||
--- a/toolkit/xre/nsXREDirProvider.cpp
|
||||
+++ b/toolkit/xre/nsXREDirProvider.cpp
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "xpcpublic.h"
|
||||
+#include "prenv.h"
|
||||
#include "prprf.h"
|
||||
|
||||
#include "nsIAppStartup.h"
|
||||
@@ -297,7 +297,8 @@ static nsresult GetSystemParentDirectory(nsIFile** aFile) {
|
||||
"/usr/lib/mozilla"_ns
|
||||
# endif
|
||||
;
|
||||
- rv = NS_NewNativeLocalFile(dirname, getter_AddRefs(localDir));
|
||||
+ const char* pathVar = PR_GetEnv("MOZ_SYSTEM_DIR");
|
||||
+ rv = NS_NewNativeLocalFile((pathVar && *pathVar) ? nsDependentCString(pathVar) : reinterpret_cast<const nsCString&>(dirname), getter_AddRefs(localDir));
|
||||
# endif
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
@@ -304,7 +304,10 @@ buildStdenv.mkDerivation {
|
||||
];
|
||||
|
||||
patches =
|
||||
# Remove references to the build clsoure
|
||||
lib.optionals (lib.versionAtLeast version "136") [ ./136-no-buildconfig.patch ]
|
||||
# Add MOZ_SYSTEM_DIR env var for native messaging host support
|
||||
++ lib.optionals (lib.versionAtLeast version "133") [ ./133-env-var-for-system-dir.patch ]
|
||||
++ lib.optionals (lib.versionAtLeast version "139" && lib.versionOlder version "141") [
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1955112
|
||||
# https://hg-edge.mozilla.org/mozilla-central/rev/aa8a29bd1fb9
|
||||
|
||||
Reference in New Issue
Block a user