cmake: always built with cmake build-style
Less cursed template (changed build-style for cross-compiling).
This commit is contained in:
parent
a653676c88
commit
2c9a3ba200
2 changed files with 39 additions and 7 deletions
13
srcpkgs/cmake/patches/no-run-cmake-bootstrap.patch
Normal file
13
srcpkgs/cmake/patches/no-run-cmake-bootstrap.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
We will run cmake ourselves with our flags
|
||||
Index: cmake-3.20.3/bootstrap
|
||||
===================================================================
|
||||
--- cmake-3.20.3.orig/bootstrap
|
||||
+++ cmake-3.20.3/bootstrap
|
||||
@@ -1968,6 +1968,7 @@ export CFLAGS
|
||||
export CXXFLAGS
|
||||
export LDFLAGS
|
||||
|
||||
+exit 0
|
||||
# Run bootstrap CMake to configure real CMake
|
||||
cmake_options="-DCMAKE_BOOTSTRAP=1"
|
||||
if test -n "${cmake_verbose}"; then
|
|
@ -1,11 +1,11 @@
|
|||
# Template file for 'cmake'
|
||||
# FIXME: cmake is being rebuilt on do_install
|
||||
pkgname=cmake
|
||||
version=3.20.3
|
||||
revision=1
|
||||
build_style=configure
|
||||
configure_args="--prefix=/usr --mandir=/share/man --docdir=/share/doc/cmake
|
||||
--system-libs ${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS}"
|
||||
make_check_target=test
|
||||
build_style=cmake
|
||||
configure_args="-DCMAKE_DOC_DIR=/share/doc/cmake
|
||||
-DCMAKE_USE_SYSTEM_LIBRARIES=ON -DKWSYS_LFS_WORKS=1"
|
||||
hostmakedepends="gcc-fortran"
|
||||
makedepends="expat-devel libarchive-devel libcurl-devel libuv-devel
|
||||
ncurses-devel rhash-devel jsoncpp-devel"
|
||||
|
@ -18,13 +18,32 @@ distfiles="https://www.cmake.org/files/v${version%.*}/${pkgname}-${version}.tar.
|
|||
checksum=4d008ac3461e271fcfac26a05936f77fc7ab64402156fb371d41284851a651b8
|
||||
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 [ "$CROSS_BUILD" ]; then
|
||||
build_style=cmake
|
||||
hostmakedepends+=" cmake"
|
||||
configure_args="-DCMAKE_DOC_DIR=/share/doc/cmake
|
||||
-DCMAKE_USE_SYSTEM_LIBRARIES=ON -DKWSYS_LFS_WORKS=1"
|
||||
fi
|
||||
|
||||
pre_configure() {
|
||||
local f
|
||||
[ ! "$CROSS_BUILD" ] || return 0
|
||||
mkdir -p build
|
||||
cd build
|
||||
../bootstrap --no-system-libs \
|
||||
${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS}
|
||||
# Make sure build directory is clean
|
||||
for f in *; do
|
||||
if [ "$f" != Bootstrap.cmk ]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
cd ${wrksrc}
|
||||
PATH="${wrksrc}/build/Bootstrap.cmk:$PATH"
|
||||
}
|
||||
|
||||
post_install() {
|
||||
rm -rf ${DESTDIR}/usr/share/doc/cmake
|
||||
sed -n -e '/Copyright/,/authorization[.]/p' \
|
||||
|
|
Loading…
Reference in a new issue