public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/oidn/
Date: Fri, 07 Mar 2025 13:22:36 +0000 (UTC)	[thread overview]
Message-ID: <1741353700.a13ceeef2aa857d02c4b8f2d4ec0605670e4f85b.sam@gentoo> (raw)

commit:     a13ceeef2aa857d02c4b8f2d4ec0605670e4f85b
Author:     Filip Kobierski <fkobi <AT> pm <DOT> me>
AuthorDate: Thu Dec 26 21:52:47 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar  7 13:21:40 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a13ceeef

media-libs/oidn: add 2.3.1 with improvements

- drop 32bit platforms as upstream does not support them
  https://github.com/RenderKit/oidn/blob/a21330356508383f54b15efee67dbd0fd00ee87b/README.md?plain=1#L168
- do not fortify source
- remove `--force` from rm to disallow silent fail
- remove addpredict if USE=cuda
  - it's currently set via sandbox.d file from nvidia-cuda-toolkit
    (thanks negril!)

Closes: https://bugs.gentoo.org/895018
Closes: https://bugs.gentoo.org/926204
Signed-off-by: Filip Kobierski <fkobi <AT> pm.me>
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/oidn/Manifest          |   1 +
 media-libs/oidn/oidn-2.3.1.ebuild | 109 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/media-libs/oidn/Manifest b/media-libs/oidn/Manifest
index ddfbcf30a9c5..37a6183f073f 100644
--- a/media-libs/oidn/Manifest
+++ b/media-libs/oidn/Manifest
@@ -3,3 +3,4 @@ DIST oidn-1.4.3.tar.gz 54222682 BLAKE2B f9b585c318258fd78e221a453b64e83965a3e503
 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
+DIST oidn-2.3.1.tar.gz 75315393 BLAKE2B d031e89924f82514994f61909d949b5dc55585cca6fbe26aba2e587f2afd03a6ae195aa93c0bbe67554224bab97ab552a4f33723786068abb82c1f6dde58e2b4 SHA512 ed3c99ba3d6634d8ca55786e4e62fe78cf6941e80736e6fcdf8e4f7b08aa45d1a546692bc64fedead31598b32b050a7d8a7e2cd1a6f3c55d645eeb175e440042

diff --git a/media-libs/oidn/oidn-2.3.1.ebuild b/media-libs/oidn/oidn-2.3.1.ebuild
new file mode 100644
index 000000000000..e7a61860c41b
--- /dev/null
+++ b/media-libs/oidn/oidn-2.3.1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+LLVM_COMPAT=( {15..18} )
+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 -ppc ~ppc64 -x86" # 64-bit-only
+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}
+	$(llvm_gen_dep '
+		llvm-core/clang:${LLVM_SLOT}=
+		llvm-core/llvm:${LLVM_SLOT}=
+	')
+"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.2.2-amdgpu-targets.patch"
+)
+
+src_prepare() {
+	if use cuda; then
+		cuda_src_prepare
+	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
+	# do not fortify source -- bug 895018
+	sed -e "s/-D_FORTIFY_SOURCE=2//g" -i {cmake/oidn_platform,external/mkl-dnn/cmake/SDL}.cmake || 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 -r "${ED}"/var || die
+	fi
+}


             reply	other threads:[~2025-03-07 13:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-07 13:22 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-22 16:08 [gentoo-commits] repo/gentoo:master commit in: media-libs/oidn/ Sam James
2025-04-28 14:01 Sam James
2025-03-07 13:22 Sam James
2025-01-05 17:49 Arthur Zamarin
2024-09-05  2:12 Sam James
2024-06-28 17:00 Sam James
2024-06-28 17:00 Sam James
2024-06-28 17:00 Sam James
2024-03-25 18:57 Sam James
2024-03-25 18:57 Sam James
2023-05-01  0:47 Sam James
2023-04-09 12:35 Arthur Zamarin
2022-12-24 14:06 Andreas Sturmlechner
2022-07-09  5:57 Sam James
2022-06-07  8:26 Jakov Smolić
2022-01-02  3:29 Sam James
2021-10-31  5:53 Sam James
2021-10-29 22:23 Sam James
2021-09-19  3:30 Sam James
2021-09-19  3:09 Sam James
2021-09-19  3:09 Sam James
2021-08-18 23:34 Sam James
2021-08-18 23:34 Sam James
2021-06-10  0:51 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1741353700.a13ceeef2aa857d02c4b8f2d4ec0605670e4f85b.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox