blob: 29d4dc0b7977984fd82eab3e70d57f0c46fa0141 (
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
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-opengl/eselect-opengl-1.2.4.ebuild,v 1.7 2011/10/03 17:45:54 josejx Exp $
EAPI=4
CL_ABI=1.1
inherit multilib
DESCRIPTION="Utility to change the OpenCL implementation being used"
HOMEPAGE="http://www.gentoo.org/"
# Source:
# http://www.khronos.org/registry/cl/api/${CL_ABI}/opencl.h
# http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_platform.h
# http://www.khronos.org/registry/cl/api/${CL_ABI}/cl.h
# http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_ext.h
# http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_gl.h
# http://www.khronos.org/registry/cl/api/${CL_ABI}/cl_gl_ext.h
# http://www.khronos.org/registry/cl/api/${CL_ABI}/cl.hpp
MIRROR="http://dev.gentoo.org/~xarthisius/distfiles/"
SRC_URI="${MIRROR}/opencl.h.${CL_ABI}.xz
${MIRROR}/cl_platform.h.${CL_ABI}.xz
${MIRROR}/cl.h.${CL_ABI}.xz
${MIRROR}/cl_ext.h.${CL_ABI}.xz
${MIRROR}/cl_gl.h.${CL_ABI}.xz
${MIRROR}/cl_gl_ext.h.${CL_ABI}.xz
${MIRROR}/cl.hpp.${CL_ABI}.xz
${MIRROR}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE=""
DEPEND="app-arch/xz-utils"
RDEPEND=">=app-admin/eselect-1.2.4"
pkg_postinst() {
local impl="$(eselect opencl show)"
if [[ -n "${impl}" && "${impl}" != '(none)' ]] ; then
eselect opengl set "${impl}"
fi
}
src_install() {
insinto /usr/share/eselect/modules
doins opencl.eselect
#doman opencl.eselect.5
local headers=( opencl.h cl_platform.h cl.h cl_ext.h cl_gl.h cl_gl_ext.h cl.hpp )
insinto /usr/$(get_libdir)/OpenCL/global/include/CL
cd "${WORKDIR}"
for f in ${headers[@]}; do
newins ${f}.${CL_ABI} ${f}
done
}
|