dev-cpp/xtensor: add 0.26.0

Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
Takuya Wakazono
2025-03-27 22:02:39 +09:00
parent 333dde0b4d
commit e05b54720a
2 changed files with 88 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST xtensor-0.24.4.tar.gz 1203049 BLAKE2B 512ab8b2e23b295e36462b63d796d037a4300b184e5932390e8c85a98e2f96639794622817bbdb73a24925c21d210bb39c96ecbd0f3d569a05eb8c5458b805c8 SHA512 e245571553592d5d0e98af5b645bc4526123764b0507ab6fb9ade690f62eae1e2850d8a44b0550ff95276b968c287bf7d6cab9262af5f28bcf7345b6d317d16a
DIST xtensor-0.26.0.tar.gz 1216657 BLAKE2B 6127426b7f581414e3d92847b4962a4a7808b0a82640157067aceaae3226b6d65d5b6f6090590604c6f76cc7b7e8e6fe45cadbfcf1350f6a115167379b4d5f73 SHA512 9fe07376ef05d9822ffedba2804ef8af402e6560ca1424624bbfb220ef954b4f721d09c22dc045a76134a5856eccf97bfbe08450e5e70c58128583c9352afb5e

View File

@@ -0,0 +1,87 @@
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
inherit cmake python-any-r1 optfeature toolchain-funcs
DESCRIPTION="header-only C++ library for numerical analysis with multi-dimensional arrays"
HOMEPAGE="https://github.com/xtensor-stack/xtensor"
SRC_URI="https://codeload.github.com/xtensor-stack/${PN}/tar.gz/refs/tags/${PV} -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc openmp tbb test"
DEPEND="
>=dev-cpp/xtl-0.8.0
tbb? ( dev-cpp/tbb )
"
RDEPEND="${DEPEND}"
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 )
"
RESTRICT="!test? ( test )"
REQUIRED_USE="?? ( tbb openmp )"
python_check_deps() {
python_has_version \
"dev-python/breathe[${PYTHON_USEDEP}]" \
"dev-python/sphinx[${PYTHON_USEDEP}]" \
"dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
}
pkg_pretend() {
use openmp && tc-check-openmp
}
pkg_setup() {
use openmp && tc-check-openmp
use doc && python-any-r1_pkg_setup
}
src_prepare() {
# Skipping test due to https://github.com/xtensor-stack/xtensor/issues/2653
sed -i -e '/test_xoptional\.cpp/d' test/CMakeLists.txt || die
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DBUILD_TESTS=$(usex test)
-DXTENSOR_USE_OPENMP=$(usex openmp)
-DXTENSOR_USE_TBB=$(usex tbb)
# A specific verions of dev-cpp/xsimd is needed, so it requires ongoing maintenance.
-DXTENSOR_USE_XSIMD=OFF
)
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
}
pkg_postinst() {
optfeature "JSON support" dev-cpp/nlohmann_json
}