# Contributor: Valery Kartel # Maintainer: Natanael Copa pkgname=cmake pkgver=3.5.1 pkgrel=0 pkgdesc="CMake is a cross-platform open-source make system" url="http://www.cmake.org" arch="all" license="CMake" depends= makedepends="ncurses-dev curl-dev expat-dev zlib-dev bzip2-dev libarchive-dev" subpackages="$pkgname-doc" case $pkgver in *.*.*.*) _v=v${pkgver%.*.*};; *.*.*) _v=v${pkgver%.*};; esac source="http://www.cmake.org/files/$_v/cmake-${pkgver}.tar.gz " _builddir="$srcdir/$pkgname-$pkgver" parallel_opt() { local i n for i in $MAKEOPTS; do case "$i" in -j*) n=${i#-j};; esac; done [ -n "$n" ] && echo "--parallel $n" } prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" # jsoncpp seems to need cmake to build so to avoid recursive build dep # we use the bundled ./bootstrap --prefix=/usr \ --mandir=/share/man \ --datadir=/share/$pkgname \ --docdir=/share/doc/$pkgname \ --system-libs \ --no-system-jsoncpp \ $(parallel_opt) make || return 1 } package() { cd $startdir/src/$pkgname-$pkgver make DESTDIR="$pkgdir" install } md5sums="ca051f4a66375c89d1a524e726da0296 cmake-3.5.1.tar.gz" sha256sums="93d651a754bcf6f0124669646391dd5774c0fc4d407c384e3ae76ef9a60477e8 cmake-3.5.1.tar.gz" sha512sums="f78185eb1a2344167888b13ce2a0e8657594bc9c4195c99f5a2be3f953dd2ff630081c2d63b180215851eec8c9565fab8ee1c481ca4c0e6eb9dc27b574d45616 cmake-3.5.1.tar.gz"