diff --git a/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch b/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch index 99795c3cc97..b20eb7724f2 100644 --- a/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch +++ b/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch @@ -26,21 +26,21 @@ typename remove_reference::type __current_errno = errno; if (__current_errno == 0) errno = __save_errno; ---- a/src/locale.cpp -+++ b/src/locale.cpp -@@ -1010,7 +1010,7 @@ ctype::do_narrow(const char_type* low, const char_type* high, char dfault, +--- libcxx-4.0.0.src/src/locale.cpp.orig ++++ libcxx-4.0.0.src/src/locale.cpp +@@ -1012,7 +1012,7 @@ return low; } -#if defined(__EMSCRIPTEN__) -+#ifdef __linux__ ++#if defined(__linux__) extern "C" const unsigned short ** __ctype_b_loc(); extern "C" const int ** __ctype_tolower_loc(); extern "C" const int ** __ctype_toupper_loc(); -@@ -1112,20 +1112,8 @@ ctype::classic_table() _NOEXCEPT - return _ctype+1; // internal ctype mask table defined in msvcrt.dll - // This is assumed to be safe, which is a nonsense assumption because we're - // going to end up dereferencing it later... +@@ -1118,20 +1118,8 @@ + #else + return __pctype_func(); + #endif -#elif defined(__EMSCRIPTEN__) - return *__ctype_b_loc(); -#elif defined(_NEWLIB_VERSION) diff --git a/srcpkgs/libcxx/template b/srcpkgs/libcxx/template index bd256e93090..df98c188e64 100644 --- a/srcpkgs/libcxx/template +++ b/srcpkgs/libcxx/template @@ -1,15 +1,20 @@ # Template file for 'libcxx' pkgname=libcxx -version=3.9.1 +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" - makedepends="llvm-libunwind-devel libcxxabi-devel" + 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 @@ -21,7 +26,7 @@ maintainer="Juan RP " homepage="http://libcxx.llvm.org" license="BSD" distfiles="http://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz" -checksum=25e615e428f60e651ed09ffd79e563864e3f4bc69a9e93ee41505c419d1a7461 +checksum=4f4d33c4ad69bf9e360eebe6b29b7b19486948b1a41decf89d4adec12473cf96 wrksrc=${pkgname}-${version}.src post_extract() { @@ -31,29 +36,6 @@ post_extract() { sed -i 's/!defined(_GCC_MAX_ALIGN_T)/& \&\& !defined(__DEFINED_max_align_t)/' include/stddef.h esac } -post_configure() { - ( - mkdir -p ${wrksrc}/build-static - cd ${wrksrc}/build-static - if [ "$CROSS_BUILD" ]; then - cp ${wrksrc}/build/cross_${XBPS_CROSS_TRIPLET}.cmake . - fi - cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - ${configure_args} -DLIBCXX_ENABLE_SHARED=OFF .. - ) -} -post_build() { - ( - cd ${wrksrc}/build-static - ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} - ) -} -post_install() { - ( - cd ${wrksrc}/build-static - ${make_cmd} DESTDIR=${DESTDIR} ${make_install_args} ${make_install_target} - ) -} libcxx-devel_package() { short_desc+=" - development files" depends="${sourcepkg}>=${version}_${revision}"