sci-libs/rpp: add 10.1.0

Bug: https://bugs.gentoo.org/984016
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/46894
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sv. Lockal
2026-10-18 05:52:02 +01:00
committed by Sam James
parent 34d3c52c91
commit 03c3ef2b91
2 changed files with 105 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
DIST rpp-10.1.0.tar.gz 174535964 BLAKE2B c59dba4018bbdf5281ad004f6b78baa92a23a1d49cd2dbde783f9ecb0050ddc029c7cc716c33e869e0f1d139f25ab3cecfbd4c9062336a1dc94475cfa543b27a SHA512 d94b453c7d7d0f494de0b25329370a808bba89bec0196dbcb8cc884e5afaf45ab7ed0626af931d1e0936d98887a18ff943b9120cebe6e7b1eb81032e7b83f794
DIST rpp-6.3.3.tar.gz 56093678 BLAKE2B de0933386d7c6a3cce88a36e22c25bea0cdda766dbc9a297bb6f5271b7a310670faa2d1dd3cc56f52e2752946f930ad02c4de2680dea3456e09ca97d4fa6c520 SHA512 024211ab05d95fbe0bb960a08b083e5b777d4842dd717a6280b1de84402426f5f9016e3b258ef81042281d775bd5504b285dd06d246f4d3479ffe57e59935184
DIST rpp-6.4.3.tar.gz 66049573 BLAKE2B cf4a31c4595e3148030a75a4c47a3bcce99002880b273fbc151948eae32639bce21126be911f18b1832d4892756b39925d79423ce455597f892fee30271f0a80 SHA512 fda88addba7a3b8ea28bcdf559a28adbf4cfd522d7071ed64c4846777a6bf1ac1143ec43719f8f83f3b948e28658a1ccbc51eccada128ddfa73aed3002506ae9
DIST rpp-7.0.2.tar.gz 73713099 BLAKE2B 939af01b4a63c659c708b17ab603ed122d8b99fd2fbb031d4ff00733f4ff36892df6014b6311bd731593085da2657442e5b8922da3c4c6edf09faa26fc1709b4 SHA512 26810258932e4d9c7b40375792f32a792f8a1b464d922b27753ee863002b9981b3a109e7e773f937808d5bdd2b87875d408e8d4e009d6b877fd31bd0224bbb17
+104
View File
@@ -0,0 +1,104 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ROCM_VERSION=${PV}
PYTHON_COMPAT=( python3_{10..15} )
inherit cmake python-any-r1 rocm toolchain-funcs
DESCRIPTION="AMD ROCm Performance Primitives (RPP) high-performance computer vision library"
HOMEPAGE="https://github.com/ROCm/rocm-libraries/tree/develop/projects/rpp"
SRC_URI="https://github.com/ROCm/rocm-libraries/releases/download/therock-${PV%.0}/rpp.tar.gz -> rpp-${PV}.tar.gz"
S="${WORKDIR}/rpp"
LICENSE="MIT"
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"
IUSE="cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_f16c test"
# pkgcheck warning: RequiredUseDefaults
REQUIRED_USE="
cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_f16c
${ROCM_REQUIRED_USE}
"
RESTRICT="!test? ( test )"
# half.hpp is included by the installed rppdefs.h
RDEPEND="
>=dev-libs/half-1.12.0-r1
dev-util/hip:${SLOT}
llvm-runtimes/openmp
"
DEPEND="${RDEPEND}"
BDEPEND="test? ( ${PYTHON_DEPS} )"
DOCS=( CHANGELOG.md README.md )
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_prepare() {
# no asan libs; upstream test suite (~420 MB of data) is only used from ${S} in src_test
sed -e "s/COMPONENT \(asan\|test\)/COMPONENT \1 EXCLUDE_FROM_ALL/" -i CMakeLists.txt || die
# builds test programs against an already installed rpp, automagic OpenCV/NIfTI/libsndfile
cmake_comment_add_subdirectory utilities/test_suite
use test || cmake_comment_add_subdirectory test
cmake_src_prepare
}
src_configure() {
rocm_use_clang
local mycmakeargs=(
-DCMAKE_SKIP_RPATH=ON
-DGPU_TARGETS="$(get_amdgpu_flags)"
-DROCM_PATH=/usr
-DBACKEND=HIP
# audio augmentations need FFTS (bundled prebuilt libffts.a is gone, FFTS is not packaged)
-DRPP_AUDIO_SUPPORT=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_FFTS=ON
)
cmake_src_configure
}
rpp_qa() {
local backend=${1} suite=${2} failed
local dir="${T}/qa/${backend}-${suite}"
mkdir -p "${dir}" || die
pushd "${dir}" >/dev/null || die
# the drivers exit non-zero on QA mismatches (checked below)
"${EPYTHON}" "${S}/utilities/test_suite/${backend}/run${suite}Tests.py" \
--qa_mode 1 --batch_size 3 |& tee qa.log
# the drivers only log build failures and crashes of the test programs
grep -qi -e "^Traceback" -e "non-zero exit status" qa.log && die "${backend} ${suite}: test programs failed"
local results=( QA_RESULTS_*/QA_results.txt )
[[ -f ${results[0]} ]] || die "${backend} ${suite}: no QA results"
failed=$(grep -h FAILED "${results[@]}")
# the random boxes come from <random> distributions; libc++ differs from the reference outputs
if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
failed=$(grep -vE "^(coarse|random_erase)_" <<<"${failed}")
fi
[[ -z ${failed} ]] || die "${backend} ${suite} QA failures:"$'\n'"${failed}"
popd >/dev/null || die
}
src_test() {
check_amdgpu
# no RPATH: use the library from the build tree, not an installed one
LD_LIBRARY_PATH="${BUILD_DIR}/$(get_libdir)" cmake_src_test
# upstream QA drivers build their test programs against an installed rpp
DESTDIR="${T}/stage" cmake_build install
local -x ROCM_PATH="${EPREFIX}/usr" CMAKE_PREFIX_PATH="${T}/stage/usr"
local -x LD_LIBRARY_PATH="${T}/stage/usr/$(get_libdir)"
local backend
for backend in HOST HIP; do
rpp_qa ${backend} Image
rpp_qa ${backend} Misc
done
}