public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: dev-util/libcuda/files/, dev-util/libcuda/
@ 2012-11-15  5:06 Alexey Shvetsov
  0 siblings, 0 replies; only message in thread
From: Alexey Shvetsov @ 2012-11-15  5:06 UTC (permalink / raw
  To: gentoo-commits

commit:     3e1d5246db202a13cb8015944691d39d61f886c3
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 15 05:06:12 2012 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Nov 15 05:06:12 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=3e1d5246

initial import of libcuda

Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

---
 dev-util/libcuda/ChangeLog                         |   13 +++++
 ...-detection-of-nouveau-in-case-its-builtin.patch |   26 ++++++++++
 ...Fix-install-target-for-gdev-lib-userspace.patch |   36 +++++++++++++
 ...stall-target-for-gdev-lib-userspace-part2.patch |   35 +++++++++++++
 .../0004-Respect-extra-CFLAGS-and-LDFLAGS.patch    |   26 ++++++++++
 .../0005-Fix-install-target-for-cuda-lib.patch     |   47 +++++++++++++++++
 dev-util/libcuda/libcuda-9999.ebuild               |   53 ++++++++++++++++++++
 dev-util/libcuda/metadata.xml                      |    8 +++
 8 files changed, 244 insertions(+), 0 deletions(-)

diff --git a/dev-util/libcuda/ChangeLog b/dev-util/libcuda/ChangeLog
new file mode 100644
index 0000000..031ee7c
--- /dev/null
+++ b/dev-util/libcuda/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for dev-util/libgdev
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*libgdev-9999 (15 Nov 2012)
+
+  15 Nov 2012; Alexey Shvetsov <alexxy@gentoo.org>
+  +files/0001-Fix-detection-of-nouveau-in-case-its-builtin.patch,
+  +files/0002-Fix-install-target-for-gdev-lib-userspace.patch,
+  +files/0003-Fix-install-target-for-gdev-lib-userspace-part2.patch,
+  +files/0004-Respect-extra-CFLAGS-and-LDFLAGS.patch, +libgdev-9999.ebuild,
+  +metadata.xml:
+  Initial import of libgdev

diff --git a/dev-util/libcuda/files/0001-Fix-detection-of-nouveau-in-case-its-builtin.patch b/dev-util/libcuda/files/0001-Fix-detection-of-nouveau-in-case-its-builtin.patch
new file mode 100644
index 0000000..aaafd7d
--- /dev/null
+++ b/dev-util/libcuda/files/0001-Fix-detection-of-nouveau-in-case-its-builtin.patch
@@ -0,0 +1,26 @@
+From 605e69e70ce7b4c505be91696612e98649ec383f Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxy@gentoo.org>
+Date: Thu, 15 Nov 2012 08:29:04 +0400
+Subject: [PATCH 1/5] Fix detection of nouveau in case its builtin
+
+Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
+---
+ common/autogen.sh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/common/autogen.sh b/common/autogen.sh
+index 469d3d8..1dca70f 100644
+--- a/common/autogen.sh
++++ b/common/autogen.sh
+@@ -4,6 +4,8 @@ if [ ! $(lsmod | grep nvidia | wc -l) -eq 0 ] ; then
+ 	driver='nvi'
+ elif [ ! $(lsmod | grep nouveau | wc -l) -eq 0 ] ; then
+ 	driver='nouveau'
++elif [ ! $(zgrep NOUVEAU /proc/config.gz | grep y | wc -l) -eq 0 ] ; then
++	driver='nouveau'
+ elif [ ! $(lsmod | grep pscnv | wc -l) -eq 0 ] ; then
+ 	driver='pscnv'
+ else
+-- 
+1.7.12.3
+

diff --git a/dev-util/libcuda/files/0002-Fix-install-target-for-gdev-lib-userspace.patch b/dev-util/libcuda/files/0002-Fix-install-target-for-gdev-lib-userspace.patch
new file mode 100644
index 0000000..797136f
--- /dev/null
+++ b/dev-util/libcuda/files/0002-Fix-install-target-for-gdev-lib-userspace.patch
@@ -0,0 +1,36 @@
+From 870f4cddb0233188ec1613a44eb9feb8c94469da Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxy@gentoo.org>
+Date: Thu, 15 Nov 2012 08:34:55 +0400
+Subject: [PATCH 2/5] Fix install target for gdev lib userspace
+
+Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
+---
+ lib/user/gdev/Makefile | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/user/gdev/Makefile b/lib/user/gdev/Makefile
+index d602fa9..5440469 100644
+--- a/lib/user/gdev/Makefile
++++ b/lib/user/gdev/Makefile
+@@ -22,12 +22,12 @@ all: $(OBJS)
+ 	$(CC) -fPIC -c $^ -o $@ $(CFLAGS) $(EXTRA_LIBS)
+ 
+ install:
+-	@if test ! -d $(GDEVDIR) ; then mkdir $(GDEVDIR) ; fi ;
+-	@if test ! -d $(GDEVDIR)/lib64 ; then mkdir $(GDEVDIR)/lib64 ; fi ;
+-	@if test ! -d $(GDEVDIR)/include ; then mkdir $(GDEVDIR)/include ; fi ;
+-	cp -f ./$(TARGET).so.1.0.0 $(GDEVDIR)/lib64/
+-	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1.0.0 $(GDEVDIR)/lib64/$(TARGET).so.1
+-	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1 $(GDEVDIR)/lib64/$(TARGET).so
++	@if test ! -d $(GDEVDIR) ; then mkdir $(DESTDIR)/$(GDEVDIR) ; fi ;
++	@if test ! -d $(GDEVDIR)/lib64 ; then mkdir $(DESTDIR)/$(GDEVDIR)/lib64 ; fi ;
++	@if test ! -d $(GDEVDIR)/include ; then mkdir $(DESTDIR)/$(GDEVDIR)/include ; fi ;
++	cp -f ./$(TARGET).so.1.0.0 $(DESTDIR)/$(GDEVDIR)/lib64/
++	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1.0.0 $(DESTDIR)/$(GDEVDIR)/lib64/$(TARGET).so.1
++	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1 $(DESTDIR)/$(GDEVDIR)/lib64/$(TARGET).so
+ 	cp -f $(HEADERS) $(GDEVDIR)/include
+ 
+ uninstall:
+-- 
+1.7.12.3
+

diff --git a/dev-util/libcuda/files/0003-Fix-install-target-for-gdev-lib-userspace-part2.patch b/dev-util/libcuda/files/0003-Fix-install-target-for-gdev-lib-userspace-part2.patch
new file mode 100644
index 0000000..159ebd7
--- /dev/null
+++ b/dev-util/libcuda/files/0003-Fix-install-target-for-gdev-lib-userspace-part2.patch
@@ -0,0 +1,35 @@
+From d99538f4e1f313c385a40ccff6aa3adff62ec55e Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxy@gentoo.org>
+Date: Thu, 15 Nov 2012 08:41:13 +0400
+Subject: [PATCH 3/5] Fix install target for gdev lib userspace part2
+
+Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
+---
+ lib/user/gdev/Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lib/user/gdev/Makefile b/lib/user/gdev/Makefile
+index 5440469..31bee51 100644
+--- a/lib/user/gdev/Makefile
++++ b/lib/user/gdev/Makefile
+@@ -22,13 +22,13 @@ all: $(OBJS)
+ 	$(CC) -fPIC -c $^ -o $@ $(CFLAGS) $(EXTRA_LIBS)
+ 
+ install:
+-	@if test ! -d $(GDEVDIR) ; then mkdir $(DESTDIR)/$(GDEVDIR) ; fi ;
+-	@if test ! -d $(GDEVDIR)/lib64 ; then mkdir $(DESTDIR)/$(GDEVDIR)/lib64 ; fi ;
+-	@if test ! -d $(GDEVDIR)/include ; then mkdir $(DESTDIR)/$(GDEVDIR)/include ; fi ;
++	@if test ! -d $(DESTDIR)/$(GDEVDIR) ; then mkdir $(DESTDIR)/$(GDEVDIR) ; fi ;
++	@if test ! -d $(DESTDIR)/$(GDEVDIR)/lib64 ; then mkdir $(DESTDIR)/$(GDEVDIR)/lib64 ; fi ;
++	@if test ! -d $(DESTDIR)/$(GDEVDIR)/include ; then mkdir $(DESTDIR)/$(GDEVDIR)/include ; fi ;
+ 	cp -f ./$(TARGET).so.1.0.0 $(DESTDIR)/$(GDEVDIR)/lib64/
+ 	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1.0.0 $(DESTDIR)/$(GDEVDIR)/lib64/$(TARGET).so.1
+ 	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1 $(DESTDIR)/$(GDEVDIR)/lib64/$(TARGET).so
+-	cp -f $(HEADERS) $(GDEVDIR)/include
++	cp -f $(HEADERS) $(DESTDIR)/$(GDEVDIR)/include
+ 
+ uninstall:
+ 	rm -f $(GDEVDIR)/lib64/$(TARGET).*
+-- 
+1.7.12.3
+

diff --git a/dev-util/libcuda/files/0004-Respect-extra-CFLAGS-and-LDFLAGS.patch b/dev-util/libcuda/files/0004-Respect-extra-CFLAGS-and-LDFLAGS.patch
new file mode 100644
index 0000000..199da0b
--- /dev/null
+++ b/dev-util/libcuda/files/0004-Respect-extra-CFLAGS-and-LDFLAGS.patch
@@ -0,0 +1,26 @@
+From 4f97a0ec262d190741f16d5d75c9305ee6a4318b Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxy@gentoo.org>
+Date: Thu, 15 Nov 2012 08:43:59 +0400
+Subject: [PATCH 4/5] Respect extra CFLAGS and LDFLAGS
+
+Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
+---
+ lib/user/gdev/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/user/gdev/Makefile b/lib/user/gdev/Makefile
+index 31bee51..d9c2200 100644
+--- a/lib/user/gdev/Makefile
++++ b/lib/user/gdev/Makefile
+@@ -16,7 +16,7 @@ OBJS = 	$(DRIVER_NAME)_gdev.o lib$(DRIVER_NAME).o lib$(DRIVER_NAME)_ib.o \
+ ZOMBIE  = $(wildcard ./*~)
+ 
+ all: $(OBJS)
+-	$(CC) -shared -Wl,-soname,$(TARGET).so.1 -o ./$(TARGET).so.1.0.0 $(OBJS) $(EXTRA_LIBS)
++	$(CC) $(LDFLAGS) -shared -Wl,-soname,$(TARGET).so.1 -o ./$(TARGET).so.1.0.0 $(OBJS) $(EXTRA_LIBS)
+ 
+ %.o:%.c
+ 	$(CC) -fPIC -c $^ -o $@ $(CFLAGS) $(EXTRA_LIBS)
+-- 
+1.7.12.3
+

diff --git a/dev-util/libcuda/files/0005-Fix-install-target-for-cuda-lib.patch b/dev-util/libcuda/files/0005-Fix-install-target-for-cuda-lib.patch
new file mode 100644
index 0000000..783f3c7
--- /dev/null
+++ b/dev-util/libcuda/files/0005-Fix-install-target-for-cuda-lib.patch
@@ -0,0 +1,47 @@
+From 720760c6a69cd3d8a3d7682327dbb234a5a473f5 Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxy@gentoo.org>
+Date: Thu, 15 Nov 2012 09:00:25 +0400
+Subject: [PATCH 5/5] Fix install target for cuda lib
+
+Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
+---
+ cuda/libcuda/Makefile | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/cuda/libcuda/Makefile b/cuda/libcuda/Makefile
+index 1a296bb..cdfd360 100644
+--- a/cuda/libcuda/Makefile
++++ b/cuda/libcuda/Makefile
+@@ -12,19 +12,21 @@ CUDUMP_OBJS = cudump.o gdev_cuda.o
+ ZOMBIE  = $(wildcard ./*~)
+ 
+ all: $(OBJS)
+-	$(CC) -shared -Wl,-soname,$(TARGET).so.1 -o ./$(TARGET).so.1.0.0 $(OBJS) 
+-	$(CC) $(CFLAGS) -o ./$(CUDUMP) $(CUDUMP).c gdev_cuda.c
++	$(CC) $(LDFLAGS)  -shared -Wl,-soname,$(TARGET).so.1 -o ./$(TARGET).so.1.0.0 $(OBJS) 
++	$(CC) $(LDFLAGS) $(CFLAGS) -o ./$(CUDUMP) $(CUDUMP).c gdev_cuda.c
+ 
+ %.o:%.c
+ 	$(CC) -fPIC -c $^ -o $@ $(CFLAGS)
+ 
+ install:
+-	@if test ! -d $(GDEVDIR)/bin ; then mkdir $(GDEVDIR)/bin ; fi ;
+-	cp -f ./$(CUDUMP) $(GDEVDIR)/bin/
+-	cp -f ./$(TARGET).so.1.0.0 $(GDEVDIR)/lib64/
+-	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1.0.0 $(GDEVDIR)/lib64/$(TARGET).so.1
+-	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1 $(GDEVDIR)/lib64/$(TARGET).so
+-	cp -f ./cuda.h $(GDEVDIR)/include
++	@if test ! -d $(DESTDIR)/$(GDEVDIR)/bin ; then mkdir -p $(DESTDIR)/$(GDEVDIR)/bin ; fi ;
++	@if test ! -d $(DESTDIR)/$(GDEVDIR)/lib64 ; then mkdir -p $(DESTDIR)/$(GDEVDIR)/lib64 ; fi ;
++	@if test ! -d $(DESTDIR)/$(GDEVDIR)/include ; then mkdir -p $(DESTDIR)/$(GDEVDIR)/include ; fi ;
++	cp -f ./$(CUDUMP) $(DESTDIR)/$(GDEVDIR)/bin/
++	cp -f ./$(TARGET).so.1.0.0 $(DESTDIR)/$(GDEVDIR)/lib64/
++	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1.0.0 $(DESTDIR)/$(GDEVDIR)/lib64/$(TARGET).so.1
++	ln -sf $(GDEVDIR)/lib64/$(TARGET).so.1 $(DESTDIR)/$(GDEVDIR)/lib64/$(TARGET).so
++	cp -f ./cuda.h $(DESTDIR)/$(GDEVDIR)/include
+ 
+ uninstall:
+ 	rm -f $(GDEVDIR)/lib64/$(TARGET).*
+-- 
+1.7.12.3
+

diff --git a/dev-util/libcuda/libcuda-9999.ebuild b/dev-util/libcuda/libcuda-9999.ebuild
new file mode 100644
index 0000000..cab4762
--- /dev/null
+++ b/dev-util/libcuda/libcuda-9999.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+EGIT_PROJECT="gdev"
+
+inherit base git-2
+
+DESCRIPTION="Gdev is open-source GPGPU runtime"
+HOMEPAGE="https://github.com/shinpei0208/gdev"
+SRC_URI=""
+EGIT_REPO_URI="
+	git://github.com/shinpei0208/gdev.git
+	https://github.com/shinpei0208/gdev.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="
+	dev-libs/libgdev
+	x11-libs/libdrm[video_cards_nouveau]
+	x11-misc/envytools"
+DEPEND="
+	virtual/pkgconfig
+	${RDEPEND}"
+
+PATCHES=(	"${FILESDIR}/0001-Fix-detection-of-nouveau-in-case-its-builtin.patch"
+			"${FILESDIR}/0002-Fix-install-target-for-gdev-lib-userspace.patch"
+			"${FILESDIR}/0003-Fix-install-target-for-gdev-lib-userspace-part2.patch"
+			"${FILESDIR}/0004-Respect-extra-CFLAGS-and-LDFLAGS.patch"
+			"${FILESDIR}/0005-Fix-install-target-for-cuda-lib.patch"
+		)
+
+src_configure() {
+	cd cuda
+	mkdir build
+	cd build
+	../configure
+}
+
+src_compile() {
+	cd cuda/build
+	emake GDEVDIR="${EPREFIX}/usr"
+}
+
+src_install() {
+	cd cuda/build
+	emake GDEVDIR="${EPREFIX}/usr" DESTDIR="${D}" install
+}

diff --git a/dev-util/libcuda/metadata.xml b/dev-util/libcuda/metadata.xml
new file mode 100644
index 0000000..247f458
--- /dev/null
+++ b/dev-util/libcuda/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>alexxy@gentoo.org</email>
+		<name>Alexey Shvetsov</name>
+	</maintainer>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-15  5:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15  5:06 [gentoo-commits] proj/sci:master commit in: dev-util/libcuda/files/, dev-util/libcuda/ Alexey Shvetsov

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