Skip to content

Commit

Permalink
cmake: update to 3.21.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
atweiden committed Aug 19, 2021
1 parent db60a92 commit b9b6dfd
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 50 deletions.
20 changes: 20 additions & 0 deletions srcpkgs/cmake/patches/ar-lwyu.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Fix darktable build
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 5a4c6521d8..55b804d643 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -1157,7 +1157,13 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
this->AddModuleDefinitionFlag(linkLineComputer.get(), vars["LINK_FLAGS"],
config);
if (gt->GetPropertyAsBool("LINK_WHAT_YOU_USE")) {
- vars["LINK_FLAGS"] += " -Wl,--no-as-needed";
+ switch (targetType) {
+ case cmStateEnums::EXECUTABLE:
+ case cmStateEnums::SHARED_LIBRARY:
+ case cmStateEnums::MODULE_LIBRARY:
+ vars["LINK_FLAGS"] += " -Wl,--no-as-needed";
+ break;
+ }
}
vars["LINK_FLAGS"] = globalGen->EncodeLiteral(vars["LINK_FLAGS"]);

13 changes: 13 additions & 0 deletions srcpkgs/cmake/patches/ignore-crape-compiler-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
index dcdc7f1b96..37e13b6c5c 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
@@ -11,7 +11,7 @@ project(Minimal NONE)
set(targets
aix-C-XL-13.1.3 aix-CXX-XL-13.1.3
aix-C-XLClang-16.1.0.1 aix-CXX-XLClang-16.1.0.1
- craype-C-Cray-8.7 craype-CXX-Cray-8.7 craype-Fortran-Cray-8.7
+ craype-Fortran-Cray-8.7
craype-C-Cray-9.0-hlist-ad craype-CXX-Cray-9.0-hlist-ad craype-Fortran-Cray-9.0-hlist-ad
craype-C-GNU-7.3.0 craype-CXX-GNU-7.3.0 craype-Fortran-GNU-7.3.0
craype-C-Intel-18.0.2.20180210 craype-CXX-Intel-18.0.2.20180210
41 changes: 0 additions & 41 deletions srcpkgs/cmake/patches/test-none.patch

This file was deleted.

15 changes: 6 additions & 9 deletions srcpkgs/cmake/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# FIXME: cmake is being rebuilt on do_install
maintainer="nox"
pkgname="cmake"
version=3.20.5
version=3.21.1
revision=1
short_desc="Cross-platform, open-source build system"
makedepends+=" expat-devel"
Expand All @@ -19,7 +18,7 @@ hostmakedepends+=" python3-Sphinx"
homepage="https://www.cmake.org"
license="BSD-3-Clause, ICU"
distfiles="https://www.cmake.org/files/v${version%.*}/$pkgname-$version.tar.gz"
checksum="12c8040ef5c6f1bc5b8868cede16bb7926c18980f59779e299ab52cbc6f15bb0"
checksum="fac3915171d4dff25913975d712f76e69aef44bf738ba7b976793a458b4cfed4"
build_style="cmake"
configure_args+=" -DCMAKE_DOC_DIR=/share/doc/cmake"
configure_args+=" -DCMAKE_MAN_DIR=/share/man"
Expand All @@ -31,11 +30,6 @@ configure_args+=" -DSPHINX_MAN=1"
make_check_target="test"
replaces="cmake-bootstrap>=0"

# XXX: cmake is broken if cmake was built with -GNinja
# https://bugs.gentoo.org/596460
export CMAKE_GENERATOR="Unix Makefiles"
make_cmd="make"

if [[ -n "$CROSS_BUILD" ]]; then
unset configure_args
hostmakedepends+=" cmake"
Expand All @@ -47,7 +41,10 @@ pre_configure() {
|| return 0
mkdir -p build
cd build
../bootstrap --no-system-libs ${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS}
../bootstrap \
--generator="Ninja" \
--no-system-libs \
${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS}
# make sure build directory is clean
for f in *; do
if [[ "$f" != "Bootstrap.cmk" ]]; then
Expand Down

0 comments on commit b9b6dfd

Please sign in to comment.