summarylogtreecommitdiffstats
diff options
context:
space:
mode:
author√Čtienne Deparis2017-12-05 11:35:20 +0100
committer√Čtienne Deparis2017-12-05 11:35:20 +0100
commit96167bc413ed595f54260469276be0bf3a2149d2 (patch)
tree5789cd41789e8305c7203dc88c6c5660ab937b71
parent1f57cc9793990da6f67ac583e0f6b1810442def8 (diff)
downloadaur-96167bc413ed595f54260469276be0bf3a2149d2.tar.gz
New release 1.17.1
-rw-r--r--.SRCINFO14
-rw-r--r--0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch36
-rw-r--r--0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch254
-rw-r--r--PKGBUILD68
4 files changed, 320 insertions, 52 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 82a9d8c77a9..1c1ffd36992 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by makepkg 5.0.2
-# Tue Nov 28 23:11:14 UTC 2017
+# Tue Dec 5 10:34:43 UTC 2017
pkgbase = cliqz
pkgdesc = Firefox-based privacy aware web browser, build from sources
- pkgver = 1.17.0
+ pkgver = 1.17.1
pkgrel = 1
url = https://cliqz.com/
arch = i686
@@ -20,6 +20,8 @@ pkgbase = cliqz
makedepends = xorg-server-xvfb
makedepends = autoconf2.13
makedepends = rust
+ makedepends = clang
+ makedepends = llvm
depends = gtk3
depends = gtk2
depends = mozilla-common
@@ -37,16 +39,18 @@ pkgbase = cliqz
options = !emptydirs
options = !makeflags
options = !strip
- source = https://github.com/cliqz-oss/browser-f/archive/1.17.0.tar.gz
+ source = https://github.com/cliqz-oss/browser-f/archive/88a3c2f0245c5748c4f217fc5f1aaed780541e0b.tar.gz
source = wifi-disentangle.patch
source = wifi-fix-interface.patch
source = no-plt.diff
source = 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
- sha256sums = 11aec82033c9deea31e109108f553f4c87a089cba318aff19f32a0f091e237ff
+ source = 0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch
+ sha256sums = 43e7873a43684b5827eb4ebeeeb47506cd84f22fa36855324f1e7c0db05ba7a3
sha256sums = f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed
sha256sums = e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1
sha256sums = ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa
- sha256sums = 1f71b379f2262d7319624c2aed31fa2dbed42828feccc27b1cd82153b76ad707
+ sha256sums = d45c97782a77e7c5ebacfa7b983019f6bb831794d3c707abbe3bb01cddb80f72
+ sha256sums = 52c56c33f7ab98232d9c0644965f149da9b7266f607c84b80aca8a5534cee3bb
pkgname = cliqz
diff --git a/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch b/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
index bd54d89cbdb..4316680bf92 100644
--- a/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
+++ b/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
@@ -1,9 +1,9 @@
-From 34508b32f65d5ad8143623b1258eb92d347514e2 Mon Sep 17 00:00:00 2001
-Message-Id: <34508b32f65d5ad8143623b1258eb92d347514e2.1511260210.git.jan.steffens@gmail.com>
+From 05ec1aa0d5e8806dd0c5c6d08c82846a1389b599 Mon Sep 17 00:00:00 2001
+Message-Id: <05ec1aa0d5e8806dd0c5c6d08c82846a1389b599.1512038840.git.jan.steffens@gmail.com>
From: Robin Grenet <robin.grenet@wanadoo.fr>
Date: Thu, 16 Nov 2017 13:35:58 +0100
-Subject: [PATCH] Bug 1360278 - Add preference to trigger context menu on mouse
- up for GTK+ and macOS, r=mstange,smaug
+Subject: [PATCH 1/2] Bug 1360278 - Add preference to trigger context menu on
+ mouse up for GTK+ and macOS, r=mstange,smaug
MozReview-Commit-ID: Bg60bD8jIg6
@@ -19,10 +19,10 @@ extra : rebase_source : cc8bd5796096f49ad4fdab81885a426afd6117e4
6 files changed, 69 insertions(+), 9 deletions(-)
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
-index 315422a6e2255e5f..92bcf5f02564d46e 100644
+index 9febead1d363d792..7a6e6a20f3cc3fd6 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
-@@ -234,6 +234,10 @@ pref("browser.sessionhistory.max_total_viewers", -1);
+@@ -231,6 +231,10 @@ pref("browser.sessionhistory.max_total_viewers", -1);
pref("ui.use_native_colors", true);
pref("ui.click_hold_context_menus", false);
@@ -34,10 +34,10 @@ index 315422a6e2255e5f..92bcf5f02564d46e 100644
pref("ui.menu.incremental_search.timeout", 1000);
// If true, all popups won't hide automatically on blur
diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm
-index cac897327a190422..bf42b4f8c0950753 100644
+index 25b4c1ba7a2d1207..2affd1ef386cbfd0 100644
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
-@@ -4700,30 +4700,49 @@ NSEvent* gLastDragMouseDownEvent = nil;
+@@ -4719,30 +4719,49 @@ NSEvent* gLastDragMouseDownEvent = nil;
if (!mGeckoChild)
return;
@@ -90,10 +90,10 @@ index cac897327a190422..bf42b4f8c0950753 100644
NS_OBJC_END_TRY_ABORT_BLOCK;
}
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
-index 87cc858ca7efd11d..17992f78bbf0a0a7 100644
+index 37b6aae4c3d0b4e7..2b80124538c20ed6 100644
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
-@@ -2737,6 +2737,19 @@ static guint ButtonMaskFromGDKButton(guint button)
+@@ -2727,6 +2727,19 @@ static guint ButtonMaskFromGDKButton(guint button)
return GDK_BUTTON1_MASK << (button - 1);
}
@@ -113,7 +113,7 @@ index 87cc858ca7efd11d..17992f78bbf0a0a7 100644
void
nsWindow::OnButtonPressEvent(GdkEventButton *aEvent)
{
-@@ -2806,13 +2819,8 @@ nsWindow::OnButtonPressEvent(GdkEventButton *aEvent)
+@@ -2796,13 +2809,8 @@ nsWindow::OnButtonPressEvent(GdkEventButton *aEvent)
DispatchInputEvent(&event);
// right menu click on linux should also pop up a context menu
@@ -129,7 +129,7 @@ index 87cc858ca7efd11d..17992f78bbf0a0a7 100644
}
}
-@@ -2848,6 +2856,11 @@ nsWindow::OnButtonReleaseEvent(GdkEventButton *aEvent)
+@@ -2838,6 +2846,11 @@ nsWindow::OnButtonReleaseEvent(GdkEventButton *aEvent)
DispatchInputEvent(&event);
mLastMotionPressure = pressure;
@@ -142,7 +142,7 @@ index 87cc858ca7efd11d..17992f78bbf0a0a7 100644
void
diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
-index 0fafc8994579fe3c..7a28e3260c0fdefb 100644
+index f7c07d57491b0b83..b969c9db4306ba6a 100644
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -245,6 +245,8 @@ private:
@@ -155,10 +155,10 @@ index 0fafc8994579fe3c..7a28e3260c0fdefb 100644
void ThemeChanged(void);
void OnDPIChanged(void);
diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp
-index 13fccd7f7d6627fb..e4ca5e011894f5c4 100644
+index 996409f45db11cc7..de73fe36d27955cd 100644
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
-@@ -1218,6 +1218,22 @@ nsBaseWidget::DispatchEventToAPZOnly(mozilla::WidgetInputEvent* aEvent)
+@@ -1222,6 +1222,22 @@ nsBaseWidget::DispatchEventToAPZOnly(mozilla::WidgetInputEvent* aEvent)
}
}
@@ -182,10 +182,10 @@ index 13fccd7f7d6627fb..e4ca5e011894f5c4 100644
nsBaseWidget::GetDocument() const
{
diff --git a/widget/nsBaseWidget.h b/widget/nsBaseWidget.h
-index f4e8e3d783307cc1..3cb56f38b6ced983 100644
+index 6d6b93ea73d64b38..cdc6aa0c87279832 100644
--- a/widget/nsBaseWidget.h
+++ b/widget/nsBaseWidget.h
-@@ -417,6 +417,12 @@ public:
+@@ -418,6 +418,12 @@ public:
void RecvScreenPixels(mozilla::ipc::Shmem&& aMem, const ScreenIntSize& aSize) override {};
#endif
@@ -199,5 +199,5 @@ index f4e8e3d783307cc1..3cb56f38b6ced983 100644
// These are methods for CompositorWidgetWrapper, and should only be
// accessed from that class. Derived widgets can choose which methods to
--
-2.15.0
+2.15.1
diff --git a/0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch b/0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch
new file mode 100644
index 00000000000..822f1ee06bf
--- /dev/null
+++ b/0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch
@@ -0,0 +1,254 @@
+From f19a0f3bc5e1e87d3c663cc2b147c5c0831519c5 Mon Sep 17 00:00:00 2001
+Message-Id: <f19a0f3bc5e1e87d3c663cc2b147c5c0831519c5.1512038840.git.jan.steffens@gmail.com>
+In-Reply-To: <05ec1aa0d5e8806dd0c5c6d08c82846a1389b599.1512038840.git.jan.steffens@gmail.com>
+References: <05ec1aa0d5e8806dd0c5c6d08c82846a1389b599.1512038840.git.jan.steffens@gmail.com>
+From: Bob Silverberg <bsilverberg@mozilla.com>
+Date: Fri, 24 Nov 2017 07:45:03 -0500
+Subject: [PATCH 2/2] Bug 1419426 - Implement
+ browserSettings.contextMenuShowEvent, r=kmag a=gchang
+
+Uplift for 58.
+---
+ .../components/extensions/ext-browserSettings.js | 45 ++++++++++++++++
+ .../extensions/schemas/browser_settings.json | 10 ++++
+ .../test/xpcshell/test_ext_browserSettings.js | 62 ++++++++++++++++++++--
+ 3 files changed, 114 insertions(+), 3 deletions(-)
+
+diff --git a/toolkit/components/extensions/ext-browserSettings.js b/toolkit/components/extensions/ext-browserSettings.js
+index f3212f351baf6975..2b24bcc1d09091f2 100644
+--- a/toolkit/components/extensions/ext-browserSettings.js
++++ b/toolkit/components/extensions/ext-browserSettings.js
+@@ -2,17 +2,23 @@
+ /* vim: set sts=2 sw=2 et tw=80: */
+ "use strict";
+
++XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
++ "resource://gre/modules/AppConstants.jsm");
+ XPCOMUtils.defineLazyModuleGetter(this, "ExtensionSettingsStore",
+ "resource://gre/modules/ExtensionSettingsStore.jsm");
+ XPCOMUtils.defineLazyModuleGetter(this, "Services",
+ "resource://gre/modules/Services.jsm");
+
+ XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
+ "@mozilla.org/browser/aboutnewtab-service;1",
+ "nsIAboutNewTabService");
+
+ Cu.import("resource://gre/modules/ExtensionPreferencesManager.jsm");
+
++var {
++ ExtensionError,
++} = ExtensionUtils;
++
+ const HOMEPAGE_OVERRIDE_SETTING = "homepage_override";
+ const HOMEPAGE_URL_PREF = "browser.startup.homepage";
+ const URL_STORE_TYPE = "url_overrides";
+@@ -82,6 +88,16 @@ ExtensionPreferencesManager.addSetting("imageAnimationBehavior", {
+ },
+ });
+
++ExtensionPreferencesManager.addSetting("contextMenuShowEvent", {
++ prefNames: [
++ "ui.context_menus.after_mouseup",
++ ],
++
++ setCallback(value) {
++ return {[this.prefNames[0]]: value === "mouseup"};
++ },
++});
++
+ this.browserSettings = class extends ExtensionAPI {
+ getAPI(context) {
+ let {extension} = context;
+@@ -114,6 +130,35 @@ this.browserSettings = class extends ExtensionAPI {
+ () => {
+ return aboutNewTabService.newTabURL;
+ }, URL_STORE_TYPE, true),
++ contextMenuShowEvent: Object.assign(
++ getSettingsAPI(
++ extension,
++ "contextMenuShowEvent",
++ () => {
++ if (AppConstants.platform === "win") {
++ return "mouseup";
++ }
++ let prefValue = Services.prefs.getBoolPref(
++ "ui.context_menus.after_mouseup", null);
++ return prefValue ? "mouseup" : "mousedown";
++ }
++ ),
++ {
++ set: details => {
++ if (!["mouseup", "mousedown"].includes(details.value)) {
++ throw new ExtensionError(
++ `${details.value} is not a valid value for contextMenuShowEvent.`);
++ }
++ if (AppConstants.platform === "android" ||
++ (AppConstants.platform === "win" &&
++ details.value === "mousedown")) {
++ return false;
++ }
++ return ExtensionPreferencesManager.setSetting(
++ extension, "contextMenuShowEvent", details.value);
++ },
++ }
++ ),
+ },
+ };
+ }
+diff --git a/toolkit/components/extensions/schemas/browser_settings.json b/toolkit/components/extensions/schemas/browser_settings.json
+index af073d933723cbd5..4f354e69dfedaf96 100644
+--- a/toolkit/components/extensions/schemas/browser_settings.json
++++ b/toolkit/components/extensions/schemas/browser_settings.json
+@@ -27,28 +27,38 @@
+ "type": "string",
+ "enum": ["normal", "none", "once"],
+ "description": "How images should be animated in the browser."
++ },
++ {
++ "id": "ContextMenuMouseEvent",
++ "type": "string",
++ "enum": ["mouseup", "mousedown"],
++ "description": "After which mouse event context menus should popup."
+ }
+ ],
+ "properties": {
+ "allowPopupsForUserEvents": {
+ "$ref": "types.Setting",
+ "description": "Allows or disallows pop-up windows from opening in response to user events."
+ },
+ "cacheEnabled": {
+ "$ref": "types.Setting",
+ "description": "Enables or disables the browser cache."
+ },
+ "homepageOverride": {
+ "$ref": "types.Setting",
+ "description": "Returns the value of the overridden home page. Read-only."
+ },
+ "imageAnimationBehavior": {
+ "$ref": "types.Setting",
+ "description": "Controls the behaviour of image animation in the browser. This setting's value is of type ImageAnimationBehavior, defaulting to <code>normal</code>."
+ },
+ "newTabPageOverride": {
+ "$ref": "types.Setting",
+ "description": "Returns the value of the overridden new tab page. Read-only."
++ },
++ "contextMenuShowEvent": {
++ "$ref": "types.Setting",
++ "description": "Controls after which mouse event context menus popup. This setting's value is of type ContextMenuMouseEvent, which has possible values of <code>mouseup</code> and <code>mousedown</code>."
+ }
+ }
+ }
+diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js b/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
+index 5c441df3e4198671..7e9c1576a723dfc6 100644
+--- a/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
++++ b/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
+@@ -24,13 +24,20 @@ add_task(async function test_browser_settings() {
+ "browser.cache.memory.enable": true,
+ "dom.popup_allowed_events": Preferences.get("dom.popup_allowed_events"),
+ "image.animation_mode": "none",
++ "ui.context_menus.after_mouseup": false,
+ };
+
+ async function background() {
+ browser.test.onMessage.addListener(async (msg, apiName, value) => {
+ let apiObj = browser.browserSettings[apiName];
+- await apiObj.set({value});
+- browser.test.sendMessage("settingData", await apiObj.get({}));
++ let result = await apiObj.set({value});
++ if (msg === "set") {
++ browser.test.assertTrue(result, "set returns true.");
++ browser.test.sendMessage("settingData", await apiObj.get({}));
++ } else {
++ browser.test.assertFalse(result, "set returns false for a no-op.");
++ browser.test.sendMessage("no-op set");
++ }
+ });
+ }
+
+@@ -69,33 +76,82 @@ add_task(async function test_browser_settings() {
+ }
+ }
+
++ async function testNoOpSetting(setting, value, expected) {
++ extension.sendMessage("setNoOp", setting, value);
++ await extension.awaitMessage("no-op set");
++ for (let pref in expected) {
++ equal(Preferences.get(pref), expected[pref], `${pref} set correctly for ${value}`);
++ }
++ }
++
+ await testSetting(
+ "cacheEnabled", false,
+ {
+ "browser.cache.disk.enable": false,
+ "browser.cache.memory.enable": false,
+ });
+ await testSetting(
+ "cacheEnabled", true,
+ {
+ "browser.cache.disk.enable": true,
+ "browser.cache.memory.enable": true,
+ });
+
+ await testSetting(
+ "allowPopupsForUserEvents", false,
+ {"dom.popup_allowed_events": ""});
+ await testSetting(
+ "allowPopupsForUserEvents", true,
+ {"dom.popup_allowed_events": PREFS["dom.popup_allowed_events"]});
+
+ for (let value of ["normal", "none", "once"]) {
+ await testSetting(
+ "imageAnimationBehavior", value,
+ {"image.animation_mode": value});
+ }
+
+- await extension.unload();
++ // This setting is a no-op on Android.
++ if (AppConstants.platform === "android") {
++ await testNoOpSetting("contextMenuShowEvent", "mouseup",
++ {"ui.context_menus.after_mouseup": false});
++ } else {
++ await testSetting(
++ "contextMenuShowEvent", "mouseup",
++ {"ui.context_menus.after_mouseup": true});
++ }
+
++ // "mousedown" is also a no-op on Windows.
++ if (["android", "win"].includes(AppConstants.platform)) {
++ await testNoOpSetting("contextMenuShowEvent", "mousedown",
++ {"ui.context_menus.after_mouseup": AppConstants.platform === "win"});
++ } else {
++ await testSetting(
++ "contextMenuShowEvent", "mousedown",
++ {"ui.context_menus.after_mouseup": false});
++ }
++
++ await extension.unload();
+ await promiseShutdownManager();
+ });
++
++add_task(async function test_bad_value() {
++ async function background() {
++ await browser.test.assertRejects(
++ browser.browserSettings.contextMenuShowEvent.set({value: "bad"}),
++ /bad is not a valid value for contextMenuShowEvent/,
++ "contextMenuShowEvent.set rejects with an invalid value.");
++
++ browser.test.sendMessage("done");
++ }
++
++ let extension = ExtensionTestUtils.loadExtension({
++ background,
++ manifest: {
++ permissions: ["browserSettings"],
++ },
++ });
++
++ await extension.startup();
++ await extension.awaitMessage("done");
++ await extension.unload();
++});
+--
+2.15.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 95e9daf52cf..bcfa5159ca7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,10 @@
# Maintainer: √Čtienne Deparis <etienne@depar.is>
pkgname=cliqz
_pkgname=browser-f
-pkgver=1.17.0
+pkgver=1.17.1
pkgrel=1
-_cqzbuildid=20171127205425
+_commitid=88a3c2f0245c5748c4f217fc5f1aaed780541e0b
+_cqzbuildid=20171130123422
pkgdesc="Firefox-based privacy aware web browser, build from sources"
arch=(i686 x86_64)
url="https://cliqz.com/"
@@ -11,23 +12,25 @@ license=(MPL2)
depends=(gtk3 gtk2 mozilla-common libxt startup-notification mime-types dbus-glib ffmpeg
nss hunspell sqlite ttf-font libpulse)
makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb
- autoconf2.13 rust)
+ autoconf2.13 rust clang llvm)
conflicts=(cliqz-bin)
-source=("https://github.com/cliqz-oss/browser-f/archive/${pkgver}.tar.gz"
+source=("https://github.com/cliqz-oss/browser-f/archive/${_commitid}.tar.gz"
wifi-disentangle.patch
wifi-fix-interface.patch
no-plt.diff
- 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch)
-sha256sums=('11aec82033c9deea31e109108f553f4c87a089cba318aff19f32a0f091e237ff'
+ 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
+ 0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch)
+sha256sums=('43e7873a43684b5827eb4ebeeeb47506cd84f22fa36855324f1e7c0db05ba7a3'
'f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed'
'e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1'
'ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa'
- '1f71b379f2262d7319624c2aed31fa2dbed42828feccc27b1cd82153b76ad707')
+ 'd45c97782a77e7c5ebacfa7b983019f6bb831794d3c707abbe3bb01cddb80f72'
+ '52c56c33f7ab98232d9c0644965f149da9b7266f607c84b80aca8a5534cee3bb')
options=(!emptydirs !makeflags !strip)
prepare() {
- cd $srcdir/${_pkgname}-${pkgver}/mozilla-release
+ cd "$srcdir/${_pkgname}-${_commitid}/mozilla-release"
sed -i 's/ifeq ($(OS_ARCH), Linux)/ifeq ($(OS_ARCH), Nope)/' toolkit/mozapps/installer/upload-files.mk
sed -i "s/@MOZ_APP_DISPLAYNAME@/$pkgname/g" toolkit/mozapps/installer/linux/rpm/mozilla.desktop
sed -i "s/@MOZ_APP_NAME@/$pkgname/g" toolkit/mozapps/installer/linux/rpm/mozilla.desktop
@@ -45,14 +48,17 @@ Exec=/usr/lib/cliqz/cliqz --private-window %u
END
# https://bugzilla.mozilla.org/show_bug.cgi?id=1360278
- patch -Np1 -i $srcdir/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
+ patch -Np1 -i "$srcdir/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch"
+
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1419426
+ patch -Np1 -i "$srcdir/0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch"
# https://bugzilla.mozilla.org/show_bug.cgi?id=1314968
- patch -Np1 -i $srcdir/wifi-disentangle.patch
- patch -Np1 -i $srcdir/wifi-fix-interface.patch
+ patch -Np1 -i "$srcdir/wifi-disentangle.patch"
+ patch -Np1 -i "$srcdir/wifi-fix-interface.patch"
# https://bugzilla.mozilla.org/show_bug.cgi?id=1382942
- patch -Np1 -i $srcdir/no-plt.diff
+ patch -Np1 -i "$srcdir/no-plt.diff"
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
@@ -68,11 +74,13 @@ END
cat >> browser/config/cliqz-release.mozconfig <<END
-# Milouse Archlinux specific additions
+# Archlinux specific additions
+ac_add_options --with-distribution-id=org.archlinux
ac_add_options --prefix=/usr
ac_add_options --enable-gold
ac_add_options --enable-pie
ac_add_options --enable-rust-simd
+ac_add_options --enable-stylo
# System libraries
ac_add_options --with-system-zlib
@@ -84,13 +92,11 @@ ac_add_options --enable-system-ffi
# Features
ac_add_options --enable-startup-notification
ac_add_options --disable-updater
-
-STRIP_FLAGS="--strip-debug"
END
}
build() {
- cd $srcdir/${_pkgname}-$pkgver
+ cd "$srcdir/${_pkgname}-${_commitid}"
# Hardening
LDFLAGS+=" -Wl,-z,now"
@@ -99,7 +105,7 @@ build() {
march=$(gcc -Q --help=target | grep march | sed -nr 's/^.*\s+([^\s]+)$/\1/p')
CFLAGS="-march=${march} -mtune=generic -O2 -fstack-protector-strong -fno-plt"
CPPFLAGS="-D_FORTIFY_SOURCE=2"
- CXXFLAGS="-march=${march} -mtune=generic -fstack-protector-strong -fno-plt"
+ CXXFLAGS="$CFLAGS"
export CQZ_RELEASE_CHANNEL=release
export CQZ_VERSION=$pkgver
@@ -111,21 +117,21 @@ build() {
package() {
install -d -m755 ${pkgdir}/usr/{bin,lib}
- ln -s /usr/lib/${pkgname}/${pkgname} ${pkgdir}/usr/bin/${pkgname}
+ ln -s "/usr/lib/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
- cd $srcdir
- mv ${_pkgname}-${pkgver}/obj/dist/${pkgname}-${pkgver}.en-US.linux-x86_64.tar.bz2 .
- tar xjf ${pkgname}-${pkgver}.en-US.linux-x86_64.tar.bz2
- cp -R $pkgname ${pkgdir}/usr/lib/
+ cd "$srcdir"
+ mv "$_pkgname-${_commitid}/obj/dist/$pkgname-$pkgver.en-US.linux-x86_64.tar.bz2" .
+ tar xjf "$pkgname-$pkgver.en-US.linux-x86_64.tar.bz2"
+ cp -R "$pkgname" "$pkgdir/usr/lib/"
- cd ${_pkgname}-$pkgver
+ cd "${_pkgname}-${_commitid}"
for size in 16 22 24 32 48 256; do
- install -D -m644 mozilla-release/browser/branding/cliqz/default$size.png \
- ${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${pkgname}.png
+ install -D -m644 "mozilla-release/browser/branding/cliqz/default$size.png" \
+ "$pkgdir/usr/share/icons/hicolor/$sizex$size/apps/$pkgname.png"
done
- install -d -m755 ${pkgdir}/usr/lib/${pkgname}/browser/defaults/preferences
- _vendorjs=${pkgdir}/usr/lib/${pkgname}/browser/defaults/preferences/vendor.js
+ install -d -m755 "$pkgdir/usr/lib/$pkgname/browser/defaults/preferences"
+ _vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js"
install -D -m644 /dev/stdin "$_vendorjs" <<END
// Disable update check
pref("app.update.enabled", false);
@@ -143,8 +149,12 @@ pref("browser.search.update", true);
pref("intl.locale.matchOS", true);
END
- install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -D -m644 mozilla-release/toolkit/mozapps/installer/linux/rpm/mozilla.desktop \
- ${pkgdir}/usr/share/applications/${pkgname}.desktop
+ "$pkgdir/usr/share/applications/$pkgname.desktop"
+
+ # Use system certificates
+ ln -srf "$pkgdir/usr/lib/libnssckbi.so" \
+ "$pkgdir/usr/lib/$pkgname/libnssckbi.so"
}