cmake: unbreak native/cross builds.

This commit is contained in:
Juan RP 2015-03-18 07:06:34 +01:00
parent df518e4212
commit 6cbfe52356
1 changed files with 15 additions and 2 deletions

View File

@ -3,7 +3,7 @@ pkgname=cmake
version=3.2.1
revision=1
build_style=configure
makedepends="zlib-devel expat-devel libcurl-devel ncurses-devel libarchive-devel>=3.1.2_16"
makedepends="zlib-devel bzip2-devel expat-devel libcurl-devel jsoncpp-devel ncurses-devel libarchive-devel>=3.1.2_16"
short_desc="Cross-platform, open-source build system"
maintainer="Juan RP <xtraeme@gmail.com>"
license="LGPL-2.1, 3-clause-BSD"
@ -15,9 +15,22 @@ if [ "$CROSS_BUILD" ]; then
# XXX ugly :-)
build_style=cmake
hostmakedepends="cmake gcc-fortran"
configure_args="-DKWSYS_CHAR_IS_SIGNED=1 -DKWSYS_LFS_WORKS=1"
configure_args=" -DCMAKE_USE_SYSTEM_BZIP2=1"
configure_args+=" -DCMAKE_USE_SYSTEM_LIBARCHIVE=1 -DCMAKE_USE_SYSTEM_JSONCPP=1"
configure_args+=" -DCMAKE_USE_SYSTEM_CURL=1 -DCMAKE_USE_SYSTEM_ZLIB=1"
configure_args+=" -DCMAKE_USE_SYSTEM_EXPAT=1 -DCMAKE_USE_SYSTEM_BZIP2=1"
configure_args+=" -DCMAKE_USE_SYSTEM_LIBLZMA=1 -DCMAKE_USE_SYSTEM_LIBFORM=1"
configure_args+=" -DHAVE_GLIBC_STRERROR_R=0 -DHAVE_POSIX_STRERROR_R=1"
configure_args+=" -DHAVE_GLIBC_STRERROR_R__TRYRUN_OUTPUT=0 -DHAVE_POSIX_STRERROR_R__TRYRUN_OUTPUT=0"
configure_args+=" -DHAVE_POLL_FINE=1 -DKWSYS_CHAR_IS_SIGNED=1 -DKWSYS_LFS_WORKS=1"
else
build_style=configure
configure_args="--prefix=/usr --mandir=/share/man"
configure_args+=" --docdir=/share/doc/cmake --system-libs ${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS}"
fi
post_install() {
if [ -d ${DESTDIR}/usr/doc ]; then
mv ${DESTDIR}/usr/doc ${DESTDIR}/usr/share
fi
}