aboutsummaryrefslogtreecommitdiff
blob: c880f4f8b5c443afebbbfcdd92d0560b6b111cbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit mercurial cmake cuda

EHG_REPO_URI="https://bitbucket.org/simoncblyth/${PN//-*}"
EHG_REVISION="a580e704afe9d2c138072835e986542c835c29fc"

DESCRIPTION="GPU Optical Photon Simulation for Particle Physics"
HOMEPAGE="https://simoncblyth.bitbucket.io"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="dev-util/nvidia-cuda-toolkit:=
	dev-libs/optix"
DEPEND="dev-util/cmake
	dev-libs/boost
	dev-util/bcm
	dev-util/plog
	${RDEPEND}"

PATCHES=(
	"${FILESDIR}"/${PN}-0.0.1_p20191110-no_lib_install.patch
)

src_prepare() {
	cmake_src_prepare
	cuda_src_prepare

	rm -f CMakeLists.txt* || die
}

src_configure() {
	local mycmakeargs=(
		-DCMAKE_MODULE_PATH="${S}"/cmake/Modules
		-DOptiX_INSTALL_DIR="${EPREFIX}/opt/optix"
		-DCUDA_SDK_ROOT_DIR="${EPREFIX}/opt/cuda/sdk"
		-DCOMPUTE_CAPABILITY=61
		-DCUDA_NVCC_FLAGS="${NVCCFLAGS}"
	)
	CMAKE_USE_DIR=${S}/${PN##*-} cmake_src_configure
}