void-packages/srcpkgs/cmake-bootstrap/template

59 lines
1.9 KiB
Bash

# Template file for 'cmake-bootstrap'
pkgname=cmake-bootstrap
version=3.20.2
revision=1
wrksrc=cmake-$version
bootstrap=yes
build_style=configure
configure_args="--prefix=/usr --datadir=share/$pkgname --bindir=bin
--system-libs --no-system-curl --no-system-jsoncpp --no-system-nghttp2
--no-system-librhash --no-system-libuv --no-system-expat --no-qt-gui
${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS}"
make_build_args="-C Bootstrap.cmk DOCDIR=/usr/share/doc"
makedepends="libarchive-devel"
short_desc="CMake (for bootstrapping only, not for normal usage)"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="LGPL-2.1-or-later, BSD-3-Clause"
homepage="https://www.cmake.org"
distfiles="https://www.cmake.org/files/v${version%.*}/cmake-${version}.tar.gz"
checksum=aecf6ecb975179eb3bb6a4a50cae192d41e92b9372b02300f9e8f1d5f559544e
conflicts="cmake>=0"
CFLAGS="-DCMAKE_USE_SYSTEM_ZLIB -DCMAKE_USE_SYSTEM_LIBARCHIVE"
CXXFLAGS="$CFLAGS"
post_patch() {
vsed -i -e '/exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR/d' \
-e '/ifndef CMAKE_BOOTSTRAP/{N;/Install tree/s/BOOTSTRAP/&_NO/}' \
Source/cmSystemTools.cxx
vsed -i -e 's/[ ]RES=/ return /' \
-e '/define CMAKE_BIN_DIR/s,/[a-z-]*,bin,' \
-e "/define CMAKE_DATA_DIR/s,/[a-z-]*,share/$pkgname," \
-e '/Run make to build bootstrap cmake/,$d' \
bootstrap
rm -rf Utilities/cmbzip2
rm -rf Utilities/cmcurl
rm -rf Utilities/cmexpat
rm -rf Utilities/cmlibarchive
rm -rf Utilities/cmliblzma
rm -rf Utilities/cmnghttp2
rm -rf Utilities/cmzlib
rm -rf Utilities/cmzstd
}
do_check() {
: "this is half baked cmake"
}
do_install() {
vbin Bootstrap.cmk/cmake
vmkdir usr/share/$pkgname
vcopy Modules usr/share/$pkgname
vcopy Templates usr/share/$pkgname
vlicense Copyright.txt
vlicense Utilities/KWIML/Copyright.txt KWIML-Copyright.txt
vlicense Utilities/cmlibuv/LICENSE libuv-LICENSE
vlicense Utilities/cmjsoncpp/LICENSE jsoncpp-LICENSE
}