diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /taskcluster/scripts/misc/build-pkgconf.sh | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/scripts/misc/build-pkgconf.sh')
-rwxr-xr-x | taskcluster/scripts/misc/build-pkgconf.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/taskcluster/scripts/misc/build-pkgconf.sh b/taskcluster/scripts/misc/build-pkgconf.sh new file mode 100755 index 0000000000..bc4ec7d4bb --- /dev/null +++ b/taskcluster/scripts/misc/build-pkgconf.sh @@ -0,0 +1,44 @@ +#!/bin/bash +set -x -e -v + +# This script is for building pkgconfs. +PROJECT=pkgconf + +cd ${MOZ_FETCHES_DIR}/${PROJECT} + +export PATH="$MOZ_FETCHES_DIR/clang/bin:$PATH" + +case "$1" in +x86_64-unknown-linux-gnu) + CC="clang --sysroot=$MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu" + EXE= + ;; +x86_64-apple-darwin) + export MACOSX_DEPLOYMENT_TARGET=10.12 + TARGET=$1 + CC="clang --target=$TARGET -isysroot $MOZ_FETCHES_DIR/MacOSX13.3.sdk" + EXE= + ;; +aarch64-apple-darwin) + export MACOSX_DEPLOYMENT_TARGET=11.0 + TARGET=$1 + CC="clang --target=$TARGET -isysroot $MOZ_FETCHES_DIR/MacOSX13.3.sdk" + EXE= + ;; +x86_64-pc-windows-gnu) + TARGET=x86_64-w64-mingw32 + CC="x86_64-w64-mingw32-clang -DPKGCONFIG_IS_STATIC=1" + EXE=.exe + ;; +esac + +./configure --disable-shared CC="$CC" AR=llvm-ar RANLIB=llvm-ranlib LDFLAGS=-fuse-ld=lld ${TARGET:+--host=$TARGET} +make -j$(nproc) V=1 + +mv ${PROJECT}${EXE} ${PROJECT}_tmp +mkdir ${PROJECT} +mv ${PROJECT}_tmp ${PROJECT}/pkg-config${EXE} +tar -acf ${PROJECT}.tar.zst ${PROJECT} + +mkdir -p $UPLOAD_DIR +mv ${PROJECT}.tar.zst $UPLOAD_DIR |