### this file is sourced not run
PKGVER=3.26.2
PKGBUILD=1
PKGARCH=x86_64

# source: BLFS 8.2 / 11.3 updated to 3.26.2
TARBALL=cmake-$PKGVER.tar.gz
MD5SUM=7517f7524f85d29ac859716169ff0628
SRC_URL=https://github.com/Kitware/CMake/releases/download/v$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='expat libarchive curl' # libuv is static
SLACKDESC="cmake: cmake $PKGVER (Makefile generator)  
cmake:  
cmake: The CMake package contains a modern toolset used for generating 
cmake: Makefiles. It is a successor of the auto-generated configure script and 
cmake: aims to be platform- and compiler-independent. A significant user of 
cmake: CMake is KDE since version 4. This package contains only the command 
cmake: line tools, GUI-based components are not included here.  
cmake: 
cmake: https://cmake.org/
cmake: 
cmake: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/cmake*
	
	# patch wxwidgets module, bug still present in 3.26.4
	sed -i -e '/wxWidgets_CONFIG_EXECUTABLE/ s/ sh / /' Modules/FindwxWidgets.cmake &&
	
	./bootstrap --prefix=/usr        \
				--system-libs        \
				--mandir=/share/man  \
				--no-system-jsoncpp  \
				--no-system-librhash \
				--docdir=/share/doc/cmake-$PKGVER &&
	make $MAKEFLAGS &&
	make $MAKEINSTALLFLAGS install &&
	pkg_build_slackdesc
}


