public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-libs/gotoblas2/, sci-libs/gotoblas2/files/
@ 2011-08-22 19:26 Sebastien Fabbro
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastien Fabbro @ 2011-08-22 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     f5ac2fab092a5a51cd74ca703b21db339dde2b17
Author:     Sébastien Fabbro <sebfabbro <AT> gmail <DOT> com>
AuthorDate: Mon Aug 22 18:46:31 2011 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Mon Aug 22 18:46:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=f5ac2fab

added gotoblas2

---
 sci-libs/gotoblas2/ChangeLog                       |   35 ++++++
 .../gotoblas2/files/gotoblas2-1.13-aliasing.patch  |   11 ++
 .../gotoblas2/files/gotoblas2-1.13-dynamic.patch   |   17 +++
 .../gotoblas2/files/gotoblas2-1.13-fcheck.patch    |   10 ++
 .../files/gotoblas2-1.13-sharedlibs.patch          |   45 ++++++++
 sci-libs/gotoblas2/gotoblas2-1.13.ebuild           |  114 ++++++++++++++++++++
 sci-libs/gotoblas2/metadata.xml                    |   19 ++++
 7 files changed, 251 insertions(+), 0 deletions(-)

diff --git a/sci-libs/gotoblas2/ChangeLog b/sci-libs/gotoblas2/ChangeLog
new file mode 100644
index 0000000..260bb6b
--- /dev/null
+++ b/sci-libs/gotoblas2/ChangeLog
@@ -0,0 +1,35 @@
+# ChangeLog for sci-libs/gotoblas2
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+  22 Aug 2011; Sébastien Fabbro <bicatali@gentoo.org> +gotoblas2-1.13.ebuild,
+  +files/gotoblas2-1.13-aliasing.patch, +files/gotoblas2-1.13-dynamic.patch,
+  +files/gotoblas2-1.13-fcheck.patch, +files/gotoblas2-1.13-sharedlibs.patch,
+  +metadata.xml:
+  Imported from bicatali overlay
+
+  17 Aug 2011; Sébastien Fabbro <bicatali@gentoo.org> gotoblas2-1.13.ebuild:
+  Fixed include directive in pkgconfig file
+
+  31 May 2011; Sébastien Fabbro <bicatali@gentoo.org> gotoblas2-1.13.ebuild:
+  Fixed shared libs. Make ebuild easier to debug with a generated rule
+  Makefile instead of dynamic. Switched to EAPI4.
+
+  23 Feb 2011; Sébastien Fabbro <bicatali@gentoo.org> gotoblas2-1.13.ebuild,
+  files/gotoblas2-1.13-sharedlibs.patch:
+  fixed ldflags propagation
+
+  23 Feb 2011; Sébastien Fabbro <bicatali@gentoo.org> gotoblas2-1.13.ebuild:
+  Switched to alternatives-2 framework
+
+  22 Nov 2010; Sébastien Fabbro <bicatali@gentoo.org> gotoblas2-1.13.ebuild,
+  metadata.xml:
+  Renamed cblas use flag to gotocblas (reserve cblas for external cblas)
+
+*gotoblas2-1.13 (12 Nov 2010)
+
+  12 Nov 2010; Sébastien Fabbro <bicatali@gentoo.org>
+  +gotoblas2-1.13.ebuild, +files/gotoblas2-1.13-dynamic.patch,
+  +files/gotoblas2-1.13-sharedlibs.patch, +metadata.xml:
+  Initial import
+

diff --git a/sci-libs/gotoblas2/files/gotoblas2-1.13-aliasing.patch b/sci-libs/gotoblas2/files/gotoblas2-1.13-aliasing.patch
new file mode 100644
index 0000000..874de70
--- /dev/null
+++ b/sci-libs/gotoblas2/files/gotoblas2-1.13-aliasing.patch
@@ -0,0 +1,11 @@
+--- driver/others/init.c.orig	2011-05-31 23:23:24.000000000 +0100
++++ driver/others/init.c	2011-05-31 23:23:49.000000000 +0100
+@@ -215,7 +215,7 @@
+   for (node = 0; node < MAX_NODES; node ++) common -> node_info[node] = 0;
+ 
+   while ((dir = readdir(dp)) != NULL) {
+-    if (*(unsigned int *) dir -> d_name == 0x065646f6eU) {
++    if (*(char *) dir -> d_name == 0x065646f6eU) {
+ 
+       node = atoi(&dir -> d_name[4]);
+ 

diff --git a/sci-libs/gotoblas2/files/gotoblas2-1.13-dynamic.patch b/sci-libs/gotoblas2/files/gotoblas2-1.13-dynamic.patch
new file mode 100644
index 0000000..71021e4
--- /dev/null
+++ b/sci-libs/gotoblas2/files/gotoblas2-1.13-dynamic.patch
@@ -0,0 +1,17 @@
+Authors:  Elias Pipping <pipping@exherbo.org>
+Upstream: no
+Synopsis: Fix compilation under KATMAI and PRESCOTT architecture.
+--- old/driver/others/dynamic.c 2010-01-20 17:28:45.000000000 +0100
++++ new/driver/others/dynamic.c 2010-05-28 16:04:10.190975461 +0200
+@@ -181,9 +181,9 @@
+   gotoblas = get_coretype();
+   
+ #ifdef ARCH_X86
+-  if (gotoblas == NULL) gotoblas = gotoblas_KATMAI;
++  if (gotoblas == NULL) gotoblas = &gotoblas_KATMAI;
+ #else
+-  if (gotoblas == NULL) gotoblas = gotoblas_PRESCOTT;
++  if (gotoblas == NULL) gotoblas = &gotoblas_PRESCOTT;
+ #endif
+   
+   if (gotoblas && gotoblas -> init) {

diff --git a/sci-libs/gotoblas2/files/gotoblas2-1.13-fcheck.patch b/sci-libs/gotoblas2/files/gotoblas2-1.13-fcheck.patch
new file mode 100644
index 0000000..809a1ed
--- /dev/null
+++ b/sci-libs/gotoblas2/files/gotoblas2-1.13-fcheck.patch
@@ -0,0 +1,10 @@
+--- f_check.orig	2011-05-31 23:12:41.508268623 +0100
++++ f_check	2011-05-31 23:12:50.208268398 +0100
+@@ -274,6 +274,7 @@
+ 	    && ($flags !~ /kernel32/)
+ 	    && ($flags !~ /advapi32/)
+ 	    && ($flags !~ /shell32/)
++	    && ($flags !~ /^\-l$/)
+ 	    ) {
+ 	    $linker_l .= $flags . " ";
+ 	}

diff --git a/sci-libs/gotoblas2/files/gotoblas2-1.13-sharedlibs.patch b/sci-libs/gotoblas2/files/gotoblas2-1.13-sharedlibs.patch
new file mode 100644
index 0000000..3ebe307
--- /dev/null
+++ b/sci-libs/gotoblas2/files/gotoblas2-1.13-sharedlibs.patch
@@ -0,0 +1,45 @@
+--- exports/Makefile.orig	2010-11-12 05:30:06.000000000 +0000
++++ exports/Makefile	2010-11-12 06:33:41.000000000 +0000
+@@ -97,10 +97,10 @@
+ so : ../$(LIBSONAME)
+ 
+ ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
+-	$(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
+-	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
+-	-Wl,--retain-symbols-file=linux.def $(EXTRALIB)
+-	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
++	$(CC) $(LDFLAGS) -shared  \
++	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive -Wl,--soname=$(LIBSONAME) \
++	-Wl,--retain-symbols-file=linux.def $(EXTRALIB) -o ../$(LIBSONAME)
++	$(CC) $(CFLAGS) -w linktest.c ../$(LIBSONAME) $(FEXTRALIB) -o linktest && echo OK.
+ 	rm -f linktest
+ 
+ endif
+@@ -110,10 +110,10 @@
+ so : ../$(LIBSONAME)
+ 
+ ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
+-	$(CC) $(CFLAGS)  -shared -o ../$(LIBSONAME) \
+-	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
+-	-Wl,--retain-symbols-file=linux.def $(EXTRALIB)
+-	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
++	$(CC) $(LDFLAGS)  -shared \
++	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive -Wl,--soname=$(LIBSONAME) \
++	-Wl,--retain-symbols-file=linux.def $(EXTRALIB) -o ../$(LIBSONAME)
++	$(CC) $(CFLAGS) -w linktest.c ../$(LIBSONAME) $(FEXTRALIB) -o linktest && echo OK.
+ 	rm -f linktest
+ 
+ endif
+@@ -129,9 +129,9 @@
+ ifeq ($(OSNAME), SunOS)
+ 
+ so : ../$(LIBSONAME)
+-	$(CC) $(CFLAGS)  -shared -o ../$(LIBSONAME) \
+-	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB)
+-	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
++	$(CC) $(LDFLAGS) -shared -Wl,--soname=$(LIBSONAME) \
++	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB) -o ../$(LIBSONAME) 
++	$(CC) $(CFLAGS) -w  linktest.c ../$(LIBSONAME) $(FEXTRALIB) -o linktest && echo OK.
+ 	rm -f linktest
+ 
+ endif

diff --git a/sci-libs/gotoblas2/gotoblas2-1.13.ebuild b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
new file mode 100644
index 0000000..b900536
--- /dev/null
+++ b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils toolchain-funcs alternatives-2
+
+MYPN="GotoBLAS2"
+MYP="${MYPN}-${PV}_bsd"
+
+DESCRIPTION="Fast implementations of the Basic Linear Algebra Subroutines"
+HOMEPAGE="http://www.tacc.utexas.edu/tacc-projects/gotoblas2/"
+# change to gentoo mirror when in
+SRC_URI="http://dev.gentoo.org/~bicatali/${MYP}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="+incblas int64 dynamic openmp static-libs threads"
+
+RDEPEND="virtual/fortran"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MYPN}"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P}-{dynamic,sharedlibs,fcheck,aliasing}.patch
+	# respect LDFLAGS
+	sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
+	if ! use dynamic; then
+		sed -i \
+			-e "/^COMMON_OPT/s/-O2/${CFLAGS}/" \
+			Makefile.rule || die
+	fi
+	# fix executable stacks
+	local i
+	for i in $(find . -name \*.S); do
+		cat >> ${i} <<-EOF
+			#if defined(__ELF__)
+			.section .note.GNU-stack,"",%progbits
+			#endif
+		EOF
+	done
+}
+
+src_configure() {
+	local use_openmp=$(use openmp && echo 1)
+	use threads && use openmp && use_openmp="" && \
+		einfo "openmp and threads enabled: using threads"
+	sed -i \
+		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
+		-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \
+		-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \
+		-e "s:^#\s*\(USE_THREAD\)\s*=.*:\1=$(use threads && echo 1 || echo 0):" \
+		-e "s:^#\s*\(USE_OPENMP\)\s*=.*:\1=${use_openmp}:" \
+		-e "s:^#\s*\(DYNAMIC_ARCH\)\s*=.*:\1=$(use dynamic && echo 1):" \
+		-e "s:^#\s*\(INTERFACE64\)\s*=.*:\1=$(use int64 && echo 1):" \
+		-e "s:^#\s*\(NO_CBLAS\)\s*=.*:\1=$(use incblas || echo 1):" \
+		Makefile.rule || die
+}
+
+src_compile() {
+	mkdir solibs
+	emake libs shared && mv *.so solibs/
+	use static-libs && emake clean && emake libs NEED_PIC=
+}
+
+src_test() {
+	emake tests
+}
+
+src_install() {
+	local profname=${PN} threads
+	use int64 && profname=${profname}-int64
+	if use threads; then
+		threads="-pthread"
+		profname=${profname}-threads
+	elif use openmp; then
+		profname=${profname}-openmp
+	fi
+
+	dolib.so solibs/lib*.so
+	use static-libs && dolib.a lib*.a
+
+	# create pkg-config file and associated eselect file
+	cat <<-EOF > ${profname}.pc
+		prefix=${EPREFIX}/usr
+		libdir=\${prefix}/$(get_libdir)
+		includedir=\${prefix}/include
+		Name: ${MYPN}
+		Description: ${DESCRIPTION}
+		Version: ${PV}
+		URL: ${HOMEPAGE}
+		Libs: -L\${libdir} -lgoto2 -lm ${threads}
+	EOF
+
+	alternatives_for blas ${profname} 0 \
+		"/usr/$(get_libdir)/pkgconfig/blas.pc" "${profname}.pc"
+
+	if use incblas; then
+		insinto /usr/include/${PN}
+		doins cblas.h
+		echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}"
+		alternatives_for cblas ${profname} 0 \
+			"/usr/$(get_libdir)/pkgconfig/cblas.pc" "${profname}.pc" \
+			"/usr/include/cblas.h" "${PN}/cblas.h"
+	fi
+
+	insinto /usr/$(get_libdir)/pkgconfig
+	doins ${profname}.pc
+	dodoc 01Readme.txt 03FAQ.txt 05LargePage 06WeirdPerformance
+}

diff --git a/sci-libs/gotoblas2/metadata.xml b/sci-libs/gotoblas2/metadata.xml
new file mode 100644
index 0000000..7ec44c0
--- /dev/null
+++ b/sci-libs/gotoblas2/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang="en">
+  The GotoBLAS codes are one of the fastest implementations
+  of the Basic Linear Algebra Subroutines(BLAS).
+  To achieve performance it starts by observing that for current
+  generation architectures, much of the overhead comes from Translation
+  Look-aside Buffer (TLB) table misses. While the importance of caches
+  is also taken into consideration, it is the minimization of such TLB
+  misses that drives the approach.
+</longdescription>
+<use>
+  <flag name='int64'>Build the 64 bits integer library</flag>
+  <flag name='incblas'>Build the CBLAS interface</flag>
+  <flag name='dynamic'>Build dynamic architecture detection at run time (for multi targets)</flag>
+</use>
+</pkgmetadata>



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

* [gentoo-commits] proj/sci:master commit in: sci-libs/gotoblas2/, sci-libs/gotoblas2/files/
@ 2012-03-15 22:48 Francois Bissey
  0 siblings, 0 replies; 2+ messages in thread
From: Francois Bissey @ 2012-03-15 22:48 UTC (permalink / raw
  To: gentoo-commits

commit:     5cebec01b9ec789f012c36f5f9bfcafd9481f7ab
Author:     François Bissey <francois.bissey <AT> canterbury <DOT> ac <DOT> nz>
AuthorDate: Thu Mar 15 22:47:54 2012 +0000
Commit:     Francois Bissey <f.r.bissey <AT> massey <DOT> ac <DOT> nz>
CommitDate: Thu Mar 15 22:47:54 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=5cebec01

Final fixes for OS X in gotoblas2

---
 sci-libs/gotoblas2/ChangeLog                       |    4 ++++
 .../files/gotoblas2-1.13-sharedlibs.patch          |   13 +++++++++++--
 sci-libs/gotoblas2/gotoblas2-1.13.ebuild           |   13 +++----------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/sci-libs/gotoblas2/ChangeLog b/sci-libs/gotoblas2/ChangeLog
index 5f0cdca..77c5817 100644
--- a/sci-libs/gotoblas2/ChangeLog
+++ b/sci-libs/gotoblas2/ChangeLog
@@ -3,6 +3,10 @@
 # $Header: $
 
   15 Mar 2012; François Bissey <francois.bissey@canterbury.ac.nz>
+  gotoblas2-1.13.ebuild, files/gotoblas2-1.13-sharedlibs.patch:
+  More OS X fixes
+
+  15 Mar 2012; François Bissey <francois.bissey@canterbury.ac.nz>
   gotoblas2-1.13.ebuild:
   add *-macos prefix support mirroring openblas
 

diff --git a/sci-libs/gotoblas2/files/gotoblas2-1.13-sharedlibs.patch b/sci-libs/gotoblas2/files/gotoblas2-1.13-sharedlibs.patch
index 3ebe307..862a00c 100644
--- a/sci-libs/gotoblas2/files/gotoblas2-1.13-sharedlibs.patch
+++ b/sci-libs/gotoblas2/files/gotoblas2-1.13-sharedlibs.patch
@@ -1,5 +1,14 @@
---- exports/Makefile.orig	2010-11-12 05:30:06.000000000 +0000
-+++ exports/Makefile	2010-11-12 06:33:41.000000000 +0000
+--- exports/Makefile.orig	2010-02-06 05:01:00.000000000 +1300
++++ exports/Makefile	2012-03-16 11:43:30.028487068 +1300
+@@ -84,7 +84,7 @@
+ 	perl ./gensymbol win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) > $(@F)
+ 
+ $(LIBDYNNAME) : ../$(LIBNAME) osx.def
+-	$(PREFIX)gcc $(CFLAGS) -all_load -dynamiclib -o $(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def  $(FEXTRALIB)
++	$(PREFIX)gcc $(CFLAGS) -all_load -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def  $(FEXTRALIB)
+ 
+ symbol.$(SUFFIX) : symbol.S
+ 	$(CC) $(CFLAGS) -c -o $(@F) $^
 @@ -97,10 +97,10 @@
  so : ../$(LIBSONAME)
  

diff --git a/sci-libs/gotoblas2/gotoblas2-1.13.ebuild b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
index 1ec7d7b..6d1dcb0 100644
--- a/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
+++ b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
@@ -4,7 +4,7 @@
 
 EAPI=4
 
-inherit eutils toolchain-funcs alternatives-2
+inherit eutils toolchain-funcs alternatives-2 multilib
 
 MYPN="GotoBLAS2"
 MYP="${MYPN}-${PV}_bsd"
@@ -25,13 +25,6 @@ DEPEND="${RDEPEND}"
 
 S="${WORKDIR}/${MYPN}"
 
-pkg_setup() {
-	SHLIB=so
-	if [[ ${CHOST} == *-darwin* ]] ; then
-		SHLIB=dylib
-	fi
-}
-
 src_prepare() {
 	epatch "${FILESDIR}"/${P}-{dynamic,sharedlibs,fcheck,aliasing}.patch
 	# respect LDFLAGS
@@ -70,7 +63,7 @@ src_configure() {
 
 src_compile() {
 	mkdir solibs
-	emake libs shared && mv *."${SHLIB}" solibs/
+	emake libs shared && mv *$(get_libname) solibs/
 	use static-libs && emake clean && emake libs NEED_PIC=
 }
 
@@ -88,7 +81,7 @@ src_install() {
 		profname=${profname}-openmp
 	fi
 
-	dolib.so solibs/lib*."${SHLIB}"
+	dolib.so solibs/lib*$(get_libname)
 	use static-libs && dolib.a lib*.a
 
 	# create pkg-config file and associated eselect file



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

end of thread, other threads:[~2012-03-15 22:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 22:48 [gentoo-commits] proj/sci:master commit in: sci-libs/gotoblas2/, sci-libs/gotoblas2/files/ Francois Bissey
  -- strict thread matches above, loose matches on Subject: below --
2011-08-22 19:26 Sebastien Fabbro

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