From 18340ddd42ca3017fdfe9b20d0d228bd6c36d69a Mon Sep 17 00:00:00 2001 From: Sertonix Date: Mon, 7 Oct 2024 22:20:19 +0200 Subject: [PATCH] default.conf: reduce duplication through default.conf By setting some environmental variables in default.conf we can reduce the amount of duplicated code needed in APKBUILDs. --- default.conf | 6 ++++++ newapkbuild.in | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/default.conf b/default.conf index 6382262..3bba6c4 100644 --- a/default.conf +++ b/default.conf @@ -10,6 +10,7 @@ export JOBS=$(nproc) export MAKEFLAGS=-j$JOBS export SAMUFLAGS=-j$JOBS export CARGO_BUILD_JOBS=$JOBS +export CMAKE_BUILD_PARALLEL_LEVEL=$JOBS export CTEST_PARALLEL_LEVEL=$JOBS export CARGO_PROFILE_RELEASE_OPT_LEVEL="s" @@ -18,6 +19,11 @@ export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 export CARGO_PROFILE_RELEASE_LTO="true" export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse" +export CTEST_OUTPUT_ON_FAILURE=ON +export CTEST_NO_TESTS_ACTION=error + +export PERL_MM_USE_DEFAULT=1 + SRCDEST=/var/cache/distfiles # The package will be stored as $REPODEST/$repo/$pkgname-$pkgver-r$pkgrel.apk diff --git a/newapkbuild.in b/newapkbuild.in index 8cbd862..855d522 100644 --- a/newapkbuild.in +++ b/newapkbuild.in @@ -91,7 +91,7 @@ __EOF__ build_perl() { cat >>APKBUILD<<__EOF__ - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + perl Makefile.PL INSTALLDIRS=vendor make __EOF__ } @@ -133,7 +133,7 @@ __EOF__ check_cmake() { cat >>APKBUILD<<__EOF__ - ctest --test-dir build --output-on-failure + ctest --test-dir build __EOF__ }