diff options
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/oidn/Manifest | 1 | ||||
-rw-r--r-- | media-libs/oidn/metadata.xml | 2 | ||||
-rw-r--r-- | media-libs/oidn/oidn-2.3.0.ebuild | 103 |
3 files changed, 105 insertions, 1 deletions
diff --git a/media-libs/oidn/Manifest b/media-libs/oidn/Manifest index 6fd58c05f4a3..ddfbcf30a9c5 100644 --- a/media-libs/oidn/Manifest +++ b/media-libs/oidn/Manifest @@ -2,3 +2,4 @@ DIST oidn-1.4.2.tar.gz 54221996 BLAKE2B bb6593e2e15877f65d9224fc93dac72aff6d567a DIST oidn-1.4.3.tar.gz 54222682 BLAKE2B f9b585c318258fd78e221a453b64e83965a3e5035a912baa49e4d5b48466441bf1d3c15291de2cd4d36e9da187ff7a643bb9d4af5282cdbb8b6bc99fb3cda0d0 SHA512 6fbdf347763c0734140195a523cf0878b1dbd91d4943c9ce4928f6991549f8b3d5ab4d57b90e20a8d04a87d00e3a1554ce73a3a3c1e64fcb016a3c1f8aa07982 DIST oidn-2.1.0.tar.gz 48977314 BLAKE2B 0fc32697df7fc6b8b367a78312a5b16ab68a5c88a2d19a8780e9de87c7e7096d7fe43dbd07928f2eba44c62fb4545338fc92f918dd4c33623259d0088a06a854 SHA512 508cb100f1a0a825774c2c01e0fc983e697341745fa0bfa48a99bfa70fc431f66fcdf17c3f170e40baefd7c3796a25d147f49cb17efbf1a1886556367c5c4566 DIST oidn-2.2.2.tar.gz 49006605 BLAKE2B e3d32cc2112ded280e642c5d69fb2ef14db59df4f5224bff79e82ede207899c9dbfa43dc663ad9ccc15a6497e363df0b91b43660729962c410b7ec75ac1b3465 SHA512 eca18e9e22a40bc1381e75985e5f5e79f48cc6d168a2a703e54540967646487d347db290459e9a612d8ab4924e8d3c83d84664fd5318cca4f17745da1e47cf50 +DIST oidn-2.3.0.tar.gz 75300547 BLAKE2B 88a5922b4db63c48ab69047dca8d1077205a6d7a2112971badb0cd35e0b770017f5cdcc95d2ef07016fe2e990e3e5806ac6a0800b67086b958948c542f0dff6f SHA512 4f68ce3b0da37e1861090d60d7cd823046f325c45a8e2c3f4098eb3b4f7ec676d2acbb9c138ff60a9f83188dd0dcbaba42106aad96beafc5e65045c77c00f2f8 diff --git a/media-libs/oidn/metadata.xml b/media-libs/oidn/metadata.xml index 228559585b99..eb65b09493a5 100644 --- a/media-libs/oidn/metadata.xml +++ b/media-libs/oidn/metadata.xml @@ -26,6 +26,6 @@ </flag> </use> <upstream> - <remote-id type="github">OpenImageDenoise/oidn</remote-id> + <remote-id type="github">RenderKit/oidn</remote-id> </upstream> </pkgmetadata> diff --git a/media-libs/oidn/oidn-2.3.0.ebuild b/media-libs/oidn/oidn-2.3.0.ebuild new file mode 100644 index 000000000000..0dd6f000d711 --- /dev/null +++ b/media-libs/oidn/oidn-2.3.0.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +LLVM_COMPAT=( {15..17} ) +ROCM_VERSION=5.7 + +inherit cmake cuda llvm-r1 python-any-r1 rocm + +DESCRIPTION="Intel® Open Image Denoise library" +HOMEPAGE="https://www.openimagedenoise.org https://github.com/RenderKit/oidn" + +if [[ ${PV} = *9999 ]]; then + EGIT_REPO_URI="https://github.com/RenderKit/oidn.git" + EGIT_BRANCH="master" + inherit git-r3 +else + SRC_URI="https://github.com/RenderKit/${PN}/releases/download/v${PV}/${P}.src.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +fi + +LICENSE="Apache-2.0" +SLOT="0" +REQUIRED_USE=" + test? ( apps ) +" +IUSE="apps cuda hip openimageio test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-cpp/tbb:= + dev-lang/ispc + cuda? ( dev-util/nvidia-cuda-toolkit ) + hip? ( dev-util/hip ) + openimageio? ( media-libs/openimageio:= ) +" +DEPEND="${RDEPEND}" +BDEPEND="${PYTHON_DEPS}" + +PATCHES=( + "${FILESDIR}/${PN}-2.2.2-amdgpu-targets.patch" +) + +src_prepare() { + if use cuda; then + cuda_src_prepare + addpredict "/proc/self/task/" + fi + + if use hip; then + # https://bugs.gentoo.org/930391 + sed "/-Wno-unused-result/s:): --rocm-path=${EPREFIX}/usr/lib):" \ + -i devices/hip/CMakeLists.txt || die + fi + + sed -e "/^install.*llvm_macros.cmake.*cmake/d" -i CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DOIDN_APPS="$(usex apps)" + + -DOIDN_DEVICE_CPU="yes" + -DOIDN_DEVICE_CUDA="$(usex cuda)" + -DOIDN_DEVICE_HIP="$(usex hip)" + # -DOIDN_DEVICE_SYCL="$(usex sycl)" + ) + + if use apps; then + mycmakeargs+=( -DOIDN_APPS_OPENIMAGEIO="$(usex openimageio)" ) + fi + + if use cuda; then + export CUDAHOSTCXX="$(cuda_gccdir)" + fi + + if use hip; then + mycmakeargs+=( + -DROCM_PATH="${EPREFIX}/usr" + -DOIDN_DEVICE_HIP_COMPILER="$(get_llvm_prefix)/bin/clang++" # use HIPHOSTCOMPILER + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + ) + fi + + cmake_src_configure +} + +src_test() { + "${BUILD_DIR}"/oidnTest || die "There were test faliures!" +} + +src_install() { + cmake_src_install + + if use hip || use cuda ; then + # remove garbage in /var/tmp left by subprojects + rm -rf "${ED}"/var || die + fi +} |