summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/xsimd')
-rw-r--r--dev-cpp/xsimd/Manifest2
-rw-r--r--dev-cpp/xsimd/files/xsimd-11.1.0-c++17.patch27
-rw-r--r--dev-cpp/xsimd/files/xsimd-11.1.0-no-march.patch71
-rw-r--r--dev-cpp/xsimd/files/xsimd-12.1.1-no-march.patch71
-rw-r--r--dev-cpp/xsimd/metadata.xml12
-rw-r--r--dev-cpp/xsimd/xsimd-11.1.0-r1.ebuild58
-rw-r--r--dev-cpp/xsimd/xsimd-12.1.1.ebuild58
7 files changed, 299 insertions, 0 deletions
diff --git a/dev-cpp/xsimd/Manifest b/dev-cpp/xsimd/Manifest
new file mode 100644
index 000000000000..70aa1f59c986
--- /dev/null
+++ b/dev-cpp/xsimd/Manifest
@@ -0,0 +1,2 @@
+DIST xsimd-11.1.0.tar.gz 219350 BLAKE2B 2bbbc4f7dbe489a407fe798b146c008aba44664efc943c2e1507d5c6e7da2a03ed91abf0d872e5abf9bd94be3e76bef276ec5b47d4e356b42a7b4c680bd6f3d9 SHA512 3a6141dfa4d95a977f4222880dfd06197613d153a78a84653022423279eec037ea9def08ae225aba7231c0b2c434ab7c907c965f8367fb0db9b96113980b51f3
+DIST xsimd-12.1.1.tar.gz 253141 BLAKE2B 29efbb045d8ade8737d702a73f3d0a912111dd4fbc84485c0e54c8b06d73edbb4b85f4b51e24da9bed0dea010b0cce9d99b57e20e8b94d3daf90d46031548eb9 SHA512 8e45a8e9b28358d5f20f713ea19a8c366edc62790c27984149f283dfe808d78a549c8ec465e8b3677d7e30b2cb80093908de364bbb9dc80683f5fdfb843131e1
diff --git a/dev-cpp/xsimd/files/xsimd-11.1.0-c++17.patch b/dev-cpp/xsimd/files/xsimd-11.1.0-c++17.patch
new file mode 100644
index 000000000000..b0c99452cc4e
--- /dev/null
+++ b/dev-cpp/xsimd/files/xsimd-11.1.0-c++17.patch
@@ -0,0 +1,27 @@
+--- a/test/CMakeLists.txt 2023-05-17 19:59:34.023146040 +0200
++++ b/test/CMakeLists.txt 2023-05-17 20:01:23.021505635 +0200
+@@ -50,20 +50,11 @@
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter -Wextra -Wreorder")
+ # Users may override the c++ standard:
+ if(NOT DEFINED CMAKE_CXX_STANDARD OR "${CMAKE_CXX_STANDARD}" STREQUAL "")
+- if (ENABLE_XTL_COMPLEX)
+- CHECK_CXX_COMPILER_FLAG("-std=c++14" HAS_CPP14_FLAG)
+- if (NOT HAS_CPP14_FLAG)
+- message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++14 support when xtl complex support is enabled")
+- endif()
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+- else()
+- CHECK_CXX_COMPILER_FLAG("-std=c++11" HAS_CPP11_FLAG)
+- if (NOT HAS_CPP11_FLAG)
+- message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++11 support!")
+- else()
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+- endif()
++ CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP17_FLAG)
++ if (NOT HAS_CPP17_FLAG)
++ message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++17 support")
+ endif()
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+ endif()
+
+ if (NOT CROSS_COMPILE_ARM)
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/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/metadata.xml b/dev-cpp/xsimd/metadata.xml
new file mode 100644
index 000000000000..58c94c12d066
--- /dev/null
+++ b/dev-cpp/xsimd/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">xtensor-stack/xsimd</remote-id>
+ <doc>https://xsimd.readthedocs.io/en/latest/</doc>
+ </upstream>
+</pkgmetadata>
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..52951201669e
--- /dev/null
+++ b/dev-cpp/xsimd/xsimd-11.1.0-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 2023-2024 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-text/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-12.1.1.ebuild b/dev-cpp/xsimd/xsimd-12.1.1.ebuild
new file mode 100644
index 000000000000..cf1c90d386a1
--- /dev/null
+++ b/dev-cpp/xsimd/xsimd-12.1.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 2023-2024 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 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ doc? (
+ app-text/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
+}