mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 21:17:37 -08:00
dev-libs/optix: make headers-only #955908
Building the SDK part has no purpose outside of building examples. It has no possible consumers. The source archive needs manual fetch. Given that there is an upstream repo now we can use as source archive there is no reason to use the manual fetch SDK archive as alternative source either. So drop the logic associated with that and make the a headers only package. Closes: https://bugs.gentoo.org/955908 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42090 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
parent
6265f2fc5f
commit
582de7f342
@ -1,9 +1,5 @@
|
||||
DIST NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64.sh 57923655 BLAKE2B c3e159106ec6c8c446090ebd182fd3b0a75ec48b62e6984ae6559578688fd9a6cb29ea6065cb89aecdeb02247acbf3fb3bb0cbf69b10c29c222eb9fcbb0c6d90 SHA512 04f50c49d08c5e4e9be73ee322c4bff4f10a5e30445bc431e213c879a35cc5e36e0ceb8c864313f417628575a3c71593e65467ea13dd111b432fdf1db9383ae0
|
||||
DIST NVIDIA-OptiX-SDK-7.5.0-linux64-x86_64.sh 57849566 BLAKE2B 98ab7b92002325dacd1d12e57e83c1ba905d5950e4db5ba78cadcef7aab7067e0077e0f1214a8f953a19d40baa5b20574f95daae98ff55ab9e59023beeb7f4d9 SHA512 76469f3b19819922d668228ca6c75efdca980f48c4c2620a679908c4ac945ab2b06a134cf79dbd2a08b181419601dc70e63f055a95c586c8e7490fdb68735547
|
||||
DIST NVIDIA-OptiX-SDK-8.1.0-linux64-aarch64-35015278.sh 57114376 BLAKE2B 0e07ed048ae62b836d3dca5d3a3c874b89dd1eba50526e2408a82d4b3806f58c27c5a094c1138e4440562aff8bc485c86f1ab174be0ac28c5bd1de58f043a714 SHA512 b86fc59de45d0ad9996bc6773d93ad276b49bf5baebc82835addf24e9aaeae849acae12e5a9af313d5eae9401af595de7cff5afe1bfd6a2cff54f89b15b7ce42
|
||||
DIST NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64-35015278.sh 57124192 BLAKE2B f2d34e836ca4ce01846a61dceecde7f78669f96d10216917c86ea85ca7eb0337fc2205c96e29f244e654e211d97f131841e0cf740a07637842375805a7682006 SHA512 fc7df50316fb09871837fd6e7eda8d783921e6759be76eab23d15f99ec3072f5c3333a8d449985281ba1ed5c75d2051e93f4808260f3be69a5065fca0cdcc06d
|
||||
DIST NVIDIA-OptiX-SDK-9.0.0-linux64-aarch64.sh 58473506 BLAKE2B 9b1a774fca9af8215b1b5f9bec659feabd915210d907c26c387ba30dca32bd61d9df6ef3cc07a21ea06015dfe08b4726b53d006fd9654a89347addbdf366c81e SHA512 b4a8781d18d13c02dbfd151ec8d76f9a5c584c7682eb1fda9552dabf559bd779b8cd06f29aa9599c7c32798b1d3a2252f7cbc7e23725a64344319e984206548e
|
||||
DIST NVIDIA-OptiX-SDK-9.0.0-linux64-x86_64.sh 58451990 BLAKE2B f215146af840cb3e2832bb6e5e3b43de711491a7b38db5fa5b9abea31060a5dd68cdb6100254edbca534707c843f8e86abae0c777b0c961a88886f043444a969 SHA512 7c59303f17ca7ed8573e454c2d3a4823a5212e1d895ce4bafb5ced6f94a2cac36d83ca336f38c511d72ec0eede4c34c89bd5b545be9f5039fded722de221f62b
|
||||
DIST optix-7.4.0-internal-optix_7_device_impl.h 331318 BLAKE2B f0f5bba73b8b13fcd7a9c6cad9df1e7da7a8bd6c2b62c8fd69baebffb597ae4f6fdef72fd5005517ed3684921ab3213466dcfcc6ed5a5025a94fce8cba93fcdd SHA512 e3aa42816154737b5d80ec837cf5cb1dc5ee579a68b73b0e9cbf175e396cee622ec3a5b8c0a9e8c65f5dfee3a2dcba7feef54acc9970bf9792e7e8c9fe4db0f2
|
||||
DIST optix-7.4.0-internal-optix_7_device_impl_exception.h 15611 BLAKE2B 0c4023d2a89df3886f1478ecf8520e077075a53659d4c56d31bbe0396dbf87228329e57105ad2b8df86aa87829d03d04341790a6c5a996403563cf2f2fdee3d4 SHA512 4b4de0502c82b7810c5cb7b7db34f1d78b43b2551f79b351ebc8c0a8d3e4a91918629ff980623dd861ac7fc786d2ecc880935d48e2619ab8c297f39bfb5ed453
|
||||
DIST optix-7.4.0-internal-optix_7_device_impl_transformations.h 17987 BLAKE2B 666f642cd5596f44e587187d1810df7815ce06fae0bc8ac609a24928789904b56a33693573ccd0719442386e090e3056792d34b9a3980367dc9c26822afb1598 SHA512 8280c529565b8af2ef2765c3da7d0821e2f2f2361aacb2bef1a3237effe272f21990d273e2ea423056c1af91946b5d2b07af4532c6168be2370add858ad9775f
|
||||
|
||||
@ -18,6 +18,9 @@
|
||||
performance on the GPU. Provides a simple, recursive and flexible
|
||||
pipeline for accelerating ray tracing algorithms.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="github">NVIDIA/optix-dev</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="headers-only">Download and install only the header files</flag>
|
||||
</use>
|
||||
|
||||
24
dev-libs/optix/optix-8.1.0-r1.ebuild
Normal file
24
dev-libs/optix/optix-8.1.0-r1.ebuild
Normal file
@ -0,0 +1,24 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="NVIDIA Ray Tracing Engine"
|
||||
HOMEPAGE="https://developer.nvidia.com/rtx/ray-tracing/optix"
|
||||
SRC_URI="
|
||||
https://github.com/NVIDIA/optix-dev/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
"
|
||||
S="${WORKDIR}/${PN}-dev-${PV}"
|
||||
|
||||
LICENSE="NVIDIA-SDK BSD"
|
||||
SLOT="0/$(ver_cut 1)"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
RESTRICT="test"
|
||||
|
||||
src_install() {
|
||||
insinto "/opt/${PN}"
|
||||
|
||||
doins -r include/
|
||||
|
||||
dodoc README.md
|
||||
}
|
||||
@ -1,124 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake cuda flag-o-matic toolchain-funcs
|
||||
MY_PV=$(ver_cut 1-2)
|
||||
PV_BUILD="-35015278"
|
||||
|
||||
DESCRIPTION="NVIDIA Ray Tracing Engine"
|
||||
HOMEPAGE="https://developer.nvidia.com/rtx/ray-tracing/optix"
|
||||
SRC_URI="
|
||||
!headers-only? (
|
||||
amd64? (
|
||||
https://developer.download.nvidia.com/designworks/optix/secure/${PV}/NVIDIA-OptiX-SDK-${PV}-linux64-x86_64${PV_BUILD}.sh
|
||||
)
|
||||
arm64? (
|
||||
https://developer.download.nvidia.com/designworks/optix/secure/${PV}/NVIDIA-OptiX-SDK-${PV}-linux64-aarch64${PV_BUILD}.sh
|
||||
)
|
||||
)
|
||||
headers-only? (
|
||||
https://github.com/NVIDIA/optix-dev/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="NVIDIA-SDK"
|
||||
SLOT="0/$(ver_cut 1)"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
IUSE="+headers-only"
|
||||
RESTRICT="bindist mirror !headers-only? ( fetch ) test"
|
||||
|
||||
RDEPEND=">=x11-drivers/nvidia-drivers-555"
|
||||
|
||||
pkg_nofetch() {
|
||||
einfo "Please download ${A} from:"
|
||||
einfo " ${HOMEPAGE}"
|
||||
einfo "and move it to your distfiles directory."
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use headers-only; then
|
||||
default
|
||||
else
|
||||
skip="$(grep -a ^tail "${DISTDIR}/${A}" | tail -n1 | cut -d' ' -f 3)"
|
||||
tail -n "${skip}" "${DISTDIR}/${A}" | tar -zx -f -
|
||||
assert "unpacking ${A} failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use headers-only; then
|
||||
default
|
||||
else
|
||||
export CMAKE_USE_DIR="${WORKDIR}/SDK"
|
||||
sed -e "s/CMAKE_CXX_STANDARD 11/CMAKE_CXX_STANDARD 17/" -i "SDK/CMakeLists.txt" || die
|
||||
|
||||
cmake_src_prepare
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use headers-only && return
|
||||
|
||||
filter-lto
|
||||
|
||||
# cmake-4 #951350
|
||||
: "${CMAKE_POLICY_VERSION_MINIMUM:=3.10}"
|
||||
export CMAKE_POLICY_VERSION_MINIMUM
|
||||
|
||||
# allow slotted install
|
||||
: "${CUDA_PATH:=${ESYSROOT}/opt/cuda}"
|
||||
export CUDA_PATH
|
||||
|
||||
local -x CUDAHOSTCXX="$(cuda_gccdir)"
|
||||
local -x CUDAHOSTLD="$(tc-getCXX)"
|
||||
local mycmakeargs=(
|
||||
-DCUDA_HOST_COMPILER="$(cuda_gccdir)"
|
||||
-DGLFW_INSTALL="no"
|
||||
-DCUDA_CHECK_DEPENDENCIES_DURING_COMPILE="yes"
|
||||
-DOPTIX_OPTIXIR_BUILD_CONFIGURATION="${CMAKE_BUILD_TYPE}"
|
||||
)
|
||||
|
||||
if [[ -v CUDAARCHS ]]; then
|
||||
local optix_CUDAARCHS="$(echo "${CUDAARCHS}" | tr ';' '\n' | sort | head -n1)"
|
||||
|
||||
mycmakeargs+=(
|
||||
-DCUDA_MIN_SM_TARGET="sm_${optix_CUDAARCHS}"
|
||||
-DCUDA_MIN_SM_COMPUTE_TARGET="compute_${optix_CUDAARCHS}"
|
||||
)
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use headers-only && return
|
||||
|
||||
cmake_src_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
use headers-only && return
|
||||
|
||||
cmake_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto "/opt/${PN}"
|
||||
|
||||
if use headers-only; then
|
||||
cd "${PN}-dev-${PV}" || die
|
||||
doins -r include/
|
||||
|
||||
dodoc README.md
|
||||
return
|
||||
fi
|
||||
|
||||
# missing a install target so cmake_src_install fails
|
||||
cmake_run_in "${BUILD_DIR}" cmake -P cmake_install.cmake
|
||||
|
||||
local DOCS=( "doc/OptiX_"{API_Reference,Programming_Guide}"_${PV}.pdf" )
|
||||
einstalldocs
|
||||
}
|
||||
24
dev-libs/optix/optix-9.0.0-r1.ebuild
Normal file
24
dev-libs/optix/optix-9.0.0-r1.ebuild
Normal file
@ -0,0 +1,24 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="NVIDIA Ray Tracing Engine"
|
||||
HOMEPAGE="https://developer.nvidia.com/rtx/ray-tracing/optix"
|
||||
SRC_URI="
|
||||
https://github.com/NVIDIA/optix-dev/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
"
|
||||
S="${WORKDIR}/${PN}-dev-${PV}"
|
||||
|
||||
LICENSE="NVIDIA-SDK BSD"
|
||||
SLOT="0/$(ver_cut 1)"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
RESTRICT="test"
|
||||
|
||||
src_install() {
|
||||
insinto "/opt/${PN}"
|
||||
|
||||
doins -r include/
|
||||
|
||||
dodoc README.md
|
||||
}
|
||||
@ -1,128 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake cuda flag-o-matic toolchain-funcs
|
||||
MY_PV=$(ver_cut 1-2)
|
||||
|
||||
DESCRIPTION="NVIDIA Ray Tracing Engine"
|
||||
HOMEPAGE="https://developer.nvidia.com/rtx/ray-tracing/optix"
|
||||
SRC_URI="
|
||||
!headers-only? (
|
||||
amd64? (
|
||||
https://developer.download.nvidia.com/designworks/optix/secure/${PV}/NVIDIA-OptiX-SDK-${PV}-linux64-x86_64.sh
|
||||
)
|
||||
arm64? (
|
||||
https://developer.download.nvidia.com/designworks/optix/secure/${PV}/NVIDIA-OptiX-SDK-${PV}-linux64-aarch64.sh
|
||||
)
|
||||
)
|
||||
headers-only? (
|
||||
https://github.com/NVIDIA/optix-dev/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="NVIDIA-SDK"
|
||||
SLOT="0/$(ver_cut 1)"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
IUSE="+headers-only"
|
||||
RESTRICT="bindist mirror !headers-only? ( fetch ) test"
|
||||
|
||||
RDEPEND=">=x11-drivers/nvidia-drivers-570"
|
||||
|
||||
pkg_nofetch() {
|
||||
einfo "Please download ${A} from:"
|
||||
einfo " ${HOMEPAGE}"
|
||||
einfo "and move it to your distfiles directory."
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use headers-only; then
|
||||
default
|
||||
else
|
||||
skip="$(grep -a ^tail "${DISTDIR}/${A}" | tail -n1 | cut -d' ' -f 3)"
|
||||
tail -n "${skip}" "${DISTDIR}/${A}" | tar -zx -f -
|
||||
assert "unpacking ${A} failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use headers-only; then
|
||||
default
|
||||
else
|
||||
export CMAKE_USE_DIR="${WORKDIR}/SDK"
|
||||
sed -e "s/CMAKE_CXX_STANDARD 11/CMAKE_CXX_STANDARD 17/" -i "SDK/CMakeLists.txt" || die
|
||||
|
||||
sed \
|
||||
-e "s/SAMPLES_NVCC_FLAGS/CUDA_NVCC_FLAGS/g" \
|
||||
-e "s/-arch sm_60/\${CUDA_NVCC_FLAGS}/g" \
|
||||
-i SDK/optixNeuralTexture/CMakeLists.txt || die
|
||||
|
||||
cmake_src_prepare
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use headers-only && return
|
||||
|
||||
filter-lto
|
||||
|
||||
# cmake-4 #951350
|
||||
: "${CMAKE_POLICY_VERSION_MINIMUM:=3.10}"
|
||||
export CMAKE_POLICY_VERSION_MINIMUM
|
||||
|
||||
# allow slotted install
|
||||
: "${CUDA_PATH:=${ESYSROOT}/opt/cuda}"
|
||||
export CUDA_PATH
|
||||
|
||||
local -x CUDAHOSTCXX="$(cuda_gccdir)"
|
||||
local -x CUDAHOSTLD="$(tc-getCXX)"
|
||||
local mycmakeargs=(
|
||||
-DCUDA_HOST_COMPILER="$(cuda_gccdir)"
|
||||
-DGLFW_INSTALL="no"
|
||||
-DCUDA_CHECK_DEPENDENCIES_DURING_COMPILE="yes"
|
||||
-DOPTIX_OPTIXIR_BUILD_CONFIGURATION="${CMAKE_BUILD_TYPE}"
|
||||
)
|
||||
|
||||
if [[ -v CUDAARCHS ]]; then
|
||||
local optix_CUDAARCHS="$(echo "${CUDAARCHS}" | tr ';' '\n' | sort | head -n1)"
|
||||
|
||||
mycmakeargs+=(
|
||||
-DCUDA_MIN_SM_TARGET="sm_${optix_CUDAARCHS}"
|
||||
-DCUDA_MIN_SM_COMPUTE_TARGET="compute_${optix_CUDAARCHS}"
|
||||
)
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use headers-only && return
|
||||
|
||||
cmake_src_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
use headers-only && return
|
||||
|
||||
cmake_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto "/opt/${PN}"
|
||||
|
||||
if use headers-only; then
|
||||
cd "${PN}-dev-${PV}" || die
|
||||
doins -r include/
|
||||
|
||||
dodoc README.md
|
||||
return
|
||||
fi
|
||||
|
||||
# missing a install target so cmake_src_install fails
|
||||
cmake_run_in "${BUILD_DIR}" cmake -P cmake_install.cmake
|
||||
|
||||
local DOCS=( "doc/OptiX_"{API_Reference,Programming_Guide}"_${PV}.pdf" )
|
||||
einstalldocs
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user