aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dev-util/amd-app-sdk/Manifest2
-rw-r--r--dev-util/amd-app-sdk/amd-app-sdk-2.4.ebuild143
2 files changed, 145 insertions, 0 deletions
diff --git a/dev-util/amd-app-sdk/Manifest b/dev-util/amd-app-sdk/Manifest
new file mode 100644
index 0000000..39a470d
--- /dev/null
+++ b/dev-util/amd-app-sdk/Manifest
@@ -0,0 +1,2 @@
+DIST AMD-APP-SDK-v2.4-lnx64.tgz 72608312 RMD160 932bd04ec6ed97c7c4ba073a9d7ec0d9dc85840e SHA1 4f34ef1674b5b2942b7a2f4b895e799a5c358384 SHA256 2aa32269d206dd4e48580cc0e5aee03f4d9d9c539b10e8f29d0a21461a58a34a
+EBUILD amd-app-sdk-2.4.ebuild 4148 RMD160 916b31149727f9e2d42c1eb872b5e67fe7b621e4 SHA1 f4f545f0322f7a926e9cf537b2dc3c7504994b0e SHA256 752e7fe8e2e920fdf5d852cd4eaa461a2d7a25fbf74c4f402bf2b926e06b29ad
diff --git a/dev-util/amd-app-sdk/amd-app-sdk-2.4.ebuild b/dev-util/amd-app-sdk/amd-app-sdk-2.4.ebuild
new file mode 100644
index 0000000..e25af82
--- /dev/null
+++ b/dev-util/amd-app-sdk/amd-app-sdk-2.4.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+inherit eutils flag-o-matic
+
+DESCRIPTION="Enable compiling code and loading it on ATI/AMD GPU"
+HOMEPAGE="http://developer.amd.com/GPU/ATISTREAMSDK/Pages/default.aspx"
+SRC_URI="http://developer.amd.com/Downloads/AMD-APP-SDK-v${PV}-lnx64.tgz"
+
+LICENSE="AMD GPL-1 as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples doc"
+RESTRICT="strip fetch"
+RDEPEND="examples? ( media-libs/glew )"
+
+MY_PN="AMD-APP-SDK"
+MY_PV="${PV}"
+MY_P="${MY_PN}-v${MY_PV}-lnx64"
+
+QA_EXECSTACK="
+ usr/lib32/libatiocl32.so
+ usr/lib64/libatiocl64.so
+ usr/lib/libatiocl32.so
+ usr/lib/libatiocl64.so
+"
+
+src_compile() {
+ if use examples; then
+ cd ${MY_P} || die
+ MAKEOPTS="${MAKEOPTS} -j1" emake || die "emake failed"
+ fi
+}
+
+src_install() {
+ local DEST=/opt/${PF}
+
+ cd ${MY_P} || die
+
+ # install libraries and executables into standart tree
+ dodir ${DEST}/bin
+ if use multilib; then
+ # executables (32 and 64 bit versions)
+ newbin bin/x86_64/clinfo clinfo64
+ newbin bin/x86/clinfo clinfo32
+ dosym cinfo64 /usr/bin/clinfo
+ dodir ${DEST}/bin/x86
+ dosym /usr/bin/clinfo32 ${DEST}/bin/x86/clinfo
+ dodir ${DEST}/bin/x86_64
+ dosym /usr/bin/clinfo64 ${DEST}/bin/x86_64/clinfo
+ # libraries
+ dolib.so lib/x86_64/libOpenCL.so lib/x86_64/libOpenCL.so.1 lib/x86_64/libatiocl64.so
+ insinto /usr/lib32
+ insopts -m0755
+ doins lib/x86/libOpenCL.so lib/x86/libOpenCL.so.1 lib/x86/libatiocl32.so
+ dosym /usr/lib32/libOpenCL.so ${DEST}/lib/x86/libOpenCL.so
+ dosym /usr/lib32/libOpenCL.so.1 ${DEST}/lib/x86/libOpenCL.so.1
+ dosym /usr/lib32/libamdocl32.so ${DEST}/lib/x86/libamdocl32.so
+ dosym /usr/lib64/libOpenCL.so ${DEST}/lib/x86_64/libOpenCL.so
+ dosym /usr/lib64/libOpenCL.so.1 ${DEST}/lib/x86_64/libOpenCL.so.1
+ dosym /usr/lib64/libamdocl64.so ${DEST}/lib/x86_64/libamdocl64.so
+ else
+ # 32 bit or 64 bit versions are installed only
+ if use amd64; then
+ dobin bin/x86_64/clinfo
+ dolib.so lib/x86_64/libOpenCL.so lib/x86_64/libOpenCL.so.1 lib/x86_64/libamdocl64.so
+ dodir ${DEST}/bin/x86_64
+ dosym /usr/bin/clinfo ${DEST}/bin/x86_64/clinfo
+ dosym /usr/lib/libOpenCL.so ${DEST}/lib/x86_64/libOpenCL.so
+ dosym /usr/lib/libOpenCL.so.1 ${DEST}/lib/x86_64/libOpenCL.so.1
+ dosym /usr/lib/libamdocl64.so ${DEST}/lib/x86_64/libamdocl64.so
+ else
+ dobin bin/x86/clinfo
+ dolib.so lib/x86/libOpenCL.so lib/x86/libOpenCL.so.1 lib/x86/libamdocl32.so
+ dodir ${DEST}/bin/x86
+ dosym /usr/bin/clinfo ${DEST}/bin/x86/clinfo
+ dosym /usr/lib/libOpenCL.so ${DEST}/lib/x86/libOpenCL.so
+ dosym /usr/lib/libOpenCL.so.1 ${DEST}/lib/x86/libOpenCL.so.1
+ dosym /usr/lib/libamdocl32.so ${DEST}/lib/x86/libamdocl32.so
+ fi
+ fi
+
+ # Install libraries
+ insinto ${DEST}/lib
+ insopts -m0755
+
+ if ! use amd64 || use multilib; then
+ insinto ${DEST}/lib/x86
+ doins lib/x86/libGLEW.so
+ doins lib/x86/libglut.so
+ fi
+ if use amd64; then
+ insinto ${DEST}/lib/x86_64
+ doins lib/x86_64/libGLEW.so
+ doins lib/x86_64/libglut.so
+ fi
+
+ # Install includes
+ # only selected header; not glew
+ insinto /usr/include
+ insopts -m0644
+ doins -r include/CAL
+ doins -r include/CL
+ insinto ${DEST}/include
+ dosym /usr/include/CL ${DEST}/include/CL
+ doins -r include/GL
+
+ # Install examples & docs
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r samples
+ doins -r make
+ dosym ${DEST}/include /usr/share/doc/${PF}/examples/include
+ dosym ${DEST}/lib /usr/share/doc/${PF}/examples/lib
+ fi
+
+ if use doc; then
+ dodoc docs/opencl/*.pdf
+ dodoc docs/opencl/LICENSES
+ dodoc docs/opencl/StreamDoc.url
+ fi
+
+ # Create icd files; we COULD use the tar file from
+ # ATI's homepage, yet this seems so unnessecary as
+ # those files are VERY simple.
+ insinto /etc/OpenCL/vendors
+ echo "libamdocl64.so" > amdocl64.icd
+ echo "libamdocl32.so" > amdocl32.icd
+
+ if use amd64; then
+ doins amdocl64.icd
+ fi
+ doins amdocl32.icd
+
+ # Create env file
+ echo "AMDAPPSDKROOT=${DEST}" > 99${PN}
+ doenvd 99${PN}
+
+ # issue info about gpu computing
+ elog "REMEMBER: You need to install a recent version of ati-drivers to use your GPU for calculations."
+}