45 lines
1.2 KiB
Bash
Executable file
45 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
version=$(cat version)
|
|
release=$(cat release)
|
|
source_release=$(cat source_release)
|
|
tmp="" && [ $release -gt 1 ] && tmp=-$release
|
|
full_version=$version-$source_release$tmp
|
|
arch="x86_64" && [ ! -z $ARCH ] && arch=$ARCH
|
|
|
|
echo assets/pre_build_patches_mozconfig.sh: Starting Pre-build script for version $full_version for $arch.
|
|
|
|
# ---
|
|
|
|
# See: https://gitlab.com/librewolf-community/browser/linux/-/blob/master/scripts/3_Configure_Source_Code.sh
|
|
|
|
#
|
|
# 1) Creating a valid mozconfig is already done by Makefile. Skipped.
|
|
#
|
|
|
|
# allow setting limited resource usage via ENV / CI:
|
|
if [ ! -z ${CORES_TO_USE} ]; then
|
|
echo "mk_add_options MOZ_MAKE_FLAGS=\"-j${CORES_TO_USE}\"" >> librewolf-${full_version}/mozconfig
|
|
fi
|
|
|
|
#
|
|
# 2) apply patches not already done in the source tarball
|
|
#
|
|
|
|
cd librewolf-$full_version
|
|
|
|
# hopefully the magic sauce that makes things build on 18.04 and later on work "everywhere"
|
|
patch -Np1 -i ../assets/deb_patches/armhf-reduce-linker-memory-use.patch
|
|
patch -Np1 -i ../assets/deb_patches/reduce-rust-debuginfo.patch
|
|
patch -Np1 -i ../assets/deb_patches/use-system-icupkg.patch
|
|
|
|
# might make the build just a tiny bit cleaner, not really required though
|
|
patch -Np1 -i ../assets/deb_patches/fix-wayland-build.patch
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|