48 lines
1.3 KiB
Bash
48 lines
1.3 KiB
Bash
# Template file for 'libcxx'
|
|
pkgname=libcxx
|
|
version=4.0.1
|
|
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=520a1171f272c9ff82f324d5d89accadcec9bc9f3c78de11f5575cdb99accc4c
|
|
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"
|
|
}
|
|
}
|