diff --git a/.gitignore b/.gitignore index 6de5154..241f013 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,235 @@ /icecat-60.4.0-gnu1.tar.bz2 /icecat-60.5.0-gnu1.tar.bz2 /icecat-60.5.1-gnu1.tar.bz2 +/icecat-60.5.2-gnu1.tar.bz2 +/icecat-60.6.0-gnu1.tar.bz2 +/icecat-60.6.0-langpacks.tar.gz +/icecat-60.6.1-gnu1.tar.bz2 +/icecat-60.6.1-langpacks.tar.gz +/icecat-60.6.1-gnu2.tar.bz2 +/icecat-60.6.2-gnu1.tar.bz2 +/icecat-60.6.3-gnu1.tar.bz2 +/icecat-60.6.3-langpacks.tar.gz +/icecat-60.6.3-gnu2.tar.bz2 +/icecat-60.7.0-gnu1.tar.bz2 +/icecat-60.7.0-langpacks.tar.gz +/icecat-60.7.0-gnu2.tar.bz2 +/icecat-60.7.1-gnu1.tar.bz2 +/icecat-60.7.1-langpacks.tar.gz +/icecat-60.7.2-gnu1.tar.bz2 +/icecat-60.7.2-langpacks.tar.gz +/icecat-60.8.0-gnu1.tar.bz2 +/icecat-60.8.0-langpacks.tar.gz +/cbindgen-vendor.tar.xz +/icecat-68.0.2-gnu1.tar.bz2 +/icecat-68.0.2-langpacks.tar.gz +/icecat-68.0.2-gnu2.tar.bz2 +/icecat-68.0.2-gnu3.tar.bz2 +/icecat-68.1.0-gnu1.tar.bz2 +/icecat-68.1.0-langpacks.tar.gz +/icecat-68.2.0-gnu1.tar.bz2 +/icecat-68.2.0-langpacks.tar.gz +/icecat-68.2.0-gnu2.tar.bz2 +/icecat-68.3.0-gnu1.tar.bz2 +/icecat-68.3.0-langpacks.tar.gz +/icecat-68.4.0-gnu1.tar.bz2 +/icecat-68.4.0-rh1.tar.bz2 +/icecat-68.4.0-langpacks.tar.gz +/icecat-68.4.0-rh2.tar.bz2 +/icecat-68.4.1-langpacks.tar.gz +/icecat-68.4.1-rh1.tar.bz2 +/icecat-68.5.0-langpacks.tar.gz +/icecat-68.5.0-rh1.tar.bz2 +/icecat-68.6.0-rh1.tar.bz2 +/icecat-68.6.0-langpacks.tar.gz +/icecat-68.6.0-rh2.tar.bz2 +/icecat-68.6.0-rh3.tar.bz2 +/icecat-68.6.0-rh4.tar.bz2 +/icecat-68.7.0-langpacks.tar.gz +/icecat-68.7.0-rh1.tar.bz2 +/icecat.png +/icecat-68.8.0-langpacks.tar.gz +/icecat-68.8.0-rh1.tar.bz2 +/icecat-68.9.0-rh1.tar.bz2 +/icecat-68.9.0-rh2.tar.bz2 +/icecat-68.9.0-langpacks.tar.gz +/icecat-78.0-langpacks.tar.gz +/icecat-78.0-rh1.tar.bz2 +/icecat-78.0.1-langpacks.tar.gz +/icecat-78.0.1-rh1.tar.bz2 +/icecat-78.2.0-rh1.tar.bz2 +/icecat-78.2.0-langpacks.tar.gz +/icecat-78.2.0-rh2.tar.bz2 +/icecat-78.2.0-rh3.tar.bz2 +/icecat-78.2.0-rh4.tar.bz2 +/icecat-78.2.0-rh5.tar.bz2 +/icecat-78.2.0-rh6.tar.bz2 +/icecat-78.3.0-langpacks.tar.gz +/icecat-78.3.0-rh1.tar.bz2 +/icecat-78.3.1-langpacks.tar.gz +/icecat-78.3.1-rh1.tar.bz2 +/icecat-78.4.0-langpacks.tar.gz +/icecat-78.4.0-rh1.tar.bz2 +/icecat-78.5.0-langpacks.tar.gz +/icecat-78.5.0-rh1.tar.bz2 +/icecat-78.5.0-rh2.tar.bz2 +/icecat-78.6.0-langpacks.tar.gz +/icecat-78.6.0-rh1.tar.bz2 +/icecat-78.6.1-langpacks.tar.gz +/icecat-78.6.1-rh1.tar.bz2 +/icecat-78.7.0-langpacks.tar.gz +/icecat-78.7.0-rh1.tar.bz2 +/icecat-78.7.0-rh2.tar.bz2 +/icecat-78.7.1-langpacks.tar.gz +/icecat-78.7.1-rh1.tar.bz2 +/icecat-78.8.0-langpacks.tar.gz +/icecat-78.8.0-rh1.tar.bz2 +/icecat-78.9.0-langpacks.tar.gz +/icecat-78.9.0-rh1.tar.bz2 +/icecat-78.10.0-langpacks.tar.gz +/icecat-78.10.0-rh1.tar.bz2 +/icecat-78.10.1-langpacks.tar.gz +/icecat-78.10.1-rh1.tar.bz2 +/icecat-78.11.0-langpacks.tar.gz +/icecat-78.11.0-rh1.tar.bz2 +/icecat-78.12.0-langpacks.tar.gz +/icecat-78.12.0-rh1.tar.bz2 +/icecat-78.12.0-rh2.tar.bz2 +/icecat-78.13.0-rh1.tar.bz2 +/icecat-78.13.0-rh2.tar.bz2 +/icecat-78.13.0-langpacks.tar.gz +/icecat-78.13.0-rh3.tar.bz2 +/icecat-78.14.0-langpacks.tar.gz +/icecat-78.14.0-rh1.tar.bz2 +/icecat-78.15.0-langpacks.tar.gz +/icecat-78.15.0-rh1.tar.bz2 +/icecat-91.2.0-langpacks.tar.gz +/icecat-91.2.0-rh1.tar.bz2 +/icecat-91.3.0-langpacks.tar.gz +/icecat-91.3.0-rh1.tar.bz2 +/icecat-91.4.0-langpacks.tar.gz +/icecat-91.4.0-rh1.tar.bz2 +/icecat-91.4.1-langpacks.tar.gz +/icecat-91.4.1-rh1.tar.bz2 +/icecat-91.5.0-langpacks.tar.gz +/icecat-91.5.0-rh1.tar.bz2 +/icecat-91.6.0-langpacks.tar.gz +/icecat-91.6.0-rh1.tar.bz2 +/icecat-91.6.1-langpacks.tar.gz +/icecat-91.6.1-rh1.tar.bz2 +/icecat-91.7.0-langpacks.tar.gz +/icecat-91.7.0-rh1.tar.bz2 +/icecat-91.7.1-langpacks.tar.gz +/icecat-91.7.1-rh1.tar.bz2 +/icecat-91.8.0-langpacks.tar.gz +/icecat-91.8.0-rh1.tar.bz2 +/icecat-91.9.0-langpacks.tar.gz +/icecat-91.9.0-rh1.tar.bz2 +/icecat-91.9.1-langpacks.tar.gz +/icecat-91.9.1-rh1.tar.bz2 +/icecat-91.10.0-langpacks.tar.gz +/icecat-91.10.0-rh1.tar.bz2 +/icecat-91.10.0-rh2.tar.bz2 +/icecat-91.10.0-rh3.tar.bz2 +/icecat-91.11.0-langpacks.tar.gz +/icecat-91.11.0-rh1.tar.bz2 +/icecat-91.12.0-langpacks.tar.gz +/icecat-91.12.0-rh1.tar.bz2 +/icecat-91.13.0-langpacks.tar.gz +/icecat-91.13.0-rh1.tar.bz2 +/icecat-102.2.0-langpacks.tar.gz +/icecat-102.2.0-rh1.tar.bz2 +/icecat-102.3.0-langpacks.tar.gz +/icecat-102.3.0-rh1.tar.bz2 +/icecat-102.4.0-langpacks.tar.gz +/icecat-102.4.0-rh1.tar.bz2 +/icecat-102.5.0-langpacks.tar.gz +/icecat-102.5.0-rh1.tar.bz2 +/icecat-102.6.0-langpacks.tar.gz +/icecat-102.6.0-rh1.tar.bz2 +/icecat-102.7.0-langpacks.tar.gz +/icecat-102.7.0-rh1.tar.bz2 +/icecat-102.8.0-langpacks.tar.gz +/icecat-102.8.0-rh1.tar.bz2 +/icecat-102.9.0-langpacks.tar.gz +/icecat-102.9.0-rh1.tar.bz2 +/icecat-102.10.0-langpacks.tar.gz +/icecat-102.10.0-rh1.tar.bz2 +/icecat-102.11.0-langpacks.tar.gz +/icecat-102.11.0-rh1.tar.bz2 +/icecat-102.11.0-rh2.tar.bz2 +/icecat-102.12.0-langpacks.tar.gz +/icecat-102.12.0-rh1.tar.bz2 +/icecat-102.13.0-langpacks.tar.gz +/icecat-102.13.0-rh1.tar.bz2 +/icecat-102.14.0-langpacks.tar.gz +/icecat-102.14.0-rh1.tar.bz2 +/icecat-102.15.0-langpacks.tar.gz +/icecat-102.15.0-rh1.tar.bz2 +/icecat-115.3.1-langpacks.tar.gz +/icecat-115.3.1-rh1.tar.bz2 +/icecat-115.3.1-rh2.tar.bz2 +/icecat-115.4.0-langpacks.tar.gz +/icecat-115.4.0-rh1.tar.bz2 +/icecat-115.4.0-rh2.tar.bz2 +/icecat-115.5.0-langpacks.tar.gz +/icecat-115.5.0-rh1.tar.bz2 +/icecat-115.6.0-langpacks.tar.gz +/icecat-115.6.0-rh1.tar.bz2 +/icecat-115.7.0-langpacks.tar.gz +/icecat-115.7.0-rh1.tar.bz2 +/icecat-115.8.0-langpacks.tar.gz +/icecat-115.8.0-rh1.tar.bz2 +/icecat-115.9.0-langpacks.tar.gz +/icecat-115.9.0-rh1.tar.bz2 +/icecat-115.10.0-langpacks.tar.gz +/icecat-115.10.0-rh1.tar.bz2 +/icecat-115.11.0-langpacks.tar.gz +/icecat-115.11.0-rh1.tar.bz2 +/icecat-115.12.0-langpacks.tar.gz +/icecat-115.12.0-rh1.tar.bz2 +/icecat-115.13.0-langpacks.tar.gz +/icecat-115.13.0-rh1.tar.bz2 +/icecat-115.14.0-langpacks.tar.gz +/icecat-115.14.0-rh1.tar.bz2 +/icecat-115.15.0-langpacks.tar.gz +/icecat-115.15.0-rh1.tar.bz2 +/icecat-115.16.0-langpacks.tar.gz +/icecat-115.16.0-rh1.tar.bz2 +/icecat-115.16.1-langpacks.tar.gz +/icecat-115.16.1-rh1.tar.bz2 +/icecat-115.17.0-langpacks.tar.gz +/icecat-115.17.0-rh1.tar.bz2 +/icecat-115.18.0-langpacks.tar.gz +/icecat-115.18.0-rh1.tar.bz2 +/icecat-115.18.0-rh2.tar.bz2 +/icecat-115.19.0-langpacks.tar.gz +/icecat-115.19.0-rh1.tar.bz2 +/icecat-115.20.0-langpacks.tar.gz +/icecat-115.20.0-rh1.tar.bz2 +/icecat-115.21.0-langpacks.tar.gz +/icecat-115.21.0-rh1.tar.bz2 +/icecat-115.22.0-langpacks.tar.gz +/icecat-115.22.0-rh1.tar.bz2 +/icecat-115.23.0-langpacks.tar.gz +/icecat-115.23.0-rh1.tar.bz2 +/icecat-115.23.1-langpacks.tar.gz +/icecat-115.23.1-rh1.tar.bz2 +/icecat-115.24.0-langpacks.tar.gz +/icecat-115.24.0-rh1.tar.bz2 +/icecat-128.12.0-langpacks.tar.gz +/icecat-128.12.0-rh1.tar.bz2 +/icecat-128.13.0-langpacks.tar.gz +/icecat-128.13.0-rh1.tar.bz2 +/icecat-128.14.0-langpacks.tar.gz +/icecat-128.14.0-rh1.tar.bz2 +/icecat-140.3.0-langpacks.tar.gz +/icecat-140.3.0-rh1.tar.bz2 +/icecat-140.4.0-langpacks.tar.gz +/icecat-140.4.0-rh1.tar.bz2 +/icecat-140.5.0-langpacks.tar.gz +/icecat-140.5.0-rh1.tar.bz2 +/icecat-140.6.0-langpacks.tar.gz +/icecat-140.6.0-rh1.tar.bz2 +/icecat-140.7.0-langpacks.tar.gz +/icecat-140.7.0-rh1.tar.bz2 diff --git a/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch b/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch deleted file mode 100644 index be4a7fb..0000000 --- a/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-60.0/mfbt/LinuxSignal.h.mozilla-1238661 firefox-60.0/mfbt/LinuxSignal.h ---- firefox-60.0/mfbt/LinuxSignal.h.mozilla-1238661 2018-04-27 08:55:38.848241768 +0200 -+++ firefox-60.0/mfbt/LinuxSignal.h 2018-04-27 09:06:47.946769859 +0200 -@@ -22,7 +22,7 @@ - void* aContext) { - asm volatile("nop; nop; nop; nop" : : : "memory"); - -- asm volatile("b %0" : : "X"(H) : "memory"); -+ asm volatile("bx %0" : : "r"(H), "l"(aSignal), "l"(aInfo), "l"(aContext) : "memory"); - } - - #define MOZ_SIGNAL_TRAMPOLINE(h) (mozilla::SignalTrampoline) diff --git a/README.md b/README.md new file mode 100644 index 0000000..f490435 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +[GNU IceCat](https://www.gnu.org/software/gnuzilla/) is the GNU version of the Firefox ESR browser. +Extensions included to this version of IceCat: + + * LibreJS + + GNU LibreJS aims to address the JavaScript problem described in the article + "[The JavaScript Trap](https://www.gnu.org/philosophy/javascript-trap.html)" of Richard Stallman. + + + * JShelter + + Mitigates potential threats from JavaScript, including fingerprinting, + tracking, and data collection. Slightly modifies the results of API calls, + differently on different domains, so that the cross-site fingerprint is not + stable. Applies security counter-measures that are likely not to break web pages. + Allows fine-grained control over the restrictions and counter-measures applied + to each domain. + + + * A set of companion extensions for LibreJS by Nathan Nichols + are pre-installed, and provide workarounds to use some services at USPS, + RSF.org, SumOfUs.org, pay.gov, McDonalds, goteo.org and Google Docs + without using nonfree JavaScript. + + + * A series of configuration changes and tweaks were applied to ensure that + IceCat does not initiate network connections that the user has not explicitly + requested. This implies not downloading feeds, updates, blacklists or any + other similar data needed during startup. + + +Origin of the name + +The name “IceCat” was coined to show our relationship to the Mozilla Firefox browser. Ice isn't Fire and a Cat isn't a Fox, so it is clearly a different package (we don't want Mozilla blamed for our mistakes, nor cause confusion with their trademarks), but is equally clearly intimately related (of course nearly all of the work comes from the Mozilla foundation effort, so we want to give credit). + +The gNewSense BurningDog browser and the Debian IceWeasel browser are similarly derived from Firefox, also with the intent of being free software. Technically, however, these projects are maintained entirely independently of IceCat. (Previously, this GNU browser project was also named IceWeasel, but that proved confusing.) +About GNU and the GNU Philosophy + +The [GNU Project](https://www.gnu.org/) was launched in 1984 to develop a complete Unix-like operating system which is [free software—free as in freedom, not price](https://www.gnu.org/philosophy/free-sw.html). Its principal sponsor is the [Free Software Foundation](https://www.fsf.org/). + +The [free software philosophy](https://www.gnu.org/philosophy/philosophy.html) is the root and motivation of the guidelines and goals of the whole free software movement, a worldwide community. diff --git a/bug1375074-save-restore-x28.patch b/bug1375074-save-restore-x28.patch deleted file mode 100644 index b622604..0000000 --- a/bug1375074-save-restore-x28.patch +++ /dev/null @@ -1,75 +0,0 @@ -# HG changeset patch -# User Lars T Hansen -# Date 1519822672 -3600 -# Wed Feb 28 13:57:52 2018 +0100 -# Node ID 672f0415217b202ae59a930769dffd9d6ba6b87c -# Parent 825fd04dacc6297d3a980ec4184079405950b35d -Bug 1375074 - Save and restore non-volatile x28 on ARM64 for generated unboxed object constructor. - -diff --git a/js/src/jit-test/tests/bug1375074.js b/js/src/jit-test/tests/bug1375074.js -new file mode 100644 ---- /dev/null -+++ b/js/src/jit-test/tests/bug1375074.js -@@ -0,0 +1,18 @@ -+// This forces the VM to start creating unboxed objects and thus stresses a -+// particular path into generated code for a specialized unboxed object -+// constructor. -+ -+var K = 2000; // 2000 should be plenty -+var s = "["; -+var i; -+for ( i=0; i < K-1; i++ ) -+ s = s + `{"i":${i}},`; -+s += `{"i":${i}}]`; -+var v = JSON.parse(s); -+ -+assertEq(v.length == K, true); -+ -+for ( i=0; i < K; i++) { -+ assertEq(v[i] instanceof Object, true); -+ assertEq(v[i].i, i); -+} -diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp ---- a/js/src/vm/UnboxedObject.cpp -+++ b/js/src/vm/UnboxedObject.cpp -@@ -86,8 +86,15 @@ - #endif - - #ifdef JS_CODEGEN_ARM64 -- // ARM64 communicates stack address via sp, but uses a pseudo-sp for -- // addressing. -+ // ARM64 communicates stack address via sp, but uses a pseudo-sp (PSP) for -+ // addressing. The register we use for PSP may however also be used by -+ // calling code, and it is nonvolatile, so save it. Do this as a special -+ // case first because the generic save/restore code needs the PSP to be -+ // initialized already. -+ MOZ_ASSERT(PseudoStackPointer64.Is(masm.GetStackPointer64())); -+ masm.Str(PseudoStackPointer64, vixl::MemOperand(sp, -16, vixl::PreIndex)); -+ -+ // Initialize the PSP from the SP. - masm.initStackPtr(); - #endif - -@@ -239,7 +246,22 @@ - if (ScratchDoubleReg.volatile_()) masm.pop(ScratchDoubleReg); - masm.PopRegsInMask(savedNonVolatileRegisters); - -+#ifdef JS_CODEGEN_ARM64 -+ // Now restore the value that was in the PSP register on entry, and return. -+ -+ // Obtain the correct SP from the PSP. -+ masm.Mov(sp, PseudoStackPointer64); -+ -+ // Restore the saved value of the PSP register, this value is whatever the -+ // caller had saved in it, not any actual SP value, and it must not be -+ // overwritten subsequently. -+ masm.Ldr(PseudoStackPointer64, vixl::MemOperand(sp, 16, vixl::PostIndex)); -+ -+ // Perform a plain Ret(), as abiret() will move SP <- PSP and that is wrong. -+ masm.Ret(vixl::lr); -+#else - masm.abiret(); -+#endif - - masm.bind(&failureStoreOther); - diff --git a/build-big-endian.patch b/build-big-endian.patch deleted file mode 100644 index e8ec439..0000000 --- a/build-big-endian.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -up firefox-60.0/gfx/skia/skia/include/core/SkColorPriv.h.big-endian firefox-60.0/gfx/skia/skia/include/core/SkColorPriv.h ---- firefox-60.0/gfx/skia/skia/include/core/SkColorPriv.h.big-endian 2018-04-09 22:50:48.000000000 +0200 -+++ firefox-60.0/gfx/skia/skia/include/core/SkColorPriv.h 2018-04-18 11:51:38.748680174 +0200 -@@ -54,18 +54,19 @@ static inline U8CPU SkUnitScalarClampToB - * - * Here we enforce this constraint. - */ -- -+/* - #ifdef SK_CPU_BENDIAN - #define SK_RGBA_R32_SHIFT 24 - #define SK_RGBA_G32_SHIFT 16 - #define SK_RGBA_B32_SHIFT 8 - #define SK_RGBA_A32_SHIFT 0 - #else -+*/ - #define SK_RGBA_R32_SHIFT 0 - #define SK_RGBA_G32_SHIFT 8 - #define SK_RGBA_B32_SHIFT 16 - #define SK_RGBA_A32_SHIFT 24 --#endif -+/*#endif*/ - - #define SkGetPackedA32(packed) ((uint32_t)((packed) << (24 - SK_A32_SHIFT)) >> 24) - #define SkGetPackedR32(packed) ((uint32_t)((packed) << (24 - SK_R32_SHIFT)) >> 24) -diff -up firefox-60.0/gfx/skia/skia/include/core/SkImageInfo.h.big-endian firefox-60.0/gfx/skia/skia/include/core/SkImageInfo.h ---- firefox-60.0/gfx/skia/skia/include/core/SkImageInfo.h.big-endian 2018-04-09 22:50:48.000000000 +0200 -+++ firefox-60.0/gfx/skia/skia/include/core/SkImageInfo.h 2018-04-18 11:51:38.748680174 +0200 -@@ -84,7 +84,8 @@ enum SkColorType { - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - kN32_SkColorType = kRGBA_8888_SkColorType, - #else -- #error "SK_*32_SHIFT values must correspond to BGRA or RGBA byte order" -+ //#error "SK_*32_SHIFT values must correspond to BGRA or RGBA byte order" -+ kN32_SkColorType = kBGRA_8888_SkColorType - #endif - }; - -diff -up firefox-60.0/gfx/skia/skia/include/gpu/GrTypes.h.big-endian firefox-60.0/gfx/skia/skia/include/gpu/GrTypes.h ---- firefox-60.0/gfx/skia/skia/include/gpu/GrTypes.h.big-endian 2018-04-09 22:50:48.000000000 +0200 -+++ firefox-60.0/gfx/skia/skia/include/gpu/GrTypes.h 2018-04-18 11:51:38.748680174 +0200 -@@ -344,15 +344,13 @@ enum GrPixelConfig { - static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; - - // Aliases for pixel configs that match skia's byte order. --#ifndef SK_CPU_LENDIAN -- #error "Skia gpu currently assumes little endian" --#endif - #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) - static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig; - #else -- #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format." -+ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; -+ static const GrPixelConfig kSkiaGamma8888_GrPixelConfig = kSBGRA_8888_GrPixelConfig; - #endif - - /** -diff -up firefox-60.0/gfx/skia/skia/src/core/SkColorData.h.big-endian firefox-60.0/gfx/skia/skia/src/core/SkColorData.h ---- firefox-60.0/gfx/skia/skia/src/core/SkColorData.h.big-endian 2018-04-18 13:42:06.980476156 +0200 -+++ firefox-60.0/gfx/skia/skia/src/core/SkColorData.h 2018-04-18 13:42:50.493520552 +0200 -@@ -31,18 +31,19 @@ - * - * Here we enforce this constraint. - */ -- -+/* - #ifdef SK_CPU_BENDIAN - #define SK_BGRA_B32_SHIFT 24 - #define SK_BGRA_G32_SHIFT 16 - #define SK_BGRA_R32_SHIFT 8 - #define SK_BGRA_A32_SHIFT 0 - #else -+*/ - #define SK_BGRA_B32_SHIFT 0 - #define SK_BGRA_G32_SHIFT 8 - #define SK_BGRA_R32_SHIFT 16 - #define SK_BGRA_A32_SHIFT 24 --#endif -+//#endif - - #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) - #error "can't define PMCOLOR to be RGBA and BGRA" diff --git a/build-icu-big-endian.patch b/build-icu-big-endian.patch deleted file mode 100644 index aaa0e3b..0000000 --- a/build-icu-big-endian.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up a/build/autoconf/icu.orig.m4 b/build/autoconf/icu.m4 ---- a/build/autoconf/icu.orig.m4 2016-12-09 09:11:01.227317790 +0100 -+++ b/build/autoconf/icu.m4 2016-12-09 09:18:40.608712247 +0100 -@@ -78,7 +78,7 @@ - # TODO: the l is actually endian-dependent - # We could make this set as 'l' or 'b' for little or big, respectively, - # but we'd need to check in a big-endian version of the file. -- ICU_DATA_FILE="icudt${version}l.dat" -+ ICU_DATA_FILE="icudt${version}b.dat" - - MOZ_ICU_DATA_ARCHIVE= - fi diff --git a/build-jit-atomic-always-lucky.patch b/build-jit-atomic-always-lucky.patch deleted file mode 100644 index 50d1c9d..0000000 --- a/build-jit-atomic-always-lucky.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-57.0b5/js/src/jit/AtomicOperations.h.jit-atomic-lucky firefox-57.0b5/js/src/jit/AtomicOperations.h ---- firefox-57.0b5/js/src/jit/AtomicOperations.h.jit-atomic-lucky 2017-10-06 12:34:02.338973607 +0200 -+++ firefox-57.0b5/js/src/jit/AtomicOperations.h 2017-10-06 12:38:24.632622215 +0200 -@@ -394,7 +394,7 @@ - #elif defined(__s390__) || defined(__s390x__) - #include "jit/none/AtomicOperations-feeling-lucky.h" - #else --#error "No AtomicOperations support provided for this platform" -+#include "jit/none/AtomicOperations-feeling-lucky.h" - #endif - - #endif // jit_AtomicOperations_h diff --git a/firefox-nss-addon-hack.patch b/firefox-nss-addon-hack.patch new file mode 100644 index 0000000..0322707 --- /dev/null +++ b/firefox-nss-addon-hack.patch @@ -0,0 +1,19 @@ +diff -up firefox-84.0.2/security/certverifier/NSSCertDBTrustDomain.cpp.nss-hack firefox-84.0.2/security/certverifier/NSSCertDBTrustDomain.cpp +--- firefox-84.0.2/security/certverifier/NSSCertDBTrustDomain.cpp.nss-hack 2021-01-11 12:12:02.585514543 +0100 ++++ firefox-84.0.2/security/certverifier/NSSCertDBTrustDomain.cpp 2021-01-11 12:47:50.345984582 +0100 +@@ -1619,6 +1619,15 @@ SECStatus InitializeNSS(const nsACString + return srv; + } + ++ /* Sets the NSS_USE_ALG_IN_ANY_SIGNATURE bit. ++ * does not change NSS_USE_ALG_IN_CERT_SIGNATURE, ++ * so policy will still disable use of sha1 in ++ * certificate related signature processing. */ ++ srv = NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_ANY_SIGNATURE, 0); ++ if (srv != SECSuccess) { ++ NS_WARNING("Unable to use SHA1 for Add-ons, expect broken/disabled Add-ons. See https://bugzilla.redhat.com/show_bug.cgi?id=1908018 for details."); ++ } ++ + if (nssDbConfig == NSSDBConfig::ReadWrite) { + UniquePK11SlotInfo slot(PK11_GetInternalKeySlot()); + if (!slot) { diff --git a/firefox-pipewire.patch b/firefox-pipewire.patch deleted file mode 100644 index 0ed09c6..0000000 --- a/firefox-pipewire.patch +++ /dev/null @@ -1,2571 +0,0 @@ -diff -ENwbur firefox-64.0/config/system-headers.mozbuild firefox-webrtc/config/system-headers.mozbuild ---- firefox-64.0/config/system-headers.mozbuild 2019-01-07 13:18:29.367461827 +0100 -+++ firefox-webrtc/config/system-headers.mozbuild 2019-01-07 13:19:30.043067979 +0100 -@@ -314,6 +314,7 @@ - 'Gestalt.h', - 'getopt.h', - 'gio/gio.h', -+ 'gio/gunixfdlist.h', - 'glibconfig.h', - 'glib.h', - 'glib-object.h', -@@ -607,6 +608,7 @@ - 'Pgenerr.h', - 'PGenErr.h', - 'Ph.h', -+ 'pipewire/pipewire.h', - 'pixman.h', - 'pk11func.h', - 'pk11pqg.h', -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc 2019-01-07 13:20:40.141768272 +0100 -@@ -0,0 +1,39 @@ -+/* -+ * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -+#include "webrtc/modules/desktop_capture/desktop_capturer.h" -+ -+#if defined(USE_X11) -+#include "webrtc/modules/desktop_capture/app_capturer_x11.h" -+#endif // defined(USE_X11) -+ -+namespace webrtc { -+ -+// static -+AppCapturer* AppCapturer::Create(const DesktopCaptureOptions& options) { -+#if defined(USE_X11) -+ return AppCapturerX11::Create(options); -+#endif // defined(USE_X11) -+ -+ return nullptr; -+} -+ -+// static -+std::unique_ptr DesktopCapturer::CreateRawAppCapturer( -+ const DesktopCaptureOptions& options) { -+#if defined(USE_X11) -+ return AppCapturerX11::CreateRawAppCapturer(options); -+#endif // defined(USE_X11) -+ -+ return nullptr; -+} -+ -+} // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc 2019-01-07 13:16:46.374432920 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc 2019-01-07 13:20:40.142768282 +0100 -@@ -7,9 +7,6 @@ - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ --#include "webrtc/modules/desktop_capture/app_capturer.h" --#include "webrtc/modules/desktop_capture/shared_desktop_frame.h" --#include "webrtc/modules/desktop_capture/x11/shared_x_util.h" - - #include - #include -@@ -21,80 +18,19 @@ - - #include - -+#include "webrtc/modules/desktop_capture/app_capturer_x11.h" -+ - #include "webrtc/modules/desktop_capture/desktop_capture_options.h" - #include "webrtc/modules/desktop_capture/desktop_frame.h" - #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" -+#include "webrtc/modules/desktop_capture/x11/shared_x_util.h" - #include "webrtc/modules/desktop_capture/x11/x_error_trap.h" - #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" - #include "webrtc/system_wrappers/include/logging.h" - - namespace webrtc { - --namespace { -- --class ScreenCapturerProxy : DesktopCapturer::Callback { --public: -- ScreenCapturerProxy() -- : screen_capturer_(DesktopCapturer::CreateScreenCapturer(DesktopCaptureOptions::CreateDefault())) { -- screen_capturer_->SelectSource(kFullDesktopScreenId); -- screen_capturer_->Start(this); -- } -- void CaptureFrame() { screen_capturer_->CaptureFrame(); } -- std::unique_ptr GetFrame() { return std::move(frame_); } -- -- // Callback interface -- virtual void OnCaptureResult(DesktopCapturer::Result result, -- std::unique_ptr frame) { -- frame_ = std::move(frame); -- } -- --protected: -- std::unique_ptr screen_capturer_; -- std::unique_ptr frame_; --}; -- --class AppCapturerLinux : public AppCapturer { --public: -- AppCapturerLinux(const DesktopCaptureOptions& options); -- virtual ~AppCapturerLinux(); -- -- // AppCapturer interface. -- virtual bool GetAppList(AppList* apps) override; -- virtual bool SelectApp(ProcessId processId) override; -- virtual bool BringAppToFront() override; -- -- // DesktopCapturer interface. -- virtual void Start(Callback* callback) override; -- virtual void Stop() override; -- virtual void CaptureFrame() override; -- virtual bool SelectSource(SourceId id) override -- { -- return SelectApp(static_cast(id)); -- } -- --protected: -- Display* GetDisplay() { return x_display_->display(); } -- bool UpdateRegions(); -- -- void FillDesktopFrameRegionWithColor(DesktopFrame* pDesktopFrame,Region rgn, uint32_t color); --private: -- Callback* callback_; -- ProcessId selected_process_; -- -- // Sample Mode -- ScreenCapturerProxy screen_capturer_proxy_; -- // Mask of foreground (non-app windows in front of selected) -- Region rgn_mask_; -- // Region of selected windows -- Region rgn_visual_; -- // Mask of background (desktop, non-app windows behind selected) -- Region rgn_background_; -- -- rtc::scoped_refptr x_display_; -- RTC_DISALLOW_COPY_AND_ASSIGN(AppCapturerLinux); --}; -- --AppCapturerLinux::AppCapturerLinux(const DesktopCaptureOptions& options) -+AppCapturerX11::AppCapturerX11(const DesktopCaptureOptions& options) - : callback_(NULL), - selected_process_(0), - x_display_(options.x_display()) { -@@ -103,7 +39,7 @@ - rgn_background_ = XCreateRegion(); - } - --AppCapturerLinux::~AppCapturerLinux() { -+AppCapturerX11::~AppCapturerX11() { - if (rgn_mask_) { - XDestroyRegion(rgn_mask_); - } -@@ -116,32 +52,32 @@ - } - - // AppCapturer interface. --bool AppCapturerLinux::GetAppList(AppList* apps) { -+bool AppCapturerX11::GetAppList(AppList* apps) { - // Implemented in DesktopDeviceInfo - return true; - } --bool AppCapturerLinux::SelectApp(ProcessId processId) { -+bool AppCapturerX11::SelectApp(ProcessId processId) { - selected_process_ = processId; - return true; - } --bool AppCapturerLinux::BringAppToFront() { -+bool AppCapturerX11::BringAppToFront() { - // Not implemented yet: See Bug 1036653 - return true; - } - - // DesktopCapturer interface. --void AppCapturerLinux::Start(Callback* callback) { -+void AppCapturerX11::Start(Callback* callback) { - assert(!callback_); - assert(callback); - - callback_ = callback; - } - --void AppCapturerLinux::Stop() { -+void AppCapturerX11::Stop() { - callback_ = NULL; - } - --void AppCapturerLinux::CaptureFrame() { -+void AppCapturerX11::CaptureFrame() { - XErrorTrap error_trap(GetDisplay()); - - //Capture screen >> set root window as capture window -@@ -169,7 +105,7 @@ - } - } - --void AppCapturerLinux::FillDesktopFrameRegionWithColor(DesktopFrame* pDesktopFrame, Region rgn, uint32_t color) { -+void AppCapturerX11::FillDesktopFrameRegionWithColor(DesktopFrame* pDesktopFrame, Region rgn, uint32_t color) { - XErrorTrap error_trap(GetDisplay()); - - if (!pDesktopFrame) { -@@ -192,7 +128,7 @@ - } - } - --bool AppCapturerLinux::UpdateRegions() { -+bool AppCapturerX11::UpdateRegions() { - XErrorTrap error_trap(GetDisplay()); - - XSubtractRegion(rgn_visual_, rgn_visual_, rgn_visual_); -@@ -269,21 +205,19 @@ - return true; - } - --} // namespace -- - // static --AppCapturer* AppCapturer::Create(const DesktopCaptureOptions& options) { -- return new AppCapturerLinux(options); -+AppCapturer* AppCapturerX11::Create(const DesktopCaptureOptions& options) { -+ return new AppCapturerX11(options); - } - - // static --std::unique_ptr DesktopCapturer::CreateRawAppCapturer( -+std::unique_ptr AppCapturerX11::CreateRawAppCapturer( - const DesktopCaptureOptions& options) { - - if (!options.x_display()) - return nullptr; - -- std::unique_ptr capturer(new AppCapturerLinux(options)); -+ std::unique_ptr capturer(new AppCapturerX11(options)); - - return std::unique_ptr(std::move(capturer)); - } -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.h firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.h ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.h 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.h 2019-01-07 13:20:40.203768892 +0100 -@@ -0,0 +1,98 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef MODULES_DESKTOP_CAPTURE_APP_CAPTURER_X11_H_ -+#define MODULES_DESKTOP_CAPTURE_APP_CAPTURER_X11_H_ -+ -+#include -+#include -+#include -+#include -+ -+#include "webrtc/modules/desktop_capture/app_capturer.h" -+#include "webrtc/modules/desktop_capture/shared_desktop_frame.h" -+#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -+#include "webrtc/modules/desktop_capture/desktop_capturer.h" -+#include "webrtc/modules/desktop_capture/desktop_geometry.h" -+#include "webrtc/modules/desktop_capture/x11/shared_x_display.h" -+#include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" -+#include "webrtc/base/constructormagic.h" -+#include "webrtc/base/scoped_ref_ptr.h" -+ -+namespace webrtc { -+ -+class ScreenCapturerProxy : DesktopCapturer::Callback { -+public: -+ ScreenCapturerProxy() -+ : screen_capturer_(DesktopCapturer::CreateScreenCapturer(DesktopCaptureOptions::CreateDefault())) { -+ screen_capturer_->SelectSource(kFullDesktopScreenId); -+ screen_capturer_->Start(this); -+ } -+ void CaptureFrame() { screen_capturer_->CaptureFrame(); } -+ std::unique_ptr GetFrame() { return std::move(frame_); } -+ -+ // Callback interface -+ virtual void OnCaptureResult(DesktopCapturer::Result result, -+ std::unique_ptr frame) { -+ frame_ = std::move(frame); -+ } -+ -+protected: -+ std::unique_ptr screen_capturer_; -+ std::unique_ptr frame_; -+}; -+ -+class AppCapturerX11 : public AppCapturer { -+public: -+ AppCapturerX11(const DesktopCaptureOptions& options); -+ virtual ~AppCapturerX11(); -+ -+ static AppCapturer* Create(const DesktopCaptureOptions& options); -+ static std::unique_ptr CreateRawAppCapturer(const DesktopCaptureOptions& options); -+ -+ // AppCapturer interface. -+ virtual bool GetAppList(AppList* apps) override; -+ virtual bool SelectApp(ProcessId processId) override; -+ virtual bool BringAppToFront() override; -+ -+ // DesktopCapturer interface. -+ virtual void Start(Callback* callback) override; -+ virtual void Stop() override; -+ virtual void CaptureFrame() override; -+ virtual bool SelectSource(SourceId id) override -+ { -+ return SelectApp(static_cast(id)); -+ } -+ -+protected: -+ Display* GetDisplay() { return x_display_->display(); } -+ bool UpdateRegions(); -+ -+ void FillDesktopFrameRegionWithColor(DesktopFrame* pDesktopFrame,Region rgn, uint32_t color); -+private: -+ Callback* callback_; -+ ProcessId selected_process_; -+ -+ // Sample Mode -+ ScreenCapturerProxy screen_capturer_proxy_; -+ // Mask of foreground (non-app windows in front of selected) -+ Region rgn_mask_; -+ // Region of selected windows -+ Region rgn_visual_; -+ // Mask of background (desktop, non-app windows behind selected) -+ Region rgn_background_; -+ -+ rtc::scoped_refptr x_display_; -+ RTC_DISALLOW_COPY_AND_ASSIGN(AppCapturerX11); -+}; -+ -+} // namespace webrtc -+ -+#endif // MODULES_DESKTOP_CAPTURE_APP_CAPTURER_X11_H_ -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc 2019-01-07 13:20:40.143768292 +0100 -@@ -0,0 +1,849 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "webrtc/modules/desktop_capture/base_capturer_pipewire.h" -+ -+#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -+#include "webrtc/modules/desktop_capture/desktop_capturer.h" -+#include "webrtc/base/checks.h" -+#include "webrtc/base/logging.h" -+ -+namespace webrtc { -+ -+const char kDesktopBusName[] = "org.freedesktop.portal.Desktop"; -+const char kDesktopObjectPath[] = "/org/freedesktop/portal/desktop"; -+const char kDesktopRequestObjectPath[] = -+ "/org/freedesktop/portal/desktop/request"; -+const char kSessionInterfaceName[] = "org.freedesktop.portal.Session"; -+const char kRequestInterfaceName[] = "org.freedesktop.portal.Request"; -+const char kScreenCastInterfaceName[] = "org.freedesktop.portal.ScreenCast"; -+ -+const int kBytesPerPixelPw = 4; -+ -+// static -+void BaseCapturerPipeWire::OnStateChanged(void* data, -+ pw_remote_state old_state, -+ pw_remote_state state, -+ const char* error_message) { -+ BaseCapturerPipeWire* that = static_cast(data); -+ RTC_DCHECK(that); -+ -+ switch (state) { -+ case PW_REMOTE_STATE_ERROR: -+ LOG(LS_ERROR) << "PipeWire remote state error: " << error_message; -+ break; -+ case PW_REMOTE_STATE_CONNECTED: -+ LOG(LS_INFO) << "PipeWire remote state: connected."; -+ that->CreateReceivingStream(); -+ break; -+ case PW_REMOTE_STATE_CONNECTING: -+ LOG(LS_INFO) << "PipeWire remote state: connecting."; -+ break; -+ case PW_REMOTE_STATE_UNCONNECTED: -+ LOG(LS_INFO) << "PipeWire remote state: unconnected."; -+ break; -+ } -+} -+ -+// static -+void BaseCapturerPipeWire::OnStreamStateChanged(void* data, -+ pw_stream_state old_state, -+ pw_stream_state state, -+ const char* error_message) { -+ BaseCapturerPipeWire* that = static_cast(data); -+ RTC_DCHECK(that); -+ -+ switch (state) { -+ case PW_STREAM_STATE_ERROR: -+ LOG(LS_ERROR) << "PipeWire stream state error: " << error_message; -+ break; -+ case PW_STREAM_STATE_CONFIGURE: -+ pw_stream_set_active(that->pw_stream_, true); -+ break; -+ case PW_STREAM_STATE_UNCONNECTED: -+ case PW_STREAM_STATE_CONNECTING: -+ case PW_STREAM_STATE_READY: -+ case PW_STREAM_STATE_PAUSED: -+ case PW_STREAM_STATE_STREAMING: -+ break; -+ } -+} -+ -+// static -+void BaseCapturerPipeWire::OnStreamFormatChanged( -+ void* data, -+ const struct spa_pod* format) { -+ BaseCapturerPipeWire* that = static_cast(data); -+ RTC_DCHECK(that); -+ -+ LOG(LS_INFO) << "PipeWire stream format changed."; -+ -+ if (!format) { -+ pw_stream_finish_format(that->pw_stream_, /*res=*/0, /*params=*/nullptr, -+ /*n_params=*/0); -+ return; -+ } -+ -+ that->spa_video_format_ = new spa_video_info_raw(); -+ spa_format_video_raw_parse(format, that->spa_video_format_, -+ &that->pw_type_->format_video); -+ -+ auto width = that->spa_video_format_->size.width; -+ auto height = that->spa_video_format_->size.height; -+ auto stride = SPA_ROUND_UP_N(width * kBytesPerPixelPw, 4); -+ auto size = height * stride; -+ -+ uint8_t buffer[1024] = {}; -+ auto builder = spa_pod_builder{buffer, sizeof(buffer)}; -+ -+ // Setup buffers and meta header for new format. -+ const struct spa_pod* params[2]; -+ params[0] = reinterpret_cast(spa_pod_builder_object( -+ &builder, -+ // id to enumerate buffer requirements -+ that->pw_core_type_->param.idBuffers, -+ that->pw_core_type_->param_buffers.Buffers, -+ // Size: specified as integer (i) and set to specified size -+ ":", that->pw_core_type_->param_buffers.size, "i", size, -+ // Stride: specified as integer (i) and set to specified stride -+ ":", that->pw_core_type_->param_buffers.stride, "i", stride, -+ // Buffers: specifies how many buffers we want to deal with, set as -+ // integer (i) where preferred number is 8, then allowed number is defined -+ // as range (r) from min and max values and it is undecided (u) to allow -+ // negotiation -+ ":", that->pw_core_type_->param_buffers.buffers, "iru", 8, -+ SPA_POD_PROP_MIN_MAX(1, 32), -+ // Align: memory alignment of the buffer, set as integer (i) to specified -+ // value -+ ":", that->pw_core_type_->param_buffers.align, "i", 16)); -+ params[1] = reinterpret_cast(spa_pod_builder_object( -+ &builder, -+ // id to enumerate supported metadata -+ that->pw_core_type_->param.idMeta, that->pw_core_type_->param_meta.Meta, -+ // Type: specified as id or enum (I) -+ ":", that->pw_core_type_->param_meta.type, "I", -+ that->pw_core_type_->meta.Header, -+ // Size: size of the metadata, specified as integer (i) -+ ":", that->pw_core_type_->param_meta.size, "i", -+ sizeof(struct spa_meta_header))); -+ -+ pw_stream_finish_format(that->pw_stream_, /*res=*/0, params, /*n_params=*/2); -+} -+ -+// static -+void BaseCapturerPipeWire::OnStreamProcess(void* data) { -+ BaseCapturerPipeWire* that = static_cast(data); -+ RTC_DCHECK(that); -+ -+ pw_buffer* buf = nullptr; -+ -+ if (!(buf = pw_stream_dequeue_buffer(that->pw_stream_))) { -+ return; -+ } -+ -+ that->HandleBuffer(buf); -+ -+ pw_stream_queue_buffer(that->pw_stream_, buf); -+} -+ -+BaseCapturerPipeWire::BaseCapturerPipeWire(CaptureSourceType source_type) -+ : capture_source_type_(source_type) {} -+ -+BaseCapturerPipeWire::~BaseCapturerPipeWire() { -+ if (pw_main_loop_) { -+ pw_thread_loop_stop(pw_main_loop_); -+ } -+ -+ if (pw_type_) { -+ delete pw_type_; -+ } -+ -+ if (spa_video_format_) { -+ delete spa_video_format_; -+ } -+ -+ if (pw_stream_) { -+ pw_stream_destroy(pw_stream_); -+ } -+ -+ if (pw_remote_) { -+ pw_remote_destroy(pw_remote_); -+ } -+ -+ if (pw_core_) { -+ pw_core_destroy(pw_core_); -+ } -+ -+ if (pw_main_loop_) { -+ pw_thread_loop_destroy(pw_main_loop_); -+ } -+ -+ if (pw_loop_) { -+ pw_loop_destroy(pw_loop_); -+ } -+ -+ if (current_frame_) { -+ free(current_frame_); -+ } -+ -+ if (start_request_signal_id_) { -+ g_dbus_connection_signal_unsubscribe(connection_, start_request_signal_id_); -+ } -+ if (sources_request_signal_id_) { -+ g_dbus_connection_signal_unsubscribe(connection_, -+ sources_request_signal_id_); -+ } -+ if (session_request_signal_id_) { -+ g_dbus_connection_signal_unsubscribe(connection_, -+ session_request_signal_id_); -+ } -+ -+ if (session_handle_) { -+ GDBusMessage* message = g_dbus_message_new_method_call( -+ kDesktopBusName, session_handle_, kSessionInterfaceName, "Close"); -+ if (message) { -+ GError* error = nullptr; -+ g_dbus_connection_send_message(connection_, message, -+ G_DBUS_SEND_MESSAGE_FLAGS_NONE, -+ /*out_serial=*/nullptr, &error); -+ if (error) { -+ LOG(LS_ERROR) << "Failed to close the session: " << error->message; -+ g_error_free(error); -+ } -+ g_object_unref(message); -+ } -+ } -+ -+ g_free(start_handle_); -+ g_free(sources_handle_); -+ g_free(session_handle_); -+ g_free(portal_handle_); -+ -+ if (proxy_) { -+ g_clear_object(&proxy_); -+ } -+} -+ -+void BaseCapturerPipeWire::InitPortals() { -+ g_dbus_proxy_new_for_bus( -+ G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, /*info=*/nullptr, -+ kDesktopBusName, kDesktopObjectPath, kScreenCastInterfaceName, -+ /*cancellable=*/nullptr, -+ reinterpret_cast(OnProxyRequested), this); -+} -+ -+void BaseCapturerPipeWire::InitPipeWire() { -+ pw_init(/*argc=*/nullptr, /*argc=*/nullptr); -+ -+ pw_loop_ = pw_loop_new(/*properties=*/nullptr); -+ pw_main_loop_ = pw_thread_loop_new(pw_loop_, "pipewire-main-loop"); -+ -+ pw_core_ = pw_core_new(pw_loop_, /*properties=*/nullptr); -+ pw_core_type_ = pw_core_get_type(pw_core_); -+ pw_remote_ = pw_remote_new(pw_core_, nullptr, /*user_data_size=*/0); -+ -+ InitPipeWireTypes(); -+ -+ // Initialize event handlers, remote end and stream-related. -+ pw_remote_events_.version = PW_VERSION_REMOTE_EVENTS; -+ pw_remote_events_.state_changed = &OnStateChanged; -+ -+ pw_stream_events_.version = PW_VERSION_STREAM_EVENTS; -+ pw_stream_events_.state_changed = &OnStreamStateChanged; -+ pw_stream_events_.format_changed = &OnStreamFormatChanged; -+ pw_stream_events_.process = &OnStreamProcess; -+ -+ pw_remote_add_listener(pw_remote_, &spa_remote_listener_, &pw_remote_events_, -+ this); -+ pw_remote_connect_fd(pw_remote_, pw_fd_); -+ -+ if (pw_thread_loop_start(pw_main_loop_) < 0) { -+ LOG(LS_ERROR) << "Failed to start main PipeWire loop"; -+ portal_init_failed_ = true; -+ } -+} -+ -+void BaseCapturerPipeWire::InitPipeWireTypes() { -+ spa_type_map* map = pw_core_type_->map; -+ pw_type_ = new PipeWireType(); -+ -+ spa_type_media_type_map(map, &pw_type_->media_type); -+ spa_type_media_subtype_map(map, &pw_type_->media_subtype); -+ spa_type_format_video_map(map, &pw_type_->format_video); -+ spa_type_video_format_map(map, &pw_type_->video_format); -+} -+ -+void BaseCapturerPipeWire::CreateReceivingStream() { -+ spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1}; -+ spa_rectangle pwScreenBounds = -+ spa_rectangle{static_cast(desktop_size_.width()), -+ static_cast(desktop_size_.height())}; -+ -+ spa_fraction pwFrameRateMin = spa_fraction{0, 1}; -+ spa_fraction pwFrameRateMax = spa_fraction{60, 1}; -+ -+ pw_properties* reuseProps = pw_properties_new("pipewire.client.reuse", "1", -+ /*end of varargs*/ nullptr); -+ pw_stream_ = pw_stream_new(pw_remote_, "webrtc-consume-stream", reuseProps); -+ -+ uint8_t buffer[1024] = {}; -+ const spa_pod* params[1]; -+ spa_pod_builder builder = spa_pod_builder{buffer, sizeof(buffer)}; -+ params[0] = reinterpret_cast(spa_pod_builder_object( -+ &builder, -+ // id to enumerate formats -+ pw_core_type_->param.idEnumFormat, pw_core_type_->spa_format, "I", -+ pw_type_->media_type.video, "I", pw_type_->media_subtype.raw, -+ // Video format: specified as id or enum (I), preferred format is BGRx, -+ // then allowed formats are enumerated (e) and the format is undecided (u) -+ // to allow negotiation -+ ":", pw_type_->format_video.format, "Ieu", pw_type_->video_format.BGRx, -+ SPA_POD_PROP_ENUM(2, pw_type_->video_format.RGBx, -+ pw_type_->video_format.BGRx), -+ // Video size: specified as rectangle (R), preferred size is specified as -+ // first parameter, then allowed size is defined as range (r) from min and -+ // max values and the format is undecided (u) to allow negotiation -+ ":", pw_type_->format_video.size, "Rru", &pwScreenBounds, 2, -+ &pwMinScreenBounds, &pwScreenBounds, -+ // Frame rate: specified as fraction (F) and set to minimum frame rate -+ // value -+ ":", pw_type_->format_video.framerate, "F", &pwFrameRateMin, -+ // Max frame rate: specified as fraction (F), preferred frame rate is set -+ // to maximum value, then allowed frame rate is defined as range (r) from -+ // min and max values and it is undecided (u) to allow negotiation -+ ":", pw_type_->format_video.max_framerate, "Fru", &pwFrameRateMax, 2, -+ &pwFrameRateMin, &pwFrameRateMax)); -+ -+ pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_, -+ this); -+ pw_stream_flags flags = static_cast( -+ PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE | -+ PW_STREAM_FLAG_MAP_BUFFERS); -+ if (pw_stream_connect(pw_stream_, PW_DIRECTION_INPUT, /*port_path=*/nullptr, -+ flags, params, -+ /*n_params=*/1) != 0) { -+ LOG(LS_ERROR) << "Could not connect receiving stream."; -+ portal_init_failed_ = true; -+ return; -+ } -+} -+ -+void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) { -+ spa_buffer* spaBuffer = buffer->buffer; -+ void* src = nullptr; -+ -+ if (!(src = spaBuffer->datas[0].data)) { -+ return; -+ } -+ -+ uint32_t maxSize = spaBuffer->datas[0].maxsize; -+ int32_t srcStride = spaBuffer->datas[0].chunk->stride; -+ if (srcStride != (desktop_size_.width() * kBytesPerPixelPw)) { -+ LOG(LS_ERROR) << "Got buffer with stride different from screen stride: " -+ << srcStride -+ << " != " << (desktop_size_.width() * kBytesPerPixelPw); -+ portal_init_failed_ = true; -+ return; -+ } -+ -+ if (!current_frame_) { -+ current_frame_ = static_cast(malloc(maxSize)); -+ } -+ RTC_DCHECK(current_frame_ != nullptr); -+ -+ // If both sides decided to go with the RGBx format we need to convert it to -+ // BGRx to match color format expected by WebRTC. -+ if (spa_video_format_->format == pw_type_->video_format.RGBx) { -+ uint8_t* tempFrame = static_cast(malloc(maxSize)); -+ std::memcpy(tempFrame, src, maxSize); -+ ConvertRGBxToBGRx(tempFrame, maxSize); -+ std::memcpy(current_frame_, tempFrame, maxSize); -+ free(tempFrame); -+ } else { -+ std::memcpy(current_frame_, src, maxSize); -+ } -+} -+ -+void BaseCapturerPipeWire::ConvertRGBxToBGRx(uint8_t* frame, uint32_t size) { -+ // Change color format for KDE KWin which uses RGBx and not BGRx -+ for (uint32_t i = 0; i < size; i += 4) { -+ uint8_t tempR = frame[i]; -+ uint8_t tempB = frame[i + 2]; -+ frame[i] = tempB; -+ frame[i + 2] = tempR; -+ } -+} -+ -+guint BaseCapturerPipeWire::SetupRequestResponseSignal( -+ const gchar* object_path, -+ GDBusSignalCallback callback) { -+ return g_dbus_connection_signal_subscribe( -+ connection_, kDesktopBusName, kRequestInterfaceName, "Response", -+ object_path, /*arg0=*/nullptr, G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE, -+ callback, this, /*user_data_free_func=*/nullptr); -+} -+ -+// static -+void BaseCapturerPipeWire::OnProxyRequested(GObject* /*object*/, -+ GAsyncResult* result, -+ gpointer user_data) { -+ BaseCapturerPipeWire* that = -+ static_cast(user_data); -+ RTC_DCHECK(that); -+ -+ GError* error = nullptr; -+ that->proxy_ = g_dbus_proxy_new_finish(result, &error); -+ if (!that->proxy_) { -+ LOG(LS_ERROR) << "Failed to create a proxy for the screen cast portal: " -+ << error->message; -+ g_error_free(error); -+ that->portal_init_failed_ = true; -+ return; -+ } -+ that->connection_ = g_dbus_proxy_get_connection(that->proxy_); -+ -+ LOG(LS_INFO) << "Created proxy for the screen cast portal."; -+ that->SessionRequest(); -+} -+ -+// static -+gchar* BaseCapturerPipeWire::PrepareSignalHandle(GDBusConnection* connection, -+ const gchar* token) { -+ gchar* sender = g_strdup(g_dbus_connection_get_unique_name(connection) + 1); -+ for (int i = 0; sender[i]; i++) { -+ if (sender[i] == '.') { -+ sender[i] = '_'; -+ } -+ } -+ -+ gchar* handle = g_strconcat(kDesktopRequestObjectPath, "/", sender, "/", -+ token, /*end of varargs*/ nullptr); -+ g_free(sender); -+ -+ return handle; -+} -+ -+void BaseCapturerPipeWire::SessionRequest() { -+ GVariantBuilder builder; -+ gchar* variant_string; -+ -+ g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); -+ variant_string = -+ g_strdup_printf("webrtc_session%d", g_random_int_range(0, G_MAXINT)); -+ g_variant_builder_add(&builder, "{sv}", "session_handle_token", -+ g_variant_new_string(variant_string)); -+ g_free(variant_string); -+ variant_string = g_strdup_printf("webrtc%d", g_random_int_range(0, G_MAXINT)); -+ g_variant_builder_add(&builder, "{sv}", "handle_token", -+ g_variant_new_string(variant_string)); -+ -+ portal_handle_ = PrepareSignalHandle(connection_, variant_string); -+ session_request_signal_id_ = SetupRequestResponseSignal( -+ portal_handle_, OnSessionRequestResponseSignal); -+ g_free(variant_string); -+ -+ LOG(LS_INFO) << "Screen cast session requested."; -+ g_dbus_proxy_call( -+ proxy_, "CreateSession", g_variant_new("(a{sv})", &builder), -+ G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, /*cancellable=*/nullptr, -+ reinterpret_cast(OnSessionRequested), this); -+} -+ -+// static -+void BaseCapturerPipeWire::OnSessionRequested(GDBusConnection* connection, -+ GAsyncResult* result, -+ gpointer user_data) { -+ BaseCapturerPipeWire* that = -+ static_cast(user_data); -+ RTC_DCHECK(that); -+ -+ GError* error = nullptr; -+ GVariant* variant = g_dbus_proxy_call_finish(that->proxy_, result, &error); -+ if (!variant) { -+ LOG(LS_ERROR) << "Failed to create a screen cast session: " -+ << error->message; -+ g_error_free(error); -+ that->portal_init_failed_ = true; -+ return; -+ } -+ LOG(LS_INFO) << "Initializing the screen cast session."; -+ -+ gchar* handle = nullptr; -+ g_variant_get_child(variant, 0, "o", &handle); -+ g_variant_unref(variant); -+ if (!handle) { -+ LOG(LS_ERROR) << "Failed to initialize the screen cast session."; -+ if (that->session_request_signal_id_) { -+ g_dbus_connection_signal_unsubscribe(connection, -+ that->session_request_signal_id_); -+ that->session_request_signal_id_ = 0; -+ } -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ g_free(handle); -+ -+ LOG(LS_INFO) << "Subscribing to the screen cast session."; -+} -+ -+// static -+void BaseCapturerPipeWire::OnSessionRequestResponseSignal( -+ GDBusConnection* connection, -+ const gchar* sender_name, -+ const gchar* object_path, -+ const gchar* interface_name, -+ const gchar* signal_name, -+ GVariant* parameters, -+ gpointer user_data) { -+ BaseCapturerPipeWire* that = -+ static_cast(user_data); -+ RTC_DCHECK(that); -+ -+ -+ LOG(LS_INFO) -+ << "Received response for the screen cast session subscription."; -+ -+ guint32 portal_response; -+ GVariant* response_data; -+ g_variant_get(parameters, "(u@a{sv})", &portal_response, &response_data); -+ g_variant_lookup(response_data, "session_handle", "s", -+ &that->session_handle_); -+ g_variant_unref(response_data); -+ -+ if (!that->session_handle_ || portal_response) { -+ LOG(LS_ERROR) -+ << "Failed to request the screen cast session subscription."; -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ that->SourcesRequest(); -+} -+ -+void BaseCapturerPipeWire::SourcesRequest() { -+ GVariantBuilder builder; -+ gchar* variant_string; -+ -+ g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); -+ // We want to record monitor content. -+ g_variant_builder_add(&builder, "{sv}", "types", -+ g_variant_new_uint32(capture_source_type_)); -+ // We don't want to allow selection of multiple sources. -+ g_variant_builder_add(&builder, "{sv}", "multiple", -+ g_variant_new_boolean(false)); -+ variant_string = g_strdup_printf("webrtc%d", g_random_int_range(0, G_MAXINT)); -+ g_variant_builder_add(&builder, "{sv}", "handle_token", -+ g_variant_new_string(variant_string)); -+ -+ sources_handle_ = PrepareSignalHandle(connection_, variant_string); -+ sources_request_signal_id_ = SetupRequestResponseSignal( -+ sources_handle_, OnSourcesRequestResponseSignal); -+ g_free(variant_string); -+ -+ LOG(LS_INFO) << "Requesting sources from the screen cast session."; -+ g_dbus_proxy_call( -+ proxy_, "SelectSources", -+ g_variant_new("(oa{sv})", session_handle_, &builder), -+ G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, /*cancellable=*/nullptr, -+ reinterpret_cast(OnSourcesRequested), this); -+} -+ -+// static -+void BaseCapturerPipeWire::OnSourcesRequested(GDBusConnection* connection, -+ GAsyncResult* result, -+ gpointer user_data) { -+ BaseCapturerPipeWire* that = -+ static_cast(user_data); -+ RTC_DCHECK(that); -+ -+ GError* error = nullptr; -+ GVariant* variant = g_dbus_proxy_call_finish(that->proxy_, result, &error); -+ if (!variant) { -+ LOG(LS_ERROR) << "Failed to request the sources: " << error->message; -+ g_error_free(error); -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ LOG(LS_INFO) << "Sources requested from the screen cast session."; -+ -+ gchar* handle = nullptr; -+ g_variant_get_child(variant, 0, "o", &handle); -+ g_variant_unref(variant); -+ if (!handle) { -+ LOG(LS_ERROR) << "Failed to initialize the screen cast session."; -+ if (that->sources_request_signal_id_) { -+ g_dbus_connection_signal_unsubscribe(connection, -+ that->sources_request_signal_id_); -+ that->sources_request_signal_id_ = 0; -+ } -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ g_free(handle); -+ -+ LOG(LS_INFO) << "Subscribed to sources signal."; -+} -+ -+// static -+void BaseCapturerPipeWire::OnSourcesRequestResponseSignal( -+ GDBusConnection* connection, -+ const gchar* sender_name, -+ const gchar* object_path, -+ const gchar* interface_name, -+ const gchar* signal_name, -+ GVariant* parameters, -+ gpointer user_data) { -+ BaseCapturerPipeWire* that = -+ static_cast(user_data); -+ RTC_DCHECK(that); -+ -+ guint32 portal_response; -+ g_variant_get(parameters, "(u@a{sv})", &portal_response, nullptr); -+ if (portal_response) { -+ LOG(LS_ERROR) -+ << "Failed to select sources for the screen cast session."; -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ LOG(LS_INFO) << "Received sources signal from session."; -+ that->StartRequest(); -+} -+ -+void BaseCapturerPipeWire::StartRequest() { -+ GVariantBuilder builder; -+ gchar* variant_string; -+ -+ g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); -+ variant_string = g_strdup_printf("webrtc%d", g_random_int_range(0, G_MAXINT)); -+ g_variant_builder_add(&builder, "{sv}", "handle_token", -+ g_variant_new_string(variant_string)); -+ -+ start_handle_ = PrepareSignalHandle(connection_, variant_string); -+ start_request_signal_id_ = -+ SetupRequestResponseSignal(start_handle_, OnStartRequestResponseSignal); -+ g_free(variant_string); -+ -+ // "Identifier for the application window", this is Wayland, so not "x11:...". -+ const gchar parent_window[] = ""; -+ -+ LOG(LS_INFO) << "Starting the screen cast session."; -+ g_dbus_proxy_call( -+ proxy_, "Start", -+ g_variant_new("(osa{sv})", session_handle_, parent_window, &builder), -+ G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, /*cancellable=*/nullptr, -+ reinterpret_cast(OnStartRequested), this); -+} -+ -+// static -+void BaseCapturerPipeWire::OnStartRequested(GDBusConnection* connection, -+ GAsyncResult* result, -+ gpointer user_data) { -+ BaseCapturerPipeWire* that = -+ static_cast(user_data); -+ RTC_DCHECK(that); -+ -+ GError* error = nullptr; -+ GVariant* variant = g_dbus_proxy_call_finish(that->proxy_, result, &error); -+ if (!variant) { -+ LOG(LS_ERROR) << "Failed to start the screen cast session: " -+ << error->message; -+ g_error_free(error); -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ LOG(LS_INFO) << "Initializing the start of the screen cast session."; -+ -+ gchar* handle = nullptr; -+ g_variant_get_child(variant, 0, "o", &handle); -+ g_variant_unref(variant); -+ if (!handle) { -+ LOG(LS_ERROR) -+ << "Failed to initialize the start of the screen cast session."; -+ if (that->start_request_signal_id_) { -+ g_dbus_connection_signal_unsubscribe(connection, -+ that->start_request_signal_id_); -+ that->start_request_signal_id_ = 0; -+ } -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ g_free(handle); -+ -+ LOG(LS_INFO) << "Subscribed to the start signal."; -+} -+ -+// static -+void BaseCapturerPipeWire::OnStartRequestResponseSignal( -+ GDBusConnection* connection, -+ const gchar* sender_name, -+ const gchar* object_path, -+ const gchar* interface_name, -+ const gchar* signal_name, -+ GVariant* parameters, -+ gpointer user_data) { -+ BaseCapturerPipeWire* that = -+ static_cast(user_data); -+ RTC_DCHECK(that); -+ -+ LOG(LS_INFO) << "Start signal received."; -+ guint32 portal_response; -+ GVariant* response_data; -+ GVariantIter* iter = nullptr; -+ g_variant_get(parameters, "(u@a{sv})", &portal_response, &response_data); -+ if (portal_response || !response_data) { -+ LOG(LS_ERROR) << "Failed to start the screen cast session."; -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ // Array of PipeWire streams. See -+ // https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.portal.ScreenCast.xml -+ // documentation for . -+ if (g_variant_lookup(response_data, "streams", "a(ua{sv})", &iter)) { -+ GVariant* variant; -+ -+ while (g_variant_iter_next(iter, "@(ua{sv})", &variant)) { -+ guint32 stream_id; -+ gint32 width; -+ gint32 height; -+ GVariant* options; -+ -+ g_variant_get(variant, "(u@a{sv})", &stream_id, &options); -+ RTC_DCHECK(options != nullptr); -+ -+ g_variant_lookup(options, "size", "(ii)", &width, &height); -+ -+ that->desktop_size_.set(width, height); -+ -+ g_variant_unref(options); -+ g_variant_unref(variant); -+ } -+ } -+ g_variant_iter_free(iter); -+ g_variant_unref(response_data); -+ -+ that->OpenPipeWireRemote(); -+} -+ -+void BaseCapturerPipeWire::OpenPipeWireRemote() { -+ GVariantBuilder builder; -+ g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); -+ -+ LOG(LS_INFO) << "Opening the PipeWire remote."; -+ -+ g_dbus_proxy_call_with_unix_fd_list( -+ proxy_, "OpenPipeWireRemote", -+ g_variant_new("(oa{sv})", session_handle_, &builder), -+ G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, /*fd_list=*/nullptr, -+ /*cancellable=*/nullptr, -+ reinterpret_cast(OnOpenPipeWireRemoteRequested), -+ this); -+} -+ -+// static -+void BaseCapturerPipeWire::OnOpenPipeWireRemoteRequested( -+ GDBusConnection* connection, -+ GAsyncResult* result, -+ gpointer user_data) { -+ BaseCapturerPipeWire* that = -+ static_cast(user_data); -+ RTC_DCHECK(that); -+ -+ GError* error = nullptr; -+ GUnixFDList* outlist = nullptr; -+ GVariant* variant = g_dbus_proxy_call_with_unix_fd_list_finish( -+ that->proxy_, &outlist, result, &error); -+ if (!variant) { -+ LOG(LS_ERROR) << "Failed to open the PipeWire remote: " -+ << error->message; -+ g_error_free(error); -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ gint32 index; -+ g_variant_get(variant, "(h)", &index); -+ -+ if ((that->pw_fd_ = g_unix_fd_list_get(outlist, index, &error)) == -1) { -+ LOG(LS_ERROR) << "Failed to get file descriptor from the list: " -+ << error->message; -+ g_error_free(error); -+ g_variant_unref(variant); -+ that->portal_init_failed_ = true; -+ return; -+ } -+ -+ g_variant_unref(variant); -+ g_object_unref(outlist); -+ -+ that->InitPipeWire(); -+ LOG(LS_INFO) << "PipeWire remote opened."; -+} -+ -+void BaseCapturerPipeWire::Start(Callback* callback) { -+ RTC_DCHECK(!callback_); -+ RTC_DCHECK(callback); -+ -+ InitPortals(); -+ -+ callback_ = callback; -+} -+ -+void BaseCapturerPipeWire::CaptureFrame() { -+ if (portal_init_failed_) { -+ callback_->OnCaptureResult(Result::ERROR_PERMANENT, nullptr); -+ return; -+ } -+ -+ if (!current_frame_) { -+ callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); -+ return; -+ } -+ -+ std::unique_ptr result(new BasicDesktopFrame(desktop_size_)); -+ result->CopyPixelsFrom( -+ current_frame_, (desktop_size_.width() * kBytesPerPixelPw), -+ DesktopRect::MakeWH(desktop_size_.width(), desktop_size_.height())); -+ if (!result) { -+ callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); -+ return; -+ } -+ callback_->OnCaptureResult(Result::SUCCESS, std::move(result)); -+} -+ -+bool BaseCapturerPipeWire::GetSourceList(SourceList* sources) { -+ RTC_DCHECK(sources->size() == 0); -+ // List of available screens is already presented by the xdg-desktop-portal. -+ // But we have to add an empty source as the code expects it. -+ sources->push_back({0}); -+ return true; -+} -+ -+bool BaseCapturerPipeWire::SelectSource(SourceId id) { -+ // Screen selection is handled by the xdg-desktop-portal. -+ return true; -+} -+ -+} // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h 2019-01-07 13:20:40.141768272 +0100 -@@ -0,0 +1,167 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef MODULES_DESKTOP_CAPTURE_BASE_CAPTURER_PIPEWIRE_H_ -+#define MODULES_DESKTOP_CAPTURE_BASE_CAPTURER_PIPEWIRE_H_ -+ -+#include -+#define typeof __typeof__ -+#include -+#include -+ -+#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -+#include "webrtc/modules/desktop_capture/desktop_capturer.h" -+ -+namespace webrtc { -+ -+class PipeWireType { -+ public: -+ spa_type_media_type media_type; -+ spa_type_media_subtype media_subtype; -+ spa_type_format_video format_video; -+ spa_type_video_format video_format; -+}; -+ -+class BaseCapturerPipeWire : public DesktopCapturer { -+ public: -+ enum CaptureSourceType { Screen = 1, Window }; -+ -+ explicit BaseCapturerPipeWire(CaptureSourceType source_type); -+ ~BaseCapturerPipeWire() override; -+ -+ // DesktopCapturer interface. -+ void Start(Callback* delegate) override; -+ void Stop() override { callback_ = nullptr; } -+ void CaptureFrame() override; -+ bool GetSourceList(SourceList* sources) override; -+ bool SelectSource(SourceId id) override; -+ -+ private: -+ // PipeWire types --> -+ pw_core* pw_core_ = nullptr; -+ pw_type* pw_core_type_ = nullptr; -+ pw_stream* pw_stream_ = nullptr; -+ pw_remote* pw_remote_ = nullptr; -+ pw_loop* pw_loop_ = nullptr; -+ pw_thread_loop* pw_main_loop_ = nullptr; -+ PipeWireType* pw_type_ = nullptr; -+ -+ spa_hook spa_stream_listener_ = {}; -+ spa_hook spa_remote_listener_ = {}; -+ -+ pw_stream_events pw_stream_events_ = {}; -+ pw_remote_events pw_remote_events_ = {}; -+ -+ spa_video_info_raw* spa_video_format_ = nullptr; -+ -+ gint32 pw_fd_ = -1; -+ -+ CaptureSourceType capture_source_type_ = -+ BaseCapturerPipeWire::CaptureSourceType::Screen; -+ -+ // <-- end of PipeWire types -+ -+ GDBusConnection* connection_ = nullptr; -+ GDBusProxy* proxy_ = nullptr; -+ gchar* portal_handle_ = nullptr; -+ gchar* session_handle_ = nullptr; -+ gchar* sources_handle_ = nullptr; -+ gchar* start_handle_ = nullptr; -+ guint session_request_signal_id_ = 0; -+ guint sources_request_signal_id_ = 0; -+ guint start_request_signal_id_ = 0; -+ -+ DesktopSize desktop_size_ = {}; -+ DesktopCaptureOptions options_ = {}; -+ -+ uint8_t* current_frame_ = nullptr; -+ Callback* callback_ = nullptr; -+ -+ bool portal_init_failed_ = false; -+ -+ void InitPortals(); -+ void InitPipeWire(); -+ void InitPipeWireTypes(); -+ -+ void CreateReceivingStream(); -+ void HandleBuffer(pw_buffer* buffer); -+ -+ void ConvertRGBxToBGRx(uint8_t* frame, uint32_t size); -+ -+ static void OnStateChanged(void* data, -+ pw_remote_state old_state, -+ pw_remote_state state, -+ const char* error); -+ static void OnStreamStateChanged(void* data, -+ pw_stream_state old_state, -+ pw_stream_state state, -+ const char* error_message); -+ -+ static void OnStreamFormatChanged(void* data, const struct spa_pod* format); -+ static void OnStreamProcess(void* data); -+ static void OnNewBuffer(void* data, uint32_t id); -+ -+ guint SetupRequestResponseSignal(const gchar* object_path, -+ GDBusSignalCallback callback); -+ -+ static void OnProxyRequested(GObject* object, -+ GAsyncResult* result, -+ gpointer user_data); -+ -+ static gchar* PrepareSignalHandle(GDBusConnection* connection, -+ const gchar* token); -+ -+ void SessionRequest(); -+ static void OnSessionRequested(GDBusConnection* connection, -+ GAsyncResult* result, -+ gpointer user_data); -+ static void OnSessionRequestResponseSignal(GDBusConnection* connection, -+ const gchar* sender_name, -+ const gchar* object_path, -+ const gchar* interface_name, -+ const gchar* signal_name, -+ GVariant* parameters, -+ gpointer user_data); -+ -+ void SourcesRequest(); -+ static void OnSourcesRequested(GDBusConnection* connection, -+ GAsyncResult* result, -+ gpointer user_data); -+ static void OnSourcesRequestResponseSignal(GDBusConnection* connection, -+ const gchar* sender_name, -+ const gchar* object_path, -+ const gchar* interface_name, -+ const gchar* signal_name, -+ GVariant* parameters, -+ gpointer user_data); -+ -+ void StartRequest(); -+ static void OnStartRequested(GDBusConnection* connection, -+ GAsyncResult* result, -+ gpointer user_data); -+ static void OnStartRequestResponseSignal(GDBusConnection* connection, -+ const gchar* sender_name, -+ const gchar* object_path, -+ const gchar* interface_name, -+ const gchar* signal_name, -+ GVariant* parameters, -+ gpointer user_data); -+ -+ void OpenPipeWireRemote(); -+ static void OnOpenPipeWireRemoteRequested(GDBusConnection* connection, -+ GAsyncResult* result, -+ gpointer user_data); -+ -+ RTC_DISALLOW_COPY_AND_ASSIGN(BaseCapturerPipeWire); -+}; -+ -+} // namespace webrtc -+ -+#endif // MODULES_DESKTOP_CAPTURE_BASE_CAPTURER_PIPEWIRE_H_ -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build 2019-01-07 13:16:46.410433280 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build 2019-01-07 13:20:40.146768322 +0100 -@@ -143,14 +143,26 @@ - "/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.cc" - ] - -+# Common Linux stuff between X11 and PipeWire - if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_NSS_CERTS"] = "1" -- DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - -+ UNIFIED_SOURCES += [ -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc", -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc", -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc", -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc", -+ ] -+ -+# X11 specific files -+if CONFIG["OS_TARGET"] == "Linux": -+ -+ DEFINES["USE_X11"] = "1" -+ - OS_LIBS += [ - "rt", - "X11", -@@ -177,6 +189,27 @@ - "/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.cc" - ] - -+# PipeWire specific files -+if CONFIG["OS_TARGET"] == "Linux": -+ -+ DEFINES["WEBRTC_USE_PIPEWIRE"] = "1" -+ -+ OS_LIBS += [ -+ "rt", -+ "pipewire-0.2", -+ "glib-2.0", -+ "gio-2.0", -+ "gobject-2.0" -+ ] -+ -+ CXXFLAGS += CONFIG['TK_CFLAGS'] -+ -+ UNIFIED_SOURCES += [ -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc", -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc", -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc" -+ ] -+ - if CONFIG["OS_TARGET"] == "NetBSD": - - DEFINES["USE_X11"] = "1" -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h 2019-01-07 13:16:46.361432790 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h 2019-01-07 13:20:40.144768302 +0100 -@@ -107,6 +107,11 @@ - } - #endif - -+#if defined(WEBRTC_USE_PIPEWIRE) -+ bool allow_pipewire() const { return allow_pipewire_; } -+ void set_allow_pipewire(bool allow) { allow_pipewire_ = allow; } -+#endif -+ - private: - #if defined(USE_X11) - rtc::scoped_refptr x_display_; -@@ -129,6 +134,9 @@ - #endif - bool disable_effects_ = true; - bool detect_updated_region_ = false; -+#if defined(WEBRTC_USE_PIPEWIRE) -+ bool allow_pipewire_ = true; -+#endif - }; - - } // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc 2019-01-07 13:16:46.389433070 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc 2019-01-07 13:20:40.148768342 +0100 -@@ -66,4 +66,17 @@ - return capturer; - } - -+#if defined(WEBRTC_USE_PIPEWIRE) || defined(USE_X11) -+bool DesktopCapturer::IsRunningUnderWayland() { -+ const char* xdg_session_type = getenv("XDG_SESSION_TYPE"); -+ if (!xdg_session_type || strncmp(xdg_session_type, "wayland", 7) != 0) -+ return false; -+ -+ if (!(getenv("WAYLAND_DISPLAY"))) -+ return false; -+ -+ return true; -+} -+#endif -+ - } // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h 2019-01-07 13:16:46.394433120 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h 2019-01-07 13:20:40.147768332 +0100 -@@ -129,6 +129,10 @@ - static std::unique_ptr CreateAppCapturer( - const DesktopCaptureOptions& options); - -+#if defined(WEBRTC_USE_PIPEWIRE) || defined(USE_X11) -+ static bool IsRunningUnderWayland(); -+#endif -+ - protected: - // CroppingWindowCapturer needs to create raw capturers without wrappers, so - // the following two functions are protected. -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc 2019-01-07 13:20:40.165768512 +0100 -@@ -0,0 +1,40 @@ -+/* -+ * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h" -+ -+#if defined(USE_X11) -+#include "webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.h" -+#endif // defined(USE_X11) -+ -+namespace webrtc { -+ -+// static -+MouseCursorMonitor* MouseCursorMonitor::CreateForWindow( -+ const DesktopCaptureOptions& options, WindowId window) { -+#if defined(USE_X11) -+ return MouseCursorMonitorX11::CreateForWindow(options, window); -+#else -+ return nullptr; -+#endif // defined(USE_X11) -+} -+ -+// static -+MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( -+ const DesktopCaptureOptions& options, -+ ScreenId screen) { -+#if defined(USE_X11) -+ return MouseCursorMonitorX11::CreateForScreen(options, screen); -+#else -+ return nullptr; -+#endif // defined(USE_X11) -+} -+ -+} // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc 2019-01-07 13:16:46.368432860 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc 2019-01-07 13:20:40.166768522 +0100 -@@ -16,6 +16,8 @@ - #include - #include - -+#include "webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.h" -+ - #include "webrtc/modules/desktop_capture/desktop_capture_options.h" - #include "webrtc/modules/desktop_capture/desktop_frame.h" - #include "webrtc/modules/desktop_capture/mouse_cursor.h" -@@ -59,38 +61,6 @@ - - namespace webrtc { - --class MouseCursorMonitorX11 : public MouseCursorMonitor, -- public SharedXDisplay::XEventHandler { -- public: -- MouseCursorMonitorX11(const DesktopCaptureOptions& options, Window window, Window inner_window); -- ~MouseCursorMonitorX11() override; -- -- void Start(Callback* callback, Mode mode) override; -- void Stop() override; -- void Capture() override; -- -- private: -- // SharedXDisplay::XEventHandler interface. -- bool HandleXEvent(const XEvent& event) override; -- -- Display* display() { return x_display_->display(); } -- -- // Captures current cursor shape and stores it in |cursor_shape_|. -- void CaptureCursor(); -- -- rtc::scoped_refptr x_display_; -- Callback* callback_; -- Mode mode_; -- Window window_; -- Window inner_window_; -- -- bool have_xfixes_; -- int xfixes_event_base_; -- int xfixes_error_base_; -- -- std::unique_ptr cursor_shape_; --}; -- - MouseCursorMonitorX11::MouseCursorMonitorX11( - const DesktopCaptureOptions& options, - Window window, Window inner_window) -@@ -244,7 +214,7 @@ - } - - // static --MouseCursorMonitor* MouseCursorMonitor::CreateForWindow( -+MouseCursorMonitor* MouseCursorMonitorX11::CreateForWindow( - const DesktopCaptureOptions& options, WindowId window) { - if (!options.x_display()) - return NULL; -@@ -254,7 +224,7 @@ - return new MouseCursorMonitorX11(options, outer_window, window); - } - --MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( -+MouseCursorMonitor* MouseCursorMonitorX11::CreateForScreen( - const DesktopCaptureOptions& options, - ScreenId screen) { - if (!options.x_display()) -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.h firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.h ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.h 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.h 2019-01-07 13:20:40.164768502 +0100 -@@ -0,0 +1,63 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_MONITOR_X11_H_ -+#define MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_MONITOR_X11_H_ -+ -+#include -+#include -+ -+#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -+#include "webrtc/modules/desktop_capture/desktop_capture_types.h" -+#include "webrtc/modules/desktop_capture/x11/shared_x_display.h" -+#include "webrtc/modules/desktop_capture/mouse_cursor.h" -+#include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h" -+#include "webrtc/base/scoped_ref_ptr.h" -+ -+namespace webrtc { -+ -+class MouseCursorMonitorX11 : public MouseCursorMonitor, -+ public SharedXDisplay::XEventHandler { -+ public: -+ MouseCursorMonitorX11(const DesktopCaptureOptions& options, Window window, Window inner_window); -+ ~MouseCursorMonitorX11() override; -+ -+ void Start(Callback* callback, Mode mode) override; -+ void Stop() override; -+ void Capture() override; -+ -+ static MouseCursorMonitor* CreateForWindow(const DesktopCaptureOptions& options, WindowId window); -+ static MouseCursorMonitor* CreateForScreen(const DesktopCaptureOptions& options, ScreenId screen); -+ -+ private: -+ // SharedXDisplay::XEventHandler interface. -+ bool HandleXEvent(const XEvent& event) override; -+ -+ Display* display() { return x_display_->display(); } -+ -+ // Captures current cursor shape and stores it in |cursor_shape_|. -+ void CaptureCursor(); -+ -+ rtc::scoped_refptr x_display_; -+ Callback* callback_; -+ Mode mode_; -+ Window window_; -+ Window inner_window_; -+ -+ bool have_xfixes_; -+ int xfixes_event_base_; -+ int xfixes_error_base_; -+ -+ std::unique_ptr cursor_shape_; -+}; -+ -+} // namespace webrtc -+ -+#endif // MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_MONITOR_X11_H_ -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc 2019-01-07 13:20:40.170768562 +0100 -@@ -0,0 +1,40 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -+#include "webrtc/modules/desktop_capture/desktop_capturer.h" -+ -+#if defined(WEBRTC_USE_PIPEWIRE) -+#include "webrtc/modules/desktop_capture/screen_capturer_pipewire.h" -+#endif // defined(WEBRTC_USE_PIPEWIRE) -+ -+#if defined(USE_X11) -+#include "webrtc/modules/desktop_capture/screen_capturer_x11.h" -+#endif // defined(USE_X11) -+ -+namespace webrtc { -+ -+// static -+std::unique_ptr DesktopCapturer::CreateRawScreenCapturer( -+ const DesktopCaptureOptions& options) { -+#if defined(WEBRTC_USE_PIPEWIRE) -+ if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { -+ return ScreenCapturerPipeWire::CreateRawScreenCapturer(options); -+ } -+#endif // defined(WEBRTC_USE_PIPEWIRE) -+ -+#if defined(USE_X11) -+ return ScreenCapturerX11::CreateRawScreenCapturer(options); -+#endif // defined(USE_X11) -+ -+ return nullptr; -+} -+ -+} // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc 2019-01-07 13:20:40.171768572 +0100 -@@ -0,0 +1,31 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include "webrtc/modules/desktop_capture/screen_capturer_pipewire.h" -+ -+#include -+ -+namespace webrtc { -+ -+ScreenCapturerPipeWire::ScreenCapturerPipeWire() -+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Screen) {} -+ScreenCapturerPipeWire::~ScreenCapturerPipeWire() {} -+ -+// static -+std::unique_ptr -+ScreenCapturerPipeWire::CreateRawScreenCapturer( -+ const DesktopCaptureOptions& options) { -+ std::unique_ptr capturer( -+ new ScreenCapturerPipeWire()); -+ -+ return std::move(capturer); -+} -+ -+} // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h 2019-01-07 13:20:40.168768542 +0100 -@@ -0,0 +1,33 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_PIPEWIRE_H_ -+#define MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_PIPEWIRE_H_ -+ -+#include -+ -+#include "webrtc/modules/desktop_capture/base_capturer_pipewire.h" -+ -+namespace webrtc { -+ -+class ScreenCapturerPipeWire : public BaseCapturerPipeWire { -+ public: -+ ScreenCapturerPipeWire(); -+ ~ScreenCapturerPipeWire() override; -+ -+ static std::unique_ptr CreateRawScreenCapturer( -+ const DesktopCaptureOptions& options); -+ -+ RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerPipeWire); -+}; -+ -+} // namespace webrtc -+ -+#endif // MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_PIPEWIRE_H_ -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc 2019-01-07 13:16:46.376432940 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc 2019-01-07 13:20:40.173768592 +0100 -@@ -19,6 +19,8 @@ - #include - #include - -+#include "webrtc/modules/desktop_capture/screen_capturer_x11.h" -+ - #include "webrtc/base/checks.h" - #include "webrtc/base/constructormagic.h" - #include "webrtc/base/timeutils.h" -@@ -32,100 +34,12 @@ - #include "webrtc/system_wrappers/include/logging.h" - - namespace webrtc { --namespace { -- --// A class to perform video frame capturing for Linux. --// --// If XDamage is used, this class sets DesktopFrame::updated_region() according --// to the areas reported by XDamage. Otherwise this class does not detect --// DesktopFrame::updated_region(), the field is always set to the entire frame --// rectangle. ScreenCapturerDifferWrapper should be used if that functionality --// is necessary. --class ScreenCapturerLinux : public DesktopCapturer, -- public SharedXDisplay::XEventHandler { -- public: -- ScreenCapturerLinux(); -- ~ScreenCapturerLinux() override; -- -- // TODO(ajwong): Do we really want this to be synchronous? -- bool Init(const DesktopCaptureOptions& options); -- -- // DesktopCapturer interface. -- void Start(Callback* delegate) override; -- void Stop() override; -- void CaptureFrame() override; -- bool GetSourceList(SourceList* sources) override; -- bool SelectSource(SourceId id) override; -- -- private: -- Display* display() { return options_.x_display()->display(); } -- -- // SharedXDisplay::XEventHandler interface. -- bool HandleXEvent(const XEvent& event) override; -- -- void InitXDamage(); -- -- // Capture screen pixels to the current buffer in the queue. In the DAMAGE -- // case, the ScreenCapturerHelper already holds the list of invalid rectangles -- // from HandleXEvent(). In the non-DAMAGE case, this captures the -- // whole screen, then calculates some invalid rectangles that include any -- // differences between this and the previous capture. -- std::unique_ptr CaptureScreen(); -- -- // Called when the screen configuration is changed. -- void ScreenConfigurationChanged(); -- -- // Synchronize the current buffer with |last_buffer_|, by copying pixels from -- // the area of |last_invalid_rects|. -- // Note this only works on the assumption that kNumBuffers == 2, as -- // |last_invalid_rects| holds the differences from the previous buffer and -- // the one prior to that (which will then be the current buffer). -- void SynchronizeFrame(); -- -- void DeinitXlib(); -- -- DesktopCaptureOptions options_; -- -- Callback* callback_ = nullptr; -- -- // X11 graphics context. -- GC gc_ = nullptr; -- Window root_window_ = BadValue; -- -- // XFixes. -- bool has_xfixes_ = false; -- int xfixes_event_base_ = -1; -- int xfixes_error_base_ = -1; -- -- // XDamage information. -- bool use_damage_ = false; -- Damage damage_handle_ = 0; -- int damage_event_base_ = -1; -- int damage_error_base_ = -1; -- XserverRegion damage_region_ = 0; -- -- // Access to the X Server's pixel buffer. -- XServerPixelBuffer x_server_pixel_buffer_; -- -- // A thread-safe list of invalid rectangles, and the size of the most -- // recently captured screen. -- ScreenCapturerHelper helper_; -- -- // Queue of the frames buffers. -- ScreenCaptureFrameQueue queue_; -- -- // Invalid region from the previous capture. This is used to synchronize the -- // current with the last buffer used. -- DesktopRegion last_invalid_region_; -- -- RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerLinux); --}; - --ScreenCapturerLinux::ScreenCapturerLinux() { -+ScreenCapturerX11::ScreenCapturerX11() { - helper_.SetLogGridSize(4); - } - --ScreenCapturerLinux::~ScreenCapturerLinux() { -+ScreenCapturerX11::~ScreenCapturerX11() { - options_.x_display()->RemoveEventHandler(ConfigureNotify, this); - if (use_damage_) { - options_.x_display()->RemoveEventHandler( -@@ -134,7 +48,7 @@ - DeinitXlib(); - } - --bool ScreenCapturerLinux::Init(const DesktopCaptureOptions& options) { -+bool ScreenCapturerX11::Init(const DesktopCaptureOptions& options) { - options_ = options; - - root_window_ = RootWindow(display(), DefaultScreen(display())); -@@ -177,7 +91,7 @@ - return true; - } - --void ScreenCapturerLinux::InitXDamage() { -+void ScreenCapturerX11::InitXDamage() { - // Our use of XDamage requires XFixes. - if (!has_xfixes_) { - return; -@@ -218,18 +132,18 @@ - LOG(LS_INFO) << "Using XDamage extension."; - } - --void ScreenCapturerLinux::Start(Callback* callback) { -+void ScreenCapturerX11::Start(Callback* callback) { - RTC_DCHECK(!callback_); - RTC_DCHECK(callback); - - callback_ = callback; - } - --void ScreenCapturerLinux::Stop() { -+void ScreenCapturerX11::Stop() { - callback_ = NULL; - } - --void ScreenCapturerLinux::CaptureFrame() { -+void ScreenCapturerX11::CaptureFrame() { - int64_t capture_start_time_nanos = rtc::TimeNanos(); - - queue_.MoveToNextFrame(); -@@ -243,6 +157,7 @@ - // in a good shape. - if (!x_server_pixel_buffer_.is_initialized()) { - // We failed to initialize pixel buffer. -+ LOG(LS_ERROR) << "Pixel buffer is not initialized."; - callback_->OnCaptureResult(Result::ERROR_PERMANENT, nullptr); - return; - } -@@ -258,6 +173,7 @@ - - std::unique_ptr result = CaptureScreen(); - if (!result) { -+ LOG(LS_WARNING) << "Temporarily failed to capture screen."; - callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); - return; - } -@@ -268,19 +184,19 @@ - callback_->OnCaptureResult(Result::SUCCESS, std::move(result)); - } - --bool ScreenCapturerLinux::GetSourceList(SourceList* sources) { -+bool ScreenCapturerX11::GetSourceList(SourceList* sources) { - RTC_DCHECK(sources->size() == 0); - // TODO(jiayl): implement screen enumeration. - sources->push_back({0}); - return true; - } - --bool ScreenCapturerLinux::SelectSource(SourceId id) { -+bool ScreenCapturerX11::SelectSource(SourceId id) { - // TODO(jiayl): implement screen selection. - return true; - } - --bool ScreenCapturerLinux::HandleXEvent(const XEvent& event) { -+bool ScreenCapturerX11::HandleXEvent(const XEvent& event) { - if (use_damage_ && (event.type == damage_event_base_ + XDamageNotify)) { - const XDamageNotifyEvent* damage_event = - reinterpret_cast(&event); -@@ -295,7 +211,7 @@ - return false; - } - --std::unique_ptr ScreenCapturerLinux::CaptureScreen() { -+std::unique_ptr ScreenCapturerX11::CaptureScreen() { - std::unique_ptr frame = queue_.current_frame()->Share(); - RTC_DCHECK(x_server_pixel_buffer_.window_size().equals(frame->size())); - -@@ -345,14 +261,15 @@ - // Doing full-screen polling, or this is the first capture after a - // screen-resolution change. In either case, need a full-screen capture. - DesktopRect screen_rect = DesktopRect::MakeSize(frame->size()); -- x_server_pixel_buffer_.CaptureRect(screen_rect, frame.get()); -+ if (!x_server_pixel_buffer_.CaptureRect(screen_rect, frame.get())) -+ return nullptr; - updated_region->SetRect(screen_rect); - } - - return std::move(frame); - } - --void ScreenCapturerLinux::ScreenConfigurationChanged() { -+void ScreenCapturerX11::ScreenConfigurationChanged() { - // Make sure the frame buffers will be reallocated. - queue_.Reset(); - -@@ -363,7 +280,7 @@ - } - } - --void ScreenCapturerLinux::SynchronizeFrame() { -+void ScreenCapturerX11::SynchronizeFrame() { - // Synchronize the current buffer with the previous one since we do not - // capture the entire desktop. Note that encoder may be reading from the - // previous buffer at this time so thread access complaints are false -@@ -383,7 +300,7 @@ - } - } - --void ScreenCapturerLinux::DeinitXlib() { -+void ScreenCapturerX11::DeinitXlib() { - if (gc_) { - XFreeGC(display(), gc_); - gc_ = nullptr; -@@ -404,20 +321,18 @@ - } - } - --} // namespace -- - // static --std::unique_ptr DesktopCapturer::CreateRawScreenCapturer( -+std::unique_ptr ScreenCapturerX11::CreateRawScreenCapturer( - const DesktopCaptureOptions& options) { - if (!options.x_display()) - return nullptr; - -- std::unique_ptr capturer(new ScreenCapturerLinux()); -+ std::unique_ptr capturer(new ScreenCapturerX11()); - if (!capturer.get()->Init(options)) { - return nullptr; - } - -- return std::unique_ptr(capturer.release()); -+ return std::move(capturer); - } - - } // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.h firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.h ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.h 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.h 2019-01-07 13:20:40.169768552 +0100 -@@ -0,0 +1,124 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_X11_H_ -+#define MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_X11_H_ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -+#include "webrtc/modules/desktop_capture/desktop_capturer.h" -+#include "webrtc/modules/desktop_capture/desktop_frame.h" -+#include "webrtc/modules/desktop_capture/desktop_region.h" -+#include "webrtc/modules/desktop_capture/x11/shared_x_display.h" -+#include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" -+#include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" -+#include "webrtc/modules/desktop_capture/screen_capturer_helper.h" -+#include "webrtc/modules/desktop_capture/shared_desktop_frame.h" -+#include "webrtc/base/constructormagic.h" -+ -+namespace webrtc { -+ -+// A class to perform video frame capturing for Linux on X11. -+// -+// If XDamage is used, this class sets DesktopFrame::updated_region() according -+// to the areas reported by XDamage. Otherwise this class does not detect -+// DesktopFrame::updated_region(), the field is always set to the entire frame -+// rectangle. ScreenCapturerDifferWrapper should be used if that functionality -+// is necessary. -+class ScreenCapturerX11 : public DesktopCapturer, -+ public SharedXDisplay::XEventHandler { -+ public: -+ ScreenCapturerX11(); -+ ~ScreenCapturerX11() override; -+ -+ static std::unique_ptr CreateRawScreenCapturer(const DesktopCaptureOptions& options); -+ -+ // TODO(ajwong): Do we really want this to be synchronous? -+ bool Init(const DesktopCaptureOptions& options); -+ -+ // DesktopCapturer interface. -+ void Start(Callback* delegate) override; -+ void Stop() override; -+ void CaptureFrame() override; -+ bool GetSourceList(SourceList* sources) override; -+ bool SelectSource(SourceId id) override; -+ -+ private: -+ Display* display() { return options_.x_display()->display(); } -+ -+ // SharedXDisplay::XEventHandler interface. -+ bool HandleXEvent(const XEvent& event) override; -+ -+ void InitXDamage(); -+ -+ // Capture screen pixels to the current buffer in the queue. In the DAMAGE -+ // case, the ScreenCapturerHelper already holds the list of invalid rectangles -+ // from HandleXEvent(). In the non-DAMAGE case, this captures the -+ // whole screen, then calculates some invalid rectangles that include any -+ // differences between this and the previous capture. -+ std::unique_ptr CaptureScreen(); -+ -+ // Called when the screen configuration is changed. -+ void ScreenConfigurationChanged(); -+ -+ // Synchronize the current buffer with |last_buffer_|, by copying pixels from -+ // the area of |last_invalid_rects|. -+ // Note this only works on the assumption that kNumBuffers == 2, as -+ // |last_invalid_rects| holds the differences from the previous buffer and -+ // the one prior to that (which will then be the current buffer). -+ void SynchronizeFrame(); -+ -+ void DeinitXlib(); -+ -+ DesktopCaptureOptions options_; -+ -+ Callback* callback_ = nullptr; -+ -+ // X11 graphics context. -+ GC gc_ = nullptr; -+ Window root_window_ = BadValue; -+ -+ // XFixes. -+ bool has_xfixes_ = false; -+ int xfixes_event_base_ = -1; -+ int xfixes_error_base_ = -1; -+ -+ // XDamage information. -+ bool use_damage_ = false; -+ Damage damage_handle_ = 0; -+ int damage_event_base_ = -1; -+ int damage_error_base_ = -1; -+ XserverRegion damage_region_ = 0; -+ -+ // Access to the X Server's pixel buffer. -+ XServerPixelBuffer x_server_pixel_buffer_; -+ -+ // A thread-safe list of invalid rectangles, and the size of the most -+ // recently captured screen. -+ ScreenCapturerHelper helper_; -+ -+ // Queue of the frames buffers. -+ ScreenCaptureFrameQueue queue_; -+ -+ // Invalid region from the previous capture. This is used to synchronize the -+ // current with the last buffer used. -+ DesktopRegion last_invalid_region_; -+ -+ RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerX11); -+}; -+ -+} // namespace webrtc -+ -+#endif // MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_X11_H_ -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc 2019-01-07 13:20:40.196768822 +0100 -@@ -0,0 +1,40 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -+#include "webrtc/modules/desktop_capture/desktop_capturer.h" -+ -+#if defined(WEBRTC_USE_PIPEWIRE) -+#include "webrtc/modules/desktop_capture/window_capturer_pipewire.h" -+#endif // defined(WEBRTC_USE_PIPEWIRE) -+ -+#if defined(USE_X11) -+#include "webrtc/modules/desktop_capture/window_capturer_x11.h" -+#endif // defined(USE_X11) -+ -+namespace webrtc { -+ -+// static -+std::unique_ptr DesktopCapturer::CreateRawWindowCapturer( -+ const DesktopCaptureOptions& options) { -+#if defined(WEBRTC_USE_PIPEWIRE) -+ if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { -+ return WindowCapturerPipeWire::CreateRawWindowCapturer(options); -+ } -+#endif // defined(WEBRTC_USE_PIPEWIRE) -+ -+#if defined(USE_X11) -+ return WindowCapturerX11::CreateRawWindowCapturer(options); -+#endif // defined(USE_X11) -+ -+ return nullptr; -+} -+ -+} // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc 2019-01-07 13:20:40.197768832 +0100 -@@ -0,0 +1,28 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include "webrtc/modules/desktop_capture/window_capturer_pipewire.h" -+ -+namespace webrtc { -+ -+WindowCapturerPipeWire::WindowCapturerPipeWire() -+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Window) {} -+WindowCapturerPipeWire::~WindowCapturerPipeWire() {} -+ -+// static -+std::unique_ptr -+WindowCapturerPipeWire::CreateRawWindowCapturer( -+ const DesktopCaptureOptions& options) { -+ std::unique_ptr capturer( -+ new WindowCapturerPipeWire()); -+ -+ return std::move(capturer); -+} -+} // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h 2019-01-07 13:20:40.177768632 +0100 -@@ -0,0 +1,33 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_PIPEWIRE_H_ -+#define MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_PIPEWIRE_H_ -+ -+#include -+ -+#include "webrtc/modules/desktop_capture/base_capturer_pipewire.h" -+ -+namespace webrtc { -+ -+class WindowCapturerPipeWire : public BaseCapturerPipeWire { -+ public: -+ WindowCapturerPipeWire(); -+ ~WindowCapturerPipeWire() override; -+ -+ static std::unique_ptr CreateRawWindowCapturer( -+ const DesktopCaptureOptions& options); -+ -+ RTC_DISALLOW_COPY_AND_ASSIGN(WindowCapturerPipeWire); -+}; -+ -+} // namespace webrtc -+ -+#endif // MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_PIPEWIRE_H_ -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc 2019-01-07 13:16:46.375432930 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc 2019-01-07 13:20:40.198768842 +0100 -@@ -17,6 +17,8 @@ - - #include - -+#include "webrtc/modules/desktop_capture/window_capturer_x11.h" -+ - #include "webrtc/base/constructormagic.h" - #include "webrtc/base/scoped_ref_ptr.h" - #include "webrtc/modules/desktop_capture/desktop_capturer.h" -@@ -30,58 +32,7 @@ - - namespace webrtc { - --namespace { -- --class WindowCapturerLinux : public DesktopCapturer, -- public SharedXDisplay::XEventHandler { -- public: -- WindowCapturerLinux(const DesktopCaptureOptions& options); -- ~WindowCapturerLinux() override; -- -- // DesktopCapturer interface. -- void Start(Callback* callback) override; -- void Stop() override; -- void CaptureFrame() override; -- bool GetSourceList(SourceList* sources) override; -- bool SelectSource(SourceId id) override; -- bool FocusOnSelectedSource() override; -- -- // SharedXDisplay::XEventHandler interface. -- bool HandleXEvent(const XEvent& event) override; -- -- private: -- Display* display() { return x_display_->display(); } -- -- // Iterates through |window| hierarchy to find first visible window, i.e. one -- // that has WM_STATE property set to NormalState. -- // See http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.3.1 . -- ::Window GetApplicationWindow(::Window window); -- -- // Returns true if the |window| is a desktop element. -- bool IsDesktopElement(::Window window); -- -- // Returns window title for the specified X |window|. -- bool GetWindowTitle(::Window window, std::string* title); -- -- // Returns the id of the owning process. -- int GetWindowProcessID(::Window window); -- -- Callback* callback_ = nullptr; -- -- rtc::scoped_refptr x_display_; -- -- Atom wm_state_atom_; -- Atom window_type_atom_; -- Atom normal_window_type_atom_; -- bool has_composite_extension_ = false; -- -- ::Window selected_window_ = 0; -- XServerPixelBuffer x_server_pixel_buffer_; -- -- RTC_DISALLOW_COPY_AND_ASSIGN(WindowCapturerLinux); --}; -- --WindowCapturerLinux::WindowCapturerLinux(const DesktopCaptureOptions& options) -+WindowCapturerX11::WindowCapturerX11(const DesktopCaptureOptions& options) - : x_display_(options.x_display()) { - // Create Atoms so we don't need to do it every time they are used. - wm_state_atom_ = XInternAtom(display(), "WM_STATE", True); -@@ -102,11 +53,11 @@ - x_display_->AddEventHandler(ConfigureNotify, this); - } - --WindowCapturerLinux::~WindowCapturerLinux() { -+WindowCapturerX11::~WindowCapturerX11() { - x_display_->RemoveEventHandler(ConfigureNotify, this); - } - --bool WindowCapturerLinux::GetSourceList(SourceList* sources) { -+bool WindowCapturerX11::GetSourceList(SourceList* sources) { - SourceList result; - - XErrorTrap error_trap(display()); -@@ -159,7 +110,7 @@ - return true; - } - --bool WindowCapturerLinux::SelectSource(SourceId id) { -+bool WindowCapturerX11::SelectSource(SourceId id) { - if (!x_server_pixel_buffer_.Init(display(), id)) - return false; - -@@ -180,7 +131,7 @@ - return true; - } - --bool WindowCapturerLinux::FocusOnSelectedSource() { -+bool WindowCapturerX11::FocusOnSelectedSource() { - if (!selected_window_) - return false; - -@@ -229,18 +180,18 @@ - return true; - } - --void WindowCapturerLinux::Start(Callback* callback) { -+void WindowCapturerX11::Start(Callback* callback) { - assert(!callback_); - assert(callback); - - callback_ = callback; - } - --void WindowCapturerLinux::Stop() { -+void WindowCapturerX11::Stop() { - callback_ = NULL; - } - --void WindowCapturerLinux::CaptureFrame() { -+void WindowCapturerX11::CaptureFrame() { - x_display_->ProcessPendingXEvents(); - - if (!x_server_pixel_buffer_.IsWindowValid()) { -@@ -274,7 +225,7 @@ - callback_->OnCaptureResult(Result::SUCCESS, std::move(frame)); - } - --bool WindowCapturerLinux::HandleXEvent(const XEvent& event) { -+bool WindowCapturerX11::HandleXEvent(const XEvent& event) { - if (event.type == ConfigureNotify) { - XConfigureEvent xce = event.xconfigure; - if (!DesktopSize(xce.width, xce.height).equals( -@@ -288,7 +239,7 @@ - return false; - } - --::Window WindowCapturerLinux::GetApplicationWindow(::Window window) { -+::Window WindowCapturerX11::GetApplicationWindow(::Window window) { - // Get WM_STATE property of the window. - XWindowProperty window_state(display(), window, wm_state_atom_); - -@@ -326,7 +277,7 @@ - return app_window; - } - --bool WindowCapturerLinux::IsDesktopElement(::Window window) { -+bool WindowCapturerX11::IsDesktopElement(::Window window) { - if (window == 0) - return false; - -@@ -361,7 +312,7 @@ - return result; - } - --bool WindowCapturerLinux::GetWindowTitle(::Window window, std::string* title) { -+bool WindowCapturerX11::GetWindowTitle(::Window window, std::string* title) { - int status; - bool result = false; - XTextProperty window_name; -@@ -390,9 +341,7 @@ - return result; - } - --} // namespace -- --int WindowCapturerLinux::GetWindowProcessID(::Window window) { -+int WindowCapturerX11::GetWindowProcessID(::Window window) { - // Get _NET_WM_PID property of the window. - Atom process_atom = XInternAtom(display(), "_NET_WM_PID", True); - XWindowProperty process_id(display(), window, process_atom); -@@ -401,11 +350,11 @@ - } - - // static --std::unique_ptr DesktopCapturer::CreateRawWindowCapturer( -+std::unique_ptr WindowCapturerX11::CreateRawWindowCapturer( - const DesktopCaptureOptions& options) { - if (!options.x_display()) - return nullptr; -- return std::unique_ptr(new WindowCapturerLinux(options)); -+ return std::unique_ptr(new WindowCapturerX11(options)); - } - - } // namespace webrtc -diff -ENwbur firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.h firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.h ---- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.h 1970-01-01 01:00:00.000000000 +0100 -+++ firefox-webrtc/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.h 2019-01-07 13:20:40.177768632 +0100 -@@ -0,0 +1,83 @@ -+/* -+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_X11_H_ -+#define MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_X11_H_ -+ -+#include -+#include -+#include -+#include -+ -+#include "webrtc/modules/desktop_capture/desktop_capture_options.h" -+#include "webrtc/modules/desktop_capture/desktop_capturer.h" -+#include "webrtc/modules/desktop_capture/desktop_geometry.h" -+#include "webrtc/modules/desktop_capture/x11/shared_x_display.h" -+#include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" -+#include "webrtc/base/constructormagic.h" -+#include "webrtc/base/scoped_ref_ptr.h" -+ -+namespace webrtc { -+ -+class WindowCapturerX11 : public DesktopCapturer, -+ public SharedXDisplay::XEventHandler { -+ public: -+ explicit WindowCapturerX11(const DesktopCaptureOptions& options); -+ ~WindowCapturerX11() override; -+ -+ static std::unique_ptr CreateRawWindowCapturer( -+ const DesktopCaptureOptions& options); -+ -+ // DesktopCapturer interface. -+ void Start(Callback* callback) override; -+ void Stop() override; -+ void CaptureFrame() override; -+ bool GetSourceList(SourceList* sources) override; -+ bool SelectSource(SourceId id) override; -+ bool FocusOnSelectedSource() override; -+ -+ // SharedXDisplay::XEventHandler interface. -+ bool HandleXEvent(const XEvent& event) override; -+ -+ private: -+ Display* display() { return x_display_->display(); } -+ -+ // Iterates through |window| hierarchy to find first visible window, i.e. one -+ // that has WM_STATE property set to NormalState. -+ // See http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.3.1 . -+ ::Window GetApplicationWindow(::Window window); -+ -+ // Returns true if the |window| is a desktop element. -+ bool IsDesktopElement(::Window window); -+ -+ // Returns window title for the specified X |window|. -+ bool GetWindowTitle(::Window window, std::string* title); -+ -+ // Returns the id of the owning process. -+ int GetWindowProcessID(::Window window); -+ -+ Callback* callback_ = nullptr; -+ -+ rtc::scoped_refptr x_display_; -+ -+ Atom wm_state_atom_; -+ Atom window_type_atom_; -+ Atom normal_window_type_atom_; -+ bool has_composite_extension_ = false; -+ -+ ::Window selected_window_ = 0; -+ XServerPixelBuffer x_server_pixel_buffer_; -+ -+ RTC_DISALLOW_COPY_AND_ASSIGN(WindowCapturerX11); -+}; -+ -+} // namespace webrtc -+ -+#endif // MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_X11_H_ diff --git a/icecat-GLIBCXX-fix-for-GCC-12.patch b/icecat-GLIBCXX-fix-for-GCC-12.patch new file mode 100644 index 0000000..8fdc264 --- /dev/null +++ b/icecat-GLIBCXX-fix-for-GCC-12.patch @@ -0,0 +1,45 @@ +From efd5bc0715e5477318be95a76811cda0a89e8289 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= +Date: Fri, 4 Mar 2022 12:00:26 +0100 +Subject: [PATCH] GLIBCXX fix for GCC 12? + +--- + build/unix/stdc++compat/stdc++compat.cpp | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/build/unix/stdc++compat/stdc++compat.cpp b/build/unix/stdc++compat/stdc++compat.cpp +index 0180f6bcfa998..8d7a542ff11f0 100644 +--- a/build/unix/stdc++compat/stdc++compat.cpp ++++ b/build/unix/stdc++compat/stdc++compat.cpp +@@ -24,6 +24,7 @@ + GLIBCXX_3.4.27 is from gcc 10 + GLIBCXX_3.4.28 is from gcc 10 + GLIBCXX_3.4.29 is from gcc 11 ++ GLIBCXX_3.4.30 is from gcc 12 + + This file adds the necessary compatibility tricks to avoid symbols with + version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with +@@ -69,6 +70,19 @@ void __attribute__((weak)) __throw_bad_array_new_length() { MOZ_CRASH(); } + } // namespace std + #endif + ++#if _GLIBCXX_RELEASE >= 12 ++namespace std { ++ ++/* This avoids the GLIBCXX_3.4.30 symbol version. */ ++void __attribute__((weak)) ++__glibcxx_assert_fail(const char* __file, int __line, const char* __function, ++ const char* __condition) { ++ MOZ_CRASH(); ++} ++ ++} // namespace std ++#endif ++ + /* While we generally don't build with exceptions, we have some host tools + * that do use them. libstdc++ from GCC 5.0 added exception constructors with + * char const* argument. Older versions only have a constructor with +-- +2.35.1 + + diff --git a/icecat-bz1445383.patch b/icecat-bz1445383.patch deleted file mode 100644 index 97fd5dc..0000000 --- a/icecat-bz1445383.patch +++ /dev/null @@ -1,131 +0,0 @@ -# HG changeset patch -# User Peter Simonyi -# Date 1528570546 14400 -# Node ID 643dfdce06c805659dbfd4f3d8a6e46ee8d3fe9d -# Parent 04cc917f68c5d554e5b9542cb3745c9453bba58d -Bug 1445383 - update ccache stats parser for ccache 3.4 and 3.5 - -MozReview-Commit-ID: KTr9RhkJN5B - -diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py ---- a/python/mozbuild/mozbuild/controller/building.py -+++ b/python/mozbuild/mozbuild/controller/building.py -@@ -752,16 +752,18 @@ class CCacheStats(object): - Instances can be subtracted from each other to obtain differences. - print() or str() the object to show a ``ccache -s`` like output - of the captured stats. - - """ - STATS_KEYS = [ - # (key, description) - # Refer to stats.c in ccache project for all the descriptions. -+ ('stats_zero_time', 'stats zero time'), -+ ('stats_updated', 'stats updated'), - ('cache_hit_direct', 'cache hit (direct)'), - ('cache_hit_preprocessed', 'cache hit (preprocessed)'), - ('cache_hit_rate', 'cache hit rate'), - ('cache_miss', 'cache miss'), - ('link', 'called for link'), - ('preprocessing', 'called for preprocessing'), - ('multiple', 'multiple source files'), - ('stdout', 'compiler produced stdout'), -@@ -833,16 +835,23 @@ class CCacheStats(object): - raise ValueError('Failed to parse ccache stats output: %s' % line) - - @staticmethod - def _strip_prefix(line, prefix): - return line[len(prefix):].strip() if line.startswith(prefix) else line - - @staticmethod - def _parse_value(raw_value): -+ try: -+ # ccache calls strftime with '%c' (src/stats.c) -+ ts = time.strptime(raw_value, '%c') -+ return int(time.mktime(ts)) -+ except ValueError: -+ pass -+ - value = raw_value.split() - unit = '' - if len(value) == 1: - numeric = value[0] - elif len(value) == 2: - numeric, unit = value - else: - raise ValueError('Failed to parse ccache stats value: %s' % raw_value) -diff --git a/python/mozbuild/mozbuild/test/controller/test_ccachestats.py b/python/mozbuild/mozbuild/test/controller/test_ccachestats.py ---- a/python/mozbuild/mozbuild/test/controller/test_ccachestats.py -+++ b/python/mozbuild/mozbuild/test/controller/test_ccachestats.py -@@ -1,14 +1,15 @@ - # This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - - from __future__ import unicode_literals - -+import time - import unittest - - from mozunit import main - - from mozbuild.controller.building import CCacheStats - - - class TestCcacheStats(unittest.TestCase): -@@ -169,16 +170,40 @@ class TestCcacheStats(unittest.TestCase) - unsupported code directive 2 - no input file 2378 - cleanups performed 1792 - files in cache 3479 - cache size 4.4 GB - max cache size 5.0 GB - """ - -+ # Substitute a locally-generated timestamp because the timestamp format is -+ # locale-dependent. -+ STAT8 = """ -+ cache directory /home/psimonyi/.ccache -+ primary config /home/psimonyi/.ccache/ccache.conf -+ secondary config (readonly) /etc/ccache.conf -+ stats zero time {timestamp} -+ cache hit (direct) 571 -+ cache hit (preprocessed) 1203 -+ cache miss 11747 -+ cache hit rate 13.12 % -+ called for link 623 -+ called for preprocessing 7194 -+ compile failed 32 -+ preprocessor error 137 -+ bad compiler arguments 4 -+ autoconf compile/link 348 -+ no input file 162 -+ cleanups performed 77 -+ files in cache 13464 -+ cache size 6.2 GB -+ max cache size 7.0 GB -+ """.format(timestamp=time.strftime('%c')) -+ - def test_parse_garbage_stats_message(self): - self.assertRaises(ValueError, CCacheStats, self.STAT_GARBAGE) - - def test_parse_zero_stats_message(self): - stats = CCacheStats(self.STAT0) - self.assertEqual(stats.cache_dir, "/home/tlin/.ccache") - self.assertEqual(stats.hit_rates(), (0, 0, 0)) - -@@ -226,10 +251,15 @@ class TestCcacheStats(unittest.TestCase) - self.assertTrue(stat6) - self.assertTrue(stat3) - self.assertTrue(stats_diff) - - # Test stats for 3.3.3. - stat7 = CCacheStats(self.STAT7) - self.assertTrue(stat7) - -+ def test_stats_version34(self): -+ # Test parsing 3.4 output. -+ stat8 = CCacheStats(self.STAT8) -+ self.assertTrue(stat8) -+ - if __name__ == '__main__': - main() diff --git a/icecat-disable-dbus-remote.patch b/icecat-disable-dbus-remote.patch deleted file mode 100644 index 2b9f3a0..0000000 --- a/icecat-disable-dbus-remote.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up icecat-60.4.0/toolkit/components/remote/nsRemoteService.cpp.old icecat-60.4.0/toolkit/components/remote/nsRemoteService.cpp ---- icecat-60.4.0/toolkit/components/remote/nsRemoteService.cpp.old 2018-11-06 11:25:46.634929894 +0100 -+++ icecat-60.4.0/toolkit/components/remote/nsRemoteService.cpp 2018-11-06 11:21:49.617828440 +0100 -@@ -31,7 +31,7 @@ - - NS_IMETHODIMP - nsRemoteService::Startup(const char* aAppName, const char* aProfileName) { --#if defined(MOZ_ENABLE_DBUS) -+#if 0 - nsresult rv; - mDBusRemoteService = new nsDBusRemoteService(); - rv = mDBusRemoteService->Startup(aAppName, aProfileName); diff --git a/icecat-fix_installer.patch b/icecat-fix_installer.patch deleted file mode 100644 index a56a880..0000000 --- a/icecat-fix_installer.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- browser/installer/package-manifest.orig.in 2017-03-24 21:09:39.027022000 +0100 -+++ browser/installer/package-manifest.in 2017-03-24 23:07:21.881504771 +0100 -@@ -74,9 +74,9 @@ - #endif - #ifndef MOZ_SYSTEM_NSPR - #ifndef MOZ_FOLD_LIBS --@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ --@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@ --@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@ -+#@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ -+#@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@ -+#@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@ - #endif - #endif - #ifdef XP_MACOSX -@@ -610,11 +610,11 @@ - @RESPATH@/chrome/recording.manifest - @RESPATH@/chrome/recording/* - #ifdef MOZ_GTK --@RESPATH@/browser/chrome/icons/default/default16.png --@RESPATH@/browser/chrome/icons/default/default32.png --@RESPATH@/browser/chrome/icons/default/default48.png --@RESPATH@/browser/chrome/icons/default/default64.png --@RESPATH@/browser/chrome/icons/default/default128.png -+#@RESPATH@/browser/chrome/icons/default/default16.png -+#@RESPATH@/browser/chrome/icons/default/default32.png -+#@RESPATH@/browser/chrome/icons/default/default48.png -+@RESPATH@/browser/chrome/icons/default/default64.png -+@RESPATH@/browser/chrome/icons/default/default128.png - #endif - @RESPATH@/browser/features/* - ---- browser/installer/allowed-dupes.orig.mn 2017-03-19 19:59:09.000000000 +0100 -+++ browser/installer/allowed-dupes.mn 2017-03-24 23:15:37.026964374 +0100 -@@ -752,3 +752,19 @@ - browser/extensions/tprb.addon@searxes.danwin1210.me/manifest.json - browser/extensions/tprb.addon@searxes.danwin1210.me/tprb_dlg.html - browser/extensions/tprb.addon@searxes.danwin1210.me/style.css -+# -+browser/extensions/abouticecat@gnu.org/defaults/preferences/preferences.js -+browser/extensions/html5-video-everywhere@lejenome.me/bootstrap.js -+browser/chrome/browser/content/browser/aboutaccounts/images/fox.png -+browser/extensions/spyblock@gnu.org/chrome/content/ui/ext/common.js -+browser/extensions/spyblock@gnu.org/lib/ext_common.js -+browser/extensions/html5-video-everywhere@lejenome.me/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-break/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-dailymotion/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-facebook/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-metacafe/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-vimeo/LICENSE -+browser/extensions/html5-video-everywhere@lejenome.me/node_modules/h5vew-site-youtube/LICENSE -+browser/extensions/spyblock@gnu.org/chrome/content/ui/skin/abp-128.png -+browser/extensions/spyblock@gnu.org/chrome/skin/abp-icon-big.png -+# diff --git a/icecat-fix_jar.patch b/icecat-fix_jar.patch deleted file mode 100644 index 418b5b9..0000000 --- a/icecat-fix_jar.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- browser/locales/jar.orig.mn 2017-03-19 19:59:09.000000000 +0100 -+++ browser/locales/jar.mn 2017-03-22 19:49:57.602190867 +0100 -@@ -12,7 +12,7 @@ - - @AB_CD@.jar: - % locale browser @AB_CD@ %locale/browser/ --* locale/browser/bookmarks.html (generic/profile/bookmarks.html.in) -+ locale/browser/bookmarks.html (generic/profile/bookmarks.html.in) - locale/browser/aboutDialog.dtd (%chrome/browser/aboutDialog.dtd) - locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd) - locale/browser/aboutPrivateBrowsing.properties (%chrome/browser/aboutPrivateBrowsing.properties) diff --git a/icecat-gcc-always-inline.patch b/icecat-gcc-always-inline.patch new file mode 100644 index 0000000..d7af60f --- /dev/null +++ b/icecat-gcc-always-inline.patch @@ -0,0 +1,14 @@ +diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline firefox-114.0.2/gfx/wr/swgl/src/gl.cc +--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22 11:08:53.294593327 +0200 ++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734 +0200 +@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF + } + + #else +-// GCC is slower when dealing with always_inline, especially in debug builds. +-// When using Clang, use always_inline more aggressively. +-# if defined(__clang__) || defined(NDEBUG) ++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG) + # define ALWAYS_INLINE __attribute__((always_inline)) inline + # else + # define ALWAYS_INLINE inline diff --git a/icecat-lang_download.sh b/icecat-lang_download.sh index 6319089..3c0c445 100755 --- a/icecat-lang_download.sh +++ b/icecat-lang_download.sh @@ -1,18 +1,23 @@ #!/bin/bash -VERSION=60.2.0 -URL=http://alpha.gnu.org/gnu/gnuzilla/$VERSION/langpacks/ +VERSION=140.7.0 +URL=https://ftp.mozilla.org/pub/firefox/releases/${VERSION}esr/linux-x86_64/xpi/ for u in $URL; do -mkdir -p langpacks && cd langpacks -wget -erobots=off -c -r -l1 -nd -nc -A.xpi -U langpacks $u -rm -f icecat-$VERSION.ja-JP-mac.langpack.xpi icecat-$VERSION.compare-locales.langpack.xpi + mkdir -p langpacks && pushd langpacks + wget -erobots=off -c -r -l1 -nd -nc -A.xpi -U langpacks $u +popd done -find . -type f -name '*.xpi' | while read FILE ; do - newfile="$(echo ${FILE} |sed -e 's/60.2.0.//g' -e 's/icecat-//g')" ; - mv "${FILE}" "${newfile}" ; -done -cd .. -tar -zcvf icecat-$VERSION-langpacks.tar.gz langpacks +#pushd langpacks +#for u in `ls *.xpi`; do +# mv $u icecat-${VERSION}.$u +#done +#find . -type f -name '*.xpi' | while read FILE ; do +# newfile="$(echo ${FILE} |sed -e 's/.xpi/.langpack.xpi/g')" ; +# mv "${FILE}" "${newfile}" ; +#done +#popd +rm -f icecat-*-langpacks.tar.gz +tar -zcvf icecat-${VERSION}-langpacks.tar.gz langpacks rm -rf langpacks exit 0 diff --git a/icecat-locale.patch b/icecat-locale.patch deleted file mode 100644 index 7bdcbac..0000000 --- a/icecat-locale.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- intl/icu/source/i18n/digitlst.orig.cpp 2017-07-25 16:08:42.000000000 +0000 -+++ intl/icu/source/i18n/digitlst.cpp 2017-08-03 19:20:54.808813010 +0000 -@@ -63,7 +63,7 @@ - - #if U_USE_STRTOD_L - # if U_HAVE_XLOCALE_H --# include -+# include - # else - # include - # endif diff --git a/icecat-mozconfig-common b/icecat-mozconfig-common index c5a3241..bb3300d 100644 --- a/icecat-mozconfig-common +++ b/icecat-mozconfig-common @@ -2,20 +2,15 @@ export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 -export MOZ_TELEMETRY_REPORTING=1 +export MOZ_TELEMETRY_REPORTING= mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir +ac_add_options --without-wasm-sandboxed-libraries ac_add_options --prefix="$PREFIX" ac_add_options --libdir="$LIBDIR" -ac_add_options --with-pthreads ac_add_options --enable-necko-wifi -ac_add_options --enable-startup-notification ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni ac_add_options --enable-release -ac_add_options --enable-pie -ac_add_options --disable-stylo -# Workaround for mozbz#1341234 -ac_add_options BINDGEN_CFLAGS="$(pkg-config nspr pixman-1 --cflags)" diff --git a/icecat-wayland.desktop b/icecat-wayland.desktop deleted file mode 100644 index 411d7da..0000000 --- a/icecat-wayland.desktop +++ /dev/null @@ -1,23 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=GNU IceCat\n on Wayland -Comment=Browse the World Wide Web -GenericName=Web Browser -Keywords=Internet;WWW;Browser;Web;Explorer; -Exec=icecat-wayland --name icecat-wayland %u -Icon=icecat -Terminal=false -Type=Application -MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; -Categories=Network;WebBrowser; -StartupNotify=true -Name[en_US]=GNU IceCat\n on Wayland -Actions=new-window;new-private-window; - -[Desktop Action new-window] -Name=Open a New Window -Exec=icecat-wayland --name icecat-wayland --new-window %u - -[Desktop Action new-private-window] -Name=Open a New Private Window -Exec=icecat-wayland --private-window --name icecat-wayland %u diff --git a/icecat-wayland.sh.in b/icecat-wayland.sh.in deleted file mode 100644 index 5c6c9d7..0000000 --- a/icecat-wayland.sh.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# Run GNU IceCat under Wayland -# - -export GDK_BACKEND=wayland -exec /usr/bin/icecat "$@" diff --git a/icecat-x11.desktop b/icecat-x11.desktop deleted file mode 100644 index 4887034..0000000 --- a/icecat-x11.desktop +++ /dev/null @@ -1,338 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=GNU IceCat on X11 -Comment=Browse the World Wide Web -Comment[ar]=تصفح الشبكة العنكبوتية العالمية -Comment[ast]=Restola pela Rede -Comment[bn]=ইন্টারনেট ব্রাউজ করুন -Comment[ca]=Navegueu per la web -Comment[cs]=Prohlížení stránek World Wide Webu -Comment[da]=Surf på internettet -Comment[de]=Im Internet surfen -Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web) -Comment[es]=Navegue por la web -Comment[et]=Lehitse veebi -Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید -Comment[fi]=Selaa Internetin WWW-sivuja -Comment[fr]=Naviguer sur le Web -Comment[gl]=Navegar pola rede -Comment[he]=גלישה ברחבי האינטרנט -Comment[hr]=Pretražite web -Comment[hu]=A világháló böngészése -Comment[it]=Esplora il web -Comment[ja]=ウェブを閲覧します -Comment[ko]=웹을 돌아 다닙니다 -Comment[ku]=Li torê bigere -Comment[lt]=Naršykite internete -Comment[nb]=Surf på nettet -Comment[nl]=Verken het internet -Comment[nn]=Surf på nettet -Comment[no]=Surf på nettet -Comment[pl]=Przeglądanie stron WWW -Comment[pt]=Navegue na Internet -Comment[pt_BR]=Navegue na Internet -Comment[ro]=Navigați pe Internet -Comment[ru]=Доступ в Интернет -Comment[sk]=Prehliadanie internetu -Comment[sl]=Brskajte po spletu -Comment[sv]=Surfa på webben -Comment[tr]=İnternet'te Gezinin -Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ -Comment[uk]=Перегляд сторінок Інтернету -Comment[vi]=Để duyệt các trang web -Comment[zh_CN]=浏览互联网 -Comment[zh_TW]=瀏覽網際網路 -GenericName=Web Browser -GenericName[ar]=متصفح ويب -GenericName[ast]=Restolador Web -GenericName[bn]=ওয়েব ব্রাউজার -GenericName[ca]=Navegador web -GenericName[cs]=Webový prohlížeč -GenericName[da]=Webbrowser -GenericName[el]=Περιηγητής διαδικτύου -GenericName[es]=Navegador web -GenericName[et]=Veebibrauser -GenericName[fa]=مرورگر اینترنتی -GenericName[fi]=WWW-selain -GenericName[fr]=Navigateur Web -GenericName[gl]=Navegador Web -GenericName[he]=דפדפן אינטרנט -GenericName[hr]=Web preglednik -GenericName[hu]=Webböngésző -GenericName[it]=Browser web -GenericName[ja]=ウェブ・ブラウザ -GenericName[ko]=웹 브라우저 -GenericName[ku]=Geroka torê -GenericName[lt]=Interneto naršyklė -GenericName[nb]=Nettleser -GenericName[nl]=Webbrowser -GenericName[nn]=Nettlesar -GenericName[no]=Nettleser -GenericName[pl]=Przeglądarka WWW -GenericName[pt]=Navegador Web -GenericName[pt_BR]=Navegador Web -GenericName[ro]=Navigator Internet -GenericName[ru]=Веб-браузер -GenericName[sk]=Internetový prehliadač -GenericName[sl]=Spletni brskalnik -GenericName[sv]=Webbläsare -GenericName[tr]=Web Tarayıcı -GenericName[ug]=توركۆرگۈ -GenericName[uk]=Веб-браузер -GenericName[vi]=Trình duyệt Web -GenericName[zh_CN]=网络浏览器 -GenericName[zh_TW]=網路瀏覽器 -Keywords=Internet;WWW;Browser;Web;Explorer; -Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب; -Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador; -Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer; -Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer; -Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet; -Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen; -Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;IceCat;Φιρεφοχ;Ιντερνετ; -Keywords[es]=Explorador;Internet;WWW; -Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa; -Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur; -Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה; -Keywords[hr]=Internet;WWW;preglednik;Web; -Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer; -Keywords[it]=Internet;WWW;Browser;Web;Navigatore; -Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk; -Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ; -Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside; -Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online; -Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador; -Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador; -Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис; -Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer; -Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet; -Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara; -Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд; -Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web; -Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;IceCat;ff;互联网;网站; -Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐; -Exec=icecat-x11 --name icecat-x11 %u -Icon=icecat -Terminal=false -Type=Application -MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; -Categories=Network;WebBrowser; -StartupNotify=true -Name[en_US]=GNU IceCat on X11 -Actions=new-window;new-private-window; - -[Desktop Action new-window] -Name=Open a New Window -Name[ach]=Dirica manyen -Name[af]=Nuwe venster -Name[an]=Nueva finestra -Name[ar]=نافذة جديدة -Name[as]=নতুন উইন্ডো -Name[ast]=Ventana nueva -Name[az]=Yeni Pəncərə -Name[be]=Новае акно -Name[bg]=Нов прозорец -Name[bn-BD]=নতুন উইন্ডো (N) -Name[bn-IN]=নতুন উইন্ডো -Name[br]=Prenestr nevez -Name[brx]=गोदान उइन्ड'(N) -Name[bs]=Novi prozor -Name[ca]=Finestra nova -Name[cak]=K'ak'a' tzuwäch -Name[cs]=Nové okno -Name[cy]=Ffenestr Newydd -Name[da]=Nyt vindue -Name[de]=­Neues Fenster -Name[dsb]=Nowe wokno -Name[el]=Νέο παράθυρο -Name[en-GB]=New Window -Name[en-US]=New Window -Name[en-ZA]=New Window -Name[eo]=Nova fenestro -Name[es-AR]=Nueva ventana -Name[es-CL]=Nueva ventana -Name[es-ES]=Nueva ventana -Name[es-MX]=Nueva ventana -Name[et]=Uus aken -Name[eu]=Leiho berria -Name[fa]=پنجره جدید‌ -Name[ff]=Henorde Hesere -Name[fi]=Uusi ikkuna -Name[fr]=­Nouvelle fenêtre -Name[fy-NL]=Nij finster -Name[ga-IE]=Fuinneog Nua -Name[gd]=Uinneag ùr -Name[gl]=Nova xanela -Name[gn]=Ovetã pyahu -Name[gu-IN]=નવી વિન્ડો -Name[he]=חלון חדש -Name[hi-IN]=नया विंडो -Name[hr]=Novi prozor -Name[hsb]=Nowe wokno -Name[hu]=Új ablak -Name[hy-AM]=Նոր Պատուհան -Name[id]=Jendela Baru -Name[is]=Nýr gluggi -Name[it]=Nuova finestra­ -Name[ja]=新しいウィンドウ -Name[ja-JP-mac]=新規ウインドウ -Name[ka]=ახალი ფანჯარა -Name[kk]=Жаңа терезе -Name[km]=បង្អួច​​​ថ្មី -Name[kn]=ಹೊಸ ಕಿಟಕಿ -Name[ko]=새 창 -Name[kok]=नवें जनेल -Name[ks]=نئئ وِنڈو -Name[lij]=Neuvo barcon -Name[lo]=ຫນ້າຕ່າງໃຫມ່ -Name[lt]=Naujas langas -Name[ltg]=Jauns lūgs -Name[lv]=Jauns logs -Name[mai]=नव विंडो -Name[mk]=Нов прозорец -Name[ml]=പുതിയ ജാലകം -Name[mr]=नवीन पटल -Name[ms]=Tetingkap Baru -Name[my]=ဝင်းဒိုးအသစ် -Name[nb-NO]=Nytt vindu -Name[ne-NP]=नयाँ सञ्झ्याल -Name[nl]=Nieuw venster -Name[nn-NO]=Nytt vindauge -Name[or]=ନୂତନ ୱିଣ୍ଡୋ -Name[pa-IN]=ਨਵੀਂ ਵਿੰਡੋ -Name[pl]=Nowe okno -Name[pt-BR]=Nova janela -Name[pt-PT]=Nova janela -Name[rm]=Nova fanestra -Name[ro]=Fereastră nouă -Name[ru]=Новое окно -Name[sat]=नावा विंडो (N) -Name[si]=නව කවුළුවක් -Name[sk]=Nové okno -Name[sl]=Novo okno -Name[son]=Zanfun taaga -Name[sq]=Dritare e Re -Name[sr]=Нови прозор -Name[sv-SE]=Nytt fönster -Name[ta]=புதிய சாளரம் -Name[te]=కొత్త విండో -Name[th]=หน้าต่างใหม่ -Name[tr]=Yeni pencere -Name[tsz]=Eraatarakua jimpani -Name[uk]=Нове вікно -Name[ur]=نیا دریچہ -Name[uz]=Yangi oyna -Name[vi]=Cửa sổ mới -Name[wo]=Palanteer bu bees -Name[xh]=Ifestile entsha -Name[zh-CN]=新建窗口 -Name[zh-TW]=開新視窗 -Exec=icecat --new-window %u - -[Desktop Action new-private-window] -Name=Open a New Private Window -Name[ach]=Dirica manyen me mung -Name[af]=Nuwe privaatvenster -Name[an]=Nueva finestra privada -Name[ar]=نافذة خاصة جديدة -Name[as]=নতুন ব্যক্তিগত উইন্ডো -Name[ast]=Ventana privada nueva -Name[az]=Yeni Məxfi Pəncərə -Name[be]=Новае акно адасаблення -Name[bg]=Нов прозорец за поверително сърфиране -Name[bn-BD]=নতুন ব্যক্তিগত উইন্ডো -Name[bn-IN]=নতুন ব্যক্তিগত উইন্ডো -Name[br]=Prenestr merdeiñ prevez nevez -Name[brx]=गोदान प्राइभेट उइन्ड' -Name[bs]=Novi privatni prozor -Name[ca]=Finestra privada nova -Name[cak]=K'ak'a' ichinan tzuwäch -Name[cs]=Nové anonymní okno -Name[cy]=Ffenestr Breifat Newydd -Name[da]=Nyt privat vindue -Name[de]=Neues privates Fenster -Name[dsb]=Nowe priwatne wokno -Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης -Name[en-GB]=New Private Window -Name[en-US]=New Private Window -Name[en-ZA]=New Private Window -Name[eo]=Nova privata fenestro -Name[es-AR]=Nueva ventana privada -Name[es-CL]=Nueva ventana privada -Name[es-ES]=Nueva ventana privada -Name[es-MX]=Nueva ventana privada -Name[et]=Uus privaatne aken -Name[eu]=Leiho pribatu berria -Name[fa]=پنجره ناشناس جدید -Name[ff]=Henorde Suturo Hesere -Name[fi]=Uusi yksityinen ikkuna -Name[fr]=Nouvelle fenêtre de navigation privée -Name[fy-NL]=Nij priveefinster -Name[ga-IE]=Fuinneog Nua Phríobháideach -Name[gd]=Uinneag phrìobhaideach ùr -Name[gl]=Nova xanela privada -Name[gn]=Ovetã ñemi pyahu -Name[gu-IN]=નવી ખાનગી વિન્ડો -Name[he]=חלון פרטי חדש -Name[hi-IN]=नयी निजी विंडो -Name[hr]=Novi privatni prozor -Name[hsb]=Nowe priwatne wokno -Name[hu]=Új privát ablak -Name[hy-AM]=Սկսել Գաղտնի դիտարկում -Name[id]=Jendela Mode Pribadi Baru -Name[is]=Nýr huliðsgluggi -Name[it]=Nuova finestra anonima -Name[ja]=新しいプライベートウィンドウ -Name[ja-JP-mac]=新規プライベートウインドウ -Name[ka]=ახალი პირადი ფანჯარა -Name[kk]=Жаңа жекелік терезе -Name[km]=បង្អួច​ឯកជន​ថ្មី -Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ -Name[ko]=새 사생활 보호 모드 -Name[kok]=नवो खाजगी विंडो -Name[ks]=نْو پرایوٹ وینڈو& -Name[lij]=Neuvo barcon privou -Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ -Name[lt]=Naujas privataus naršymo langas -Name[ltg]=Jauns privatais lūgs -Name[lv]=Jauns privātais logs -Name[mai]=नया निज विंडो (W) -Name[mk]=Нов приватен прозорец -Name[ml]=പുതിയ സ്വകാര്യ ജാലകം -Name[mr]=नवीन वैयक्तिक पटल -Name[ms]=Tetingkap Persendirian Baharu -Name[my]=New Private Window -Name[nb-NO]=Nytt privat vindu -Name[ne-NP]=नयाँ निजी सञ्झ्याल -Name[nl]=Nieuw privévenster -Name[nn-NO]=Nytt privat vindauge -Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ -Name[pa-IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ -Name[pl]=Nowe okno prywatne -Name[pt-BR]=Nova janela privativa -Name[pt-PT]=Nova janela privada -Name[rm]=Nova fanestra privata -Name[ro]=Fereastră privată nouă -Name[ru]=Новое приватное окно -Name[sat]=नावा निजेराक् विंडो (W ) -Name[si]=නව පුද්ගලික කවුළුව (W) -Name[sk]=Nové okno v režime Súkromné prehliadanie -Name[sl]=Novo zasebno okno -Name[son]=Sutura zanfun taaga -Name[sq]=Dritare e Re Private -Name[sr]=Нови приватан прозор -Name[sv-SE]=Nytt privat fönster -Name[ta]=புதிய தனிப்பட்ட சாளரம் -Name[te]=కొత్త ఆంతరంగిక విండో -Name[th]=หน้าต่างส่วนตัวใหม่ -Name[tr]=Yeni gizli pencere -Name[tsz]=Juchiiti eraatarakua jimpani -Name[uk]=Приватне вікно -Name[ur]=نیا نجی دریچہ -Name[uz]=Yangi maxfiy oyna -Name[vi]=Cửa sổ riêng tư mới -Name[wo]=Panlanteeru biir bu bees -Name[xh]=Ifestile yangasese entsha -Name[zh-CN]=新建隐私浏览窗口 -Name[zh-TW]=新增隱私視窗 -Exec=icecat --private-window %u diff --git a/icecat-x11.sh.in b/icecat-x11.sh.in deleted file mode 100644 index f7173e5..0000000 --- a/icecat-x11.sh.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# Run GNU IceCat on X11 backend -# - -export GDK_BACKEND=x11 -exec /usr/bin/icecat "$@" diff --git a/icecat.1 b/icecat.1 deleted file mode 100644 index ec21e5e..0000000 --- a/icecat.1 +++ /dev/null @@ -1,151 +0,0 @@ -.TH ICECAT 1 "December 12, 2018" icecat "Linux User's Manual" -.SH NAME -IceCat \- GNU version of Firefox browser - -.SH SYNOPSIS -.B icecat -[\fIOPTIONS\fR ...] [\fIURL\fR] - -.B icecat-bin -[\fIOPTIONS\fR] [\fIURL\fR] - -.SH DESCRIPTION -\fBGnuzilla IceCat\fR is an open-source web browser, designed for standards compliance, performance and portability. - -GNUzilla is the GNU version of the Mozilla suite, and GNU IceCat is the GNU version of the Firefox browser. Its main advantage is an ethical one: it is entirely free software. While the Firefox source code from the Mozilla project is free software, they distribute and recommend non-free software as plug-ins and addons. - -In addition, GNU IceCat includes some privacy protection features, included in a separate addon: - -Some sites refer to zero-size images on other hosts to keep track of cookies. When IceCat detects this mechanism it blocks cookies from the site hosting the zero-length image file. (It is possible to re-enable such a site by removing it from the blocked hosts list.) -Other sites rewrite the host name in links redirecting the user to another site, mainly to "spy" on clicks. When this behavior is detected, IceCat shows a message alerting the user. - -Origin of the name - -The name IceCat was coined to show our relationship to the Mozilla Firefox browser. Ice isn't Fire and a Cat isn't a Fox, so it is clearly a different package (we don't want Mozilla blamed for our mistakes, nor cause confusion with their trademarks), but is equally clearly intimately related (of course nearly all of the work comes from the Mozilla foundation effort, so we want to give credit). - -.SH USAGE -\fBicecat\fR is a simple shell script that will set up the -environment for the actual executable, \fBicecat-bin\fR. - -.SH OPTIONS -A summary of the options supported by \fBicecat\fR is included below. - -.SS "X11 options" -.TP -.BI \-\-display= DISPLAY -X display to use -.TP -.B \--sync -Make X calls synchronous -.TP -.B \-\-g-fatal-warnings -Make all warnings fatal - -.SS "IceCat options" -.TP -.B \-h, \-help -Show summary of options. -.TP -.B \-v, \-version -Print IceCat version. -.TP -\fB\-P\fR \fIprofile\fR -Start with \fIprofile\fR. -.TP -\fB\-\-profile\fR \fIpath\fR -Start with profile at \fIpath\fR. -.TP -\fB\-\-migration\fR -Start with migration wizard. -.TP -.B \-\-ProfileManager -Start with ProfileManager. -.TP -\fB\-\-no\-remote\fR -Do not accept or send remote commands; implies \fB--new-instance\fR. -.TP -\fB\-\-new\-instance\fR -Open new instance, not a new window in running instance. -.TP -\fB\-\-UILocale\fR \fIlocale\fR -Start with \fIlocale\fR resources as UI Locale. -.TP -\fB\-\-save\-mode\fR -Disables extensions and themes for this session. -.TP -\fB\-\-headless\fR -Run without a GUI. -.TP -\fB\-\-marionette\fR -Enable remote control server. -.TP -\fB\-\-browser\fR -Open a browser window. -.TP -\fB\-\-new-window\fR \fIurl\fR -Open \fIurl\fR in a new window. -.TP -\fB\-\-new-tab\fR \fIurl\fR -Open \fIurl\fR in a new tab. -.TP -\fB\-\-private-window\fR \fIurl\fR -Open \fIurl\fR in a new private window. -.TP -\fB\-\-preferences\fR -Open Preferences dialog. -.TP -\fB\-\-screenshot\fR [\fIpath\fR] -Save screenshot to \fIpath\fR or in working directory. -.TP -\fB\-\-window-size\fR \fIwidth\fR[,\fIheight\fR] -Width and optionally height of screenshot. -.TP -\fB\-\-search\fR \fIterm\fR -Search \fIterm\fR with your default search engine. -.TP - - -\fB\-\-jsconsole\fR -Open the Browser Console. -.TP -\fB\-\-jsdebugger\fR -Open the Browser Toolbox. -.TP -\fB\-\-wait-for-jsdebugger\fR -Spin event loop until JS debugger connects. Enables debugging (some) application startup code paths. Only has an effect when \fI--jsdebugger\fR is also supplied. -.TP -\fB\-\-devtools\fR -Open DevTools on initial load. -.TP -\fB\-\-start-debugger-server\fR [ws:][\fIport\fR|\fIpath\fR] -Start the debugger server on a TCP port or Unix domain socket path. Defaults to TCP port 6000. Use WebSocket protocol if ws: prefix is specified. -.TP -\fB\-\-recording\fR \fIfile\fR -Record drawing for a given URL. -.TP -\fB\-\-recording-output\fR \fIfile\fR -Specify destination file for a drawing recording. -.TP -\fB\-\-setDefaultBrowser\fR -Set this app as the default browser. - -.SH FILES -\fI/usr/bin/icecat\fR - shell script wrapping -\fBicecat\fR -.br -\fI/usr/lib64/icecat/icecat-bin\fR - \fBicecat\fR -executable - -.SH VERSION -60.x - -.SH BUGS -To report a bug, please mail to bug-gnuzilla@gnu.org/\fR - -.SH AUTHORS -.TP -.B For a full list of the people who are credited with making a contribution to Mozilla, see http://www.mozilla.org/credits/ . -.I http://www.mozilla.org/about.html -.TP -.B Tobias Girstmair -.I https://www.gnu.org/software/gnuzilla/ diff --git a/icecat.appdata.xml b/icecat.appdata.xml index e30c55f..ad0171c 100644 --- a/icecat.appdata.xml +++ b/icecat.appdata.xml @@ -11,7 +11,7 @@

- GNUzilla is the GNU version of the Mozilla suite, and GNU IceCat is the GNU version of the Firefox ESR browser. + GNU IceCat is the GNU version of the Firefox ESR browser.

Its main advantage is an ethical one: it is entirely free software: @@ -22,49 +22,41 @@

Extensions included to this version of IceCat:

-

+

    +
  • LibreJS GNU LibreJS aims to address the JavaScript problem described in Richard - Stallman's article The JavaScript Trap. -

    -

    - AboutIceCat - Adds a custom "about:icecat" homepage with links to information about the - free software and privacy features in IceCat, and check-boxes to enable - and disable the ones more prone to break websites. -

    -

    - HTML5-video-everywhere - Uses the native video player to play embedded videos from different sources -

    -

    + Stallman's article The JavaScript Trap +

  • +
  • + HTTPS Everywhere + HTTPS Everywhere is an extension that encrypts your communications with many major websites, making your browsing more secure +
  • +
  • A set of companion extensions for LibreJS by Nathan Nichols (https://addons.mozilla.org/en-US/firefox/user/NateN1222/) are pre-installed, and provide workarounds to use some services at USPS, RSF.org, SumOfUs.org, pay.gov, McDonald's, goteo.org and Google Docs without using nonfree JavaScript. -

    -

    +

  • +
  • A series of configuration changes and tweaks were applied to ensure that IceCat does not initiate network connections that the user has not explicitly requested. This implies not downloading feeds, updates, blacklists or any other similar data needed during startup. -

    -

    - Tor™ Browser Button - Simple TOR network integration (requires running TOR separately at the operating system level) -

    +
  • +
http://www.gnu.org/software/gnuzilla/ - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1.png + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1021.png - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat2.png + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1022.png - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat3.png + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1023.png - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat4.png + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1024.png sagitter_at_fedoraproject.org diff --git a/icecat.metainfo.xml b/icecat.metainfo.xml deleted file mode 100644 index 691082e..0000000 --- a/icecat.metainfo.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - mozilla-requestpolicy - icecat.desktop - mozilla-requestpolicy - Extension that gives you control over cross-site requests - https://requestpolicycontinued.github.io/ - https://github.com/requestpolicycontinued/requestpolicy/issues - CC0-1.0 - GPL-3.0+ and LGPL-3.0+ - diff --git a/icecat.png b/icecat.png deleted file mode 100644 index aac883e..0000000 Binary files a/icecat.png and /dev/null differ diff --git a/icecat.rpmlintrc b/icecat.rpmlintrc index 22effff..562f383 100644 --- a/icecat.rpmlintrc +++ b/icecat.rpmlintrc @@ -1,4 +1,7 @@ -# Edited by sagitter (sagitter AT fedoraproject dot org) +# Whitelisting errors +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#whitelist +# https://src.fedoraproject.org/rpms/python3/blob/master/f/python3.rpmlintrc +# Edited by sagitter (sagitter@fedoraproject.org) # KNOWN BUGS: # @@ -9,30 +12,43 @@ # ifarch applied patches are okay # https://fedoraproject.org/wiki/Packaging:Guidelines#Architecture_Support addFilter(r'(%ifarch-applied-patch) Patch*') +# Different file size due to the signature of the source code tarbz archive +addFilter(r'file-size-mismatch') + +addFilter(r'(invalid-url) Source0') +addFilter(r'(invalid-url) Source4') +addFilter(r'(invalid-url) Source5') +addFilter(r'(invalid-url) Source17') + +addFilter(r'(strange-permission) icecat-lang_download.sh') +addFilter(r'(strange-permission) node-stdout-nonblocking-wrapper') # ERRORS: ##### RPMs ##### # chroot function (??) -addFilter(r'(missing-call-to-chdir-with-chroot) %{_libdir}/icecat/libmozsandbox.so') -addFilter(r'(missing-call-to-setgroups-before-setuid) %{_libdir}/icecat/libxul.so') +addFilter(r'(missing-call-to-chdir-with-chroot) /usr/lib64/icecat/libmozsandbox.so') +addFilter(r'(missing-call-to-setgroups-before-setuid) /usr/lib64/icecat/libxul.so') +addFilter(r'(missing-call-to-chdir-with-chroot) /usr/lib/icecat/libmozsandbox.so') +addFilter(r'(missing-call-to-setgroups-before-setuid) /usr/lib/icecat/libxul.so') # Expected on FF browser # https://support.mozilla.org/en-US/questions/1045418 -addFilter(r'(zero-length) %{_libdir}/icecat/chrome.manifest') -addFilter(r'(zero-length) %{_libdir}/icecat/browser/chrome.manifest') +addFilter(r'(zero-length) /usr/lib(64)?/icecat/chrome.manifest') +addFilter(r'(zero-length) /usr/lib(64)?/icecat/browser/chrome.manifest') + +addFilter(r'E:library-not-linked-against-libc /usr/lib64/icecat/gtk2/libmozgtk.so') +addFilter(r'E:library-not-linked-against-libc /usr/lib64/icecat/libmozgtk.so') +addFilter(r'E:library-not-linked-against-libc /usr/lib/icecat/gtk2/libmozgtk.so') +addFilter(r'E:library-not-linked-against-libc /usr/lib/icecat/libmozgtk.so') # False positive -addFilter(r'(dangling-symlink) %{_libdir}/icecat/dictionaries %{_datadir}/myspell') +addFilter(r'(dangling-symlink) /usr/lib(64)?/icecat/dictionaries /usr/share/myspell') addFilter(r'(unversioned-explicit-provides) webclient') # WARNINGS: ##### RPMs ##### addFilter(r'(no-manual-page-for-binary) icecat-wayland') +addFilter(r'(no-manual-page-for-binary) icecat-x11') -##### SRPMs ##### -# Different file size due to the signature of the source code tarbz archive -addFilter(r'file-size-mismatch') - -addFilter(r'(invalid-url) Source*') diff --git a/icecat.sh.in b/icecat.sh.in index 704cccc..a269749 100644 --- a/icecat.sh.in +++ b/icecat.sh.in @@ -39,12 +39,12 @@ cmdname=`basename $0` MOZ_ARCH=$(uname -m) case $MOZ_ARCH in x86_64 | s390x | sparc64) - MOZ_LIB_DIR="/usr/lib64" - SECONDARY_LIB_DIR="/usr/lib" + MOZ_LIB_DIR="/__PREFIX__/lib64" + SECONDARY_LIB_DIR="/__PREFIX__/lib" ;; * ) - MOZ_LIB_DIR="/usr/lib" - SECONDARY_LIB_DIR="/usr/lib64" + MOZ_LIB_DIR="/__PREFIX__/lib" + SECONDARY_LIB_DIR="/__PREFIX__/lib64" ;; esac @@ -64,22 +64,35 @@ MOZ_DIST_BIN="$MOZ_LIB_DIR/icecat" MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE" -MOZ_LAUNCHER="$MOZ_DIST_BIN/run-icecat.sh" +MOZ_LAUNCHER="$MOZ_DIST_BIN/icecat" +GETENFORCE_FILE="/usr/sbin/getenforce" ## -## Enable X11 backend by default? +## Enable Wayland backend? ## -if __DEFAULT_X11__; then - if ! [ "$GDK_BACKEND" ]; then - export GDK_BACKEND=x11 - fi +if ! [ $MOZ_DISABLE_WAYLAND ] && [ "$WAYLAND_DISPLAY" ]; then + if [ "$XDG_CURRENT_DESKTOP" == "GNOME" ]; then + export MOZ_ENABLE_WAYLAND=1 + fi +## Enable Wayland on KDE/Sway +## + if [ "$XDG_SESSION_TYPE" == "wayland" ]; then + export MOZ_ENABLE_WAYLAND=1 + fi +fi + +## +## Use D-Bus remote exclusively when there's Wayland display. +## +if [ "$WAYLAND_DISPLAY" ]; then + export MOZ_DBUS_REMOTE=1 fi ## ## Set MOZ_GRE_CONF ## MOZ_GRE_CONF=/etc/gre.d/gre.conf -if [ "$MOZ_LIB_DIR" == "/usr/lib64" ]; then +if [ "$MOZ_LIB_DIR" == "/__PREFIX__/lib64" ]; then MOZ_GRE_CONF=/etc/gre.d/gre64.conf fi export MOZ_GRE_CONF @@ -107,7 +120,8 @@ export MOZ_PLUGIN_PATH ## ## Set MOZ_APP_LAUNCHER for gnome-session ## -export MOZ_APP_LAUNCHER="/usr/bin/icecat" +export MOZ_APP_LAUNCHER="/__PREFIX__/bin/icecat" + ## ## Set FONTCONFIG_PATH for Xft/fontconfig @@ -148,7 +162,7 @@ export MOZ_USE_XINPUT2=1 ## -## To disable the use of Firefox localization, set MOZ_DISABLE_LANGPACKS=1 +## To disable the use of IceCat localization, set MOZ_DISABLE_LANGPACKS=1 ## in your environment before launching Firefox. ## # @@ -167,11 +181,19 @@ MOZILLA_DOWN=0 if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then if [ -x $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE ]; then # Is icecat running? - /usr/bin/pidof icecat > /dev/null 2>&1 + /__PREFIX__/pidof icecat > /dev/null 2>&1 MOZILLA_DOWN=$? fi fi +# When IceCat is not running, restore SELinux labels for profile files +# (rhbz#1731371) +if [ $MOZILLA_DOWN -ne 0 ]; then + if [ -x $GETENFORCE_FILE ] && [ `getenforce` != "Disabled" ]; then + (restorecon -vr ~/.mozilla/icecat/* &) + fi +fi + # Modify language pack configuration only when icecat is not running # and language packs are not disabled if [ $MOZILLA_DOWN -ne 0 ]; then @@ -191,8 +213,8 @@ if [ $MOZILLA_DOWN -ne 0 ]; then CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG} # Try with a local variant first, then without a local variant - SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"` - MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"` + SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g" | sed "s|\..*||g"` + MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g" | sed "s|\..*||g"` function create_langpack_link() { local language=$* @@ -247,13 +269,11 @@ do ;; esac done - -# Run the browser -debugging=0 -if [ $debugging = 1 ] -then - echo $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" -fi + +## Allow downgrade because during distro upgrade the build time can be +## older in newer version than the previous one. +## +export MOZ_ALLOW_DOWNGRADE=1 -exec $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" +exec $MOZ_PROGRAM "$@" diff --git a/icecat.spec b/icecat.spec index 5bbce05..6e50c61 100644 --- a/icecat.spec +++ b/icecat.spec @@ -1,448 +1,393 @@ -# Filtering of private libraries -%global privlibs libbrowsercomps -%global privlibs %{privlibs}|libclearkey -%global privlibs %{privlibs}|libdbusservice -%global privlibs %{privlibs}|libmozalloc -%global privlibs %{privlibs}|libmozgnome -%global privlibs %{privlibs}|liblgpllibs +### Naming ### +# Set to true if it's going to be submitted as update +%global release_build 1 -%global __provides_exclude ^(%{privlibs})\\.so -%global __requires_exclude ^(%{privlibs})\\.so -# +# Set new source-code build version for Fedora and, not necessarily, for upstream too +%global redhat_ver rh1 -##Active/Deactive language files handling -%global build_langpacks 0 +ExcludeArch: %{ix86} %{arm} -%define default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html +# Bundled cbindgen makes build slow. +# Enable only if system cbindgen is not available. +%global use_bundled_cbindgen 0 -##Define installation directories -%global icecatappdir %{_libdir}/%{name} -%global icecat_ver %{name}-%{version} -%global icecat_devel %{name}-devel-%{version} - -##Define language files directory -%global langpackdir %{icecatappdir}/langpacks - -%global toolkit_gtk3 1 +#################### +### Optimization ### # Builds for debugging -%global debug_build 0 +%global debug_build 0 + +# Downgrade optimization +%global less_optbuild 0 + +# Build PGO+LTO on x86_64 and aarch64 only +%ifarch x86_64 %{arm64} +%if 0%{?release_build} +%global build_with_pgo 1 +%global pgo_wayland 1 +%global launch_wayland_compositor 1 +%else +%global build_with_pgo 0 +%global pgo_wayland 0 +%global launch_wayland_compositor 0 +%endif +%endif + +#################### + +# Active/Deactive language files handling +%bcond_without langpacks + +%if %{with langpacks} +%bcond_without langpacks_subpkg +%endif + +# Define installation directories +%global icecatappdir %{_libdir}/%{name} +# Define language files directory +%global langpackdir %{icecatappdir}/langpacks + +%global icecat_ver %{name}-%{version} +%global icecat_devel %{name}-devel-%{version} + +%global toolkit_gtk3 1 # Big endian platforms -%ifarch ppc64 s390x +%ifarch s390x %{power64} # Javascript Intl API is not supported on big endian platforms right now: # https://bugzilla.mozilla.org/show_bug.cgi?id=1322212 -%global big_endian 1 +%global big_endian 1 %endif -# Use system sqlite? -%global system_sqlite 1 - -%if 0%{?system_sqlite} -%global sqlite_version 3.8.4.2 -# The actual sqlite version (see #480989): -%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) -%endif - -# Use system libicu? -%if 0%{?fedora} > 28 -%global system_libicu 1 +%if 0%{?fedora} +%global system_nss 1 %else -%global system_libicu 0 +%global system_nss 0 %endif - -# Use system nspr/nss? -%global system_nss 1 - -%if 0%{?system_nss} -%global nspr_version 4.17.0 -# NSS/NSPR quite often ends in build override, so as requirement the version -# we're building against could bring us some broken dependencies from time to time. -#%%global nspr_build_version %%(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) +%if %{?system_nss} +%global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.34 -#%%global nss_build_version %%(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) +%global nss_version 3.100 %global nss_build_version %{nss_version} %endif -## Audio backends +# Audio backends %bcond_without pulseaudio -%bcond_without jack +%bcond_with alsa -%if 0%{?fedora} > 29 -%global wayland_backend_default 1 -%global with_vpx 0 -%else -%global with_vpx 1 +%global with_vpx 1 +%if %{?with_vpx} +%global libvpx_version 1.8.2 %endif -# Use mozilla hardening option? -%global hardened_build 1 +# Use clang? +%bcond_without toolchain_clang + +%if %{with toolchain_clang} +%global toolchain clang +%endif + +# https://bugzilla.redhat.com/show_bug.cgi?id=1908792 +# https://bugzilla.redhat.com/show_bug.cgi?id=2255254 +%global __provides_exclude_from ^%{icecatappdir} +%global __requires_exclude ^(%%(find %{buildroot}%{icecatappdir} -name '*.so' | xargs -n1 basename | sort -u | paste -s -d '|' -)) Name: icecat -Version: 60.5.1 -Release: 1%{?dist} +Epoch: 4 +Version: 140.7.0 +Release: %autorelease -e %{redhat_ver} Summary: GNU version of Firefox browser -## Tri-licensing scheme for Gnuzilla/IceCat in parentheses, and licenses for the extensions included -License: (MPLv1.1 or GPLv2+ or LGPLv2+) and GPLv3+ and MIT and BSD and ISC and ASL 2.0 and MPLv2.0 +# Tri-licensing scheme for Gnuzilla/IceCat in parentheses, and licenses for the extensions included +License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND GPL-3.0-or-later AND MIT AND BSD-4-Clause-UC AND ISC AND Apache-2.0 AND MPL-2.0 URL: http://www.gnu.org/software/gnuzilla/ ## Source archive created by scripts based on Gnuzilla files. -## Modified files are hosted in a dedicated fork repository: -## https://fedorapeople.org/cgit/sagitter/public_git/icecat.git/ -Source0: https://sagitter.fedorapeople.org/icecat/v%{version}/%{name}-%{version}-gnu1.tar.bz2 -#Source0: http://alpha.gnu.org/gnu/gnuzilla/%%{version}/icecat-%%{version}-gnu1.tar.bz2 +## All modified files are hosted in a dedicated fork repository: +## https://gitlab.com/anto.trande/icecat +Source0: %{name}-%{version}-%{redhat_ver}.tar.bz2 Source2: %{name}.png Source3: %{name}-mozconfig-common -##Language files downloaded by source7 script -%if 0%{build_langpacks} +# Language files downloaded by source7 script +%if %{with langpacks} Source4: %{name}-%{version}-langpacks.tar.gz %endif -##All license files -##Download from http://www.gnu.org/licenses -##Download from http://www.mozilla.org/MPL/1.1/index.txt -##Download from https://www.mozilla.org/MPL/2.0/index.txt +# All license files +# Download from http://www.gnu.org/licenses +# Download from http://www.mozilla.org/MPL/1.1/index.txt +# Download from https://www.mozilla.org/MPL/2.0/index.txt Source5: %{name}-COPYING-licensefiles.tar.gz -##manpage file -Source6: %{name}.1 - Source7: %{name}-lang_download.sh -# Whitelisting errors -# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#whitelist -Source8: %{name}.rpmlintrc - # Desktop files -Source9: %{name}-wayland.desktop Source10: %{name}.appdata.xml -Source11: %{name}.metainfo.xml -Source12: %{name}-wayland.sh.in Source13: %{name}.sh.in Source14: %{name}.desktop -Source15: %{name}-x11.sh.in -Source16: %{name}-x11.desktop -# Build patches -Patch3: mozilla-build-arm.patch - -# Unrecognized file? -Patch7: %{name}-fix_jar.patch - -# Fix files list for installer -Patch8: %{name}-fix_installer.patch - -# xlocale.h not provided by glibc-headers -# Set path of libcxx-devel -Patch9: %{name}-locale.patch - -Patch26: build-icu-big-endian.patch - -# Also fixes s390x: https://bugzilla.mozilla.org/show_bug.cgi?id=1376268 -Patch29: build-big-endian.patch -# Always feel lucky for unsupported platforms: -# https://bugzilla.mozilla.org/show_bug.cgi?id=1347128 -Patch37: build-jit-atomic-always-lucky.patch +# cbingen +Source17: cbindgen-vendor.tar.xz +Source18: node-stdout-nonblocking-wrapper +Source19: run-wayland-compositor # Fedora specific patches -Patch219: rhbz-1173156.patch -Patch225: mozilla-1005640-accept-lang.patch +Patch221: firefox-nss-addon-hack.patch +Patch224: %{name}-GLIBCXX-fix-for-GCC-12.patch -#ARM run-time patch +# ARM run-time patch Patch226: rhbz-1354671.patch -# Upstream patches -Patch406: mozilla-256180.patch -Patch413: mozilla-1353817.patch -Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch -Patch416: mozilla-1424422.patch -Patch417: bug1375074-save-restore-x28.patch -Patch418: mozilla-1436242.patch -Patch420: %{name}-disable-dbus-remote.patch -Patch421: %{name}-bz1445383.patch +# Fix crash on ppc64le (mozilla#1512162) +Patch423: mozilla-1512162.patch -# Wayland specific upstream patches -Patch565: firefox-pipewire.patch -# +# PGO/LTO patches +Patch603: %{name}-gcc-always-inline.patch -BuildRequires: alsa-lib-devel -BuildRequires: autoconf213 -BuildRequires: bzip2-devel -BuildRequires: cairo-devel -BuildRequires: ccache -BuildRequires: dbus-devel -BuildRequires: dbus-glib-devel -BuildRequires: dconf -BuildRequires: desktop-file-utils -BuildRequires: dos2unix -BuildRequires: gcc, gcc-c++ -BuildRequires: fedora-bookmarks -BuildRequires: freetype-devel -BuildRequires: gdk-pixbuf2 -BuildRequires: glib2-devel -BuildRequires: pkgconfig(gtk+-2.0) -%if %{?toolkit_gtk3} -BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: alsa-lib-devel +BuildRequires: autoconf213 +BuildRequires: bzip2-devel +BuildRequires: cairo-devel +BuildRequires: cargo +%if !0%{?use_bundled_cbindgen} +BuildRequires: cbindgen %endif -BuildRequires: gstreamer1-devel -BuildRequires: gstreamer1-plugins-base-devel -BuildRequires: gstreamer-devel -BuildRequires: gstreamer-plugins-base-devel -BuildRequires: hunspell-devel -BuildRequires: ImageMagick, autotrace -BuildRequires: java-1.8.0-openjdk-headless -BuildRequires: intltool -BuildRequires: libappstream-glib -BuildRequires: libevent-devel -BuildRequires: libicu-devel -BuildRequires: libIDL-devel -BuildRequires: libjpeg-turbo-devel -BuildRequires: libjpeg-devel -BuildRequires: libX11-devel -BuildRequires: libXt-devel -BuildRequires: libXrender-devel -BuildRequires: libyuv-devel -BuildRequires: libXinerama-devel -BuildRequires: libffi-devel -BuildRequires: libnotify-devel -BuildRequires: libpng-devel +BuildRequires: ccache +BuildRequires: dbus-devel +BuildRequires: dbus-glib-devel +BuildRequires: dbus-x11 +BuildRequires: dconf +BuildRequires: desktop-file-utils +BuildRequires: dos2unix +BuildRequires: gcc, gcc-c++ +BuildRequires: make +BuildRequires: freetype-devel +BuildRequires: gdk-pixbuf2 +BuildRequires: glib2-devel +BuildRequires: pkgconfig(gtk+-2.0) +%if 0%{?toolkit_gtk3} +BuildRequires: pkgconfig(gtk+-3.0) +%endif +BuildRequires: gstreamer1-devel +BuildRequires: gstreamer1-plugins-base-devel +BuildRequires: hunspell-devel +BuildRequires: ImageMagick, autotrace +BuildRequires: intltool +BuildRequires: libappstream-glib +BuildRequires: libavcodec-free-devel +BuildRequires: libevent-devel +BuildRequires: libjpeg-turbo-devel +BuildRequires: libjpeg-devel +BuildRequires: libX11-devel +BuildRequires: libXt-devel +BuildRequires: libXrender-devel +BuildRequires: libyuv-devel +BuildRequires: libXinerama-devel +BuildRequires: libffi-devel +BuildRequires: libnotify-devel +BuildRequires: libpng-devel %if %{?with_vpx} -BuildRequires: libvpx-devel +BuildRequires: libvpx-devel >= %{libvpx_version} %endif -BuildRequires: libzip-devel -BuildRequires: mesa-libGL-devel +BuildRequires: libzip-devel +BuildRequires: mesa-libGL-devel +BuildRequires: nodejs +BuildRequires: nasm >= 1.13 +BuildRequires: strace + %if %{?system_nss} -BuildRequires: pkgconfig(nspr) >= %{nspr_version} -BuildRequires: pkgconfig(nss) >= %{nss_version} -BuildRequires: nss-static >= %{nss_version} +BuildRequires: pkgconfig(nspr) >= %{nspr_version} +BuildRequires: pkgconfig(nss) >= %{nss_version} +BuildRequires: nss-static >= %{nss_version} %endif -# xlocale.h not provided by glibc-headers > 2.24 -# Set path of libcxx-devel -BuildRequires: libcxx-devel -BuildRequires: openjpeg-devel -BuildRequires: pango-devel -BuildRequires: pipewire-devel -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-virtualenv -BuildRequires: pkgconfig(gconf-2.0) -BuildRequires: pkgconfig(xrender) -BuildRequires: pkgconfig(libstartup-notification-1.0) -BuildRequires: pkgconfig(dri) -BuildRequires: pkgconfig(libcurl) +BuildRequires: pango-devel +BuildRequires: pciutils-libs +BuildRequires: pipewire-devel +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3.11-devel +BuildRequires: python3-orjson +BuildRequires: perl-interpreter +BuildRequires: pkgconfig(xrender) +BuildRequires: pkgconfig(libstartup-notification-1.0) +BuildRequires: pkgconfig(dri) +BuildRequires: pkgconfig(libcurl) %if %{with pulseaudio} -BuildRequires: pulseaudio-libs-devel +BuildRequires: pulseaudio-libs-devel %endif -%if %{with jack} -BuildRequires: jack-audio-connection-kit-devel +BuildRequires: llvm +%if 0%{?fedora} >= 42 || 0%{?rhel} >= 10 +BuildRequires: clang19 +BuildRequires: clang19-libs +BuildRequires: llvm19-devel +BuildRequires: compiler-rt19 +%global llvm_suffix -19 +%else +BuildRequires: clang17 +BuildRequires: clang17-libs +BuildRequires: llvm17-devel +BuildRequires: compiler-rt17 +%global llvm_suffix -17 %endif -BuildRequires: yasm -BuildRequires: llvm -BuildRequires: llvm-devel -BuildRequires: clang -BuildRequires: clang-libs -BuildRequires: rust -BuildRequires: cargo +%if "%toolchain" == "clang" +BuildRequires: lld +%endif +BuildRequires: rust +BuildRequires: rustfmt -%if %{?system_sqlite} -BuildRequires: pkgconfig(sqlite3) >= %{sqlite_version} -Requires: sqlite >= %{sqlite_build_version} +%if 0%{?pgo_wayland} +BuildRequires: xorg-x11-server-Xvfb +BuildRequires: mutter +BuildRequires: gsettings-desktop-schemas +BuildRequires: gnome-settings-daemon +BuildRequires: mesa-dri-drivers +BuildRequires: mesa-libEGL +BuildRequires: xorg-x11-server-Xwayland +BuildRequires: dbus-x11 +BuildRequires: gnome-keyring %endif -Requires: dconf -Requires: mozilla-filesystem -Requires: p11-kit-trust +%if 0%{?big_endian} +BuildRequires: icu +%endif + +Requires: dconf +Requires: mozilla-filesystem +Requires: p11-kit-trust %if %{?system_nss} -Requires: nspr >= %{nspr_build_version} -Requires: nss >= %{nss_build_version} +Requires: nspr >= %{nspr_build_version} +Requires: nss >= %{nss_build_version} %endif -Requires: fedora-bookmarks -Suggests: mozilla-https-everywhere -Suggests: mozilla-ublock-origin -Provides: webclient +%if 0%{?fedora} +BuildRequires: fedora-bookmarks +Requires: fedora-bookmarks +%endif + +Suggests: mozilla-ublock-origin +Provides: webclient %description -GNUZilla Icecat is a fully-free fork of Mozilla Firefox ESR. +GNU IceCat is the GNU version of the Firefox ESR browser. Extensions included to this version of IceCat: - * AboutIceCat - Adds a custom "about:icecat" homepage with links to information about the - free software and privacy features in IceCat, and check-boxes to enable - and disable the ones more prone to break websites. - * LibreJS - GNU LibreJS aims to address the JavaScript problem described in Richard - Stallman's article The JavaScript Trap. + GNU LibreJS aims to address the JavaScript problem described in the article + "The JavaScript Trap" of Richard Stallman. + + * JShelter: Mitigates potential threats from JavaScript, including fingerprinting, + tracking, and data collection. Slightly modifies the results of API calls, + differently on different domains, so that the cross-site fingerprint is not + stable. Applies security counter-measures that are likely not to break web pages. + Allows fine-grained control over the restrictions and counter-measures applied + to each domain. - * HTML5-video-everywhere - Uses the native video player to play embedded videos from different sources + * A set of companion extensions for LibreJS by Nathan Nichols + are pre-installed, and provide workarounds to use some services at USPS, + RSF.org, SumOfUs.org, pay.gov, McDonalds, goteo.org and Google Docs + without using nonfree JavaScript. - * Tor™ Browser Button - Simple TOR network integration - (requires running TOR separately at the operating system level) + * A series of configuration changes and tweaks were applied to ensure that + IceCat does not initiate network connections that the user has not explicitly + requested. This implies not downloading feeds, updates, blacklists or any + other similar data needed during startup. - * Searxes - Third-party Request Blocker - -%if 0%{?wayland_backend_default} -%package x11 -Summary: GNU IceCat X11 launcher -Requires: %{name} -%description x11 -The %{name}-x11 package contains launcher and desktop file -to run GNU IceCat natively on X11. -%else -%package wayland -Summary: GNU IceCat Wayland launcher -Requires: %{name} -%description wayland -The icecat-wayland package contains launcher and desktop file -to run GNU IceCat natively on Wayland. +%if %{with langpacks_subpkg} +%package langpacks +Summary: IceCat langpacks +Requires: %{name} = 4:%{version}-%{release} +%description langpacks +The icecat-langpacks package contains all the localization +and translations langpack add-ons. +%files langpacks -f %{name}.lang +%dir %{langpackdir} %endif %prep -%setup -q -n %{name}-%{version} +%autosetup -N -n %{name}-%{version} -#Fix permissions -find . -type f -name "*.h" -exec chmod 0644 '{}' \; -find . -type f -name "*.cpp" -exec chmod 0644 '{}' \; -find . -type f -name "*.cc" -exec chmod 0644 '{}' \; -find . -type f -name "*.c" -exec chmod 0644 '{}' \; - -##Copy license files +# Copy license files tar -xf %{SOURCE5} -##Prevent HTTPS-everywhere addon's installation -sed '/https-everywhere/d' -i ./browser/installer/package-manifest.in - -%patch3 -p1 -b .arm -%patch7 -p0 -%patch8 -p0 - -%patch37 -p1 -b .jit-atomic-lucky - # Fedora patches -%patch219 -p1 -b .rhbz-1173156 -%patch225 -p1 -b .1005640-accept-lang +%if 0%{?fedora} +%patch -P 221 -p 1 -b .firefox-nss-addon-hack +%endif +%patch -P 224 -p 1 -b .glibcxx -#ARM run-time patch -%ifarch aarch64 -%patch226 -p1 -b .1354671 +# ARM64 +%ifarch %{arm64} +%patch -P 226 -p 1 -b .1354671 %endif -%patch406 -p0 -b .256180 -%patch413 -p1 -b .1353817 -%ifarch %{arm} -%patch415 -p1 -b .mozilla-1238661 +%ifarch %{power64} +%patch -P 423 -p 1 -b .1512162 %endif -%patch416 -p1 -b .1424422 -%patch417 -p1 -b .bug1375074-save-restore-x28 -%patch418 -p1 -b .mozilla-1436242 +%patch -P 603 -p1 -b .inline -# Patch for big endian platforms only -%if 0%{?big_endian} -%patch26 -p1 -b .icu -%patch9 -p0 -b .locale -%patch29 -p1 -b .big-endian -%endif - -%patch420 -p1 -b .%{name}-disable-dbus-remote -%patch421 -p1 -b .%{name}-update-ccache-stats-parser - -# Wayland specific upstream patches -dos2unix %{PATCH565} -%patch565 -p1 -b .firefox-pipewire - -##Remove default configuration and copy the customized one +# Remove default configuration and copy the customized one rm -f .mozconfig cp -p %{SOURCE3} .mozconfig +# Disable signature checking for extensions that are bundled with IceCat. +# Add these options to allow loading unsigned add-ons in app and system scopes. +echo "ac_add_options --with-unsigned-addon-scopes=app,system" >> .mozconfig +echo "ac_add_options --allow-addon-sideload" >> .mozconfig + echo "ac_add_options --enable-default-toolkit=cairo-gtk3-wayland" >> .mozconfig echo "ac_add_options --enable-official-branding" >> .mozconfig - -%ifarch %{ix86} x86_64 -echo "ac_add_options --enable-webrtc" >> .mozconfig -%else echo "ac_add_options --disable-webrtc" >> .mozconfig + +# Hide DRM Content option +# This option does not work on other architectures +%ifarch x86_64 +echo "ac_add_options --disable-eme" >> .mozconfig %endif %if %{with pulseaudio} echo "ac_add_options --enable-pulseaudio" >> .mozconfig %endif -%if %{with jack} -echo "ac_add_options --enable-jack" >> .mozconfig +%if %{with alsa} +echo "ac_add_options --enable-alsa" >> .mozconfig %endif %ifarch s390x echo "ac_add_options --disable-jemalloc" >> .mozconfig %endif -%if 0%{?system_nss} -echo "ac_add_options --with-nspr-cflags='%(%{_bindir}/nspr-config --cflags)'" >> .mozconfig -echo "ac_add_options --with-nspr-libs='%(%{_bindir}/nspr-config --libs)'" >> .mozconfig -echo "ac_add_options --with-system-nss" >>.mozconfig -%endif -%if 0%{?system_libicu} -echo "ac_add_options --with-system-icu" >> .mozconfig +%if %{?system_nss} +echo "ac_add_options --with-system-nspr" >> .mozconfig +echo "ac_add_options --with-system-nss" >> .mozconfig +echo 'ac_add_options BINDGEN_CFLAGS="%(pkg-config nspr pixman-1 --cflags)"' >> .mozconfig %else -echo "ac_add_options --without-system-icu" >> .mozconfig +echo "ac_add_options --without-system-nspr" >> .mozconfig +echo "ac_add_options --without-system-nss" >> .mozconfig %endif -echo "ac_add_options --disable-system-cairo" >> .mozconfig -echo "ac_add_options --enable-system-hunspell" >> .mozconfig +# Workaround for mozbz#1341234 +echo "ac_add_options --allow-addon-sideload" >> .mozconfig echo "ac_add_options --enable-system-pixman" >> .mozconfig -%if 0%{?system_sqlite} -echo "ac_add_options --enable-system-sqlite" >> .mozconfig -%else -echo "ac_add_options --disable-system-sqlite" >> .mozconfig -%endif -echo "ac_add_options --with-system-zlib" >> .mozconfig -echo "ac_add_options --with-system-bz2" >> .mozconfig -echo "ac_add_options --with-system-libevent=%{_prefix}" >> .mozconfig -echo "ac_add_options --enable-llvm-hacks" >> .mozconfig +echo "ac_add_options --with-system-libevent" >> .mozconfig %if %{?with_vpx} echo "ac_add_options --with-system-libvpx" >> .mozconfig %else echo "ac_add_options --without-system-libvpx" >> .mozconfig %endif -echo "ac_add_options --disable-libjpeg-turbo" >> .mozconfig + echo "ac_add_options --with-system-jpeg" >> .mozconfig -echo "ac_add_options --disable-crashreporter" >> .mozconfig -echo "ac_add_options --disable-eme" >> .mozconfig - -# This option works on these architectures only -%ifarch %{ix86} x86_64 %{arm} -echo "ac_add_options --disable-elf-hack" >> .mozconfig -%endif - -%ifarch aarch64 ppc64 s390x %{arm} %{ix86} -#echo "ac_add_options --disable-skia" >> .mozconfig -%endif +echo "ac_add_options --enable-ffmpeg" >> .mozconfig +echo "ac_add_options --enable-av1" >> .mozconfig %if 0%{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig -echo "ac_add_options --enable-dtrace" >> .mozconfig +echo "ac_add_options --enable-rust-debug" >> .mozconfig %else -%define optimize_flags "none" -# Fedora with GCC-7 needs to disable default build flags (mozbz#1342344) -%ifnarch s390x -%define optimize_flags "-g -O2" -%endif -%ifarch %{arm} s390x -# ARMv7 need that (rhbz#1426850) -%define optimize_flags "-g -O2 -fno-schedule-insns" -%endif -%ifarch ppc64le aarch64 -%define optimize_flags "-g -O2" -%endif +%global optimize_flags "none" %if %{?optimize_flags} != "none" echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig %else @@ -450,162 +395,205 @@ echo 'ac_add_options --enable-optimize' >> .mozconfig %endif echo "ac_add_options --disable-debug" >> .mozconfig %endif - echo "ac_add_options --disable-strip" >> .mozconfig echo "ac_add_options --disable-install-strip" >> .mozconfig echo "ac_add_options --disable-tests" >> .mozconfig +echo "ac_add_options --disable-crashreporter" >> .mozconfig + +# Localization +%if %{with langpacks} echo "ac_add_options --with-l10n-base=$PWD/l10n" >> .mozconfig - -echo "ac_add_options --disable-rust-tests" >> .mozconfig -echo "ac_add_options --disable-gtest-in-build" >> .mozconfig - -%if 0%{?hardened_build} -echo "ac_add_options --enable-hardening" >> .mozconfig %endif +%if "%toolchain" == "clang" +echo "ac_add_options --with-libclang-path=`llvm-config%{?llvm_suffix} --libdir`" >> .mozconfig +%endif + +%ifarch s390x %{arm64} +echo "ac_add_options --disable-jit" >> .mozconfig +%endif + +%if 0%{?build_with_pgo} +echo "ac_add_options MOZ_PGO=1" >> .mozconfig +echo "ac_add_options --enable-lto" >> .mozconfig +%else +echo "ac_add_options --disable-lto" >> .mozconfig +%endif + +echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig + # Remove executable bit to make brp-mangle-shebangs happy. chmod -x third_party/rust/itertools/src/lib.rs +chmod a-x third_party/rust/ash/src/extensions/ext/*.rs +chmod a-x third_party/rust/ash/src/extensions/khr/*.rs +chmod a-x third_party/rust/ash/src/extensions/nv/*.rs + +# Remove unrecognized files +find extensions/gnu -name cose.manifest -delete #--------------------------------------------------------------------- %build -%if 0%{?system_sqlite} -# Do not proceed with build if the sqlite require would be broken: -# make sure the minimum requirement is non-empty, ... -sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 -# ... and that major number of the computed build-time version matches: -case "%{sqlite_build_version}" in - "$sqlite_version"*) ;; - *) exit 1 ;; -esac +# cbindgen +%if 0%{?use_bundled_cbindgen} +mkdir -p my_rust_vendor +cd my_rust_vendor +%{__tar} xf %{SOURCE17} +cd - +mkdir -p .cargo +cat > .cargo/config <> .mozconfig +echo "export AR=\"llvm-ar\"" >> .mozconfig +echo "export NM=\"llvm-nm\"" >> .mozconfig +echo "export RANLIB=\"llvm-ranlib\"" >> .mozconfig +echo "ac_add_options --enable-linker=lld" >> .mozconfig +echo "export CC=clang%{?llvm_suffix}" >> .mozconfig +echo "export CXX=clang++%{?llvm_suffix}" >> .mozconfig +%else +echo "export CC=gcc" >> .mozconfig +echo "export CXX=g++" >> .mozconfig +echo "export AR=\"gcc-ar\"" >> .mozconfig +echo "export NM=\"gcc-nm\"" >> .mozconfig +echo "export RANLIB=\"gcc-ranlib\"" >> .mozconfig %endif -export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" -export MOZ_SERVICES_SYNC="1" -export MOZ_OPTIMIZE_FLAGS=" -freorder-blocks -fno-reorder-functions" -export STRIP=/bin/true -MOZ_RUN_GTEST=0 ./mach -v build +%if 0%{?build_with_pgo} +echo "ac_add_options MOZ_PGO=1" >> .mozconfig +# PGO build doesn't work with ccache +export CCACHE_DISABLE=1 +%endif + +# Require 4 GB of RAM per CPU core +%global _smp_tasksize_proc 4096 +%if %{?less_optbuild} +echo "mk_add_options MOZ_MAKE_FLAGS=\"-j1\"" >> .mozconfig +%else +echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig +%endif + +echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig +echo "export STRIP=/bin/true" >> .mozconfig + +%if 0%{?launch_wayland_compositor} +cp -p %{SOURCE19} . +. ./run-wayland-compositor +%endif + +%if %{?debug_build} +export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true +%endif + +#Use python 3.11 for mach +sed -i -e 's|#!/usr/bin/env python3|#!/usr/bin/env python3.11|' mach + +./mach build -v 2>&1 | cat - || exit 1 + +%if 0%{?build_with_pgo} +kill $MUTTER_PID +%endif %install # set up our default bookmarks +%if 0%{?fedora} +%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html cp -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html +%endif %make_install -C objdir ##Resize IceCat icon for i in 16 22 24 32 36 48 64 72 96 128 256 ; do - mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}x${i}/apps - convert -geometry ${i} %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps + convert -geometry ${i} %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png done ##desktop file installation -mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications -desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE14} +mkdir -p %{buildroot}%{_datadir}/applications +desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE14} -%if 0%{?wayland_backend_default} -desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE16} -%else -desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE9} -%endif - -# set up the firefox start script -%if 0%{?wayland_backend_default} -%global x11_state false -%else -%global x11_state true -%endif - -rm -rf $RPM_BUILD_ROOT%{_bindir}/%{name} -sed -e 's/__DEFAULT_X11__/%{x11_state}/' %{SOURCE13} > %{buildroot}%{_bindir}/%{name} +rm -rf %{buildroot}%{_bindir}/%{name} +%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE13} > %{buildroot}%{_bindir}/%{name} chmod 755 %{buildroot}%{_bindir}/%{name} - -%if 0%{?wayland_backend_default} -cat %{SOURCE15} > %{buildroot}%{_bindir}/%{name}-x11 -chmod 755 %{buildroot}%{_bindir}/%{name}-x11 -%else -cat %{SOURCE12} > %{buildroot}%{_bindir}/%{name}-wayland -chmod 755 %{buildroot}%{_bindir}/%{name}-wayland -%endif # -##Install man page -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 -install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/man1/ - -##Make sure locale works for langpacks -cat > objdir/dist/bin/browser/defaults/preferences/icecat-l10n.js << EOF -pref("general.useragent.locale", "chrome://global/locale/intl.properties"); -EOF - ##Extract langpacks, make any mods needed, repack the langpack, and install it. -%if 0%{?build_langpacks} echo > %{name}.lang -mkdir -p $RPM_BUILD_ROOT%{langpackdir} +%if %{with langpacks} +mkdir -p %{buildroot}%{langpackdir} tar xf %{SOURCE4} for langpack in `ls langpacks/*.xpi`; do language=`basename $langpack .xpi` @@ -618,7 +606,7 @@ tar xf %{SOURCE4} zip -qq -r9mX ../${extensionID}.xpi * cd - - install -p -m 644 ${extensionID}.xpi $RPM_BUILD_ROOT%{langpackdir} + install -p -m 644 ${extensionID}.xpi %{buildroot}%{langpackdir} language=`echo $language | sed -e 's/-/_/g'` echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> %{name}.lang done @@ -628,11 +616,26 @@ rm -rf %{name}-langpacks function create_default_langpack() { language_long=$1 language_short=$2 -cd $RPM_BUILD_ROOT%{langpackdir} +cd %{buildroot}%{langpackdir} ln -s langpack-$language_long@icecat.mozilla.org.xpi langpack-$language_short@icecat.mozilla.org.xpi cd - echo "%%lang($language_short) %{langpackdir}/langpack-$language_short@icecat.mozilla.org.xpi" >> %{name}.lang } + +# Table of fallbacks for each language +#create_default_langpack "bn-IN" "bn" +create_default_langpack "es-AR" "es" +create_default_langpack "fy-NL" "fy" +create_default_langpack "ga-IE" "ga" +create_default_langpack "gu-IN" "gu" +create_default_langpack "hi-IN" "hi" +create_default_langpack "hy-AM" "hy" +create_default_langpack "nb-NO" "nb" +create_default_langpack "nn-NO" "nn" +create_default_langpack "pa-IN" "pa" +create_default_langpack "pt-PT" "pt" +create_default_langpack "sv-SE" "sv" +create_default_langpack "zh-TW" "zh" %endif # Remove copied libraries to speed up build @@ -648,20 +651,19 @@ ln -sf %{icecatappdir}/%{name}-bin ${RPM_BUILD_ROOT}%{icecatappdir}/%{name} # Use the system hunspell dictionaries rm -rf ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries -ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries - -# Copy over run-icecat.sh -cp -p build/unix/run-%{name}.sh %{buildroot}%{icecatappdir}/ +ln -s %{_datadir}/hunspell ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries # Remove unused directories -rm -rf $RPM_BUILD_ROOT%{_libdir}/%{icecat_devel} -rm -rf $RPM_BUILD_ROOT%{_datadir}/idl/%{icecat_ver} -rm -rf $RPM_BUILD_ROOT%{_includedir}/%{icecat_ver} -rm -rf $RPM_BUILD_ROOT%{icecatappdir}/removed-files +rm -rf %{buildroot}%{_libdir}/%{icecat_devel} +rm -rf %{buildroot}%{_datadir}/idl/%{icecat_ver} +rm -rf %{buildroot}%{_includedir}/%{icecat_ver} +rm -rf %{buildroot}%{icecatappdir}/removed-files -mkdir -p $RPM_BUILD_ROOT%{_metainfodir} -install -pm 644 %{SOURCE10} $RPM_BUILD_ROOT%{_metainfodir}/ -install -pm 644 %{SOURCE11} $RPM_BUILD_ROOT%{_metainfodir}/ +# Remove gtk2 support as flash plugin is no longer supported +rm -rf %{buildroot}%{icecatappdir}/gtk2 + +mkdir -p %{buildroot}%{_metainfodir} +install -pm 644 %{SOURCE10} %{buildroot}%{_metainfodir}/ # Moves defaults/preferences to browser/defaults/preferences %pretrans -p @@ -683,621 +685,38 @@ if (posix.stat("%{icecatappdir}/browser/defaults/preferences", "type") == "link" end %check -appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_metainfodir}/*.appdata.xml +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml +desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop -%if 0%{?build_langpacks} -%files -f %{name}.lang -%else +%if %{with langpacks_subpkg} %files +%dir %{langpackdir} +%else +%files -f %{name}.lang %endif -%doc Changelog.IceCat README.* AUTHORS -%license LICENSE LEGAL COPYING-* +%doc README.* AUTHORS +%license LICENSE COPYING-* %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*x*/apps/%{name}*.png %{_metainfodir}/*.appdata.xml -%{_metainfodir}/%{name}.metainfo.xml -%{_mandir}/man1/%{name}* %dir %{icecatappdir} +%{icecatappdir}/glxtest +%{icecatappdir}/vaapitest %{icecatappdir}/browser/ %{icecatappdir}/defaults/ %{icecatappdir}/dictionaries %{icecatappdir}/icecat* +%{icecatappdir}/fonts/ %{icecatappdir}/*.so %{icecatappdir}/*.ini %{icecatappdir}/omni.ja -%{icecatappdir}/run-icecat.sh %{icecatappdir}/dependentlibs.list -%{icecatappdir}/plugin-container %{icecatappdir}/pingsender %{icecatappdir}/gmp-clearkey/ -%{icecatappdir}/chrome.manifest -%{icecatappdir}/fonts/EmojiOneMozilla.ttf -%{icecatappdir}/gtk2/*.so -%if !%{?system_nss} -%{icecatappdir}/libfreeblpriv3.chk -%{icecatappdir}/libnssdbm3.chk -%{icecatappdir}/libsoftokn3.chk -%endif -%if 0%{?build_langpacks} -%dir %{langpackdir} -%endif - -%if 0%{?wayland_backend_default} -%files x11 -%{_bindir}/%{name}-x11 -%{_datadir}/applications/%{name}-x11.desktop -%else -%files wayland -%{_bindir}/%{name}-wayland -%{_datadir}/applications/%{name}-wayland.desktop +%ifarch %{arm64} riscv64 +%{icecatappdir}/v4l2test %endif %changelog -* Thu Feb 14 2019 Antonio Trande - 60.5.1-1 -- Mozilla release 60.5.1 -- Conditional macro for libvpx support - -* Tue Feb 05 2019 Björn Esser - 60.5.0-2 -- rebuilt (libvpx) - -* Tue Jan 29 2019 Antonio Trande - 60.5.0-1 -- Mozilla release 60.5.0 - -* Sun Jan 13 2019 Antonio Trande - 60.4.0-2 -- Make Wayland support default on fedora 30+ -- Enable Wayland support -- Drop old patches -- Backported Wayland related code from Firefox 63 -- Added fix for mozbz#1507475 - crash when display changes - -* Wed Dec 12 2018 Antonio Trande - 60.4.0-1 -- Upstream release 60.4.0 - -* Tue Nov 13 2018 Caolán McNamara - 60.3.0-4 -- rebuild for hunspell-1.7.0 - -* Sat Nov 10 2018 Antonio Trande - 60.3.0-3 -- Rebuild with latest changes from Gnuzilla - -* Wed Oct 31 2018 Antonio Trande - 60.3.0-2 -- Drop UserAgent patch (rhbz#1644898) - -* Wed Oct 24 2018 Antonio Trande - 60.3.0-1 -- Upstream release 60.3.0 - -* Wed Oct 03 2018 Antonio Trande - 60.2.2-2 -- Drop UserAgent patch (rhbz#1644898) - -* Wed Oct 03 2018 Antonio Trande - 60.2.2-1 -- Upstream release 60.2.2 - -* Fri Sep 28 2018 Antonio Trande - 60.2.1-1 -- Upstream release 60.2.1 - -* Fri Sep 14 2018 Antonio Trande - 60.2.0-0.1 -- Pre-release 60.2.0 -- Integrate firefox patches for wayland (disabled) -- Setting of upstream patches for ESR60 -- Manpage updated -- Include languages -- Use options to reduce memory requirements at ld runtime on ix86 - -* Sun Aug 05 2018 Antonio Trande - 52.9.0-1 -- Update to 52.9.0 - -* Fri Jul 13 2018 Fedora Release Engineering - 52.8.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jul 10 2018 Pete Walter - 52.8.1-2 -- Rebuild for ICU 62 - -* Thu Jun 07 2018 Antonio Trande - 52.8.1-1 -- Update to 52.8.1 -- Add icecat.rpmlintrc - -* Wed Jun 06 2018 Antonio Trande - 52.8.0-3 -- Source tarball re-created without non-free code - -* Tue Jun 5 2018 Tom Callaway - 52.8.0-2 -- remove non-free files from tarball - -* Sat May 12 2018 Antonio Trande - 52.8.0-1 -- Update to 52.8.0 - -* Mon Apr 30 2018 Pete Walter - 52.7.3-2 -- Rebuild for ICU 61.1 - -* Tue Mar 27 2018 Antonio Trande - 52.7.3-1 -- Update to 52.7.3 - -* Tue Mar 20 2018 Antonio Trande - 52.7.2-1 -- Update to 52.7.2 - -* Sat Mar 10 2018 Antonio Trande - 52.7.0-1 -- Update to 52.7.0 - -* Tue Feb 27 2018 Antonio Trande - 52.6.0-7 -- HTTPS Everywhere updated to 2018.1.11 -- "goteo.org payments with free JS" updated to 1.1 -- "LibreJS compatible Pay.gov" updated to 1.3 -- "Reveal hidden HTML" updated to 1.6 -- Enabled WebRTC, but prevent leaking the LAN ip - -* Sun Feb 18 2018 Antonio Trande - 52.6.0-6 -- Add gcc gcc-c++ BR - -* Sun Feb 18 2018 Antonio Trande - 52.6.0-5 -- Rebuild for libevent-2.1.8 - -* Wed Feb 07 2018 Fedora Release Engineering - 52.6.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sun Jan 28 2018 Antonio Trande - 52.6.0-3 -- Rebuild for libvpx again - -* Fri Jan 26 2018 Tom Callaway - 52.6.0-2 -- rebuild for new libvpx - -* Wed Jan 24 2018 Antonio Trande - 52.6.0-1 -- Update to 52.6.0 - -* Thu Jan 11 2018 Igor Gnatenko - 52.5.3-4 -- Remove obsolete scriptlets - -* Sun Jan 07 2018 Antonio Trande - 52.5.3-3 -- Set build against NSS-3.34/NSPR-4.17.0 at least - -* Sun Jan 07 2018 Antonio Trande - 52.5.3-2 -- Patched for mozilla bug-1427870 - -* Sun Dec 31 2017 Antonio Trande - 52.5.3-1 -- Update to 52.5.3 -- Use 'with-l10n' option - -* Fri Dec 29 2017 Antonio Trande - 52.5.2-1 -- Update to 52.5.2 -- WebRTC is always disabled -- Add JACK audio backend (bz#1528742) - -* Thu Dec 21 2017 Antonio Trande - 52.3.0-4 -- Appdata file moved into metainfo data directory - -* Mon Dec 04 2017 Caolán McNamara - 52.3.0-3 -- rebuild for hunspell-1.5.2 - -* Sat Sep 02 2017 Antonio Trande - 52.3.0-2 -- Enable language files - -* Wed Aug 16 2017 Antonio Trande - 52.3.0-1 -- Update to 52.3.0 - -* Thu Aug 03 2017 Antonio Trande - 52.2.1-1 -- Update to 52.2.1 -- ICU source code patched to work on big-endian architectures - -* Wed Jul 26 2017 Fedora Release Engineering - 52.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Mon May 15 2017 Fedora Release Engineering - 52.1.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild - -* Sat May 06 2017 Antonio Trande - 52.1.0-2 -- Fix language files - -* Sat May 06 2017 Jens Lody - 52.1.0-1 -- Update to 52.1.0 -- Remove obsolete firefox-debug.patch -- Spec-file: fix typo in description - -* Sun Apr 16 2017 Antonio Trande - 52.0.2-3 -- Enable languages - -* Fri Apr 14 2017 Antonio Trande - 52.0.2-2 -- Update to 52.0.2 -- Add patch for mozbz#1158076 - enable dark theme by pref - -* Sun Mar 26 2017 Antonio Trande - 52.0.1-5 -- Skia support disabled on ARM/ix86 builds (failed for memory exhausted) - -* Sun Mar 26 2017 Antonio Trande - 52.0.1-4 -- Downgrade optimization level on ARM builds (failed for memory exhausted) -- Use one job with Make on ix86 - -* Wed Mar 22 2017 Antonio Trande - 52.0.1-3 -- Added fix for mozbz#1158076 - -* Mon Mar 20 2017 Antonio Trande - 52.0.1-2 -- Set cflags/libs options for NSS/NSPR -- Add --disable-elf-hack - -* Sun Mar 19 2017 Antonio Trande - 52.0.1-1 -- Update to 52.0.1 -- All patches synchronized with firefox - -* Mon Mar 06 2017 Jens Lody - 45.7.0-8 -- aarch64build-fix (taken from mozjs45) -- include aarch64 again - -* Sun Mar 05 2017 Antonio Trande - 45.7.0-7 -- Build with language files -- Use new source archive -- Exclude aarch64 - -* Sun Mar 05 2017 Jens Lody - 45.7.0-6 -- do not set debug-build-flag - -* Sun Mar 05 2017 Jens Lody - 45.7.0-5 -- (Re-)add language-download.script and make Source-tag unconditional. -- Fix debug build. - -* Sat Feb 18 2017 Antonio Trande - 45.7.0-3 -- Optimization flags disabled on arm/arm64 - -* Thu Feb 16 2017 Jens Lody - - 45.7.0-3 -- Fix gcc7 build, with backport of fix for mozb#1269171 - -* Fri Feb 10 2017 Fedora Release Engineering - 45.7.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Sat Feb 04 2017 Antonio Trande - 45.7.0-1 -- Update to 45.7.0 - -* Sat Jan 21 2017 Antonio Trande - 45.5.1-7 -- Test for trying ICU patch - -* Fri Jan 20 2017 Antonio Trande - 45.5.1-6 -- System ICU disabled on Fedora > 25 - -* Fri Jan 20 2017 Antonio Trande - 45.5.1-5 -- Patched to make compatible with NSS 3.28.1 (bz#1414987) - -* Thu Jan 05 2017 Antonio Trande - 45.5.1-4 -- Conformed to new rules for scriptlets - -* Tue Dec 13 2016 Caolán McNamara - 45.5.1-3 -- rebuild for hunspell-1.5.4 - -* Fri Dec 02 2016 Antonio Trande - 45.5.1-2 -- Keep workaround for bz#1332926 - -* Fri Dec 02 2016 Antonio Trande - 45.5.1-1 -- Update to 45.5.1 - -* Sun Nov 27 2016 Antonio Trande - 45.3.0-0.6.beta -- Debug build -- Debug builds patched (mozb#1013882) -- Patched for removing unnecessary warns - -* Sun Sep 04 2016 Antonio Trande - 45.3.0-0.5.beta -- Drop obsolete patch - -* Sat Sep 03 2016 Antonio Trande - 45.3.0-0.4.beta -- Use MOZ_SMP_FLAGS instead of MOZ_MAKE_FLAGS - -* Thu Sep 01 2016 Antonio Trande - 45.3.0-0.3.beta -- Update desktop file's translations -- Enable jemalloc - -* Thu Sep 01 2016 Antonio Trande - 45.3.0-0.2.beta -- Disable optimization on ARM - -* Mon Aug 29 2016 Antonio Trande - 45.3.0-0.1.beta -- Update to 45.3.0 (beta) -- Drop old patches -- Reset default compiler flags -- Filtering private libraries - -* Fri Jul 22 2016 Tom Callaway - 38.8.0-13 -- rebuild for libvpx 1.6.0 - -* Wed Jun 29 2016 Antonio Trande - 38.8.0-12 -- Optimization level increased to -O1 - -* Tue Jun 28 2016 Antonio Trande - 38.8.0-11 -- Fix appadata file's tags - -* Sun Jun 26 2016 Antonio Trande - 38.8.0-10 -- Rebuild with newest icecat-38.8.0-gnu2 source archive (24 June) - -* Sun Jun 26 2016 Jens Lody - 38.8.0-9 -- Workaround for #1332926 - -* Sat Jun 18 2016 Antonio Trande - 38.8.0-8 -- Set MOZ_SMP_FLAGS - -* Sat Jun 18 2016 Antonio Trande - 38.8.0-7 -- Undo latest change - -* Sat Jun 18 2016 Antonio Trande - 38.8.0-6 -- Set C++14 standard flag - -* Fri Jun 17 2016 Antonio Trande - 38.8.0-5 -- Set C++ standard flag - -* Fri Jun 17 2016 Antonio Trande - 38.8.0-4 -- Disable install stripping -- Disable builds for debugging - -* Fri Jun 17 2016 Antonio Trande - 38.8.0-3 -- Enable builds for debugging - -* Fri May 13 2016 Antonio Trande - 38.8.0-2 -- Remove additional flag - -* Fri May 13 2016 Antonio Trande - 38.8.0-1 -- Update to 38.8.0 - -* Mon Apr 18 2016 Caolán McNamara - 38.7.1-4 -- rebuild for hunspell 1.4.0 - -* Fri Apr 15 2016 David Tardon - 38.7.1-3 -- rebuild for ICU 57.1 - -* Sat Apr 09 2016 Antonio Trande - 38.7.1-2 -- Downgrade optimization level on ARM - -* Fri Apr 08 2016 Antonio Trande - 38.7.1-1 -- Update to 38.7.1 - -* Thu Feb 04 2016 Antonio Trande - 38.6.0-1 -- Update to 38.6.0 -- Patched for GCC6 builds -- Cut off Provides bundled libraries except xulrunner - -* Thu Feb 04 2016 Fedora Release Engineering - 38.5.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Jan 04 2016 Antonio Trande - 38.5.2-4 -- Fix description of appdata file - -* Mon Jan 04 2016 Antonio Trande - 38.5.2-3 -- Fix validating of desktop file - -* Sun Jan 03 2016 Antonio Trande - 38.5.2-2 -- .desktop .appdata and .metainfo files renamed (bz#1295234) - -* Fri Jan 01 2016 Antonio Trande - 38.5.2-1 -- Update to 38.5.2 - -* Fri Dec 18 2015 Antonio Trande - 38.5.0-1 -- Update to 38.5.0 - -* Tue Dec 08 2015 Antonio Trande - 38.4.0-3 -- Force -fstack-protector-all flag (bz#1283307) - -* Tue Dec 1 2015 Tom Callaway - 38.4.0-2 -- rebuild for libvpx 1.5.0 - -* Tue Nov 17 2015 Antonio Trande - 38.4.0-1 -- Update to 38.4.0 - -* Tue Nov 03 2015 Antonio Trande - 38.3.0-12 -- ARM neon support disabled on aarch64 - -* Sat Oct 31 2015 Antonio Trande - 38.3.0-11 -- Rebuild for ICU 56 - -* Wed Oct 28 2015 Antonio Trande - 38.3.0-10 -- Rebuild with RPM_LD_FLAGS - -* Wed Oct 28 2015 David Tardon - 38.3.0-9 -- rebuild for ICU 56.1 - -* Tue Oct 20 2015 Antonio Trande - 38.3.0-8 -- Active hardened_build - -* Tue Oct 13 2015 Antonio Trande - 38.3.0-7 -- Rebuilt with updated Addons - -* Mon Oct 12 2015 Antonio Trande - 38.3.0-6 -- Fixed header files directory for freetype-2.6.1 - -* Mon Oct 12 2015 Antonio Trande - 38.3.0-5 -- Languages packaged - -* Tue Oct 06 2015 Antonio Trande - 38.3.0-4 -- WebRTC disabled on extra arches - -* Tue Oct 06 2015 Antonio Trande - 38.3.0-3 -- Updated appdata and manpage files - -* Mon Oct 05 2015 Antonio Trande - 38.3.0-2 -- Disabled crashreporter on F22+ - -* Sat Oct 03 2015 Antonio Trande - 38.3.0-1 -- Update to 38.3.0 -- Patches updated -- Language files not packaged -- Build defined for Gtk3 - -* Thu Aug 13 2015 Antonio Trande - 31.8.0-5 -- Added backported patch for CVE-2015-4473_4482_4488_4489_4491_4492 vulnerabilities - -* Thu Aug 13 2015 Antonio Trande - 31.8.0-4 -- Added backported patch for CVE-2015-4495 vulnerability - -* Tue Jul 21 2015 Antonio Trande - 31.8.0-3 -- Fixed on secondary arches - -* Mon Jul 20 2015 Antonio Trande - 31.8.0-2 -- Un-bundle libvpx-1.4 - -* Fri Jul 17 2015 Antonio Trande - 31.8.0-1 -- Update to 31.8.0 - -* Sun Jul 12 2015 Antonio Trande - 31.7.0-8 -- Packaged IceCat 31.7 in Fedora 21 - -* Fri Jul 03 2015 Antonio Trande - 31.7.0-7 -- Fix .metainfo.xml file - -* Thu Jul 02 2015 Antonio Trande - 31.7.0-6 -- Added .metainfo.xml file - -* Thu Jun 18 2015 Antonio Trande - 31.7.0-5 -- Added options --enable-tree-freetype --enable-stdcxx-compat -- Added patch for Freetype-2.6 headers - -* Wed Jun 17 2015 Fedora Release Engineering - 31.7.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sun Jun 14 2015 Antonio Trande - 31.7.0-3 -- Re-built locale files -- Re-organized mozconfig options -- Compiled with ccache - -* Wed Jun 10 2015 Antonio Trande - 31.7.0-2 -- Unpacked files found - -* Mon Jun 08 2015 Antonio Trande - 31.7.0-1 -- Update to 31.7.0 -- Make sure locale works for langpacks -- Set default bookmarks -- Made appdata file -- devel package obsoleted - -* Mon May 04 2015 Antonio Trande - 31.6.0-6 -- Required VPX from system for < F23 - -* Sun May 03 2015 Antonio Trande - 31.6.0-5 -- libvpx-1.3.0 bundled only in >= F23 - -* Tue Apr 07 2015 Antonio Trande - 31.6.0-4 -- Disable optimization flags (when GCC5 compiles) on ARM - -* Tue Apr 07 2015 Antonio Trande - 31.6.0-3 -- Compiled against bundle libvpx-1.3.0 - -* Mon Apr 06 2015 Tom Callaway - 31.6.0-2 -- Rebuild for libvpx 1.4.0 - -* Sat Apr 04 2015 Antonio Trande - 31.6.0-1 -- Update to 31.6.0 - -* Mon Mar 16 2015 Antonio Trande - 31.5.0-2 -- New rebuild to fix profile's storage problem - -* Thu Mar 12 2015 Antonio Trande - 31.5.0-1 -- Update to 31.5.0 -- Patched to fix Mozilla Bug1021171 -- crashreporter disabled on > F21 -- Improved .desktop file - -* Wed Feb 04 2015 Petr Machata - 31.4.0-5 -- Bump for rebuild. - -* Mon Feb 02 2015 Antonio Trande - 31.4.0-4 -- Desktop file missing %%u (bz#1188078) - -* Sat Jan 31 2015 Antonio Trande - 31.4.0-3 -- Annulled the user-agent string customization - -* Thu Jan 29 2015 Antonio Trande - 31.4.0-2 -- Added %%license macro - -* Thu Jan 29 2015 Antonio Trande - 31.4.0-1 -- Update to 31.4.0 -- Added MPLv2.0 license of HTML5-video-everywhere extension -- Description updated - -* Mon Jan 26 2015 David Tardon - 31.2.0-8 -- rebuild for ICU 54.1 - -* Wed Jan 21 2015 Antonio Trande - 31.2.0-7 -- Package now requires system-bookmarks (bz#1184297) - -* Wed Nov 26 2014 Antonio Trande - 31.2.0-6 -- libjpeg-turbo unbundled (bz#1164815) - -* Thu Nov 06 2014 Antonio Trande - 31.2.0-5 -- Added -Wno-error=declaration-after-statement -- Built against GStreamer-1.0 -- Package compiled against bundled JPEG - -* Sat Oct 25 2014 Antonio Trande - 31.2.0-4 -- Removed -fexceptions flags from Fedora optflags - -* Thu Oct 23 2014 Antonio Trande - 31.2.0-3 -- Added -Wformat-security flags -- Added special link flags for ARM - -* Wed Oct 22 2014 Antonio Trande - 31.2.0-2 -- Fixed compiler flags - -* Tue Oct 21 2014 Antonio Trande - 31.2.0-1 -- Update to 31.2.0 -- Added 'configure' options -- Built against system NSS/NSPR - -* Thu Oct 16 2014 Antonio Trande - 31.1.1-1 -- Update to 31.1.1 -- New bundled files (bz#1153135) -- Static sub-package is not built anymore -- Man-page updated -- Spyblock addon included - -* Tue Aug 26 2014 Antonio Trande - 24.0-14 -- Added "Provides: webclient" -- Installed manpage file - -* Tue Aug 19 2014 Antonio Trande - 24.0-13 -- Removed system xulrunner conditional -- Ghosted all .xpi language files (handled by %%find_lang) -- Added BSD, ISC, MIT, Apache2.0 licenses - -* Sat Aug 09 2014 Antonio Trande - 24.0-12 -- Removed HTTPS-everywhere RequestPolicy extensions (patch7) - -* Thu Jul 24 2014 Antonio Trande - 24.0-11 -- Remove precompiled .egg files -- Remove bundled jar/class files -- Delete chrpaths -- Added 'Public Domain' license -- Added a patch for using system Python Virtualenv (patch6) - -* Wed Jul 16 2014 Antonio Trande - 24.0-10 -- Added freetype2 system-headers list for Fedora>=21 (patch5) - -* Fri Apr 04 2014 Antonio Trande - 24.0-9 -- Defined other bundled() Provides - -* Sat Mar 29 2014 Antonio Trande - 24.0-8 -- Use system nspr - -* Wed Mar 26 2014 Antonio Trande - 24.0-7 -- Removed much more bundled files (added related BR packages) -- Build browser and xulrunner -- Added freetype2 reference patch - -* Thu Feb 27 2014 Antonio Trande - 24.0-6 -- Sources patched to use system ogg/opus/vorbis libraries -- Build browser alone - -* Wed Feb 05 2014 Antonio Trande - 24.0-5 -- Fix some executable permissions -- Added some tricks -- Build browser and xulrunner -- Defined a conditional macro for xulrunner -- Built a static sub-package -- Added COPYING separated license files -- Added bundled() Provides - -* Mon Jan 27 2014 Antonio Trande - 24.0-4 -- Build browser alone -- Added libffi/libpng linkage from system to .mozconfig file -- Added a patch to exclude APNG support missing error for libpng -- Added libpng-devel BR - -* Tue Jan 14 2014 Antonio Trande - 24.0-3 -- Removed bundled files -- Added nspr/nss Requires - -* Wed Jan 08 2014 Antonio Trande - 24.0-2 -- Timestamp preserving for the 'install' commands -- Added a comment interpretation to the License tag -- Defined all command calls in normal mode - -* Sun Jan 05 2014 Antonio Trande - 24.0-1 -- Initial package - +%autochangelog diff --git a/mozilla-1005640-accept-lang.patch b/mozilla-1005640-accept-lang.patch deleted file mode 100644 index 29d3833..0000000 --- a/mozilla-1005640-accept-lang.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm.1005640-accept-lang firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm ---- firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm.1005640-accept-lang 2017-01-16 17:16:52.000000000 +0100 -+++ firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm 2017-01-18 12:35:29.380394216 +0100 -@@ -2852,6 +2852,11 @@ this.XPIProvider = { - this.addAddonsToCrashReporter(); - } - -+ // Save locale settings to compare it later to check whenever some addon -+ // changed it. -+ var previousLocale = Cc["@mozilla.org/chrome/chrome-registry;1"] -+ .getService(Ci.nsIXULChromeRegistry).getSelectedLocale("global"); -+ - try { - AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_begin"); - -@@ -2880,6 +2885,14 @@ this.XPIProvider = { - AddonManagerPrivate.recordException("XPI-BOOTSTRAP", "startup failed", e); - } - -+ var currentLocale = Cc["@mozilla.org/chrome/chrome-registry;1"] -+ .getService(Ci.nsIXULChromeRegistry).getSelectedLocale("global"); -+ if (currentLocale != previousLocale) { -+ // We have to flush string cache if the locale was changed during loading -+ // of addons -+ Services.obs.notifyObservers(null, "chrome-flush-caches", null); -+ } -+ - // Let these shutdown a little earlier when they still have access to most - // of XPCOM - Services.obs.addObserver({ diff --git a/mozilla-1353817.patch b/mozilla-1353817.patch deleted file mode 100644 index dc8d8f8..0000000 --- a/mozilla-1353817.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1cc652f5525f458b0b4ceb12af24bf5a4367db32 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Tue, 23 May 2017 13:09:48 -0400 -Subject: [PATCH] Bug 1353817: Include SkNx_neon.h for ARM64 too - -This fixes build errors as arm_neon.h was missing along with some -missing converters. ---- - gfx/skia/skia/src/core/SkNx.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gfx/skia/skia/src/core/SkNx.h b/gfx/skia/skia/src/core/SkNx.h -index 6bca856..b0427aa 100644 ---- a/gfx/skia/skia/src/core/SkNx.h -+++ b/gfx/skia/skia/src/core/SkNx.h -@@ -299,7 +299,7 @@ typedef SkNx<4, uint32_t> Sk4u; - // Include platform specific specializations if available. - #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 - #include "../opts/SkNx_sse.h" --#elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON) -+#elif !defined(SKNX_NO_SIMD) && (defined(SK_ARM_HAS_NEON) || defined(SK_CPU_ARM64)) - #include "../opts/SkNx_neon.h" - #else - --- -2.9.4 - diff --git a/mozilla-1424422.patch b/mozilla-1424422.patch deleted file mode 100644 index cc8b31f..0000000 --- a/mozilla-1424422.patch +++ /dev/null @@ -1,188 +0,0 @@ -diff -up firefox-60.0/browser/base/content/browser.js.1424422 firefox-60.0/browser/base/content/browser.js ---- firefox-60.0/browser/base/content/browser.js.1424422 2018-04-26 22:07:20.000000000 +0200 -+++ firefox-60.0/browser/base/content/browser.js 2018-04-30 11:49:51.609458857 +0200 -@@ -1259,6 +1259,9 @@ var gBrowserInit = { - - if (AppConstants.CAN_DRAW_IN_TITLEBAR) { - gDragSpaceObserver.init(); -+ if (AppConstants.platform == "linux") { -+ gLightThemeObserver.init(); -+ } - } - - BrowserSearch.initPlaceHolder(); -@@ -1826,6 +1829,9 @@ var gBrowserInit = { - - if (AppConstants.CAN_DRAW_IN_TITLEBAR) { - gDragSpaceObserver.uninit(); -+ if (AppConstants.platform == "linux") { -+ gLightThemeObserver.uninit(); -+ } - } - - TabsInTitlebar.uninit(); -@@ -5781,6 +5787,24 @@ var gDragSpaceObserver = { - }, - }; - -+var gLightThemeObserver = { -+ init() { -+ Services.obs.addObserver(this, "lightweight-theme-styling-update"); -+ }, -+ -+ uninit() { -+ Services.obs.removeObserver(this, "lightweight-theme-styling-update"); -+ }, -+ -+ observe(aSubject, aTopic, aData) { -+ switch (aTopic) { -+ case "lightweight-theme-styling-update": -+ TabsInTitlebar.updateAppearance(true); -+ break; -+ } -+ }, -+}; -+ - // Updates the UI density (for touch and compact mode) based on the uidensity pref. - var gUIDensity = { - MODE_NORMAL: 0, -diff -up firefox-60.0/browser/themes/linux/browser.css.1424422 firefox-60.0/browser/themes/linux/browser.css ---- firefox-60.0/browser/themes/linux/browser.css.1424422 2018-04-26 22:07:21.000000000 +0200 -+++ firefox-60.0/browser/themes/linux/browser.css 2018-04-30 11:45:40.388172492 +0200 -@@ -691,12 +691,34 @@ notification[value="translation"] menuli - padding-bottom: 2px; - } - -+ /* When default theme is used render titlebar command buttons -+ * according to system config. -+ * -+ * When -moz-lwtheme is enabled use similar approach as on Windows platform. -+ */ -+ .titlebar-button:-moz-lwtheme { -+ border: none; -+ margin: 0 !important; -+ padding: 8px 17px; -+ } -+ .titlebar-button:-moz-lwtheme > .toolbarbutton-icon { -+ width: 12px; -+ height: 12px; -+ } -+ .titlebar-button:hover:-moz-lwtheme { -+ background-color: Highlight; -+ } -+ - /* Render titlebar command buttons according to system config. - * Use full scale icons here as the Gtk+ does. - */ - @media (-moz-gtk-csd-minimize-button) { -- #titlebar-min { -- -moz-appearance: -moz-window-button-minimize; -+ #titlebar-min:not(:-moz-lwtheme) { -+ -moz-appearance: -moz-window-button-minimize; -+ } -+ #titlebar-min:-moz-lwtheme { -+ -moz-appearance: none !important; -+ list-style-image: url(chrome://browser/skin/window-controls/minimize-themes.svg); - } - } - @media (-moz-gtk-csd-minimize-button: 0) { -@@ -706,12 +728,20 @@ notification[value="translation"] menuli - } - - @media (-moz-gtk-csd-maximize-button) { -- #titlebar-max { -+ #titlebar-max:not(:-moz-lwtheme) { - -moz-appearance: -moz-window-button-maximize; - } -- :root[sizemode="maximized"] #titlebar-max { -+ #titlebar-max:-moz-lwtheme { -+ -moz-appearance: none !important; -+ list-style-image: url(chrome://browser/skin/window-controls/maximize-themes.svg); -+ } -+ :root[sizemode="maximized"] #titlebar-max:not(:-moz-lwtheme) { - -moz-appearance: -moz-window-button-restore; - } -+ :root[sizemode="maximized"] #titlebar-max:-moz-lwtheme { -+ -moz-appearance: none !important; -+ list-style-image: url(chrome://browser/skin/window-controls/restore-themes.svg); -+ } - } - @media (-moz-gtk-csd-maximize-button: 0) { - #titlebar-max { -@@ -720,9 +750,13 @@ notification[value="translation"] menuli - } - - @media (-moz-gtk-csd-close-button) { -- #titlebar-close { -+ #titlebar-close:not(:-moz-lwtheme) { - -moz-appearance: -moz-window-button-close; - } -+ #titlebar-close:-moz-lwtheme { -+ -moz-appearance: none !important; -+ list-style-image: url(chrome://browser/skin/window-controls/close-themes.svg); -+ } - } - @media (-moz-gtk-csd-close-button: 0) { - #titlebar-close { -diff -up firefox-60.0/browser/themes/linux/jar.mn.1424422 firefox-60.0/browser/themes/linux/jar.mn ---- firefox-60.0/browser/themes/linux/jar.mn.1424422 2018-04-26 22:07:20.000000000 +0200 -+++ firefox-60.0/browser/themes/linux/jar.mn 2018-04-30 11:45:40.388172492 +0200 -@@ -49,9 +49,12 @@ browser.jar: - * skin/classic/browser/preferences/in-content/dialog.css (preferences/in-content/dialog.css) - skin/classic/browser/preferences/applications.css (preferences/applications.css) - skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png) -- - skin/classic/browser/sync-desktopIcon.svg (../shared/sync-desktopIcon.svg) - skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg) -+ skin/classic/browser/window-controls/close-themes.svg (window-controls/close-themes.svg) -+ skin/classic/browser/window-controls/maximize-themes.svg (window-controls/maximize-themes.svg) -+ skin/classic/browser/window-controls/minimize-themes.svg (window-controls/minimize-themes.svg) -+ skin/classic/browser/window-controls/restore-themes.svg (window-controls/restore-themes.svg) - skin/classic/browser/e10s-64@2x.png (../shared/e10s-64@2x.png) - - [extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}] chrome.jar: -diff -up firefox-60.0/browser/themes/linux/window-controls/close-themes.svg.1424422 firefox-60.0/browser/themes/linux/window-controls/close-themes.svg ---- firefox-60.0/browser/themes/linux/window-controls/close-themes.svg.1424422 2018-04-30 11:45:40.388172492 +0200 -+++ firefox-60.0/browser/themes/linux/window-controls/close-themes.svg 2018-04-30 11:45:40.388172492 +0200 -@@ -0,0 +1,7 @@ -+ -+ -+ -+ -+ -diff -up firefox-60.0/browser/themes/linux/window-controls/maximize-themes.svg.1424422 firefox-60.0/browser/themes/linux/window-controls/maximize-themes.svg ---- firefox-60.0/browser/themes/linux/window-controls/maximize-themes.svg.1424422 2018-04-30 11:45:40.388172492 +0200 -+++ firefox-60.0/browser/themes/linux/window-controls/maximize-themes.svg 2018-04-30 11:45:40.388172492 +0200 -@@ -0,0 +1,7 @@ -+ -+ -+ -+ -+ -diff -up firefox-60.0/browser/themes/linux/window-controls/minimize-themes.svg.1424422 firefox-60.0/browser/themes/linux/window-controls/minimize-themes.svg ---- firefox-60.0/browser/themes/linux/window-controls/minimize-themes.svg.1424422 2018-04-30 11:45:40.388172492 +0200 -+++ firefox-60.0/browser/themes/linux/window-controls/minimize-themes.svg 2018-04-30 11:45:40.388172492 +0200 -@@ -0,0 +1,7 @@ -+ -+ -+ -+ -+ -diff -up firefox-60.0/browser/themes/linux/window-controls/restore-themes.svg.1424422 firefox-60.0/browser/themes/linux/window-controls/restore-themes.svg ---- firefox-60.0/browser/themes/linux/window-controls/restore-themes.svg.1424422 2018-04-30 11:45:40.388172492 +0200 -+++ firefox-60.0/browser/themes/linux/window-controls/restore-themes.svg 2018-04-30 11:45:40.388172492 +0200 -@@ -0,0 +1,8 @@ -+ -+ -+ -+ -+ -+ diff --git a/mozilla-1436242.patch b/mozilla-1436242.patch deleted file mode 100644 index 570b7c5..0000000 --- a/mozilla-1436242.patch +++ /dev/null @@ -1,56 +0,0 @@ - -# HG changeset patch -# User Jed Davis -# Date 1526943705 21600 -# Node ID 6bb3adfa15c6877f7874429462dad88f8c978c4f -# Parent 4c71c8454879c841871ecf3afb7dbdc96bad97fc -Bug 1436242 - Avoid undefined behavior in IPC fd-passing code. r=froydnj - -MozReview-Commit-ID: 3szIPUssgF5 - -diff --git a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc ---- a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc -+++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc -@@ -418,20 +418,37 @@ bool Channel::ChannelImpl::ProcessIncomi - const int* fds; - unsigned num_fds; - unsigned fds_i = 0; // the index of the first unused descriptor - - if (input_overflow_fds_.empty()) { - fds = wire_fds; - num_fds = num_wire_fds; - } else { -- const size_t prev_size = input_overflow_fds_.size(); -- input_overflow_fds_.resize(prev_size + num_wire_fds); -- memcpy(&input_overflow_fds_[prev_size], wire_fds, -- num_wire_fds * sizeof(int)); -+ // This code may look like a no-op in the case where -+ // num_wire_fds == 0, but in fact: -+ // -+ // 1. wire_fds will be nullptr, so passing it to memcpy is -+ // undefined behavior according to the C standard, even though -+ // the memcpy length is 0. -+ // -+ // 2. prev_size will be an out-of-bounds index for -+ // input_overflow_fds_; this is undefined behavior according to -+ // the C++ standard, even though the element only has its -+ // pointer taken and isn't accessed (and the corresponding -+ // operation on a C array would be defined). -+ // -+ // UBSan makes #1 a fatal error, and assertions in libstdc++ do -+ // the same for #2 if enabled. -+ if (num_wire_fds > 0) { -+ const size_t prev_size = input_overflow_fds_.size(); -+ input_overflow_fds_.resize(prev_size + num_wire_fds); -+ memcpy(&input_overflow_fds_[prev_size], wire_fds, -+ num_wire_fds * sizeof(int)); -+ } - fds = &input_overflow_fds_[0]; - num_fds = input_overflow_fds_.size(); - } - - // The data for the message we're currently reading consists of any data - // stored in incoming_message_ followed by data in input_buf_ (followed by - // other messages). - - diff --git a/mozilla-1512162.patch b/mozilla-1512162.patch new file mode 100644 index 0000000..02e9585 --- /dev/null +++ b/mozilla-1512162.patch @@ -0,0 +1,20 @@ +--- a/js/xpconnect/src/XPCWrappedNative.cpp.1512162 2019-07-17 22:51:30.000000000 +0200 ++++ b/js/xpconnect/src/XPCWrappedNative.cpp 2019-07-25 08:08:18.512528313 +0200 +@@ -1055,7 +1055,7 @@ + MOZ_ALWAYS_INLINE bool GetOutParamSource(uint8_t paramIndex, + MutableHandleValue srcp) const; + +- MOZ_ALWAYS_INLINE bool GatherAndConvertResults(); ++ bool GatherAndConvertResults(); + + MOZ_ALWAYS_INLINE bool QueryInterfaceFastPath(); + +@@ -1102,7 +1102,7 @@ + + ~CallMethodHelper(); + +- MOZ_ALWAYS_INLINE bool Call(); ++ bool Call(); + + // Trace implementation so we can put our CallMethodHelper in a Rooted. + void trace(JSTracer* aTrc); diff --git a/mozilla-256180.patch b/mozilla-256180.patch deleted file mode 100644 index a6b3320..0000000 --- a/mozilla-256180.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- layout/generic/nsIFrame.h.old 2016-07-11 13:41:39.688276559 +0200 -+++ layout/generic/nsIFrame.h 2016-07-11 13:42:12.791406976 +0200 -@@ -13,7 +13,7 @@ - #error This header/class should only be used within GNU code. It should not be used by extensions. - #endif - --#define MAX_REFLOW_DEPTH 200 -+#define MAX_REFLOW_DEPTH 1000 - - /* nsIFrame is in the process of being deCOMtaminated, i.e., this file is - eventually going to be eliminated, and all callers will use nsFrame instead. diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch deleted file mode 100644 index e390a28..0000000 --- a/mozilla-build-arm.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h ---- firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm 2017-03-03 13:53:52.480754536 +0100 -+++ firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h 2017-03-03 13:56:01.476018102 +0100 -@@ -203,6 +203,10 @@ - #define SK_ARM_HAS_CRC32 - #endif - -+#if defined(__aarch64__) -+ #undef SK_ARM_HAS_NEON -+#endif -+ - ////////////////////////////////////////////////////////////////////// - - #if !defined(SKIA_IMPLEMENTATION) diff --git a/node-stdout-nonblocking-wrapper b/node-stdout-nonblocking-wrapper new file mode 100755 index 0000000..b2814b8 --- /dev/null +++ b/node-stdout-nonblocking-wrapper @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/node "$@" 2>&1 | cat - diff --git a/rhbz-1173156.patch b/rhbz-1173156.patch deleted file mode 100644 index 9750861..0000000 --- a/rhbz-1173156.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up a/extensions/auth/nsAuthSambaNTLM.cpp.old b/extensions/auth/nsAuthSambaNTLM.cpp ---- a/extensions/auth/nsAuthSambaNTLM.cpp.old 2014-11-25 12:23:22.000000000 +0100 -+++ b/extensions/auth/nsAuthSambaNTLM.cpp 2014-12-23 15:26:36.606674625 +0100 -@@ -161,7 +161,7 @@ - const char* username = PR_GetEnv("USER"); - if (!username) return NS_ERROR_FAILURE; - -- const char* const args[] = {"ntlm_auth", -+ const char* const args[] = {"/usr/bin/ntlm_auth", - "--helper-protocol", - "ntlmssp-client-1", - "--use-cached-creds", diff --git a/rhbz-1354671.patch b/rhbz-1354671.patch index f45f7e9..9770fa6 100644 --- a/rhbz-1354671.patch +++ b/rhbz-1354671.patch @@ -1,12 +1,11 @@ -diff -up firefox-53.0/layout/base/nsIPresShell.h.1354671 firefox-53.0/layout/base/nsIPresShell.h ---- firefox-53.0/layout/base/nsIPresShell.h.1354671 2017-04-27 13:07:43.808653320 +0200 -+++ firefox-53.0/layout/base/nsIPresShell.h 2017-04-27 13:09:40.404427641 +0200 -@@ -204,7 +204,7 @@ +--- firefox-78.0/layout/base/PresShell.orig.h 2020-06-26 20:10:50.168878803 +0200 ++++ firefox-78.0/layout/base/PresShell.h 2020-06-26 23:13:24.174571951 +0200 +@@ -257,7 +257,7 @@ * to the same aSize value. AllocateFrame is infallible and will abort * on out-of-memory. */ - void* AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) { + void* __attribute__((optimize("no-lifetime-dse"))) AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) { - void* result = mFrameArena.AllocateByFrameID(aID, aSize); - RecordAlloc(result); - return result; + #define FRAME_ID(classname, ...) \ + static_assert(size_t(nsQueryFrame::FrameIID::classname##_id) == \ + size_t(eArenaObjectID_##classname), \ diff --git a/run-wayland-compositor b/run-wayland-compositor new file mode 100755 index 0000000..23ead19 --- /dev/null +++ b/run-wayland-compositor @@ -0,0 +1,60 @@ +#!/usr/bin/bash +# Run wayland compositor and set WAYLAND_DISPLAY env variable + +set -x + +echo export DESKTOP_SESSION=gnome > $HOME/.xsessionrc +echo export XDG_CURRENT_DESKTOP=GNOME > $HOME/.xsessionrc +echo export XDG_SESSION_TYPE=wayland >> $HOME/.xsessionrc + +# Turn off the screen saver and screen locking +gsettings set org.gnome.desktop.screensaver idle-activation-enabled false +gsettings set org.gnome.desktop.screensaver lock-enabled false +gsettings set org.gnome.desktop.screensaver lock-delay 3600 + +# Disable the screen saver +# This starts the gnome-keyring-daemon with an unlocked login keyring. libsecret uses this to +# store secrets. Firefox uses libsecret to store a key that protects sensitive information like +# credit card numbers. +if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + # if not found, launch a new one + eval `dbus-launch --sh-syntax` +fi + +if [ -z "$XDG_RUNTIME_DIR" ]; then + export XDG_RUNTIME_DIR=$HOME +fi + +export WAYLAND_DISPLAY=icecat-pgo-wayland-0 +if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + rm -f $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY + rm -f $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY.lock +fi + +echo "Launch mutter for $WAYLAND_DISPLAY" +mutter --headless --virtual-monitor 1920x1080 --wayland-display=$WAYLAND_DISPLAY --no-x11 & MUTTER_PID=$! +export MUTTER_PID +echo "Mutter PID $MUTTER_PID" + +echo "Waiting for mutter to start..." +sleep 5 +retry_count=0 +max_retries=5 +until [ $retry_count -gt $max_retries ]; do + if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + retry_count=$(($max_retries + 1)) + else + retry_count=$(($retry_count + 1)) + echo "Waiting for Mutter, retry: $retry_count" + sleep 2 + fi +done + +if [ ! -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + echo "Mutter failed to start!" + exit 1 +fi + +echo "Mutter is running, $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY is here." + + diff --git a/sources b/sources index 9ffec47..889ba13 100644 --- a/sources +++ b/sources @@ -1,2 +1,5 @@ -SHA512 (icecat-60.5.1-gnu1.tar.bz2) = 6867681f5b4d65f78160a7686530975861d08c99a1f5e8d79448c2add3d9886144d3daefdb4d732dbda8ea14870086a41749a4de5e991b06199b66b3a0e6b677 +SHA512 (cbindgen-vendor.tar.xz) = 647dcadf3507bd05262613d03ff18a8c876bcbb4e83ce59f911128ae020ac16695298987c6c14f8b7a7aee5bb096740c6885c0a854d8b26431fc9a8ff864c369 +SHA512 (icecat-140.7.0-langpacks.tar.gz) = a4618e3272b48be4307c79222bdd55f321aefb6d6ba08beb10178d0b95530bc4130cf86901d0906e714bd75106ad8513957fe3ad335431c8faf5b2d9767e17de +SHA512 (icecat-140.7.0-rh1.tar.bz2) = 7a19f7928322bea905828e6a4e981395687f1b649e37518a8000bcfcb29446b424ee592f708d0c7c93ebeb901820752785f883a937e9361e9f172a0a9bacb603 SHA512 (icecat-COPYING-licensefiles.tar.gz) = ed541845170f1d209e322b0def3248d571e0c42c4a17c74e83197e743bd8a128a1475f5312d905c8e70d047eddeac17e604373892eb6d5f1720c5c361849c42c +SHA512 (icecat.png) = a3cec16cb15a27c3c91b53e2c534e78b07911011ff1331e450c0baf8e13b76da7cea2a90e5d75191fa88cfbfd40a0a7f3e553e92b64d0043dadd5ad5edfdf81c