From fb05b962d6b4b0e89d7bd420737694430dd7f5fe Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Fri, 29 Jan 2021 16:24:17 +0100 Subject: [PATCH 1/3] build-style/cmake: use ninja as default generator --- common/build-style/cmake.sh | 8 ++++---- common/environment/build-style/cmake.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index 3135508b8b0..b8b070dbf32 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -64,7 +64,7 @@ _EOF # Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590 CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \ - cmake ${cmake_args} ${configure_args} $(echo ${cmake_builddir}|sed \ + cmake ${cmake_args} -GNinja ${configure_args} $(echo ${cmake_builddir}|sed \ -e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g') # Replace -isystem with -I for Qt4 and Qt5 packages @@ -72,7 +72,7 @@ _EOF } do_build() { - : ${make_cmd:=make} + : ${make_cmd:=ninja} cd ${cmake_builddir:=build} ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} @@ -92,14 +92,14 @@ do_check() { fi fi - : ${make_cmd:=make} + : ${make_cmd:=ninja} : ${make_check_target:=test} CTEST_OUTPUT_ON_FAILURE=TRUE ${make_cmd} ${make_check_args} ${make_check_target} } do_install() { - : ${make_cmd:=make} + : ${make_cmd:=ninja} : ${make_install_target:=install} cd ${cmake_builddir:=build} diff --git a/common/environment/build-style/cmake.sh b/common/environment/build-style/cmake.sh index 25bd8a388ec..c9e4d896159 100644 --- a/common/environment/build-style/cmake.sh +++ b/common/environment/build-style/cmake.sh @@ -1,5 +1,5 @@ if [ "$CHROOT_READY" ]; then if [[ "$hostmakedepends" != *"cmake-bootstrap"* ]]; then - hostmakedepends+=" cmake" + hostmakedepends+=" cmake ninja" fi fi From c060d9d4c481f469b616964da349984549b6c34d Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Fri, 29 Jan 2021 16:30:11 +0100 Subject: [PATCH 2/3] ccache: force bootstrap build to use gnu-make --- srcpkgs/ccache/template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/srcpkgs/ccache/template b/srcpkgs/ccache/template index 8b46fdd4686..52e60be6fcb 100644 --- a/srcpkgs/ccache/template +++ b/srcpkgs/ccache/template @@ -16,6 +16,8 @@ checksum=5fdc804056632d722a1182e15386696f0ea6c59cb4ab4d65a54f0b269ae86f99 if [ -z "$CHROOT_READY" ]; then hostmakedepends="cmake-bootstrap" + configure_args+=" -G'Unix Makefiles'" + make_cmd="make" else hostmakedepends="asciidoc perl" fi From 7d8b697420d590bc8d2e8c41e413b75706f88821 Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Fri, 29 Jan 2021 16:47:02 +0100 Subject: [PATCH 3/3] build-style/cmake: replace sed monstrosity with ${wrksrc}/${build_wrksrc} --- common/build-style/cmake.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index b8b070dbf32..6078ede1f49 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -64,8 +64,7 @@ _EOF # Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590 CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \ - cmake ${cmake_args} -GNinja ${configure_args} $(echo ${cmake_builddir}|sed \ - -e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g') + cmake ${cmake_args} -GNinja ${configure_args} ${wrksrc}/${build_wrksrc} # Replace -isystem with -I for Qt4 and Qt5 packages find -name flags.make -exec sed -i "{}" -e"s;-isystem;-I;g" \;