public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] dev/xarthisius:master commit in: dev-util/amdstream/files/, dev-util/amdstream/
@ 2011-12-20 13:53 Kacper Kowalik
  0 siblings, 0 replies; 2+ messages in thread
From: Kacper Kowalik @ 2011-12-20 13:53 UTC (permalink / raw
  To: gentoo-commits

commit:     8005c209b13491616158b2984e74d1cbe51bf1c8
Author:     Kacper Kowalik (Xarthisius) <xarthisius.kk <AT> gmail <DOT> com>
AuthorDate: Tue Dec 20 13:53:42 2011 +0000
Commit:     Kacper Kowalik <xarthisius <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 13:53:42 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/xarthisius.git;a=commit;h=8005c209

[dev-util/amdstream] initial import

---
 dev-util/amdstream/Manifest                      |    4 +
 dev-util/amdstream/amdstream-2.6.ebuild          |  108 ++++++++++++++++++++++
 dev-util/amdstream/files/amdstream-2.6-x11.patch |   33 +++++++
 dev-util/amdstream/metadata.xml                  |    8 ++
 4 files changed, 153 insertions(+), 0 deletions(-)

diff --git a/dev-util/amdstream/Manifest b/dev-util/amdstream/Manifest
new file mode 100644
index 0000000..1374eb5
--- /dev/null
+++ b/dev-util/amdstream/Manifest
@@ -0,0 +1,4 @@
+AUX amdstream-2.6-x11.patch 903 RMD160 7bc7ecf59b5bc9a20de05b9a37e52712a7bcebaf SHA1 a708e3ab7f4ecb21ba371d874f63d40e49e6bdf1 SHA256 7b7c2dd9a7433d1c66575b2d80eab5b236f8d8c359755839f4cefacf967f9c48
+DIST AMD-APP-SDK-v2.6-lnx32.tgz 17953026 RMD160 3a117bc7a54e779ae80cd5f9559aa11c415b5190 SHA1 b927bc1839af8aa890c3f72199256d9ec2e81170 SHA256 b7f48da66d77228d1962d9698c65511c3091f511892597fa3bd52d031956e83d
+DIST AMD-APP-SDK-v2.6-lnx64.tgz 97519970 RMD160 4b6643ffae445fb4bb5cc817cb4fae886b86beb3 SHA1 b2ce0497306b65f4fe912d74142902ecdbbfbd07 SHA256 3042dafb0fbe3e61585b53f23f9d2d568888df01f39cbb12ee74118dca2845ba
+EBUILD amdstream-2.6.ebuild 2332 RMD160 c06835492f5d035e69a5fe944ec033c0b054ce59 SHA1 9c78755f04959ad1220fc4686ff746f8af65cd92 SHA256 30b72876399e737f44096c3c44995f7f8fb2ad0540f763215c9b61c17370e548

diff --git a/dev-util/amdstream/amdstream-2.6.ebuild b/dev-util/amdstream/amdstream-2.6.ebuild
new file mode 100644
index 0000000..1a0feda
--- /dev/null
+++ b/dev-util/amdstream/amdstream-2.6.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+MY_PN=AMD-APP-SDK
+MY_PV=v${PV}
+MY_P=${MY_PN}-${MY_PV}
+
+DESCRIPTION="AMD Accelerated Parallel Processing (APP) SDK (formerly ATI Stream)"
+HOMEPAGE="http://developer.amd.com/sdks/amdappsdk/pages/default.aspx"
+
+SRC_URI="amd64? ( http://developer.amd.com/Downloads/${MY_P}-lnx64.tgz )
+	x86? ( http://developer.amd.com/Downloads/${MY_P}-lnx32.tgz )"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples"
+
+DEPEND="examples? ( app-admin/eselect-opengl
+		sys-devel/llvm
+		media-libs/mesa
+		|| ( dev-util/opencl-headers dev-util/nvidia-cuda-toolkit )
+		media-libs/glew
+		media-libs/freeglut )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+RESTRICT="mirror"
+QA_PREBUILT="opt/AMDAPP/lib/*
+	opt/AMDAPP/bin/clinfo"
+
+pkg_setup() {
+	if [[ $(tc-arch) == 'x86' ]] ; then
+		bitness=32
+		_arch=x86
+	else
+		bitness=64
+		_arch=x86_64
+	fi
+	export bitness
+	export _arch
+	export MY_S=${MY_P}-RC3-lnx${bitness}
+}
+
+src_unpack() {
+	default_src_unpack
+	unpack ./${MY_S}.tgz ./icd-registration.tgz
+}
+
+src_prepare() {
+	local _ddir=/opt/AMDAPP
+	cat <<-EOF > 99${PN}
+		PATH=${_ddir}/bin
+		LDPATH=${_ddir}/lib
+	EOF
+
+	if use examples ; then
+		pushd ${MY_S} &> /dev/null
+		epatch "${FILESDIR}"/${P}-x11.patch
+		sed -i make/openclsdkdefs.mk \
+			-e "s/g++/$(tc-getCXX)/" \
+			-e "/C_DEBUG_FLAG/d" || die
+		popd &> /dev/null
+	fi
+}
+
+src_compile() {
+	use examples || return
+	emake -C ${MY_S}
+}
+
+src_install() {
+	doenvd 99${PN}
+	doins -r etc
+
+	#Install SDK
+	pushd ${MY_S} &> /dev/null
+	insinto /opt/AMDAPP
+	doins -r {glut_notice.txt,docs,include}
+
+	insinto /opt/AMDAPP/bin
+	doins bin/${_arch}/clinfo
+
+	insinto /opt/AMDAPP/lib
+	doins lib/*.so lib/${_arch}/*
+
+	# fix perms
+	fperms 755 /opt/AMDAPP/bin/clinfo
+
+	#TODO: install examples
+
+	#Env vars
+	#mkdir -p ${D}/etc/profile.d
+	#cd ${D}/etc/profile.d
+	#echo "#!/bin/sh" > amdstream.sh
+	#echo "export AMDAPPSDKROOT=${_installdir}" >> amdstream.sh
+	#echo "export AMDAPPSDKSAMPLESROOT=${_installdir}" >> amdstream.sh
+
+	##More docs and export
+	#echo "AMDSTREAMSDKROOT=${_installdir}/" >> ${D}/etc/env.d/99amdstream
+	#echo "AMDSTREAMSDKSAMPLEROOT=${_installdir}/" >> ${D}/etc/env.d/99amdstream
+	#echo "LIBRARY_PATH=${_installdir}/lib/x86_64" >> ${D}/etc/env.d/99amdstream
+}

diff --git a/dev-util/amdstream/files/amdstream-2.6-x11.patch b/dev-util/amdstream/files/amdstream-2.6-x11.patch
new file mode 100644
index 0000000..05ff3ea
--- /dev/null
+++ b/dev-util/amdstream/files/amdstream-2.6-x11.patch
@@ -0,0 +1,33 @@
+--- a/samples/opencl/cl/app/BoxFilterGL/Makefile
++++ b/samples/opencl/cl/app/BoxFilterGL/Makefile
+@@ -29,7 +29,7 @@
+ ifdef MINGW
+ 	LLIBS += glew$(BITS).dll glut$(BITS) opengl32 glu32 gdi32
+ else
+-	LLIBS += glut GLEW GL GLU
++	LLIBS += glut GLEW GL GLU X11
+ endif
+ else
+ 	LLIBS += glut$(BITS) GLEW$(BITS)
+--- a/samples/opencl/cl/app/URNGNoiseGL/Makefile
++++ b/samples/opencl/cl/app/URNGNoiseGL/Makefile
+@@ -29,7 +29,7 @@
+ ifdef MINGW
+ 	LLIBS += glew$(BITS).dll glut$(BITS) opengl32 glu32 gdi32
+ else
+-	LLIBS += glut GLEW GL GLU
++	LLIBS += glut GLEW GL GLU X11
+ endif
+ else
+ 	LLIBS += glut$(BITS) GLEW$(BITS)
+--- a/samples/opencl/cl/app/SimpleGL/Makefile
++++ b/samples/opencl/cl/app/SimpleGL/Makefile
+@@ -29,7 +29,7 @@
+ ifdef MINGW
+ 	LLIBS += glew$(BITS).dll glut$(BITS) opengl32 glu32 gdi32
+ else
+-	LLIBS += glut GLEW GL GLU
++	LLIBS += glut GLEW GL GLU X11
+ endif
+ else
+ 	LLIBS += glut$(BITS) GLEW$(BITS)

diff --git a/dev-util/amdstream/metadata.xml b/dev-util/amdstream/metadata.xml
new file mode 100644
index 0000000..6629da3
--- /dev/null
+++ b/dev-util/amdstream/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer>
+		<email>xarthisius@gentoo.org</email>
+		<name>Kacper Kowalik</name>
+	</maintainer>
+</pkgmetadata>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] dev/xarthisius:master commit in: dev-util/amdstream/files/, dev-util/amdstream/
@ 2011-12-20 16:40 Kacper Kowalik
  0 siblings, 0 replies; 2+ messages in thread
From: Kacper Kowalik @ 2011-12-20 16:40 UTC (permalink / raw
  To: gentoo-commits

commit:     be4020db62568ab3f4a1c542ba7c241d6f342b2a
Author:     Kacper Kowalik (Xarthisius) <xarthisius <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 20 16:40:50 2011 +0000
Commit:     Kacper Kowalik <xarthisius <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 16:40:50 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/xarthisius.git;a=commit;h=be4020db

[dev-util/amdstream] update, add sci/x11 to metadata.xml

---
 dev-util/amdstream/Manifest                        |    4 +-
 dev-util/amdstream/amdstream-2.6.ebuild            |   60 ++++++++++----------
 .../files/amdstream-2.6-parallel-build.patch       |   29 ++++++++++
 dev-util/amdstream/metadata.xml                    |    2 +
 4 files changed, 65 insertions(+), 30 deletions(-)

diff --git a/dev-util/amdstream/Manifest b/dev-util/amdstream/Manifest
index 1374eb5..7ecb442 100644
--- a/dev-util/amdstream/Manifest
+++ b/dev-util/amdstream/Manifest
@@ -1,4 +1,6 @@
+AUX amdstream-2.6-parallel-build.patch 668 RMD160 d8097fe9122fdbbc16e5cee418bf46815a342e43 SHA1 7c5b9d9397b3c6a462c5d64f1222760320770d55 SHA256 d59ad3d0e84086d081d2cc79bdb4b3872abd401266fad384bf61afc19fe2129f
 AUX amdstream-2.6-x11.patch 903 RMD160 7bc7ecf59b5bc9a20de05b9a37e52712a7bcebaf SHA1 a708e3ab7f4ecb21ba371d874f63d40e49e6bdf1 SHA256 7b7c2dd9a7433d1c66575b2d80eab5b236f8d8c359755839f4cefacf967f9c48
 DIST AMD-APP-SDK-v2.6-lnx32.tgz 17953026 RMD160 3a117bc7a54e779ae80cd5f9559aa11c415b5190 SHA1 b927bc1839af8aa890c3f72199256d9ec2e81170 SHA256 b7f48da66d77228d1962d9698c65511c3091f511892597fa3bd52d031956e83d
 DIST AMD-APP-SDK-v2.6-lnx64.tgz 97519970 RMD160 4b6643ffae445fb4bb5cc817cb4fae886b86beb3 SHA1 b2ce0497306b65f4fe912d74142902ecdbbfbd07 SHA256 3042dafb0fbe3e61585b53f23f9d2d568888df01f39cbb12ee74118dca2845ba
-EBUILD amdstream-2.6.ebuild 2332 RMD160 c06835492f5d035e69a5fe944ec033c0b054ce59 SHA1 9c78755f04959ad1220fc4686ff746f8af65cd92 SHA256 30b72876399e737f44096c3c44995f7f8fb2ad0540f763215c9b61c17370e548
+EBUILD amdstream-2.6.ebuild 2253 RMD160 cff0babb14b086a45d5f9572bddbde03f007e3a0 SHA1 4071db6dea98607aa1fccd6768de86650b9f3ae7 SHA256 1521e53faaa7272fb3bba7a7062d737115c00979fe0688a68a093467ab818590
+MISC metadata.xml 273 RMD160 028a597f815805499bf0669bbe2579a697fbc4d4 SHA1 268f07aa42b0af6780138185a8fa02fa5ad884bb SHA256 10368a84ee4a3f6c125e1e6d1119ff590c2a223d3a1dbe3cf6864c1554660563

diff --git a/dev-util/amdstream/amdstream-2.6.ebuild b/dev-util/amdstream/amdstream-2.6.ebuild
index 1a0feda..1cd16f4 100644
--- a/dev-util/amdstream/amdstream-2.6.ebuild
+++ b/dev-util/amdstream/amdstream-2.6.ebuild
@@ -20,27 +20,34 @@ SLOT="0"
 KEYWORDS="~amd64"
 IUSE="examples"
 
-DEPEND="examples? ( app-admin/eselect-opengl
+#check if those deps are valid, especially llvm
+RDEPEND="
+	x11-libs/libXext
+	x11-libs/libX11
+	examples? (
 		sys-devel/llvm
-		media-libs/mesa
-		|| ( dev-util/opencl-headers dev-util/nvidia-cuda-toolkit )
 		media-libs/glew
-		media-libs/freeglut )"
-RDEPEND="${DEPEND}"
+		media-libs/freeglut
+	)"
+DEPEND=""
 
 S=${WORKDIR}
 
 RESTRICT="mirror"
 QA_PREBUILT="opt/AMDAPP/lib/*
-	opt/AMDAPP/bin/clinfo"
+	opt/AMDAPP/bin/clinfo
+	opt/AMDAPP/samples/opencl/bin/x86_64/*
+	opt/AMDAPP/samples/opencl/bin/x86/*"
 
 pkg_setup() {
 	if [[ $(tc-arch) == 'x86' ]] ; then
 		bitness=32
 		_arch=x86
+		_narch=x86_64
 	else
 		bitness=64
 		_arch=x86_64
+		_narch=x86
 	fi
 	export bitness
 	export _arch
@@ -53,25 +60,28 @@ src_unpack() {
 }
 
 src_prepare() {
-	local _ddir=/opt/AMDAPP
+	local _ddir=/opt/AMDAPP/
 	cat <<-EOF > 99${PN}
-		PATH=${_ddir}/bin
-		LDPATH=${_ddir}/lib
+		PATH=${_ddir}bin
+		LDPATH=${_ddir}lib
+		AMDSTREAMSDKROOT=${_ddir}
+		AMDSTREAMSDKSAMPLEROOT=${_ddir}
 	EOF
 
 	if use examples ; then
 		pushd ${MY_S} &> /dev/null
-		epatch "${FILESDIR}"/${P}-x11.patch
+		epatch "${FILESDIR}"/${P}-x11.patch \
+			"${FILESDIR}"/${P}-parallel-build.patch
 		sed -i make/openclsdkdefs.mk \
 			-e "s/g++/$(tc-getCXX)/" \
-			-e "/C_DEBUG_FLAG/d" || die
+			-e "/C_DEBUG_FLAG/d" || die #CXXFLAGS
 		popd &> /dev/null
 	fi
 }
 
 src_compile() {
 	use examples || return
-	emake -C ${MY_S}
+	#emake -C ${MY_S} # Does it make sense to build it?
 }
 
 src_install() {
@@ -82,27 +92,19 @@ src_install() {
 	pushd ${MY_S} &> /dev/null
 	insinto /opt/AMDAPP
 	doins -r {glut_notice.txt,docs,include}
+	if use examples ; then
+		rm -rf samples/opencl/bin/${_narch}
+		doins -r samples
+		for i in /opt/AMDAPP/samples/opencl/bin/${_arch}/*; do
+			[[ ${i} == ${i%.*} ]] && fperms 755 "${i}"
+		done
+	fi
 
+	insopts -m755
 	insinto /opt/AMDAPP/bin
 	doins bin/${_arch}/clinfo
 
 	insinto /opt/AMDAPP/lib
+	rm -rf lib/${_arch}/lib{GLEW,glut}.so
 	doins lib/*.so lib/${_arch}/*
-
-	# fix perms
-	fperms 755 /opt/AMDAPP/bin/clinfo
-
-	#TODO: install examples
-
-	#Env vars
-	#mkdir -p ${D}/etc/profile.d
-	#cd ${D}/etc/profile.d
-	#echo "#!/bin/sh" > amdstream.sh
-	#echo "export AMDAPPSDKROOT=${_installdir}" >> amdstream.sh
-	#echo "export AMDAPPSDKSAMPLESROOT=${_installdir}" >> amdstream.sh
-
-	##More docs and export
-	#echo "AMDSTREAMSDKROOT=${_installdir}/" >> ${D}/etc/env.d/99amdstream
-	#echo "AMDSTREAMSDKSAMPLEROOT=${_installdir}/" >> ${D}/etc/env.d/99amdstream
-	#echo "LIBRARY_PATH=${_installdir}/lib/x86_64" >> ${D}/etc/env.d/99amdstream
 }

diff --git a/dev-util/amdstream/files/amdstream-2.6-parallel-build.patch b/dev-util/amdstream/files/amdstream-2.6-parallel-build.patch
new file mode 100644
index 0000000..027d0b0
--- /dev/null
+++ b/dev-util/amdstream/files/amdstream-2.6-parallel-build.patch
@@ -0,0 +1,29 @@
+--- samples/opencl/Makefile.orig	2011-11-29 06:15:55.000000000 +0100
++++ samples/opencl/Makefile	2011-12-20 16:36:27.404326333 +0100
+@@ -2,10 +2,22 @@
+ 
+ include $(DEPTH)/make/openclsdkdefs.mk 
+ 
+-SUBDIRS = SDKUtil \
+-          cl \
+-          cpp_cl \
+-          benchmark
++DIRS = cl \
++	cpp_cl \
++	benchmark
++
++all: $(DIRS)
++
++../../../TempSDKUtil/lib/$(CPU_ARCH)/libSDKUtil.a:
++	$(MAKE) -C SDKUtil
++
++$(DIRS): ../../../TempSDKUtil/lib/$(CPU_ARCH)/libSDKUtil.a
++	$(MAKE) -C $@
++
++clean:
++	$(MAKE) -C SDKUtil clean
++	rm -rf ../../../TempSDKUtil/lib/$(CPU_ARCH)/libSDKUtil.a
++	for i in $(DIRS); do make -C $$i clean; done
+ 
+ include $(DEPTH)/make/openclsdkrules.mk 
+ 

diff --git a/dev-util/amdstream/metadata.xml b/dev-util/amdstream/metadata.xml
index 6629da3..7cef770 100644
--- a/dev-util/amdstream/metadata.xml
+++ b/dev-util/amdstream/metadata.xml
@@ -5,4 +5,6 @@
 		<email>xarthisius@gentoo.org</email>
 		<name>Kacper Kowalik</name>
 	</maintainer>
+	<herd>sci</herd>
+	<herd>x11</herd>
 </pkgmetadata>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-20 16:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20 13:53 [gentoo-commits] dev/xarthisius:master commit in: dev-util/amdstream/files/, dev-util/amdstream/ Kacper Kowalik
  -- strict thread matches above, loose matches on Subject: below --
2011-12-20 16:40 Kacper Kowalik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox