summaryrefslogtreecommitdiff
path: root/dev-cpp/xsimd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-22 01:53:56 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-22 01:53:56 +0000
commit9f4b8d7fbdb3e35f8854c2e1c63926e383d299ea (patch)
treefe6bc16c271fcb3387f3243f0fb6f829b98b75fb /dev-cpp/xsimd
parentfe3d938433735c9b681b7e72296a5ae70fd2a7e9 (diff)
gentoo auto-resync : 22:12:2023 - 01:53:56
Diffstat (limited to 'dev-cpp/xsimd')
-rw-r--r--dev-cpp/xsimd/Manifest3
-rw-r--r--dev-cpp/xsimd/files/xsimd-12.1.1-no-march.patch71
-rw-r--r--dev-cpp/xsimd/xsimd-12.1.1.ebuild58
3 files changed, 132 insertions, 0 deletions
diff --git a/dev-cpp/xsimd/Manifest b/dev-cpp/xsimd/Manifest
index 1767339326bd..0850a6a74a2e 100644
--- a/dev-cpp/xsimd/Manifest
+++ b/dev-cpp/xsimd/Manifest
@@ -1,6 +1,9 @@
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
+AUX xsimd-12.1.1-no-march.patch 3739 BLAKE2B 44fb2ddfb55b8109e3b92a1479647ecbaf0f16fe949bc70c2f12fcfbd1cb0d87bfdf43d0fc2ac835bde8dbe843527d6426692a2fd0b504b6cfdcee824ae5d262 SHA512 82d5d1834af23f94ef0421c328e8f0b84c4c3b05acbd3c05bc9ea9c56c4078e827b8dcecf5f726deb35de9b3693c63effd5b7085c07a3b964f25a577d53c6da2
DIST xsimd-11.1.0.tar.gz 219350 BLAKE2B 2bbbc4f7dbe489a407fe798b146c008aba44664efc943c2e1507d5c6e7da2a03ed91abf0d872e5abf9bd94be3e76bef276ec5b47d4e356b42a7b4c680bd6f3d9 SHA512 3a6141dfa4d95a977f4222880dfd06197613d153a78a84653022423279eec037ea9def08ae225aba7231c0b2c434ab7c907c965f8367fb0db9b96113980b51f3
+DIST xsimd-12.1.1.tar.gz 253141 BLAKE2B 29efbb045d8ade8737d702a73f3d0a912111dd4fbc84485c0e54c8b06d73edbb4b85f4b51e24da9bed0dea010b0cce9d99b57e20e8b94d3daf90d46031548eb9 SHA512 8e45a8e9b28358d5f20f713ea19a8c366edc62790c27984149f283dfe808d78a549c8ec465e8b3677d7e30b2cb80093908de364bbb9dc80683f5fdfb843131e1
EBUILD xsimd-11.1.0-r1.ebuild 1031 BLAKE2B 47cde261b7d92c710cd91672306339e04005a9b3fa089fef2e918174ffa5f131cbf608fd651e2117bf54d7e8dea6950daf8c70cacaced5b47a2ce34ea41ce23c SHA512 da2f00e7b0353076e00cd1e6fa2f49245eb393d7ddd7a923fec2fa1024bc7cc330c9938e90d5a00769eaf7ff44aecde6028893d5f4f3f5f27ec9024eed335a06
EBUILD xsimd-11.1.0.ebuild 971 BLAKE2B eac1966e1309d91318f895e1a329bd0b2d15be9b934b4a7226840268f895f1f8970bc26f6d3537053bab6ff3cc941c82cff2909b3388bd2fe8aa2ee801055296 SHA512 ab2a1ff69571ea8b9027fb5a9549020ca52234563aba1559d08df98964be050332e3fe756daa6081de7c180536df1211b7e9eed2e0de14dffa4bc854762c109f
+EBUILD xsimd-12.1.1.ebuild 1033 BLAKE2B 1cccb4531fe261e5edd7a4908b07ac36f5850c877ac0b1924c632552d0597647d67783e7d188036cfc4fc00c6b3157cd0615c3a589c7c48e0fb14e3098adbaf1 SHA512 55ae1c6f08bdb9b60903474958062748b3674edfb92cf66e617c612f20d6bf620f7aea865f126add9c315cf1ceff64d8fe84736e7e9601ef6248ddfe6ed78d47
MISC metadata.xml 385 BLAKE2B e22c7622c338c277eee7dd048463a2d3244fffcd255b1a9dd9652a1295c3c1f0043e67fab28b084b3f10b03b5fd5e36b4f713c040ddc168ac6be9287af14e031 SHA512 5826eb1e62fa79c1e355668ad83a9e4e113b3cf154535537181597062f952ad436c56c8d9dd9f3599815307e33f4e1366b2a9b109d27c53bc112fe0a4c62d885
diff --git a/dev-cpp/xsimd/files/xsimd-12.1.1-no-march.patch b/dev-cpp/xsimd/files/xsimd-12.1.1-no-march.patch
new file mode 100644
index 000000000000..c830d584bc54
--- /dev/null
+++ b/dev-cpp/xsimd/files/xsimd-12.1.1-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 AND NOT EMSCRIPTEN)
+- 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-12.1.1.ebuild b/dev-cpp/xsimd/xsimd-12.1.1.ebuild
new file mode 100644
index 000000000000..36841823861d
--- /dev/null
+++ b/dev-cpp/xsimd/xsimd-12.1.1.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 ~ppc ~ppc64 ~riscv ~s390 ~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}"/${PN}-11.1.0-c++17.patch
+ "${FILESDIR}"/${P}-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
+}