From 58a4a6996e0612541f75b301b10d932e12ffc62f Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Wed, 14 Feb 2024 22:00:01 -0500 Subject: [PATCH] tbb: update to 2021.11.0 --- srcpkgs/tbb/patches/hostname-usage.patch | 11 ---- srcpkgs/tbb/patches/musl.patch | 22 +++---- srcpkgs/tbb/template | 73 ++++++------------------ 3 files changed, 31 insertions(+), 75 deletions(-) delete mode 100644 srcpkgs/tbb/patches/hostname-usage.patch diff --git a/srcpkgs/tbb/patches/hostname-usage.patch b/srcpkgs/tbb/patches/hostname-usage.patch deleted file mode 100644 index 4aefeff192b52a..00000000000000 --- a/srcpkgs/tbb/patches/hostname-usage.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/version_info_linux.sh -+++ b/build/version_info_linux.sh -@@ -20,7 +20,7 @@ - - # Script used to generate version info string - echo "#define __TBB_VERSION_STRINGS(N) \\" --echo '#N": BUILD_HOST'"\t\t"`hostname -s`" ("`uname -m`")"'" ENDL \' -+echo '#N": BUILD_HOST'"\t\t"`hostname`" ("`uname -m`")"'" ENDL \' - # find OS name in *-release and issue* files by filtering blank lines and lsb-release content out - echo '#N": BUILD_OS'"\t\t"`lsb_release -sd 2>/dev/null | grep -ih '[a-z] ' - /etc/*release /etc/issue 2>/dev/null | head -1 | sed -e 's/["\\\\]//g'`'" ENDL \' - echo '#N": BUILD_KERNEL'"\t"`uname -srv`'" ENDL \' diff --git a/srcpkgs/tbb/patches/musl.patch b/srcpkgs/tbb/patches/musl.patch index a8867eb5379376..ac8acf35bc9a38 100644 --- a/srcpkgs/tbb/patches/musl.patch +++ b/srcpkgs/tbb/patches/musl.patch @@ -1,18 +1,20 @@ ---- a/src/tbbmalloc/proxy.cpp 2018-10-17 14:05:31.311723013 +0200 -+++ b/src/tbbmalloc/proxy.cpp 2018-10-17 14:06:32.972726194 +0200 -@@ -28,6 +28,7 @@ +diff --git a/src/tbbmalloc_proxy/proxy.cpp b/src/tbbmalloc_proxy/proxy.cpp +index 23b9c19c1c..e4d881a397 100644 +--- a/src/tbbmalloc_proxy/proxy.cpp ++++ b/src/tbbmalloc_proxy/proxy.cpp +@@ -24,6 +24,7 @@ // of aligned_alloc as required by new C++ standard, this makes it hard to // redefine aligned_alloc here. However, running on systems with new libc // version, it still needs it to be redefined, thus tricking system headers +#if defined(__GLIBC__) - #if defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC + #if defined(__GLIBC_PREREQ) + #if !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC // tell that there is no aligned_alloc - #undef _GLIBCXX_HAVE_ALIGNED_ALLOC -@@ -37,6 +38,7 @@ - #include +@@ -35,6 +36,7 @@ #undef aligned_alloc - #endif // defined(__GLIBC_PREREQ)&&!__GLIBC_PREREQ(2, 16)&&_GLIBCXX_HAVE_ALIGNED_ALLOC + #endif // !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC + #endif // defined(__GLIBC_PREREQ) +#endif // defined(__GLIBC__) - #endif // __linux__ && !__ANDROID__ + #include + #endif // __unix__ && !__ANDROID__ - #include "proxy.h" diff --git a/srcpkgs/tbb/template b/srcpkgs/tbb/template index 250561cde8e705..7bb4637e3d9f15 100644 --- a/srcpkgs/tbb/template +++ b/srcpkgs/tbb/template @@ -1,70 +1,34 @@ # Template file for 'tbb' pkgname=tbb -reverts="2021.5.0_1" -version=2020.U3 -revision=2 -# version rewrite: 2017_U7 (upstream) => 2017.7 (xbps) -_ver=${version/./_} -build_style=gnu-makefile -hostmakedepends="cmake" +version=2021.11.0 +revision=1 +build_style=cmake +makedepends="libgomp-devel libhwloc-devel" short_desc="Intel Threading Building Blocks" maintainer="Andrea Brancaleoni " license="Apache-2.0" -homepage="https://www.threadingbuildingblocks.org" -distfiles="https://github.com/oneapi-src/oneTBB/archive/${_ver}.tar.gz" -checksum=2103cc6238c935664f87680618f6684d57501d4a2fa8ea8f6c97ad6ff7dc722a +homepage="https://oneapi-src.github.io/oneTBB/" +changelog="https://raw.githubusercontent.com/oneapi-src/oneTBB/master/RELEASE_NOTES.md" +distfiles="https://github.com/oneapi-src/oneTBB/archive/refs/tags/v${version}.tar.gz" +checksum=782ce0cab62df9ea125cdea253a50534862b563f1d85d4cda7ad4e77550ac363 -case "$XBPS_TARGET_MACHINE" in - x86_64*) - make_build_args="arch=intel64" - ;; - i686*) - make_build_args="arch=ia32" - ;; - armv7l*) - make_build_args="arch=armv7" - ;; - aarch64*) - make_build_args="arch=arm64" - ;; - ppc64*) - make_build_args="arch=ppc64" - ;; - ppc*) - make_build_args="arch=ppc32" - ;; - *) - # make sure to fall back instead of letting host uname control it - make_build_args="arch=generic" - ;; -esac +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + makedepends+=" libucontext-devel" + configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-lucontext" +fi -post_extract() { - sed -i 's|CPLUS = g..|CPLUS = $(CXX)|g' build/linux.gcc.inc - sed -i 's|CONLY = gcc|CONLY = $(CC)|g' build/linux.gcc.inc +if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then + makedepends+=" libatomic-devel" + configure_args+=" -DCMAKE_CXX_FLAGS=-latomic" +fi - # alternative might be: - # https://git.alpinelinux.org/cgit/aports/tree/testing/libtbb/glibc-struct-mallinfo.patch +post_extract() { if [ "$XBPS_TARGET_LIBC" = "musl" ]; then vsed -e "s@#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED __linux__@@" \ - -i src/tbbmalloc/proxy.h + -i src/tbbmalloc_proxy/proxy.h fi } -do_install() { - vmkdir usr/lib - vcopy build/linux_*/*.so* usr/lib - vmkdir usr/include/tbb - vcopy include/tbb/* usr/include/tbb - - cmake \ - -DINSTALL_DIR=$DESTDIR/usr/lib/cmake/TBB \ - -DSYSTEM_NAME=Linux \ - -DLIB_REL_PATH=../.. \ - -DINC_REL_PATH=../../../include \ - -P cmake/tbb_config_installer.cmake -} - tbb-devel_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" @@ -72,5 +36,6 @@ tbb-devel_package() { vmove usr/include vmove "usr/lib/*.so" vmove usr/lib/cmake + vmove usr/lib/pkgconfig } }