From 816a2fd81aadb86434cd954737636b82df49c895 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Wed, 26 Oct 2022 17:03:34 +0200 Subject: [PATCH] gitdiff --- flatpak/Makefile | 16 ++++-- flatpak/assets/mozconfig.aarch64 | 54 +++++++++++++++++++ .../assets/{mozconfig => mozconfig.x86_64} | 11 ++-- flatpak/assets/post_build_distini_etc.sh | 3 ++ flatpak/assets/pre_build_patches_mozconfig.sh | 6 +++ 5 files changed, 78 insertions(+), 12 deletions(-) create mode 100644 flatpak/assets/mozconfig.aarch64 rename flatpak/assets/{mozconfig => mozconfig.x86_64} (84%) create mode 100644 flatpak/assets/post_build_distini_etc.sh create mode 100644 flatpak/assets/pre_build_patches_mozconfig.sh diff --git a/flatpak/Makefile b/flatpak/Makefile index 163f41e..11bbe11 100644 --- a/flatpak/Makefile +++ b/flatpak/Makefile @@ -6,7 +6,13 @@ source_release:=$(shell cat source_release) full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo "-$(release)") mozbuild=~/.mozbuild -docker_image_name=lw-android-arm +# if arch not passed on commandline, default to x86_64 +ifeq ($(arch),aarch64) +else +arch=x86_64 +endif + +docker_image_name=lw-linux-flatpak-$(arch) help : @@ -36,7 +42,7 @@ fetch : wget -q -O version "https://gitlab.com/librewolf-community/browser/source/-/raw/main/version" wget -q -O source_release "https://gitlab.com/librewolf-community/browser/source/-/raw/main/release" wget -q -O "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum" "https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum?job=Build" - wget -q -O "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz" "https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$$(cat version)-$$(cat source_release).source.tar.gz?job=Build" + wget --progress=bar:force -O "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz" "https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$$(cat version)-$$(cat source_release).source.tar.gz?job=Build" cat "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum" sha256sum -c "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum" @@ -64,7 +70,8 @@ dir : librewolf-$(full_version) librewolf-$(full_version) : librewolf-$(full_version).source.tar.gz rm -rf $@ tar xf $< - cp -v assets/mozconfig librewolf-$(full_version) + touch $@ + cp -v assets/mozconfig.$(arch) librewolf-$(full_version)/mozconfig # (cd librewolf-$(full_version) && patch -p1 -i ../assets/tryfix-reslink-fail.patch) # (cd librewolf-$(full_version) && patch -p1 -i ../assets/fix-l10n-package-cmd.patch) @@ -78,7 +85,8 @@ docker-clean : docker rmi $(docker_image_name) bootstrap : dir - (cd librewolf-$(full_version) && ./mach --no-interactive bootstrap --application-choice=mobile_android) + (cd librewolf-$(full_version) && ./mach --no-interactive bootstrap --application-choice=browser) + setup-debian : apt-get -y install mercurial python3 python3-dev python3-pip curl wget dpkg-sig libssl-dev zstd diff --git a/flatpak/assets/mozconfig.aarch64 b/flatpak/assets/mozconfig.aarch64 new file mode 100644 index 0000000..bf17591 --- /dev/null +++ b/flatpak/assets/mozconfig.aarch64 @@ -0,0 +1,54 @@ + +ac_add_options --target=aarch64-linux-gnu +ac_add_options --enable-bootstrap + +# taken from manjaro build: +ac_add_options --enable-optimize="-g0 -O2" + +export CC='clang-13' +export CXX='clang++-13' +export AR=llvm-ar-13 +export NM=llvm-nm-13 +export RANLIB=llvm-ranlib-13 + +# --- + +# We should fix this one.. +#ac_add_options --without-wasm-sandboxed-libraries + + +# +# Librewolf specific settings +# + +ac_add_options --allow-addon-sideload +ac_add_options --disable-crashreporter +ac_add_options --disable-debug +ac_add_options --disable-default-browser-agent +ac_add_options --disable-tests +# updater disabled in Settings repo (app.update.auto). +# this setting toggles the urlbar 'star' bug +# ac_add_options --disable-updater +ac_add_options --enable-hardening +ac_add_options --enable-optimize +ac_add_options --enable-release +ac_add_options --enable-rust-simd + +ac_add_options --with-app-name=librewolf +ac_add_options --with-branding=browser/branding/librewolf + +ac_add_options --with-unsigned-addon-scopes=app,system + +# see issue # https://gitlab.com/librewolf-community/browser/arch/-/issues/49 +export MOZ_REQUIRE_SIGNING= + +mk_add_options MOZ_CRASHREPORTER=0 +mk_add_options MOZ_DATA_REPORTING=0 +mk_add_options MOZ_NORMANTY=0 +mk_add_options MOZ_SERVICES_HEALTHREPORT=0 +mk_add_options MOZ_TELEMETRY_REPORTING=0 + +ac_add_options --enable-strip + +# Internationalization +ac_add_options --with-l10n-base=$(pwd)/browser/locales/l10n diff --git a/flatpak/assets/mozconfig b/flatpak/assets/mozconfig.x86_64 similarity index 84% rename from flatpak/assets/mozconfig rename to flatpak/assets/mozconfig.x86_64 index 764ee82..2ceddb6 100644 --- a/flatpak/assets/mozconfig +++ b/flatpak/assets/mozconfig.x86_64 @@ -1,12 +1,7 @@ -# -# Android build -# - -ac_add_options --enable-application=mobile/android +#ac_add_options --target=aarch64-linux-gnu +ac_add_options --target=x86_64-linux-gnu ac_add_options --enable-bootstrap -ac_add_options --with-android-ndk=$HOME/.mozbuild/android-ndk-r21d -ac_add_options --with-android-sdk=$HOME/.mozbuild/android-sdk-linux -CROSS_BUILD=1 + # We should fix this one.. #ac_add_options --without-wasm-sandboxed-libraries diff --git a/flatpak/assets/post_build_distini_etc.sh b/flatpak/assets/post_build_distini_etc.sh new file mode 100644 index 0000000..2d90fb4 --- /dev/null +++ b/flatpak/assets/post_build_distini_etc.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "post_build_distini_etc.sh: Hello, world!" diff --git a/flatpak/assets/pre_build_patches_mozconfig.sh b/flatpak/assets/pre_build_patches_mozconfig.sh new file mode 100644 index 0000000..5dec726 --- /dev/null +++ b/flatpak/assets/pre_build_patches_mozconfig.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "pre_build_patches_mozconfig.sh: Hello, world!" + + +