summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/iceweasel/PKGBUILD25
1 files changed, 24 insertions, 1 deletions
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD
index 3f0661f0f..6ed720ee9 100644
--- a/libre/iceweasel/PKGBUILD
+++ b/libre/iceweasel/PKGBUILD
@@ -59,7 +59,7 @@ makedepends=(unzip zip diffutils yasm mesa imake inetutils xorg-server-xvfb
autoconf2.13 rust clang llvm jack gtk2 nodejs cbindgen nasm
python-setuptools python-psutil)
# FIXME: 'mozilla-serarchplugins' package needs re-working (see note in prepare())
-makedepends+=(quilt libxslt imagemagick)
+makedepends+=(quilt libxslt imagemagick git jq)
optdepends=('networkmanager: Location detection via available WiFi networks'
'libnotify: Notification integration'
'pulseaudio: Audio support'
@@ -252,6 +252,7 @@ END
# Disable various components at the source level
sed -i 's/;1/;0/' toolkit/components/telemetry/components.conf
+ sed -Ei 's/((MOZ_SERVICES_HEALTHREPORT|MOZ_NORMANDY).+)True/\1False/' browser/moz.configure
#sed -i 's/;1/;0/' browser/experiments/Experiments.manifest
#sed -i '/pocket/d' browser/extensions/moz.build
#sed -i '/activity-stream/d' browser/extensions/moz.build
@@ -294,6 +295,26 @@ END
git init && git clean -dfX -e \!ipc/chromium/src/third_party/libevent/evconfig-private.h
}
+_check_build_config() {
+ echo "Checking build configuration..."
+
+ # Configure produces mozinfo.json that reflects current configuration.
+ # See build/docs/mozinfo.rst
+ ./mach configure
+
+ # In this test, jq collects values of the following keys of mozinfo.json into array,
+ # and checks if any of them are not equal to false, in which case it returns "true".
+ # E.g. if the value of any key is true or null (in case the key is missing from mozinfo.json),
+ # that means the build configuration has to be reworked.
+ local object_directory=$(./mach environment | sed -En '/object directory:/{n;s/^\s+//;p;}')
+ local features_not_disabled=$(cat "$object_directory/mozinfo.json" \
+ | jq -e '[.crashreporter, .datareporting, .healthreport, .normandy, .telemetry, .updater] | any(. != false)')
+ if $features_not_disabled; then
+ echo 'Some features are not disabled correctly in build configuration files, aborting.'
+ return 1
+ fi
+}
+
build() {
cd firefox-$pkgver
@@ -371,6 +392,7 @@ build() {
cat >.mozconfig ../mozconfig - <<END
ac_add_options --enable-profile-generate=cross
END
+ _check_build_config
./mach build
echo "Profiling instrumented browser..."
@@ -411,6 +433,7 @@ END
# each of the [ARCH-SPECIFIC BUILD CONFIG] branches above should have created .mozconfig
[[ ! -f .mozconfig ]] && echo ".mozconfig file not found in source root" && return 1
+ _check_build_config
echo "Building optimized browser..."
./mach build