aboutsummaryrefslogtreecommitdiffstats
path: root/main/cmake
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-09-20 13:08:52 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-09-20 13:08:52 +0000
commitc46cd2811caa2f3bb6f3ddb7680551fcf7eb32ed (patch)
tree09f8070f543e74beb1f0431f8aaeb7f957197981 /main/cmake
parent2702db2a9ba4bb1f2ef819ae61c791477748784f (diff)
main/cmake: use system shared libs, and fix build against musl
Diffstat (limited to 'main/cmake')
-rw-r--r--main/cmake/APKBUILD34
-rw-r--r--main/cmake/fix-execinfo.h-detection.patch11
2 files changed, 35 insertions, 10 deletions
diff --git a/main/cmake/APKBUILD b/main/cmake/APKBUILD
index 7c35cfa5398..5a523e33973 100644
--- a/main/cmake/APKBUILD
+++ b/main/cmake/APKBUILD
@@ -1,22 +1,24 @@
# 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"
diff --git a/main/cmake/fix-execinfo.h-detection.patch b/main/cmake/fix-execinfo.h-detection.patch
new file mode 100644
index 00000000000..4fdf830cdfb
--- /dev/null
+++ b/main/cmake/fix-execinfo.h-detection.patch
@@ -0,0 +1,11 @@
+--- 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