Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 608426
Collapse All | Expand All

(-)a/eselect-opencl-1.1.0-r4.ebuild (-13 / +20 lines)
Lines 20-34 Link Here
20
20
21
# Using copy by Mario Kicherer #496418
21
# Using copy by Mario Kicherer #496418
22
22
23
CL_ABIS=(1.0 1.1 1.2 2.0 2.1)
24
23
SRC_URI="
25
SRC_URI="
24
	https://dev.gentoo.org/~xarthisius/distfiles/${P}-r1.tar.xz
26
	https://dev.gentoo.org/~xarthisius/distfiles/${P}-r1.tar.xz
25
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl10.zip
26
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl11.zip
27
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl12.zip
28
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl20.zip
29
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl21.zip
30
	http://packages.gentooexperimental.org/opencl-cpp-headers.tar
27
	http://packages.gentooexperimental.org/opencl-cpp-headers.tar
31
	"
28
	"
29
30
for CL_ABI in "${CL_ABIS[@]}" ; do
31
	SRC_URI="${SRC_URI} https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl${CL_ABI/./}.zip"
32
done
33
34
32
LICENSE="GPL-2"
35
LICENSE="GPL-2"
33
SLOT="0"
36
SLOT="0"
34
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~x86-fbsd"
37
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~x86-fbsd"
Lines 52-69 Link Here
52
	local headers=( opencl.h cl_platform.h cl.h cl_ext.h cl_gl.h cl_gl_ext.h cl_egl.h )
55
	local headers=( opencl.h cl_platform.h cl.h cl_ext.h cl_gl.h cl_gl_ext.h cl_egl.h )
53
56
54
	# We install all versions of OpenCL headers
57
	# We install all versions of OpenCL headers
55
	for CL_ABI in 1.0 1.1 1.2 2.0 2.1; do
58
	for CL_ABI in "${CL_ABIS[@]}" ; do
56
		mkdir -p "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}"
59
		mkdir -p "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}"
57
		for f in ${headers[@]}; do
60
		for f in ${headers[@]}; do
58
			cp "${WORKDIR}"/OpenCL-Headers-opencl${CL_ABI/./}/${f} "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/${f}" > /dev/null
61
			if [ -r "${WORKDIR}/OpenCL-Headers-opencl${CL_ABI/./}/${f}" ] ; then
59
		done
62
				cp "${WORKDIR}"/OpenCL-Headers-opencl${CL_ABI/./}/${f} "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/${f}"
63
			fi
60
	done
64
	done
61
65
62
	for i in 1.1 1.2 2.1; do
66
		if [ -r "${WORKDIR}/${CL_ABI}/cl.hpp" ] ; then
63
		cp "${WORKDIR}"/$i/cl.hpp "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/"
67
			cp "${WORKDIR}/${CL_ABI}/cl.hpp" "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/"
68
			einfo "${WORKDIR}/${CL_ABI}/cl.hpp copied to ${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/"
69
		else
70
			einfo "${WORKDIR}/${CL_ABI}/cl.hpp does not exist"
71
		fi
64
	done
72
	done
73
65
	# Create symlinks to newest. Maybe this should be switchable?
74
	# Create symlinks to newest. Maybe this should be switchable?
66
	for f in ${headers[@]}; do
75
	dosym "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-1.2/" "/usr/$(get_libdir)/OpenCL/global/include/CL"
67
		dosym "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-1.2/${f}" "/usr/include/CL/${f}"
68
	done
69
}
76
}
(-)a/eselect-opencl-1.1.0-r4.ebuild (-14 / +21 lines)
Lines 2-8 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Id$
3
# $Id$
4
4
5
EAPI=5
5
EAPI=6
6
6
7
inherit multilib
7
inherit multilib
8
8
Lines 20-34 Link Here
20
20
21
# Using copy by Mario Kicherer #496418
21
# Using copy by Mario Kicherer #496418
22
22
23
CL_ABIS=(1.0 1.1 1.2 2.0 2.1)
24
23
SRC_URI="
25
SRC_URI="
24
	https://dev.gentoo.org/~xarthisius/distfiles/${P}-r1.tar.xz
26
	https://dev.gentoo.org/~xarthisius/distfiles/${P}-r1.tar.xz
25
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl10.zip
26
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl11.zip
27
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl12.zip
28
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl20.zip
29
	https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl21.zip
30
	http://packages.gentooexperimental.org/opencl-cpp-headers.tar
27
	http://packages.gentooexperimental.org/opencl-cpp-headers.tar
31
	"
28
	"
29
30
for CL_ABI in "${CL_ABIS[@]}" ; do
31
	SRC_URI="${SRC_URI} https://github.com/KhronosGroup/OpenCL-Headers/archive/opencl${CL_ABI/./}.zip"
32
done
33
34
32
LICENSE="GPL-2"
35
LICENSE="GPL-2"
33
SLOT="0"
36
SLOT="0"
34
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~x86-fbsd"
37
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~x86-fbsd"
Lines 52-69 Link Here
52
	local headers=( opencl.h cl_platform.h cl.h cl_ext.h cl_gl.h cl_gl_ext.h cl_egl.h )
55
	local headers=( opencl.h cl_platform.h cl.h cl_ext.h cl_gl.h cl_gl_ext.h cl_egl.h )
53
56
54
	# We install all versions of OpenCL headers
57
	# We install all versions of OpenCL headers
55
	for CL_ABI in 1.0 1.1 1.2 2.0 2.1; do
58
	for CL_ABI in "${CL_ABIS[@]}" ; do
56
		mkdir -p "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}"
59
		mkdir -p "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}"
57
		for f in ${headers[@]}; do
60
		for f in ${headers[@]}; do
58
			cp "${WORKDIR}"/OpenCL-Headers-opencl${CL_ABI/./}/${f} "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/${f}" > /dev/null
61
			if [ -r "${WORKDIR}/OpenCL-Headers-opencl${CL_ABI/./}/${f}" ] ; then
59
		done
62
				cp "${WORKDIR}"/OpenCL-Headers-opencl${CL_ABI/./}/${f} "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/${f}"
63
			fi
60
	done
64
	done
61
65
62
	for i in 1.1 1.2 2.1; do
66
		if [ -r "${WORKDIR}/${CL_ABI}/cl.hpp" ] ; then
63
		cp "${WORKDIR}"/$i/cl.hpp "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/"
67
			cp "${WORKDIR}/${CL_ABI}/cl.hpp" "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/"
68
			einfo "${WORKDIR}/${CL_ABI}/cl.hpp copied to ${D}/usr/$(get_libdir)/OpenCL/global/include/CL-${CL_ABI}/"
69
		else
70
			einfo "${WORKDIR}/${CL_ABI}/cl.hpp does not exist"
71
		fi
64
	done
72
	done
73
65
	# Create symlinks to newest. Maybe this should be switchable?
74
	# Create symlinks to newest. Maybe this should be switchable?
66
	for f in ${headers[@]}; do
75
	dosym "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-1.2/" "/usr/$(get_libdir)/OpenCL/global/include/CL"
67
		dosym "${D}/usr/$(get_libdir)/OpenCL/global/include/CL-1.2/${f}" "/usr/include/CL/${f}"
68
	done
69
}
76
}

Return to bug 608426