summaryrefslogtreecommitdiff
path: root/dev-libs/ocl-icd/ocl-icd-2.2.12-r10.ebuild
blob: 2f086a0966a5104c2a7a81575e36c402c5d3c5b6 (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-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools flag-o-matic multilib-minimal

DESCRIPTION="Alternative to vendor specific OpenCL ICD loaders"
HOMEPAGE="https://github.com/OCL-dev/ocl-icd"
SRC_URI="https://github.com/OCL-dev/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

# Does nothing now but by keeping it here we avoid having to have virtual/opencl
# handle ebuilds both with and without this flag.
IUSE="+khronos-headers"

BDEPEND="dev-lang/ruby:2.5
	virtual/rubygems"
DEPEND="dev-util/opencl-headers"
RDEPEND="${DEPEND}
	!app-eselect/eselect-opencl
	!dev-libs/opencl-icd-loader"

PATCHES=("${FILESDIR}"/${P}-gcc-10.patch)

src_prepare() {
	replace-flags -Os -O2 # bug 646122

	default
	eautoreconf
}

multilib_src_configure() {
	# dev-util/opencl-headers ARE official Khronos Group headers, what this option
	# does is disable the use of the bundled ones
	ECONF_SOURCE="${S}" econf --enable-pthread-once --disable-official-khronos-headers
}

multilib_src_install() {
	default

	# Drop .la files
	find "${ED}" -name '*.la' -delete || die
}