ae5162801e
Now supports static and dynamic lib out of the box.
47 lines
1.3 KiB
Bash
47 lines
1.3 KiB
Bash
# Template file for 'libcxx'
|
|
pkgname=libcxx
|
|
version=4.0.0
|
|
revision=1
|
|
build_style=cmake
|
|
hostmakedepends="python"
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
arm*)
|
|
# libcxxabi doesn't build on arm.
|
|
;;
|
|
*)
|
|
configure_args+="
|
|
-DLIBCXX_CXX_ABI=libcxxabi
|
|
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON
|
|
-DLIBCXX_CXX_ABI_LIBRARY_PATH=/usr/lib
|
|
"
|
|
makedepends="llvm llvm-libunwind-devel libcxxabi-devel"
|
|
LDFLAGS="-Wl,--no-as-needed -lunwind -Wl,--as-needed"
|
|
esac
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES"
|
|
esac
|
|
make_build_args="VERBOSE=1"
|
|
short_desc="New implementation of the C++ standard library, targeting C++11"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
homepage="http://libcxx.llvm.org"
|
|
license="BSD"
|
|
distfiles="http://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz"
|
|
checksum=4f4d33c4ad69bf9e360eebe6b29b7b19486948b1a41decf89d4adec12473cf96
|
|
wrksrc=${pkgname}-${version}.src
|
|
|
|
post_extract() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl)
|
|
patch -Np1 <${FILESDIR}/libcxx-0001-musl-hacks.patch
|
|
sed -i 's/!defined(_GCC_MAX_ALIGN_T)/& \&\& !defined(__DEFINED_max_align_t)/' include/stddef.h
|
|
esac
|
|
}
|
|
libcxx-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.so"
|
|
vmove "usr/lib/*.a"
|
|
}
|
|
}
|