summaryrefslogtreecommitdiff
blob: dd754dd95a789922c8785193d11231ec5e1615bb (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$

EAPI=4

MY_PN=${PN//-/_}
MY_P=${MY_PN}_${PV}_x64

inherit rpm multilib

INTEL_CL=/usr/$(get_libdir)/OpenCL/vendors/intel/

DESCRIPTION="Intel's implementation of the OpenCL standard optimized for Intel processors."
HOMEPAGE="http://software.intel.com/en-us/articles/opencl-sdk/"
SRC_URI="http://software.intel.com/file/35734/${MY_P}.tgz"

LICENSE="Intel-SDP"
SLOT="0"
IUSE=""
KEYWORDS="~amd64 -x86"

#sys-devel/clang
#dev-libs/boost:1.46
RDEPEND="dev-cpp/tbb
	sys-process/numactl"
DEPEND=""

RESTRICT="mirror"
QA_EXECSTACK="${INTEL_CL/\//}libcpu_device.so
    ${INTEL_CL/\//}libOclCpuBackEnd.so
	${INTEL_CL/\//}libtask_executor.so"
QA_PREBUILT="${INTEL_CL}*"

S=${WORKDIR}

src_unpack() {
	default
	rpm_unpack ./${MY_P}.rpm
}

src_prepare() {
	cat <<- EOF > "${S}"/intelocl64.icd
		${INTEL_CL}/libintelocl.so
	EOF
}

src_install() {
	insinto /etc/OpenCL/vendors
	doins intelocl64.icd
	# things that are left out: llc, ioc
	insinto ${INTEL_CL}
	doins -r usr/include

	insopts -m 755
	doins usr/lib64/libOpenCL.so
	pushd usr/lib64/OpenCL/vendors/intel &> /dev/null
	rm -f libboost* libtbb*
	doins *.so *rtl *pch
	popd &> /dev/null
}