Commit c46cd281 authored by Timo Teräs's avatar Timo Teräs
Browse files

main/cmake: use system shared libs, and fix build against musl

parent 2702db2a
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cmake
pkgver=2.8.11.2
pkgrel=0
pkgrel=1
pkgdesc="CMake is a cross-platform open-source make system"
url="http://www.cmake.org"
arch="all"
license="CMake"
depends=
makedepends="ncurses-dev"
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"
subpackages="$pkgname-doc"
source="http://www.cmake.org/files/$_v/cmake-${pkgver}.tar.gz
fix-execinfo.h-detection.patch"
_builddir="$srcdir/$pkgname-$pkgver"
parallel_opt() {
local i n
......@@ -28,9 +30,17 @@ parallel_opt() {
[ -n "$n" ] && echo "--parallel $n"
}
build ()
{
cd $startdir/src/$pkgname-$pkgver
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"
# bug in cmake.
# http://www.mail-archive.com/cmake@cmake.org/msg09515.html
# export CC="gcc"
......@@ -39,6 +49,7 @@ build ()
./bootstrap --prefix=/usr \
--mandir=/share/man \
--docdir=/share/cmake-${pkgver%.*}/doc \
--system-libs \
$(parallel_opt)
make || return 1
......@@ -49,6 +60,9 @@ package() {
make DESTDIR="$pkgdir" install
}
md5sums="6f5d7b8e7534a5d9e1a7664ba63cf882 cmake-2.8.11.2.tar.gz"
sha256sums="b32acb483afdd14339941c6e4ec25f633d916a7a472653a0b00838771a6c0562 cmake-2.8.11.2.tar.gz"
sha512sums="05ac2293300bf15fdcf98f07dfa7b9862b117cd0d6f7e30c1995ecb8a3bfd94e2b7e778caaa05bc46bd88eca5afe7f6be38b1904275a9a2aeae562bfdbaeec94 cmake-2.8.11.2.tar.gz"
md5sums="6f5d7b8e7534a5d9e1a7664ba63cf882 cmake-2.8.11.2.tar.gz
892a67b8d52f3fd81ffb2077e2292e7c fix-execinfo.h-detection.patch"
sha256sums="b32acb483afdd14339941c6e4ec25f633d916a7a472653a0b00838771a6c0562 cmake-2.8.11.2.tar.gz
fac853838e95c36d80f478402f21f0b0c2c76e93c7eb5070df0f84820ed74f64 fix-execinfo.h-detection.patch"
sha512sums="05ac2293300bf15fdcf98f07dfa7b9862b117cd0d6f7e30c1995ecb8a3bfd94e2b7e778caaa05bc46bd88eca5afe7f6be38b1904275a9a2aeae562bfdbaeec94 cmake-2.8.11.2.tar.gz
857ced87d530aa88875df9ff313fe5617368b7be8661030bb3e66537a5416a2151fa671a94e901a1db30f0b4ebe76de787ebdd237d181d893c269ac7530ac705 fix-execinfo.h-detection.patch"
--- cmake-2.8.11.2/Source/kwsys/SystemInformation.cxx
+++ cmake-2.8.11.2/Source/kwsys/SystemInformation.cxx
@@ -130,7 +130,7 @@
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
# endif
# endif
-# if defined(__GNUC__)
+# if defined(__GNUC__) && defined(__GLIBC__)
# include <execinfo.h>
# if !(defined(__LSB_VERSION__) && __LSB_VERSION__ < 41)
# define KWSYS_SYSTEMINFORMATION_HAVE_BACKTRACE
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment