diff --git a/www-client/iceweasel/iceweasel_esr-140.1.0.recipe b/www-client/iceweasel/iceweasel_esr-140.3.1.recipe similarity index 97% rename from www-client/iceweasel/iceweasel_esr-140.1.0.recipe rename to www-client/iceweasel/iceweasel_esr-140.3.1.recipe index dfa3e8a3c..80941a670 100644 --- a/www-client/iceweasel/iceweasel_esr-140.1.0.recipe +++ b/www-client/iceweasel/iceweasel_esr-140.3.1.recipe @@ -7,7 +7,7 @@ COPYRIGHT="1995-2025 Mozilla Developers and Contributors" LICENSE="MPL v2.0" REVISION="1" SOURCE_URI="https://ftp.mozilla.org/pub/firefox/releases/${portVersion}esr/source/firefox-${portVersion}esr.source.tar.xz" -CHECKSUM_SHA256="d15c65d790e0c371b5c95332141b1bdeb29fefc27f852d22a5f542b6d1bc1922" +CHECKSUM_SHA256="0b43b3a1c4f40765d96eb2094d38838f5d01b7280ad8b9b0a17612bed9c36735" SOURCE_DIR="firefox-$portVersion" PATCHES=" iceweasel_esr-$portVersion.patchset @@ -30,6 +30,7 @@ PROVIDES=" CONFLICTS=" iceweasel iceweasel_bin + iceweasel_esr_bin " REQUIRES=" haiku diff --git a/www-client/iceweasel/patches/iceweasel_esr-140.1.0.patchset b/www-client/iceweasel/patches/iceweasel_esr-140.3.1.patchset similarity index 99% rename from www-client/iceweasel/patches/iceweasel_esr-140.1.0.patchset rename to www-client/iceweasel/patches/iceweasel_esr-140.3.1.patchset index 1a0367655..ccb633e4a 100644 --- a/www-client/iceweasel/patches/iceweasel_esr-140.1.0.patchset +++ b/www-client/iceweasel/patches/iceweasel_esr-140.3.1.patchset @@ -1,6 +1,6 @@ -From 1a26d6092016b5173b3834be67aa71dfb68c15cd Mon Sep 17 00:00:00 2001 +From 7f0346798dbcac029b67bbdd199fe66e8246cdf8 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 1 Jun 2025 00:33:54 +1000 +Date: Fri, 26 Sep 2025 10:43:48 +1000 Subject: Add Haiku build support Based on patches sourced from https://github.com/kenz-gelsoft/gecko-dev/ @@ -14,7 +14,7 @@ Based on patches sourced from https://github.com/kenz-gelsoft/gecko-dev/ - Implement remote server diff --git a/Cargo.lock b/Cargo.lock -index a48fdc8..5c24238 100644 +index b5cfa08..5de1944 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3808,7 +3808,6 @@ dependencies = [ @@ -167,6 +167,37 @@ index 7da0a7b..684f454 100644 vars_set.append(vars) gn_configs = [] +diff --git a/build/gyp_includes/common.gypi b/build/gyp_includes/common.gypi +index 8acb326..a50a782 100644 +--- a/build/gyp_includes/common.gypi ++++ b/build/gyp_includes/common.gypi +@@ -685,7 +685,7 @@ + + # Default to enabled PIE; this is important for ASLR but we may need to be + # able to turn it off for various reasons. +- 'linux_disable_pie%': 0, ++ 'linux_disable_pie%': 1, + + # The release channel that this build targets. This is used to restrict + # channel-specific build options, like which installer packages to create. +@@ -2557,7 +2557,7 @@ + 'target_conditions': [ + ['_type=="executable"', { + 'ldflags': [ +- '-pie', ++ '-fPIC', + ], + }], + ], +@@ -3169,7 +3169,7 @@ + # understand slide, and get rid of the Valgrind check. + 'xcode_settings': { + 'OTHER_LDFLAGS': [ +- '-Wl,-pie', # Position-independent executable (MH_PIE) ++ '-Wl,-fPIC', # Position-independent executable (MH_PIE) + ], + }, + }], diff --git a/build/moz.configure/bindgen.configure b/build/moz.configure/bindgen.configure index af5a0cd..1d6be80 100644 --- a/build/moz.configure/bindgen.configure @@ -223,7 +254,7 @@ index 6162d68..3b8adad 100644 def target_is_solaris(target): if target.kernel == "SunOS": diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure -index 769ac03..f25661b 100644 +index 1842548..ed6bb1d 100644 --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -2951,7 +2951,7 @@ def security_hardening_cflags( @@ -717,7 +748,7 @@ index 0cfd739..439aed9 100644 # define HAVE_PIPE2 1 #endif diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp -index c1b1c52..5d1cefd 100644 +index c23c0be..13353f6 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -1125,7 +1125,7 @@ Result BaseProcessLauncher::DoSetup() { @@ -746,7 +777,7 @@ index b6a3ccf..b196a9a 100644 "threading/posix/CpuCount.cpp", "threading/posix/PosixThread.cpp", diff --git a/js/src/util/NativeStack.cpp b/js/src/util/NativeStack.cpp -index 4e4189d..37dc13a 100644 +index e77289c..4946275 100644 --- a/js/src/util/NativeStack.cpp +++ b/js/src/util/NativeStack.cpp @@ -31,6 +31,9 @@ @@ -759,7 +790,7 @@ index 4e4189d..37dc13a 100644 #else # error "Unsupported platform" #endif -@@ -117,6 +120,14 @@ void* js::GetNativeStackBaseImpl() { +@@ -116,6 +119,14 @@ void* js::GetNativeStackBaseImpl() { # endif } @@ -1853,10 +1884,10 @@ index 82a2ee5..ade709b 100644 # define MOZ_REALLY_CRASH(line) __builtin_trap() diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml -index 19e59b5..ab81595 100644 +index 04562fb..fc88f46 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml -@@ -11290,6 +11290,8 @@ +@@ -11325,6 +11325,8 @@ value: true #elif defined(XP_SOLARIS) value: true @@ -1865,7 +1896,7 @@ index 19e59b5..ab81595 100644 #else value: false #endif -@@ -11334,6 +11336,8 @@ +@@ -11369,6 +11371,8 @@ value: true #elif defined(XP_SOLARIS) value: true @@ -1874,7 +1905,7 @@ index 19e59b5..ab81595 100644 #else value: false #endif -@@ -11367,6 +11371,8 @@ +@@ -11402,6 +11406,8 @@ value: true #elif defined(XP_SOLARIS) value: true @@ -1883,7 +1914,7 @@ index 19e59b5..ab81595 100644 #else value: false #endif -@@ -11386,6 +11392,8 @@ +@@ -11421,6 +11427,8 @@ value: true #elif defined(XP_SOLARIS) value: true @@ -1892,7 +1923,7 @@ index 19e59b5..ab81595 100644 #else value: false #endif -@@ -11405,6 +11413,8 @@ +@@ -11440,6 +11448,8 @@ value: true #elif defined(XP_SOLARIS) value: true @@ -1901,7 +1932,7 @@ index 19e59b5..ab81595 100644 #else value: false #endif -@@ -11424,6 +11434,8 @@ +@@ -11459,6 +11469,8 @@ value: true #elif defined(XP_SOLARIS) value: true @@ -1910,7 +1941,7 @@ index 19e59b5..ab81595 100644 #else value: false #endif -@@ -11452,6 +11464,8 @@ +@@ -11487,6 +11499,8 @@ value: true #elif defined(XP_SOLARIS) value: true @@ -1919,7 +1950,7 @@ index 19e59b5..ab81595 100644 #else value: false #endif -@@ -12445,6 +12459,8 @@ +@@ -12480,6 +12494,8 @@ type: bool #if defined(MOZ_WIDGET_ANDROID) value: true @@ -2383,7 +2414,7 @@ index ca05c3b..c9bf842 100644 unsigned char certFingerprint[SHA256_LENGTH]; srv = PK11_HashBuf(SEC_OID_SHA256, certFingerprint, cert->derCert.data, diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml -index 9cc08a4..481a24b 100644 +index 7b6f75c..d1496ad 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -2607,6 +2607,12 @@ criteria = "safe-to-deploy" @@ -5691,24 +5722,39 @@ index d534bd9..56a0674 100644 } #endif diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp -index 9217d2b..cb984de 100644 +index b47deb1..44e647b 100644 --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp -@@ -357,12 +357,12 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[], - crashHelperPid = geckoargs::sCrashHelperPid.Get(aArgc, aArgv); - MOZ_ASSERT(crashHelperPid.isSome()); - #endif // defined(XP_LINUX) && !defined(MOZ_WIDGET_ANDROID) +@@ -347,7 +347,7 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[], + #endif /* XP_MACOSX */ + + SetupErrorHandling(aArgv[0]); - +#ifndef XP_HAIKU - exceptionHandlerIsSet = CrashReporter::SetRemoteExceptionHandler( - std::move(*crashReporterArg), crashHelperPid); - MOZ_ASSERT(exceptionHandlerIsSet, - "Should have been able to set remote exception handler"); + bool exceptionHandlerIsSet = false; + if (!CrashReporter::IsDummy()) { + auto crashReporterArg = geckoargs::sCrashReporter.Get(aArgc, aArgv); +@@ -370,7 +370,7 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[], + CrashReporter::UnregisterRuntimeExceptionModule(); + } + } - +#endif - if (!exceptionHandlerIsSet) { - // Bug 684322 will add better visibility into this condition - NS_WARNING("Could not setup crash reporting\n"); + #ifdef MOZ_X11 + XInitThreads(); + #endif +@@ -590,9 +590,9 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[], + mozilla::Omnijar::CleanUp(); + } + } +- ++#ifndef XP_HAIKU + CrashReporter::UnsetRemoteExceptionHandler(exceptionHandlerIsSet); +- ++#endif + return XRE_DeinitCommandLine(); + } + diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp index 146a586..10b7fb6 100644 --- a/toolkit/xre/nsSigHandlers.cpp @@ -5788,6 +5834,123 @@ index 9c94cb8..ee3e523 100644 if (!profile.IsEmpty()) { rv = AppendProfileString(aFile, profile.get()); } else { +diff --git a/tools/haiku-launcher/launcher.cpp b/tools/haiku-launcher/launcher.cpp +new file mode 100644 +index 0000000..86a9f22 +--- /dev/null ++++ b/tools/haiku-launcher/launcher.cpp +@@ -0,0 +1,111 @@ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++class BrowserLauncherApp : public BApplication { ++ public: ++ BrowserLauncherApp(const char *signature, int argc, char **argv); ++ ~BrowserLauncherApp() {}; ++ ++ virtual void RefsReceived(BMessage *pmsg); ++ virtual void ArgvRecieved(int32 argc, char**argv); ++ virtual void ReadyToRun(); ++ BString GetBinPath(void); ++ ++ private: ++ BString fCommandLine; ++}; ++ ++BrowserLauncherApp::BrowserLauncherApp(const char *signature, int argc, char **argv) ++ : BApplication(signature) ++{ ++ ArgvRecieved(argc, argv); ++} ++ ++BString ++BrowserLauncherApp::GetBinPath(void) ++{ ++ BPath binPath; ++ ++ image_info info; ++ int32 cookie = 0; ++ ++ while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) { ++ if (info.type == B_APP_IMAGE) { ++ binPath.SetTo(info.name); ++ binPath.GetParent(&binPath); ++ break; ++ } ++ } ++ ++ binPath.Append("Iceweasel"); ++ ++ return binPath.Path(); ++} ++ ++void ++BrowserLauncherApp::RefsReceived(BMessage *pmsg) ++{ ++ fCommandLine = GetBinPath(); ++ ++ entry_ref ref; ++ for (int32 i = 0; pmsg->FindRef("refs", i, &ref) == B_OK; i++) { ++ BPath file = BPath(&ref); ++ fCommandLine += " \""; ++ fCommandLine += file.Path(); ++ fCommandLine += "\""; ++ } ++ ++ BString url; ++ for (int32 i = 0; pmsg->FindString("url", i, &url) == B_OK; i++) { ++ fCommandLine += " \""; ++ fCommandLine += url; ++ fCommandLine += "\""; ++ } ++ ++ fCommandLine += " &"; ++} ++ ++void ++BrowserLauncherApp::ArgvRecieved(int32 argc, char**argv) ++{ ++ BMessage message(B_REFS_RECEIVED); ++ for (int i = 1; i < argc; i++) { ++ const char* url = argv[i]; ++ BEntry entry(argv[i], true); ++ BPath path; ++ if (entry.Exists() && entry.GetPath(&path) == B_OK) ++ url = path.Path(); ++ message.AddString("url", url); ++ } ++ RefsReceived(&message); ++} ++ ++void ++BrowserLauncherApp::ReadyToRun() ++{ ++ if (!fCommandLine.IsEmpty()) ++ system(fCommandLine.String()); ++ ++ Quit(); ++} ++ ++int main(int argc, char **argv) ++{ ++ BrowserLauncherApp application("application/x-vnd.iceweasel-launcher", argc, argv); ++ application.Run(); ++ return 0; ++} ++ ++ diff --git a/tools/profiler/core/ProfilerUtils.cpp b/tools/profiler/core/ProfilerUtils.cpp index 4c53061..76d3561 100644 --- a/tools/profiler/core/ProfilerUtils.cpp @@ -5976,163 +6139,5 @@ index dbd9993..1431340 100644 # include # include -- -2.48.1 - - -From 1f23b694739b795bab9591e680820c4696b304a8 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 6 Apr 2025 10:13:00 +1000 -Subject: Add simple launcher app - - -diff --git a/tools/haiku-launcher/launcher.cpp b/tools/haiku-launcher/launcher.cpp -new file mode 100644 -index 0000000..86a9f22 ---- /dev/null -+++ b/tools/haiku-launcher/launcher.cpp -@@ -0,0 +1,111 @@ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+class BrowserLauncherApp : public BApplication { -+ public: -+ BrowserLauncherApp(const char *signature, int argc, char **argv); -+ ~BrowserLauncherApp() {}; -+ -+ virtual void RefsReceived(BMessage *pmsg); -+ virtual void ArgvRecieved(int32 argc, char**argv); -+ virtual void ReadyToRun(); -+ BString GetBinPath(void); -+ -+ private: -+ BString fCommandLine; -+}; -+ -+BrowserLauncherApp::BrowserLauncherApp(const char *signature, int argc, char **argv) -+ : BApplication(signature) -+{ -+ ArgvRecieved(argc, argv); -+} -+ -+BString -+BrowserLauncherApp::GetBinPath(void) -+{ -+ BPath binPath; -+ -+ image_info info; -+ int32 cookie = 0; -+ -+ while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) { -+ if (info.type == B_APP_IMAGE) { -+ binPath.SetTo(info.name); -+ binPath.GetParent(&binPath); -+ break; -+ } -+ } -+ -+ binPath.Append("Iceweasel"); -+ -+ return binPath.Path(); -+} -+ -+void -+BrowserLauncherApp::RefsReceived(BMessage *pmsg) -+{ -+ fCommandLine = GetBinPath(); -+ -+ entry_ref ref; -+ for (int32 i = 0; pmsg->FindRef("refs", i, &ref) == B_OK; i++) { -+ BPath file = BPath(&ref); -+ fCommandLine += " \""; -+ fCommandLine += file.Path(); -+ fCommandLine += "\""; -+ } -+ -+ BString url; -+ for (int32 i = 0; pmsg->FindString("url", i, &url) == B_OK; i++) { -+ fCommandLine += " \""; -+ fCommandLine += url; -+ fCommandLine += "\""; -+ } -+ -+ fCommandLine += " &"; -+} -+ -+void -+BrowserLauncherApp::ArgvRecieved(int32 argc, char**argv) -+{ -+ BMessage message(B_REFS_RECEIVED); -+ for (int i = 1; i < argc; i++) { -+ const char* url = argv[i]; -+ BEntry entry(argv[i], true); -+ BPath path; -+ if (entry.Exists() && entry.GetPath(&path) == B_OK) -+ url = path.Path(); -+ message.AddString("url", url); -+ } -+ RefsReceived(&message); -+} -+ -+void -+BrowserLauncherApp::ReadyToRun() -+{ -+ if (!fCommandLine.IsEmpty()) -+ system(fCommandLine.String()); -+ -+ Quit(); -+} -+ -+int main(int argc, char **argv) -+{ -+ BrowserLauncherApp application("application/x-vnd.iceweasel-launcher", argc, argv); -+ application.Run(); -+ return 0; -+} -+ -+ -diff --git a/build/gyp_includes/common.gypi b/build/gyp_includes/common.gypi -index 8acb326..a50a782 100644 ---- a/build/gyp_includes/common.gypi -+++ b/build/gyp_includes/common.gypi -@@ -685,7 +685,7 @@ - - # Default to enabled PIE; this is important for ASLR but we may need to be - # able to turn it off for various reasons. -- 'linux_disable_pie%': 0, -+ 'linux_disable_pie%': 1, - - # The release channel that this build targets. This is used to restrict - # channel-specific build options, like which installer packages to create. -@@ -2557,7 +2557,7 @@ - 'target_conditions': [ - ['_type=="executable"', { - 'ldflags': [ -- '-pie', -+ '-fPIC', - ], - }], - ], -@@ -3169,7 +3169,7 @@ - # understand slide, and get rid of the Valgrind check. - 'xcode_settings': { - 'OTHER_LDFLAGS': [ -- '-Wl,-pie', # Position-independent executable (MH_PIE) -+ '-Wl,-fPIC', # Position-independent executable (MH_PIE) - ], - }, - }], --- -2.48.1 +2.50.1 diff --git a/www-client/iceweasel/patches/iceweasel_launcher-140.1.0.patchset b/www-client/iceweasel/patches/iceweasel_launcher-140.3.1.patchset similarity index 100% rename from www-client/iceweasel/patches/iceweasel_launcher-140.1.0.patchset rename to www-client/iceweasel/patches/iceweasel_launcher-140.3.1.patchset