summaryrefslogtreecommitdiff
path: root/dev-cpp/xsimd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-29 09:35:43 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-10-29 09:35:43 +0000
commit704343381e435b306648a2d85a77a58e34478643 (patch)
tree009e24c29e03885a4bd7bb17b673f62567395237 /dev-cpp/xsimd
parenteb147001d2176fe9850e42017a6b1284baf865ff (diff)
gentoo auto-resync : 29:10:2023 - 09:35:42
Diffstat (limited to 'dev-cpp/xsimd')
-rw-r--r--dev-cpp/xsimd/Manifest4
-rw-r--r--dev-cpp/xsimd/files/xsimd-11.1.0-no-march.patch71
-rw-r--r--dev-cpp/xsimd/xsimd-11.1.0-r1.ebuild58
-rw-r--r--dev-cpp/xsimd/xsimd-11.1.0.ebuild2
4 files changed, 133 insertions, 2 deletions
diff --git a/dev-cpp/xsimd/Manifest b/dev-cpp/xsimd/Manifest
index 3bb5b3debadc..bc60a5646d05 100644
--- a/dev-cpp/xsimd/Manifest
+++ b/dev-cpp/xsimd/Manifest
@@ -1,4 +1,6 @@
AUX xsimd-11.1.0-c++17.patch 1429 BLAKE2B 23be29fdd74ed37632bd1fba0ffdedf08af48f14985494f5befac4afb34622bb44e294e954d9d4e57a07ee6e9d988a48a93dd1b66a6f6206b79bd7c0cb600cc8 SHA512 41a474a6d768aec39e6760d4ff60017a5e3d5c4349bf244d3de1464bd9b06022d6cadcd4f91cc17a6630f38f1b0fe0e3aa4fa5a6810b8c57d649f5a8da28c217
+AUX xsimd-11.1.0-no-march.patch 3720 BLAKE2B 21adb3c35d8161db849c90363781642fa9c1051686e6dba00e55396adc905d1276540c663d34ab7bd124daa3fe6e367c5c41c17d7e0f31d55b82b1488fbdee0f SHA512 567f535a2a0dcdb02f05b53beba48e9704ef40d63df9531014257e0773a8df09854245ec5d22e6b7cffdf7541e8f48e55e2ea8faa513ca93f952aa177757bb3a
DIST xsimd-11.1.0.tar.gz 219350 BLAKE2B 2bbbc4f7dbe489a407fe798b146c008aba44664efc943c2e1507d5c6e7da2a03ed91abf0d872e5abf9bd94be3e76bef276ec5b47d4e356b42a7b4c680bd6f3d9 SHA512 3a6141dfa4d95a977f4222880dfd06197613d153a78a84653022423279eec037ea9def08ae225aba7231c0b2c434ab7c907c965f8367fb0db9b96113980b51f3
-EBUILD xsimd-11.1.0.ebuild 964 BLAKE2B 089ae95d084889681e4f7fb1c109909df4470c764c720da715f8fe1c7faf0bd7a393b1159e10a254ac9891929b68eda1d4576afe533b60f4b4fd8296c3e1daab SHA512 fef0deeff92dfeb2b359bb0d6621cd739e896e8c101ebd5f140fc70d814a41c3b2c2a2d37b0b42b169df96fe9565cf038f82cfd9df91b262d30ff98d74192218
+EBUILD xsimd-11.1.0-r1.ebuild 1015 BLAKE2B 114ffe8b172aeff1000e55d5bd13f8afd6be6e1881a73d3a273f1671dcbfa9cf2d3d8c831a38addde4920a97b9a0932caa1b1c492975ece4f417992a30060103 SHA512 bd8085c37d7045984c06e9ef0621ded427e51d018fa12647bbef9945f54cf59fc945c5c17e1837dfdb01f53ca73f7e9a64ddfb08ca22c3c94ed6e792f46a3f6b
+EBUILD xsimd-11.1.0.ebuild 971 BLAKE2B eac1966e1309d91318f895e1a329bd0b2d15be9b934b4a7226840268f895f1f8970bc26f6d3537053bab6ff3cc941c82cff2909b3388bd2fe8aa2ee801055296 SHA512 ab2a1ff69571ea8b9027fb5a9549020ca52234563aba1559d08df98964be050332e3fe756daa6081de7c180536df1211b7e9eed2e0de14dffa4bc854762c109f
MISC metadata.xml 385 BLAKE2B e22c7622c338c277eee7dd048463a2d3244fffcd255b1a9dd9652a1295c3c1f0043e67fab28b084b3f10b03b5fd5e36b4f713c040ddc168ac6be9287af14e031 SHA512 5826eb1e62fa79c1e355668ad83a9e4e113b3cf154535537181597062f952ad436c56c8d9dd9f3599815307e33f4e1366b2a9b109d27c53bc112fe0a4c62d885
diff --git a/dev-cpp/xsimd/files/xsimd-11.1.0-no-march.patch b/dev-cpp/xsimd/files/xsimd-11.1.0-no-march.patch
new file mode 100644
index 000000000000..77ba1e2f2ef0
--- /dev/null
+++ b/dev-cpp/xsimd/files/xsimd-11.1.0-no-march.patch
@@ -0,0 +1,71 @@
+We both want to respect the user's CFLAGS, but also, not all of our arches support
+-march or -mtune.
+--- a/benchmark/CMakeLists.txt
++++ b/benchmark/CMakeLists.txt
+@@ -30,10 +30,6 @@ include(CheckCXXCompilerFlag)
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
+
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+- if(NOT CMAKE_CXX_FLAGS MATCHES "-march" AND NOT CMAKE_CXX_FLAGS MATCHES "-arch" AND NOT CMAKE_OSX_ARCHITECTURES)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
+- endif()
+-
+ if(NOT MSVC)
+ CHECK_CXX_COMPILER_FLAG("-std=c++11" HAS_CPP11_FLAG)
+ if (ENABLE_XTL_COMPLEX)
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -26,15 +26,6 @@ else()
+ message(STATUS "Tests build type is ${CMAKE_BUILD_TYPE}")
+ endif()
+
+-if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+- if (NOT CMAKE_CXX_FLAGS MATCHES "-march" AND NOT CMAKE_CXX_FLAGS MATCHES "-arch" AND NOT CMAKE_OSX_ARCHITECTURES)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
+- endif()
+- if(NOT CMAKE_CXX_COMPILER_ID MATCHES Clang) # We are using clang-cl
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
+- endif()
+-endif()
+-
+ add_executable(mandelbrot mandelbrot.cpp ${XSIMD_HEADERS})
+ set_property(TARGET mandelbrot PROPERTY CXX_STANDARD 14)
+ if(ENABLE_XTL_COMPLEX)
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -41,10 +41,6 @@ OPTION(XSIMD_ENABLE_WERROR "Turn on -Werror" OFF)
+
+ OPTION(CROSS_COMPILE_ARM "cross compile for ARM targets" OFF)
+
+-# Note: to compile on ARM (or cross compile), you may need to add the following:
+-# -DTARGET_ARCH="armv8-a -mfpu=neon -mfloat-abi=softfp -target arm-linux-gnueabi"
+-set(TARGET_ARCH "native" CACHE STRING "Target architecture arguments")
+-
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+ if (NOT WIN32 AND NOT ANDROID)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter -Wextra -Wreorder")
+@@ -79,10 +75,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
+ include_directories(/usr/${ARM_ARCH_DIRECTORY}/include/c++/${ARM_GCC_VER}/${ARM_ARCH_DIRECTORY}/)
+ include_directories(/usr/${ARM_ARCH_DIRECTORY}/include/c++/${ARM_GCC_VER}/)
+ include_directories(/usr/${ARM_ARCH_DIRECTORY}/include/)
+- if(NOT CMAKE_CXX_FLAGS MATCHES "-march")
+- message(STATUS "SETTING ARCH TO ${TARGET_ARCH}")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${TARGET_ARCH}")
+- endif()
+ if(ARM_ARCH_DIRECTORY MATCHES "arm-linux-gnueabi")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -mfloat-abi=softfp -target arm-linux-gnueabi")
+ else ()
+@@ -91,13 +83,9 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
+ message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
+ message(STATUS "CMAKE_CXX_LINK_EXECUTABLE: ${CMAKE_CXX_LINK_EXECUTABLE}")
+ elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^ppc64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=${TARGET_ARCH} -mtune=${TARGET_ARCH}")
+ elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "riscv64")
+ # Nothing specific
+ elseif(NOT WIN32)
+- if(NOT CMAKE_CXX_FLAGS MATCHES "-march" AND NOT CMAKE_CXX_FLAGS MATCHES "-arch" AND NOT CMAKE_OSX_ARCHITECTURES)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${TARGET_ARCH}")
+- endif()
+ endif()
+ endif()
+
diff --git a/dev-cpp/xsimd/xsimd-11.1.0-r1.ebuild b/dev-cpp/xsimd/xsimd-11.1.0-r1.ebuild
new file mode 100644
index 000000000000..2df99c4ac6a7
--- /dev/null
+++ b/dev-cpp/xsimd/xsimd-11.1.0-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="C++ wrappers for SIMD intrinsics"
+HOMEPAGE="https://github.com/xtensor-stack/xsimd"
+SRC_URI="https://github.com/xtensor-stack/${PN}/archive/refs/tags/${PV}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ doc? (
+ app-doc/doxygen
+ dev-python/breathe
+ dev-python/sphinx
+ dev-python/sphinx-rtd-theme
+ )
+ test? ( dev-cpp/doctest )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-c++17.patch
+ "${FILESDIR}"/${PN}-11.1.0-no-march.patch
+)
+
+src_prepare() {
+ sed -i \
+ -e '/fPIC/d' \
+ test/CMakeLists.txt \
+ || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_TESTS=$(usex test)
+ )
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ use doc && emake -C docs html
+}
+
+src_install() {
+ cmake_src_install
+ if use doc; then
+ dodoc -r docs/build/html
+ fi
+}
diff --git a/dev-cpp/xsimd/xsimd-11.1.0.ebuild b/dev-cpp/xsimd/xsimd-11.1.0.ebuild
index 0e227b874a04..29217564ceda 100644
--- a/dev-cpp/xsimd/xsimd-11.1.0.ebuild
+++ b/dev-cpp/xsimd/xsimd-11.1.0.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/xtensor-stack/${PN}/archive/refs/tags/${PV}.tar.gz
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
IUSE="doc test"
RESTRICT="!test? ( test )"