summaryrefslogtreecommitdiff
path: root/libre/icecat
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-12-22 13:37:41 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2021-01-08 18:49:34 -0500
commit67543610649d27431b8f5d3aaed572305e2a8918 (patch)
tree419de9a0eb3916f91b2c940ab498e697ce99fc84 /libre/icecat
parentc119d03f02d8f3f7f8244d27eb48933fcf8ba818 (diff)
[icedove][iceweasel]: housekeeping - refactor anti-features check
these changes are an attempt to normalize common patching implementations, in order to reduce the diffs across all of our mozilla PKGBUILDs
Diffstat (limited to 'libre/icecat')
-rw-r--r--libre/icecat/PKGBUILD31
1 files changed, 20 insertions, 11 deletions
diff --git a/libre/icecat/PKGBUILD b/libre/icecat/PKGBUILD
index eef0d52df..2b763c67b 100644
--- a/libre/icecat/PKGBUILD
+++ b/libre/icecat/PKGBUILD
@@ -68,6 +68,8 @@ eval "_should_skip_pgo=\$_should_skip_pgo_${CARCH}"
_check_build_config() {
+ pushd "$srcdir/$pkgname-${pkgver%_*}" > /dev/null
+
echo "Checking build configuration..."
# Configure produces mozinfo.json that reflects current configuration.
@@ -78,13 +80,21 @@ _check_build_config() {
# 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 jq_cmd='[.crashreporter, .datareporting, .healthreport, .normandy, .telemetry, .updater] | any(. != false)'
- local features_not_disabled=$(cat "$object_directory/mozinfo.json" | jq -e "${jq_cmd}")
- if $features_not_disabled; then
- echo 'Some features are not disabled correctly in build configuration files, aborting.'
-# return 1
+ local obj_directory=$(./mach environment | sed -En '/object directory:/{n;s/^\s+//;p;}')
+ local antifeature_keys=(.crashreporter .datareporting .healthreport .normandy .telemetry .updater)
+ local antifeatures=()
+ echo "obj_directory is: ${obj_directory}"
+ for key in ${antifeature_keys[@]}
+ do jq -e "${key} != false" "${obj_directory}"/mozinfo.json && antifeatures+=(${key})
+ done
+ if (( ${#antifeatures[@]} ))
+ then echo "Some anti-features are not disabled in build configuration files, aborting:"
+ for key in ${antifeatures[@]} ; do echo " - ${key} is enabled" ; done ;
+ # FIXME: - .datareporting is enabled
+# return 1
fi
+
+ popd > /dev/null
}
prepare() {
@@ -117,13 +127,12 @@ ac_add_options --enable-update-channel=release
ac_add_options --with-distribution-id=nu.parabola
ac_add_options --with-unsigned-addon-scopes=app,system
ac_add_options --allow-addon-sideload
-export MOZ_APP_NAME=icecat
-export MOZ_APP_REMOTINGNAME=${pkgname//-/}
+export MOZ_APP_NAME=${pkgname}
+export MOZ_APP_REMOTINGNAME=${pkgname}
export MOZ_TELEMETRY_REPORTING=
export MOZ_REQUIRE_SIGNING=
-
-ac_add_options --with-app-basename=icecat
-ac_add_options --with-app-name=icecat
+ac_add_options --with-app-basename=${pkgname}
+ac_add_options --with-app-name=${pkgname}
# System libraries
ac_add_options --with-system-nspr