Add cmake 3.16.9

This commit is contained in:
Andrey Rodionov 2020-10-14 13:19:57 +03:00
parent 49ed4e3437
commit 067c2886ad
3 changed files with 70 additions and 0 deletions

42
cmake316/PKGBUILD Normal file
View file

@ -0,0 +1,42 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=cmake
pkgver=3.16.9
pkgrel=1
pkgdesc='A cross-platform open-source make system'
arch=('x86_64')
url="https://www.cmake.org/"
license=('custom')
depends=('curl' 'libarchive' 'shared-mime-info' 'jsoncpp' 'libjsoncpp.so' 'libuv' 'rhash')
makedepends=()
optdepends=('qt5-base: cmake-gui')
source=("https://www.cmake.org/files/v${pkgver%.*}/${pkgname}-${pkgver}.tar.gz"
cmake-cppflags.patch)
sha512sums=('SKIP'
'407c5c63a31266e44641ada8229dbc33df44df98e5bb575db3a33590e8ffdff9aea3f2ee5cb0cb855858facf1e46c63886dea9f948a0cad2da042e7f7f258cac')
prepare() {
cd ${pkgname}-${pkgver}
patch -p1 -i ../cmake-cppflags.patch # Honor CPPFLAGS https://gitlab.kitware.com/cmake/cmake/issues/12928
}
build() {
cd ${pkgname}-${pkgver}
export CXXFLAGS+=" ${CPPFLAGS}"
./bootstrap --prefix=/usr \
--mandir=/share/man \
--docdir=/share/doc/cmake \
--system-libs \
--parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN)
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
install -Dm644 Copyright.txt \
"${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}

View file

@ -0,0 +1,26 @@
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index f6d620f40e..325b11f25e 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -100,7 +100,7 @@ if(NOT CMAKE_MODULE_EXISTS)
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
endif()
-set(CMAKE_C_FLAGS_INIT "$ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}")
+set(CMAKE_C_FLAGS_INIT "$ENV{CPPFLAGS} $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}")
cmake_initialize_per_config_variable(CMAKE_C_FLAGS "Flags used by the C compiler")
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index dbb4366757..8a0ee288c6 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -197,7 +197,7 @@ endforeach()
# on the initial values computed in the platform/*.cmake files
# use _INIT variables so that this only happens the first time
# and you can set these flags in the cmake cache
-set(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}")
+set(CMAKE_CXX_FLAGS_INIT "$ENV{CPPFLAGS} $ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}")
cmake_initialize_per_config_variable(CMAKE_CXX_FLAGS "Flags used by the CXX compiler")

2
cmake316/rebuild.list Normal file
View file

@ -0,0 +1,2 @@
cmake-fedora
uranium