diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index b000e69..b237214 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -63,7 +63,7 @@ apk add bash git gcc g++ cmake make file wget \ gpgme-dev libgcrypt-dev libgcrypt-static argp-standalone zstd-dev zstd-static util-linux-static \ glib-static libassuan-static zlib-static libgpg-error-static \ curl-dev curl-static nghttp2-static libidn2-static openssl-libs-static brotli-static c-ares-static libunistring-static \ - glib-static glib-dev autoconf automake + glib-static glib-dev autoconf automake meson # libcurl's pkg-config scripts are broken. everywhere, everytime. # these additional flags have been collected from all the .pc files whose libs are mentioned as -l in Libs.private @@ -75,7 +75,7 @@ echo "Requires.private: libcares libnghttp2 libidn2 libssl openssl libcrypto lib # in a Docker container, we can safely disable this check git config --global --add safe.directory '*' -bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 0.27 +bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 0.28 bash -euxo pipefail /source/ci/install-static-mksquashfs.sh 4.6.1 bash -euxo pipefail /source/ci/install-static-zsyncmake.sh 0.6.2 diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh index 40e0a67..f64b10e 100644 --- a/ci/install-static-desktop-file-validate.sh +++ b/ci/install-static-desktop-file-validate.sh @@ -25,11 +25,9 @@ pushd "$build_dir" wget -c "https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/archive/"$version"/desktop-file-utils-"$version".tar.gz" tar xf desktop-file-utils-*.tar.gz cd desktop-file-utils-*/ -# The next 2 lines are a workaround for: checking build system type... ./config.guess: unable to guess system type -wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O config.guess -wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O config.sub -autoreconf --install # https://github.com/shendurelab/LACHESIS/issues/31#issuecomment-283963819 -./configure CFLAGS=-no-pie LDFLAGS=-static + +# setting LDFLAGS as suggested in https://mesonbuild.com/Creating-Linux-binaries.html#building-and-installing +env LDFLAGS=-static meson setup build --prefer-static --default-library=static if [[ "${GITHUB_ACTIONS:-}" != "" ]]; then jobs="$(nproc)" @@ -37,11 +35,5 @@ else jobs="$(nproc --ignore=1)" fi -make -j"$jobs" - -# TODO: Find more elegant way to do this -cd src/ -gcc -static -o desktop-file-validate keyfileutils.o validate.o validator.o mimeutils.o -lglib-2.0 -lintl -strip desktop-file-validate -cp desktop-file-validate /usr/bin/ -cd .. +ninja -C build -j "$jobs" -v +ninja -C build -j 1 -v install