diff --git a/srcpkgs/simde/patches/musl.patch b/srcpkgs/simde/patches/musl.patch new file mode 100644 index 00000000000..c070f858ea8 --- /dev/null +++ b/srcpkgs/simde/patches/musl.patch @@ -0,0 +1,18 @@ +This workaround patch should be removable when musl implements C23 +functions (technically this isn't a __GLIBC__-only quirk, but used +due to lack of anything better beside running a build test for it). + +https://bugs.gentoo.org/926488 +https://github.com/simd-everywhere/simde/issues/1001 +--- a/simde/simde-math.h ++++ b/simde/simde-math.h +@@ -1182,3 +1182,3 @@ + #if \ +- (!defined(HEDLEY_EMSCRIPTEN_VERSION) && HEDLEY_HAS_BUILTIN(__builtin_roundeven)) || \ ++ (defined (__GLIBC__) && !defined(HEDLEY_EMSCRIPTEN_VERSION) && HEDLEY_HAS_BUILTIN(__builtin_roundeven)) || \ + HEDLEY_GCC_VERSION_CHECK(10,0,0) +@@ -1202,3 +1202,3 @@ + #if \ +- (!defined(HEDLEY_EMSCRIPTEN_VERSION) && HEDLEY_HAS_BUILTIN(__builtin_roundevenf)) || \ ++ (defined(__GLIBC__) && !defined(HEDLEY_EMSCRIPTEN_VERSION) && HEDLEY_HAS_BUILTIN(__builtin_roundevenf)) || \ + HEDLEY_GCC_VERSION_CHECK(10,0,0) diff --git a/srcpkgs/simde/template b/srcpkgs/simde/template new file mode 100644 index 00000000000..21193fbaf4d --- /dev/null +++ b/srcpkgs/simde/template @@ -0,0 +1,27 @@ +# Template file for 'simde' +pkgname=simde +version=0.7.6 +revision=1 +build_style=meson +short_desc="Implementations of SIMD instruction sets" +maintainer="classabbyamp " +license="MIT" +homepage="https://github.com/simd-everywhere/simde" +changelog="https://github.com/simd-everywhere/simde/releases" +distfiles="https://github.com/simd-everywhere/simde/archive/refs/tags/v${version}.tar.gz" +checksum=c63e6c61392e324728da1c7e5de308cb31410908993a769594f5e21ff8de962b + +if [ "$XBPS_TARGET_LIBC" = musl ]; then + # /usr/bin/ld: :(.text+0x1105): undefined reference to `roundeven' + make_check=no +fi + +if [ "$XBPS_CHECK_PKGS" ] && [ "$XBPS_TARGET_LIBC" != musl ]; then + configure_args+=" -Dtests=true" +else + configure_args+=" -Dtests=false" +fi + +post_install() { + vlicense COPYING +}