2020-12-17 14:07:55 +01:00
|
|
|
# Description: A cross-platform, open-source make system
|
2021-11-15 21:52:17 +01:00
|
|
|
# URL: https://www.cmake.org/
|
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
|
|
|
# Depends on: curl expat libarchive ncurses
|
|
|
|
# Optional: jsoncpp librhash libuv lzlib nghttp2-libs ninja python3-sphinx
|
2008-10-14 13:26:23 +03:00
|
|
|
|
|
|
|
name=cmake
|
2021-12-11 13:26:35 +01:00
|
|
|
version=3.22.1
|
2017-04-11 20:10:16 +02:00
|
|
|
release=1
|
2020-06-21 20:21:42 +10:00
|
|
|
source=(https://cmake.org/files/v${version%.*}/$name-$version.tar.gz)
|
2008-10-14 13:26:23 +03:00
|
|
|
|
|
|
|
build() {
|
2020-12-17 14:07:55 +01:00
|
|
|
cd $name-$version
|
2012-06-26 16:11:53 +02:00
|
|
|
|
2020-12-17 14:07:55 +01:00
|
|
|
sed -i Source/CMakeInstallDestinations.cmake \
|
|
|
|
-e 's|share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}|share/cmake|'
|
2015-03-11 14:42:45 +00:00
|
|
|
|
2021-06-15 21:22:43 +00:00
|
|
|
prt-get isinst ninja && PKGMK_CMAKE+=' --generator=Ninja'
|
|
|
|
prt-get isinst jsoncpp && PKGMK_CMAKE+=' --system-jsoncpp' || PKGMK_CMAKE+=' --no-system-jsoncpp'
|
|
|
|
prt-get isinst librhash && PKGMK_CMAKE+=' --system-librhash' || PKGMK_CMAKE+=' --no-system-librhash'
|
|
|
|
prt-get isinst libuv && PKGMK_CMAKE+=' --system-libuv' || PKGMK_CMAKE+=' --no-system-libuv'
|
|
|
|
prt-get isinst lzlib && PKGMK_CMAKE+=' --system-liblzma' || PKGMK_CMAKE+=' --no-system-liblzma'
|
|
|
|
prt-get isinst nghttp2-libs && PKGMK_CMAKE+=' --system-nghttp2' || PKGMK_CMAKE+=' --no-system-nghttp2'
|
|
|
|
|
|
|
|
./bootstrap $PKGMK_CMAKE \
|
2020-12-17 14:07:55 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--system-curl \
|
|
|
|
--system-expat \
|
|
|
|
--system-zlib \
|
|
|
|
--system-bzip2 \
|
|
|
|
--system-libarchive \
|
|
|
|
--system-zstd \
|
2021-01-31 22:17:15 +11:00
|
|
|
--parallel=${JOBS:-1} \
|
|
|
|
$(prt-get isinst python3-sphinx >/dev/null && echo --sphinx-man)
|
|
|
|
|
2021-06-15 21:22:43 +00:00
|
|
|
prt-get isinst ninja && ninja || make
|
|
|
|
prt-get isinst ninja && DESTDIR=$PKG ninja install || make DESTDIR=$PKG install
|
2020-12-17 14:07:55 +01:00
|
|
|
rm -r $PKG/usr/{doc,share/cmake/Help}
|
2016-08-18 11:33:56 +02:00
|
|
|
|
2020-12-17 14:07:55 +01:00
|
|
|
ln -sf $name $PKG/usr/share/$name-${version%.*}
|
2008-10-14 13:26:23 +03:00
|
|
|
}
|