summaryrefslogtreecommitdiff
path: root/sci-libs/rpp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-27 07:59:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-27 07:59:40 +0100
commitd2ed973482fdd800013658e83a61709b29e0a80f (patch)
tree57ea7666a57b5a05a4c8866e4915e90b4a6e7c94 /sci-libs/rpp
parent9f6a82a85d400d6ae7de04c43cee88dbc6bc4da0 (diff)
gentoo auto-resync : 27:06:2024 - 07:59:39
Diffstat (limited to 'sci-libs/rpp')
-rw-r--r--sci-libs/rpp/Manifest4
-rw-r--r--sci-libs/rpp/files/rpp-6.1.1-skip-install-license.patch17
-rw-r--r--sci-libs/rpp/metadata.xml14
-rw-r--r--sci-libs/rpp/rpp-6.1.1.ebuild91
4 files changed, 126 insertions, 0 deletions
diff --git a/sci-libs/rpp/Manifest b/sci-libs/rpp/Manifest
new file mode 100644
index 000000000000..87c4ef72363a
--- /dev/null
+++ b/sci-libs/rpp/Manifest
@@ -0,0 +1,4 @@
+AUX rpp-6.1.1-skip-install-license.patch 1046 BLAKE2B 3000d90e9d2ccb3191e18cba7b74c4318ded903103cc31a998cca9591297bd3203c578bac2a1415db7980dcd7db0c5678f9f5dbdce66bc0112b4fdbe6405909d SHA512 5b2818a151dd3dd27c1af9ae19a73cbdf3c1bb69ad16d51ad075f50e2488742792bd1ec6f00b38392660e765911942fb41fdea2c5f31bc76998d5f9b5c9fd2db
+DIST rpp-6.1.1.tar.gz 37016755 BLAKE2B 884090ab50e0a4a3aed4e52c5bbd934a8c5b62eca310471c30cf4c5a7cafdd36fed7894320b4d5246620b3c47e90fafd0f8160a7d4ed0295c7668c8d147f4b18 SHA512 a7c10bdd08739eba08209783decf0f4fd7c12194b9ebc63bd16e4cb998645110c089833efb83a77d4bed7f8599cf3a320608be28633f0dc956079f9d70e765f8
+EBUILD rpp-6.1.1.ebuild 2071 BLAKE2B 8be3e4ff071215995b4b0ac07b9d9e2e8f9ad01ebe8d3b7e97ff20861ffae46e0e79cc84f486e33e871fda39159fe5e40b1201d1c2ebc0bdb9c6b07127445cdb SHA512 c617d733d2ab79e6e838a721cf437d0dc187bbf5c3883256cf1a3a29831b777e32be6fcc71d64de266cd9316663717a1c34b8261f4d69f8d97c69e879ee0450c
+MISC metadata.xml 410 BLAKE2B 196192c40a427e78cfb88efe5ba4cd77399a2945bc1c8bb8728f0c43cab51f95ecf992e832c95e6607b48043a04f0680b21cd059cdfca3def9286530a4899e7b SHA512 a66340c6c4d62c10a5fdada9b63cab9784f75973a5132be56e52233341796c93423ed766a58733e3f22091057488aed9e0731e7cedd55caa0721e703df137d31
diff --git a/sci-libs/rpp/files/rpp-6.1.1-skip-install-license.patch b/sci-libs/rpp/files/rpp-6.1.1-skip-install-license.patch
new file mode 100644
index 000000000000..2253bb5aed67
--- /dev/null
+++ b/sci-libs/rpp/files/rpp-6.1.1-skip-install-license.patch
@@ -0,0 +1,17 @@
+Skip installation of license: it will be installed by ebuild to correct place
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -343,13 +343,6 @@ install(FILES ${PROJECT_BINARY_DIR}/include/rpp_backend.h
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/test COMPONENT test)
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/utilities/test_suite/ DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/test COMPONENT test)
+
+-# set license information
+-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+-install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT runtime)
+-install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR}-asan COMPONENT asan)
+-install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR}-dev COMPONENT dev)
+-install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR}-test COMPONENT test)
+-
+ # CTest - Needs RPP Installed
+ enable_testing()
+ include(CTest)
diff --git a/sci-libs/rpp/metadata.xml b/sci-libs/rpp/metadata.xml
new file mode 100644
index 000000000000..944efd183177
--- /dev/null
+++ b/sci-libs/rpp/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>lockalsash@gmail.com</email>
+ <name>Sv. Lockal</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ROCm/rpp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-libs/rpp/rpp-6.1.1.ebuild b/sci-libs/rpp/rpp-6.1.1.ebuild
new file mode 100644
index 000000000000..d38645f9ff56
--- /dev/null
+++ b/sci-libs/rpp/rpp-6.1.1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ROCM_VERSION=${PV}
+
+inherit cmake flag-o-matic rocm
+
+DESCRIPTION="AMD ROCm Performance Primitives (RPP) high-performance computer vision library"
+HOMEPAGE="https://github.com/ROCm/rpp"
+SRC_URI="https://github.com/ROCm/rpp/archive/refs/tags/rocm-${PV}.tar.gz -> rpp-${PV}.tar.gz"
+S="${WORKDIR}/${PN}-rocm-${PV}"
+
+LICENSE="BSD"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+# pkgcheck warning: RequiredUseDefaults
+REQUIRED_USE="
+ cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_f16c
+ ${ROCM_REQUIRED_USE}
+"
+
+RDEPEND="
+ dev-util/hip:${SLOT}
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ >=dev-build/cmake-3.22
+ >=dev-libs/half-1.12.0-r1
+ test? ( dev-cpp/gtest )
+"
+
+IUSE="cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_f16c test"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.1.1-skip-install-license.patch
+)
+
+DOCS=( CHANGELOG.md LICENSE README.md )
+
+rcc_test_wrapper() {
+ local S="${WORKDIR}/${PN}-rocm-${PV}/utilities/rpp-unittests/HIP_NEW"
+ local CMAKE_USE_DIR="${S}"
+ local BUILD_DIR="${BUILD_DIR}/utilities/rpp-unittests/HIP_NEW"
+ cd "${S}" || die
+ $@
+}
+
+src_prepare() {
+ sed -e "s:\${ROCM_PATH}/llvm/bin/clang++:hipcc:" \
+ -i CMakeLists.txt || die
+
+ cmake_src_prepare
+ use test && rcc_test_wrapper cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_SKIP_RPATH=ON
+ -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
+ -DROCM_PATH=/usr
+ -DBACKEND=HIP
+ -DBUILD_WITH_AMD_ADVANCE=OFF
+ )
+
+ cmake_src_configure
+
+ if use test; then
+ append-cxxflags -I"${S}/include"
+ append-ldflags -L"${BUILD_DIR}/lib64"
+ local mycmakeargs=(-DROCM_PATH=/usr)
+ use test && rcc_test_wrapper cmake_src_configure
+ fi
+}
+
+src_compile() {
+ cmake_src_compile
+ use test && rcc_test_wrapper cmake_src_compile
+}
+
+src_test() {
+ check_amdgpu
+
+ cd "${BUILD_DIR}"/utilities/rpp-unittests/HIP_NEW || die
+ for params in "0 0" "0 1" "1 1" "2 1" "5 1" "0 2" "0 3" "0 4" "0 5" "0 8"; do
+ LD_LIBRARY_PATH="${BUILD_DIR}"/lib64 ./uniqueFunctionalities_hip $params || die
+ done
+}