diff --git a/default.conf b/default.conf
index 638226279e10d1c5ab8549ca70e90858e9f05521..3bba6c4e33cc73792f5a1f1e5436c54cd8d5f245 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 8cbd8625f3db69bc155c91f9625eb040f1f1873c..855d522b9b14e89235358db853b0d38e1e1aeef3 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__
 }