core/cmake/Pkgfile

42 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-12-11 22:30:57 +01:00
# Description: A cross-platform, open-source make system
# URL: https://www.cmake.org/
# Maintainer: CRUX System Team, core-ports at crux dot nu
2023-08-11 06:50:51 +02:00
# Depends on: curl expat jsoncpp libarchive libuv lzlib ncurses rhash
2022-01-30 14:36:05 +01:00
# Optional: python3-sphinx
2021-12-11 22:30:57 +01:00
name=cmake
2023-10-07 09:04:35 +02:00
version=3.27.7
2023-07-18 23:21:41 +02:00
release=1
2021-12-11 22:30:57 +01:00
source=(https://cmake.org/files/v${version%.*}/$name-$version.tar.gz)
build() {
cd $name-$version
sed -i Source/CMakeInstallDestinations.cmake \
-e 's|share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}|share/cmake|'
2022-03-05 16:05:21 +01:00
prt-get isinst ccache && PKGMK_CMAKE+=' --enable-ccache'
./bootstrap --generator=Ninja $PKGMK_CMAKE \
2021-12-11 22:30:57 +01:00
--prefix=/usr \
2022-01-09 03:16:54 +01:00
--datadir=/share/cmake \
2022-03-05 16:05:21 +01:00
--bootstrap-system-libuv \
--bootstrap-system-jsoncpp \
--bootstrap-system-librhash \
2023-07-18 23:21:41 +02:00
--no-system-cppdap \
2022-01-09 03:16:54 +01:00
--system-libs \
2021-12-11 22:30:57 +01:00
--parallel=${JOBS:-1} \
2022-03-05 16:05:21 +01:00
$(prt-get isinst python3-sphinx >/dev/null && echo --sphinx-man) \
2022-04-18 00:10:45 +02:00
-- -D CMake_BUILD_LTO=ON \
-D BUILD_TESTING=OFF
2021-12-11 22:30:57 +01:00
2023-03-31 10:47:03 +02:00
ninja -j ${JOBS:-1}
2021-12-11 22:30:57 +01:00
DESTDIR=$PKG ninja install
rm -r $PKG/usr/{doc,share/cmake/Help}
ln -sf $name $PKG/usr/share/$name-${version%.*}
2022-03-05 16:05:21 +01:00
prt-get isinst bash-completion || rm -r $PKG/usr/share/bash-completion
rm -r $PKG/usr/share/emacs
2021-12-11 22:30:57 +01:00
}