summaryrefslogtreecommitdiffstats
path: root/dev-libs/pocl/pocl-1.4.ebuild
blob: e64906046500ef64915197cb9d5336f1f1f6888c (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
EAPI="6"
inherit cmake-utils cmake-multilib versionator

DESCRIPTION="Portable Computing Language"
HOMEPAGE="http://portablecl.org"

PV_RC_SEPARATOR_FIXED=$(replace_version_separator '_' '-')
PV_FILE_FORMAT=${PV_RC_SEPARATOR_FIXED^^}
SRC_URI="https://github.com/pocl/pocl/archive/v${PV_FILE_FORMAT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${PV_FILE_FORMAT}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64"
IUSE=""

RDEPEND=">=sys-devel/llvm-6.0
         sys-devel/clang
         sys-apps/hwloc
         "

DEPEND="${RDEPEND}"

PATCHES=("${FILESDIR}/vendor_opencl_libs_location.epatch"
)


# pocl 1.4 only links with libOpenCL.so supporting 2.1 version of the standard (poclu library references 
# clCreateProgramWithIL which is not available in OpenCL 2.0). intel-ocl-sdk for instance
src_configure() {
        sed -i''  -e 's#typedef ptrdiff_t intptr_t#//typedef ptrdiff_t intptr_t#' include/pocl_types.h

	local mycmakeargs=(
            "-DENABLE_CUDA=ON"
#	    "-DENABLE_HSA=ON"
        )

        cmake-multilib_src_configure
}