commit: e5fb753cefcda1830df68b575be8513126af34ea
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 25 16:41:10 2025 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Dec 25 16:41:25 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5fb753c
dev-cpp/xsimd: add 14.0.0
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
dev-cpp/xsimd/Manifest | 1 +
dev-cpp/xsimd/files/xsimd-14.0.0-c++17.patch | 11 ++++
dev-cpp/xsimd/files/xsimd-14.0.0-no-march.patch | 72 +++++++++++++++++++++++++
dev-cpp/xsimd/xsimd-14.0.0.ebuild | 70 ++++++++++++++++++++++++
4 files changed, 154 insertions(+)
diff --git a/dev-cpp/xsimd/Manifest b/dev-cpp/xsimd/Manifest
index 1d9c2dcd2338..2619e028ad00 100644
--- a/dev-cpp/xsimd/Manifest
+++ b/dev-cpp/xsimd/Manifest
@@ -1 +1,2 @@
DIST xsimd-13.2.0.tar.gz 269287 BLAKE2B
596d348e32cd6cde6112d7dee304d44111db755eb5827c6c55a57c2803a65956ef4660784748c6f127c28c80c62689d9956363bbc49ef9d2edf5f1f8b428af55
SHA512
3825626547b0dd9b58f306bc89e9b3bc6dd778ad3811b7828e50fc16ae102574255b53f2b0714995de2bd6f9eb7b2c5d266a1a24fbfdf5420dc5e94d7dcbb522
+DIST xsimd-14.0.0.tar.gz 306182 BLAKE2B
8f17b86916cb7f88d8ba5f67abe063a514aa6707ed465a1a654fdcc9a59080ac27e2ab7b525eb289bfacf83d93a5b2fbddde46a6d99e819fc1dfbe9b1e591e98
SHA512
f1d9bc50482a52a7b1891637c4e054eeafed0503b938ef07050fea8354e215b9483bafb17485b22fca8d715ddd7c79f03af352116487558d610d4e03d7dbcf4e
diff --git a/dev-cpp/xsimd/files/xsimd-14.0.0-c++17.patch
b/dev-cpp/xsimd/files/xsimd-14.0.0-c++17.patch
new file mode 100644
index 000000000000..c6aff84bbe66
--- /dev/null
+++ b/dev-cpp/xsimd/files/xsimd-14.0.0-c++17.patch
@@ -0,0 +1,11 @@
+--- a/test/CMakeLists.txt 2025-12-25 17:05:59.804507367 +0100
++++ b/test/CMakeLists.txt 2025-12-25 17:08:47.228585458 +0100
+@@ -53,7 +53,7 @@
+ endif()
+ # Users may override the c++ standard:
+ if(NOT DEFINED CMAKE_CXX_STANDARD OR "${CMAKE_CXX_STANDARD}" STREQUAL
"")
+- if (ENABLE_XTL_COMPLEX)
++ if (TRUE)
+ 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 when xtl complex support is enabled")
diff --git a/dev-cpp/xsimd/files/xsimd-14.0.0-no-march.patch
b/dev-cpp/xsimd/files/xsimd-14.0.0-no-march.patch
new file mode 100644
index 000000000000..958e36491afd
--- /dev/null
+++ b/dev-cpp/xsimd/files/xsimd-14.0.0-no-march.patch
@@ -0,0 +1,72 @@
+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")
+@@ -91,10 +87,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 ()
+@@ -95,14 +95,12 @@
+ 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(${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc")
+ # 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-14.0.0.ebuild
b/dev-cpp/xsimd/xsimd-14.0.0.ebuild
new file mode 100644
index 000000000000..37f74aa89126
--- /dev/null
+++ b/dev-cpp/xsimd/xsimd-14.0.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+inherit cmake python-any-r1
+
+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
+ $(python_gen_any_dep '
+ dev-python/breathe[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
+ ')
+ )
+ test? ( dev-cpp/doctest )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-c++17.patch
+ "${FILESDIR}"/${P}-no-march.patch
+)
+
+python_check_deps() {
+ python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" &&
+ python_has_version
"dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/breathe[${PYTHON_USEDEP}]"
+
+}
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+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() {
+ use doc && HTML_DOCS=( docs/build/html/* )
+ cmake_src_install
+}