public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/
@ 2011-08-04  0:30 Andrea Arteaga
  0 siblings, 0 replies; 9+ messages in thread
From: Andrea Arteaga @ 2011-08-04  0:30 UTC (permalink / raw
  To: gentoo-commits

commit:     088ed0d541b43463b41f80c4c596a1b41f9bf5a9
Author:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Thu Aug  4 00:30:05 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Thu Aug  4 00:30:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=088ed0d5

Added versioned openblas. Import from the bicatali overlay.

---
 sci-libs/openblas/ChangeLog                       |   27 +++++
 sci-libs/openblas/files/openblas-aliasing.patch   |   11 ++
 sci-libs/openblas/files/openblas-sharedlibs.patch |   45 ++++++++
 sci-libs/openblas/metadata.xml                    |   14 +++
 sci-libs/openblas/openblas-0.1_alpha2.ebuild      |  116 +++++++++++++++++++++
 sci-libs/openblas/openblas-9999.ebuild            |  110 +++++++++++++++++++
 6 files changed, 323 insertions(+), 0 deletions(-)

diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
new file mode 100644
index 0000000..d04e0a9
--- /dev/null
+++ b/sci-libs/openblas/ChangeLog
@@ -0,0 +1,27 @@
+# ChangeLog for sci-libs/openblas
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*openblas-0.1_alpha2 (03 Aug 2011)
+
+  03 Aug 2011 Andrea Arteaga <andyspiros@gmail.com> openblas-0.1_alpha2.ebuild
+  Import from bicatali overlay. Added alpha version.
+
+  20 Jun 2011; Sébastien Fabbro <bicatali@gentoo.org> openblas-9999.ebuild:
+  Added more include files, thanks François Bissey for his note
+
+  31 May 2011; Sébastien Fabbro <bicatali@gentoo.org> openblas-9999.ebuild,
+  +files/openblas-aliasing.patch:
+  Fixed shared libs. Make ebuild easier to debug with a generated rule Makefile
+  instead of dynamic. Added a aliasing patch. Switched to EAPI4.
+
+  23 Feb 2011; Sébastien Fabbro <bicatali@gentoo.org> openblas-9999.ebuild,
+  files/openblas-sharedlibs.patch:
+  fixed ldflags propagation
+
+*openblas-9999 (23 Feb 2011)
+
+  23 Feb 2011; Sébastien Fabbro <bicatali@gentoo.org> +openblas-9999.ebuild,
+  +files/openblas-sharedlibs.patch, +metadata.xml:
+  Initial import
+

diff --git a/sci-libs/openblas/files/openblas-aliasing.patch b/sci-libs/openblas/files/openblas-aliasing.patch
new file mode 100644
index 0000000..8c59b1c
--- /dev/null
+++ b/sci-libs/openblas/files/openblas-aliasing.patch
@@ -0,0 +1,11 @@
+--- driver/others/init.c.orig	2011-05-31 18:59:24.000000000 +0100
++++ driver/others/init.c	2011-05-31 20:18:51.000000000 +0100
+@@ -261,7 +261,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/openblas/files/openblas-sharedlibs.patch b/sci-libs/openblas/files/openblas-sharedlibs.patch
new file mode 100644
index 0000000..3ebe307
--- /dev/null
+++ b/sci-libs/openblas/files/openblas-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/openblas/metadata.xml b/sci-libs/openblas/metadata.xml
new file mode 100644
index 0000000..fd35350
--- /dev/null
+++ b/sci-libs/openblas/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang="en">
+  OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD
+  version. See <pkg>sci-libs/gotoblas2</pkg> for more on GotoBLAS2.
+</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>

diff --git a/sci-libs/openblas/openblas-0.1_alpha2.ebuild b/sci-libs/openblas/openblas-0.1_alpha2.ebuild
new file mode 100644
index 0000000..ef417e6
--- /dev/null
+++ b/sci-libs/openblas/openblas-0.1_alpha2.ebuild
@@ -0,0 +1,116 @@
+# 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 git-2
+
+DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
+HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
+EGIT_REPO_URI="git://github.com/xianyi/OpenBLAS.git"
+EGIT_COMMIT="v0.1alpha2.2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="+incblas int64 dynamic openmp static-libs threads"
+
+RDEPEND="virtual/fortran"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MYPN}"
+
+pkg_setup() {
+	ewarn "If the compilation fails, try setting the TARGET environment variable"
+	ewarn "to your CPU's codename and run emerge again."
+}
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-{sharedlibs,aliasing}.patch
+	# respect LDFLAGS
+	sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
+	# respect CFLAGS only if dynamic flag not enabled
+	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: ${PN}
+		Description: ${DESCRIPTION}
+		Version: ${PV}
+		URL: ${HOMEPAGE}
+		Libs: -L\${libdir} -lopenblas -lm ${threads}
+	EOF
+	insinto /usr/$(get_libdir)/pkgconfig
+	doins ${profname}.pc
+
+	alternatives_for blas ${profname} 0 \
+		"/usr/$(get_libdir)/pkgconfig/blas.pc" "${profname}.pc"
+
+	if use incblas; then
+		insinto /usr/include/${PN}
+		doins cblas.h common*.h config.h param.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
+	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
+}

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
new file mode 100644
index 0000000..143c24e
--- /dev/null
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -0,0 +1,110 @@
+# 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 git-2
+
+DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
+HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
+EGIT_REPO_URI="git://github.com/xianyi/OpenBLAS.git"
+
+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}"/${PN}-{sharedlibs,aliasing}.patch
+	# respect LDFLAGS
+	sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
+	# respect CFLAGS only if dynamic flag not enabled
+	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: ${PN}
+		Description: ${DESCRIPTION}
+		Version: ${PV}
+		URL: ${HOMEPAGE}
+		Libs: -L\${libdir} -lopenblas -lm ${threads}
+	EOF
+	insinto /usr/$(get_libdir)/pkgconfig
+	doins ${profname}.pc
+
+	alternatives_for blas ${profname} 0 \
+		"/usr/$(get_libdir)/pkgconfig/blas.pc" "${profname}.pc"
+
+	if use incblas; then
+		insinto /usr/include/${PN}
+		doins cblas.h common*.h config.h param.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
+	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
+}



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

* [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/
@ 2012-03-23 20:23 Andrea Arteaga
  0 siblings, 0 replies; 9+ messages in thread
From: Andrea Arteaga @ 2012-03-23 20:23 UTC (permalink / raw
  To: gentoo-commits

commit:     8df1a9ed5ce544bb360a6b29d9afe40cf2af21cb
Author:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Fri Mar 23 20:21:02 2012 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Fri Mar 23 20:21:02 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=8df1a9ed

[sci-libs/openblas] First stable version.

---
 .../openblas/files/openblas-sharedlibs-0.1.patch   |   45 +++++++
 sci-libs/openblas/openblas-0.1.ebuild              |  125 ++++++++++++++++++++
 2 files changed, 170 insertions(+), 0 deletions(-)

diff --git a/sci-libs/openblas/files/openblas-sharedlibs-0.1.patch b/sci-libs/openblas/files/openblas-sharedlibs-0.1.patch
new file mode 100644
index 0000000..c2e6580
--- /dev/null
+++ b/sci-libs/openblas/files/openblas-sharedlibs-0.1.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 -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(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/openblas/openblas-0.1.ebuild b/sci-libs/openblas/openblas-0.1.ebuild
new file mode 100644
index 0000000..d705f85
--- /dev/null
+++ b/sci-libs/openblas/openblas-0.1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils toolchain-funcs alternatives-2 multilib
+
+DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
+HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
+SRC_URI="http://soc.dev.gentoo.org/~spiros/repository/${P}.tbz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-macos ~ppc-macos ~x64-macos"
+
+IUSE="+incblas int64 dynamic openmp static-libs threads"
+
+RDEPEND="virtual/fortran"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}"
+
+pkg_setup() {
+	ewarn "If the compilation fails, try setting the TARGET environment variable"
+	ewarn "to your CPU's codename and run emerge again."
+}
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-{sharedlibs,aliasing}.patch
+	# respect LDFLAGS
+	sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
+	# respect CFLAGS only if dynamic flag not enabled
+	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 *$(get_libname) 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*$(get_libname)
+	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: ${PN}
+		Description: ${DESCRIPTION}
+		Version: ${PV}
+		URL: ${HOMEPAGE}
+		Libs: -L\${libdir} -lopenblas -lm ${threads}
+	EOF
+
+	alternatives_for blas ${profname} 0 \
+		"/usr/$(get_libdir)/pkgconfig/blas.pc" "${profname}.pc"
+
+	if use incblas; then
+		echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}"
+		insinto /usr/include/${PN}
+		doins cblas.h common*.h config.h param.h
+		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 GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
+
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		cd "${ED}"/usr/$(get_libdir)
+		for d in *.dylib ; do
+			ebegin "correcting install_name of ${d}"
+			install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
+			eend $?
+		done
+	fi
+}



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

* [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/
@ 2012-06-26 22:27 Sebastien Fabbro
  0 siblings, 0 replies; 9+ messages in thread
From: Sebastien Fabbro @ 2012-06-26 22:27 UTC (permalink / raw
  To: gentoo-commits

commit:     1bcc83882d8d1066410cc42f1609e06eeb51a239
Author:     Sebastien Fabbro <sfabbro <AT> uvic <DOT> ca>
AuthorDate: Tue Jun 26 17:55:21 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Tue Jun 26 17:55:21 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=1bcc8388

sci-libs/openblas: version bump

---
 sci-libs/openblas/ChangeLog                        |    7 +++
 .../openblas/files/openblas-sharedlibs-0.2.patch   |   45 ++++++++++++++++++++
 sci-libs/openblas/files/openblas-sharedlibs.patch  |   45 --------------------
 .../{openblas-0.1.ebuild => openblas-0.2.0.ebuild} |   17 +++++---
 sci-libs/openblas/openblas-9999.ebuild             |    2 +-
 5 files changed, 64 insertions(+), 52 deletions(-)

diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
index 0cb3791..ca933f9 100644
--- a/sci-libs/openblas/ChangeLog
+++ b/sci-libs/openblas/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*openblas-0.2.0 (26 Jun 2012)
+
+  26 Jun 2012; Sebastien Fabbro <fabbros@gentoo.org> -openblas-0.1.ebuild,
+  +openblas-0.2.0.ebuild, +files/openblas-sharedlibs-0.2.patch,
+  openblas-9999.ebuild, -files/openblas-sharedlibs.patch:
+  Version bump. Adapted patch. More prefix keywords
+
   07 May 2012; Andrea Arteaga <andyspiros@gmail.com>
   -openblas-0.1_alpha2.ebuild -openblas-0.1_alpha25.ebuild:
   Cleaned up old versions.

diff --git a/sci-libs/openblas/files/openblas-sharedlibs-0.2.patch b/sci-libs/openblas/files/openblas-sharedlibs-0.2.patch
new file mode 100644
index 0000000..fd59785
--- /dev/null
+++ b/sci-libs/openblas/files/openblas-sharedlibs-0.2.patch
@@ -0,0 +1,45 @@
+--- exports/Makefile.orig	2012-06-26 10:24:20.154182394 -0700
++++ exports/Makefile	2012-06-26 10:28:59.894394334 -0700
+@@ -106,9 +106,9 @@
+ so : ../$(LIBSONAME)
+ 
+ ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
+-	$(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
++	$(CC) $(LDFLAGS) -shared \
+ 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
+-	-Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB)
++	-Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB) -o ../$(LIBSONAME)
+ 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
+ 	rm -f linktest
+ 
+@@ -119,9 +119,9 @@
+ so : ../$(LIBSONAME)
+ 
+ ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
+-	$(CC) $(CFLAGS)  -shared -o ../$(LIBSONAME) \
++	$(CC) $(LDFLAGS)  -shared \
+ 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
+-	-Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB)
++	-Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB) -o ../$(LIBSONAME)
+ 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
+ 	rm -f linktest
+ 
+@@ -132,14 +132,15 @@
+ so : ../$(LIBSONAME)
+ 
+ ../$(LIBSONAME) :
+-	$(CC) -shared -o ../$(LIBSONAME) ../$(LIBNAME)
++	$(CC) -shared ../$(LIBNAME) -o ../$(LIBSONAME)
+ endif
+ 
+ ifeq ($(OSNAME), SunOS)
+ 
+ so : ../$(LIBSONAME)
+-	$(CC) $(CFLAGS)  -shared -o ../$(LIBSONAME) \
+-	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB)
++	$(CC) $(LDFLAGS)  -shared  \
++	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB) \
++	-o ../$(LIBSONAME)
+ 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
+ 	rm -f linktest
+ 

diff --git a/sci-libs/openblas/files/openblas-sharedlibs.patch b/sci-libs/openblas/files/openblas-sharedlibs.patch
deleted file mode 100644
index 3ebe307..0000000
--- a/sci-libs/openblas/files/openblas-sharedlibs.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- 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/openblas/openblas-0.1.ebuild b/sci-libs/openblas/openblas-0.2.0.ebuild
similarity index 86%
rename from sci-libs/openblas/openblas-0.1.ebuild
rename to sci-libs/openblas/openblas-0.2.0.ebuild
index 09b6092..70a1ca0 100644
--- a/sci-libs/openblas/openblas-0.1.ebuild
+++ b/sci-libs/openblas/openblas-0.2.0.ebuild
@@ -6,23 +6,26 @@ EAPI=4
 
 inherit eutils toolchain-funcs alternatives-2 multilib
 
+# commit ID
+CID="23a7062"
+
 DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
 HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="http://soc.dev.gentoo.org/~spiros/repository/${P}.tbz2"
+SRC_URI="http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="~amd64 ~x86 ~x86-macos ~ppc-macos ~x64-macos"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
 
-IUSE="+incblas int64 dynamic openmp static-libs threads"
+IUSE="+incblas int64 dynamic openmp static-libs test threads"
 
 RDEPEND="virtual/fortran"
 DEPEND="${RDEPEND}"
 
-S="${WORKDIR}/${P}"
+S="${WORKDIR}/xianyi-OpenBLAS-${CID}"
 
 src_prepare() {
-	epatch "${FILESDIR}"/${PN}-{sharedlibs-0.1,aliasing}.patch
+	epatch "${FILESDIR}"/${PN}-{sharedlibs-0.2,aliasing}.patch
 	# respect LDFLAGS
 	sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
 	# respect CFLAGS only if dynamic flag not enabled
@@ -48,6 +51,7 @@ src_configure() {
 		einfo "openmp and threads enabled: using threads"
 	sed -i \
 		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
+		-e "s:^#\s*\(NO_LAPACKE\)\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):" \
@@ -90,7 +94,8 @@ src_install() {
 		Description: ${DESCRIPTION}
 		Version: ${PV}
 		URL: ${HOMEPAGE}
-		Libs: -L\${libdir} -lopenblas -lm ${threads}
+		Libs: -L\${libdir} -lopenblas ${threads}
+		Libs.private: -lm
 	EOF
 
 	alternatives_for blas ${profname} 0 \

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index 6484a1e..393818d 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -22,7 +22,7 @@ DEPEND="${RDEPEND}"
 S="${WORKDIR}/${MYPN}"
 
 src_prepare() {
-	epatch "${FILESDIR}"/${PN}-{sharedlibs,aliasing}.patch
+	epatch "${FILESDIR}"/${PN}-{sharedlibs-0.2,aliasing}.patch
 	# respect LDFLAGS
 	sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
 	# respect CFLAGS only if dynamic flag not enabled



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

* [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/
@ 2012-06-27 15:06 Sebastien Fabbro
  0 siblings, 0 replies; 9+ messages in thread
From: Sebastien Fabbro @ 2012-06-27 15:06 UTC (permalink / raw
  To: gentoo-commits

commit:     c9f6f2cf30fbbf170107286e86bc05ab266f7092
Author:     Sebastien Fabbro <sfabbro <AT> uvic <DOT> ca>
AuthorDate: Wed Jun 27 15:06:34 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Wed Jun 27 15:06:34 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=c9f6f2cf

sci-libs/openblas: fixed soname

(Portage version: 2.2.01.20430-prefix/git/Linux x86_64, unsigned Manifest commit)

---
 sci-libs/openblas/ChangeLog                        |    4 ++++
 .../openblas/files/openblas-sharedlibs-0.2.patch   |    6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
index ca933f9..b31db97 100644
--- a/sci-libs/openblas/ChangeLog
+++ b/sci-libs/openblas/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  27 Jun 2012; Sebastien Fabbro <fabbros@gentoo.org>
+  files/openblas-sharedlibs-0.2.patch:
+  sci-libs/openblas: fixed soname
+
 *openblas-0.2.0 (26 Jun 2012)
 
   26 Jun 2012; Sebastien Fabbro <fabbros@gentoo.org> -openblas-0.1.ebuild,

diff --git a/sci-libs/openblas/files/openblas-sharedlibs-0.2.patch b/sci-libs/openblas/files/openblas-sharedlibs-0.2.patch
index fd59785..a66b314 100644
--- a/sci-libs/openblas/files/openblas-sharedlibs-0.2.patch
+++ b/sci-libs/openblas/files/openblas-sharedlibs-0.2.patch
@@ -8,7 +8,7 @@
 +	$(CC) $(LDFLAGS) -shared \
  	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
 -	-Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB)
-+	-Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB) -o ../$(LIBSONAME)
++	-Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBSONAME) $(EXTRALIB) -o ../$(LIBSONAME)
  	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
  	rm -f linktest
  
@@ -20,7 +20,7 @@
 +	$(CC) $(LDFLAGS)  -shared \
  	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
 -	-Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB)
-+	-Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB) -o ../$(LIBSONAME)
++	-Wl,--soname=$(LIBSONAME) -Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB) -o ../$(LIBSONAME)
  	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
  	rm -f linktest
  
@@ -38,7 +38,7 @@
 -	$(CC) $(CFLAGS)  -shared -o ../$(LIBSONAME) \
 -	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB)
 +	$(CC) $(LDFLAGS)  -shared  \
-+	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB) \
++	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive -Wl,--soname=$\(LIBSONAME) $(EXTRALIB) \
 +	-o ../$(LIBSONAME)
  	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
  	rm -f linktest



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

* [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/
@ 2012-07-10 21:28 Sebastien Fabbro
  0 siblings, 0 replies; 9+ messages in thread
From: Sebastien Fabbro @ 2012-07-10 21:28 UTC (permalink / raw
  To: gentoo-commits

commit:     47fb485ca7f74d01b12a632116bf0cf6ec1e27da
Author:     Sébastien Fabbro <sebfabbro <AT> gmail <DOT> com>
AuthorDate: Mon Jul  9 21:46:31 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Mon Jul  9 21:46:31 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=47fb485c

sci-libs/openblas: version bump

---
 sci-libs/openblas/ChangeLog                        |    7 +
 .../openblas/files/openblas-sharedlibs-0.1.patch   |   45 -------
 sci-libs/openblas/openblas-0.1.1.ebuild            |  120 -------------------
 sci-libs/openblas/openblas-0.2.0.ebuild            |  125 --------------------
 sci-libs/openblas/openblas-0.2.2.ebuild            |    1 +
 sci-libs/openblas/openblas-9999.ebuild             |   38 ++++--
 6 files changed, 32 insertions(+), 304 deletions(-)

diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
index b31db97..198533a 100644
--- a/sci-libs/openblas/ChangeLog
+++ b/sci-libs/openblas/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*openblas-0.2.2 (09 Jul 2012)
+
+  09 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> -openblas-0.1.1.ebuild,
+  -files/openblas-sharedlibs-0.1.patch, -openblas-0.2.0.ebuild,
+  +openblas-0.2.2.ebuild, openblas-9999.ebuild:
+  Version bump
+
   27 Jun 2012; Sebastien Fabbro <fabbros@gentoo.org>
   files/openblas-sharedlibs-0.2.patch:
   sci-libs/openblas: fixed soname

diff --git a/sci-libs/openblas/files/openblas-sharedlibs-0.1.patch b/sci-libs/openblas/files/openblas-sharedlibs-0.1.patch
deleted file mode 100644
index c2e6580..0000000
--- a/sci-libs/openblas/files/openblas-sharedlibs-0.1.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- 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 -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(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/openblas/openblas-0.1.1.ebuild b/sci-libs/openblas/openblas-0.1.1.ebuild
deleted file mode 100644
index 09b6092..0000000
--- a/sci-libs/openblas/openblas-0.1.1.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=4
-
-inherit eutils toolchain-funcs alternatives-2 multilib
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="http://soc.dev.gentoo.org/~spiros/repository/${P}.tbz2"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~x86-macos ~ppc-macos ~x64-macos"
-
-IUSE="+incblas int64 dynamic openmp static-libs threads"
-
-RDEPEND="virtual/fortran"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/${P}"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-{sharedlibs-0.1,aliasing}.patch
-	# respect LDFLAGS
-	sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
-	# respect CFLAGS only if dynamic flag not enabled
-	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 *$(get_libname) 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*$(get_libname)
-	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: ${PN}
-		Description: ${DESCRIPTION}
-		Version: ${PV}
-		URL: ${HOMEPAGE}
-		Libs: -L\${libdir} -lopenblas -lm ${threads}
-	EOF
-
-	alternatives_for blas ${profname} 0 \
-		"/usr/$(get_libdir)/pkgconfig/blas.pc" "${profname}.pc"
-
-	if use incblas; then
-		echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}"
-		insinto /usr/include/${PN}
-		doins cblas.h common*.h config.h param.h
-		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 GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
-
-	if [[ ${CHOST} == *-darwin* ]] ; then
-		cd "${ED}"/usr/$(get_libdir)
-		for d in *.dylib ; do
-			ebegin "correcting install_name of ${d}"
-			install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
-			eend $?
-		done
-	fi
-}

diff --git a/sci-libs/openblas/openblas-0.2.0.ebuild b/sci-libs/openblas/openblas-0.2.0.ebuild
deleted file mode 100644
index 61b59d4..0000000
--- a/sci-libs/openblas/openblas-0.2.0.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=4
-
-inherit eutils toolchain-funcs alternatives-2 multilib
-
-# commit ID
-CID="23a7062"
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
-
-IUSE="+incblas int64 dynamic openmp static-libs threads"
-
-RDEPEND="virtual/fortran"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/xianyi-OpenBLAS-${CID}"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-{sharedlibs-0.2,aliasing}.patch
-	# respect LDFLAGS
-	sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
-	# respect CFLAGS only if dynamic flag not enabled
-	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*\(NO_LAPACKE\)\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 *$(get_libname) 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*$(get_libname)
-	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: ${PN}
-		Description: ${DESCRIPTION}
-		Version: ${PV}
-		URL: ${HOMEPAGE}
-		Libs: -L\${libdir} -lopenblas ${threads}
-		Libs.private: -lm
-	EOF
-
-	alternatives_for blas ${profname} 0 \
-		"/usr/$(get_libdir)/pkgconfig/blas.pc" "${profname}.pc"
-
-	if use incblas; then
-		echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}"
-		insinto /usr/include/${PN}
-		doins cblas.h common*.h config.h param.h
-		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 GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
-
-	if [[ ${CHOST} == *-darwin* ]] ; then
-		cd "${ED}"/usr/$(get_libdir)
-		for d in *.dylib ; do
-			ebegin "correcting install_name of ${d}"
-			install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
-			eend $?
-		done
-	fi
-}

diff --git a/sci-libs/openblas/openblas-0.2.2.ebuild b/sci-libs/openblas/openblas-0.2.2.ebuild
new file mode 120000
index 0000000..2381753
--- /dev/null
+++ b/sci-libs/openblas/openblas-0.2.2.ebuild
@@ -0,0 +1 @@
+openblas-9999.ebuild
\ No newline at end of file

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index 393818d..092af35 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -4,22 +4,31 @@
 
 EAPI=4
 
-inherit eutils toolchain-funcs alternatives-2 git-2 multilib
+if [[ ${PV} == "9999" ]] ; then
+	_SCM=git-2
+	EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
+	SRC_URI=""
+	KEYWORDS=""
+else
+	SRC_URI="http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
+	CID="4933d61" # commit ID
+fi
+
+inherit eutils toolchain-funcs alternatives-2 multilib ${_SCM}
 
 DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
 HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-EGIT_REPO_URI="git://github.com/xianyi/OpenBLAS.git"
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS=""
 
 IUSE="+incblas int64 dynamic openmp static-libs threads"
 
 RDEPEND="virtual/fortran"
 DEPEND="${RDEPEND}"
 
-S="${WORKDIR}/${MYPN}"
+S="${WORKDIR}/xianyi-OpenBLAS-${CID}"
 
 src_prepare() {
 	epatch "${FILESDIR}"/${PN}-{sharedlibs-0.2,aliasing}.patch
@@ -48,6 +57,7 @@ src_configure() {
 		einfo "openmp and threads enabled: using threads"
 	sed -i \
 		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
+		-e "s:^#\s*\(NO_LAPACKE\)\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):" \
@@ -90,30 +100,30 @@ src_install() {
 		Description: ${DESCRIPTION}
 		Version: ${PV}
 		URL: ${HOMEPAGE}
-		Libs: -L\${libdir} -lopenblas -lm ${threads}
+		Libs: -L\${libdir} -lopenblas ${threads}
+		Libs.private: -lm
 	EOF
-	if use incblas; then
-		echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}"
-	fi
-	insinto /usr/$(get_libdir)/pkgconfig
-	doins ${profname}.pc
 
 	alternatives_for blas ${profname} 0 \
-		"/usr/$(get_libdir)/pkgconfig/blas.pc" "${profname}.pc"
+		/usr/$(get_libdir)/pkgconfig/blas.pc ${profname}.pc
 
 	if use incblas; then
+		echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}"
 		insinto /usr/include/${PN}
 		doins cblas.h common*.h config.h param.h
 		alternatives_for cblas ${profname} 0 \
-			"/usr/$(get_libdir)/pkgconfig/cblas.pc" "${profname}.pc" \
-			"/usr/include/cblas.h" "${PN}/cblas.h"
+			/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 GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
 
 	if [[ ${CHOST} == *-darwin* ]] ; then
 		cd "${ED}"/usr/$(get_libdir)
 		for d in *.dylib ; do
-			ebegin "correcting install_name of ${d}"
+			ebegin "Correcting install_name of ${d}"
 			install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
 			eend $?
 		done



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

* [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/
@ 2013-07-24 23:05 Sebastien Fabbro
  0 siblings, 0 replies; 9+ messages in thread
From: Sebastien Fabbro @ 2013-07-24 23:05 UTC (permalink / raw
  To: gentoo-commits

commit:     5e47b4408194d828de2ec3dc84009490b15f3fbd
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 24 23:04:46 2013 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Wed Jul 24 23:04:46 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=5e47b440

sci-libs/openblas: Version bump. Rewrote ebuild to try to follow upstream closer

Package-Manager: portage-2.2.01.22124-prefix

---
 sci-libs/openblas/ChangeLog                        |   8 ++
 sci-libs/openblas/files/openblas-aliasing.patch    |  11 --
 .../openblas/files/openblas-sharedlibs-0.2.patch   |  45 -------
 sci-libs/openblas/metadata.xml                     |   1 -
 sci-libs/openblas/openblas-0.2.6.ebuild            |   1 -
 sci-libs/openblas/openblas-0.2.7.ebuild            | 127 ++++++++++++++++++
 sci-libs/openblas/openblas-9999.ebuild             | 148 ++++++++++-----------
 7 files changed, 204 insertions(+), 137 deletions(-)

diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
index 73db9ea..80ed3d8 100644
--- a/sci-libs/openblas/ChangeLog
+++ b/sci-libs/openblas/ChangeLog
@@ -2,6 +2,14 @@
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*openblas-0.2.7 (24 Jul 2013)
+
+  24 Jul 2013; Sébastien Fabbro <bicatali@gentoo.org> +openblas-0.2.7.ebuild,
+  -files/openblas-aliasing.patch, -files/openblas-sharedlibs-0.2.patch,
+  -openblas-0.2.6.ebuild, metadata.xml, openblas-9999.ebuild:
+  sci-libs/openblas: Version bump. Rewrote ebuild to try to follow upstream
+  closer
+
 *openblas-0.2.6 (03 Mar 2013)
 
   03 Mar 2013; Sébastien Fabbro <bicatali@gentoo.org> +openblas-0.2.6.ebuild,

diff --git a/sci-libs/openblas/files/openblas-aliasing.patch b/sci-libs/openblas/files/openblas-aliasing.patch
deleted file mode 100644
index 8c59b1c..0000000
--- a/sci-libs/openblas/files/openblas-aliasing.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- driver/others/init.c.orig	2011-05-31 18:59:24.000000000 +0100
-+++ driver/others/init.c	2011-05-31 20:18:51.000000000 +0100
-@@ -261,7 +261,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/openblas/files/openblas-sharedlibs-0.2.patch b/sci-libs/openblas/files/openblas-sharedlibs-0.2.patch
deleted file mode 100644
index a66b314..0000000
--- a/sci-libs/openblas/files/openblas-sharedlibs-0.2.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- exports/Makefile.orig	2012-06-26 10:24:20.154182394 -0700
-+++ exports/Makefile	2012-06-26 10:28:59.894394334 -0700
-@@ -106,9 +106,9 @@
- so : ../$(LIBSONAME)
- 
- ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
--	$(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
-+	$(CC) $(LDFLAGS) -shared \
- 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
--	-Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB)
-+	-Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBSONAME) $(EXTRALIB) -o ../$(LIBSONAME)
- 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
- 	rm -f linktest
- 
-@@ -119,9 +119,9 @@
- so : ../$(LIBSONAME)
- 
- ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
--	$(CC) $(CFLAGS)  -shared -o ../$(LIBSONAME) \
-+	$(CC) $(LDFLAGS)  -shared \
- 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
--	-Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB)
-+	-Wl,--soname=$(LIBSONAME) -Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB) -o ../$(LIBSONAME)
- 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
- 	rm -f linktest
- 
-@@ -132,14 +132,15 @@
- so : ../$(LIBSONAME)
- 
- ../$(LIBSONAME) :
--	$(CC) -shared -o ../$(LIBSONAME) ../$(LIBNAME)
-+	$(CC) -shared ../$(LIBNAME) -o ../$(LIBSONAME)
- endif
- 
- ifeq ($(OSNAME), SunOS)
- 
- so : ../$(LIBSONAME)
--	$(CC) $(CFLAGS)  -shared -o ../$(LIBSONAME) \
--	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB)
-+	$(CC) $(LDFLAGS)  -shared  \
-+	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive -Wl,--soname=$\(LIBSONAME) $(EXTRALIB) \
-+	-o ../$(LIBSONAME)
- 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
- 	rm -f linktest
- 

diff --git a/sci-libs/openblas/metadata.xml b/sci-libs/openblas/metadata.xml
index fd35350..67a10b4 100644
--- a/sci-libs/openblas/metadata.xml
+++ b/sci-libs/openblas/metadata.xml
@@ -8,7 +8,6 @@
 </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>

diff --git a/sci-libs/openblas/openblas-0.2.6.ebuild b/sci-libs/openblas/openblas-0.2.6.ebuild
deleted file mode 120000
index 2381753..0000000
--- a/sci-libs/openblas/openblas-0.2.6.ebuild
+++ /dev/null
@@ -1 +0,0 @@
-openblas-9999.ebuild
\ No newline at end of file

diff --git a/sci-libs/openblas/openblas-0.2.7.ebuild b/sci-libs/openblas/openblas-0.2.7.ebuild
new file mode 100644
index 0000000..f2c690e
--- /dev/null
+++ b/sci-libs/openblas/openblas-0.2.7.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils toolchain-funcs alternatives-2 multilib fortran-2
+
+DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
+HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
+SRC_URI="http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz
+	http://dev.gentoo.org/~bicatali/distfiles/${PN}-gentoo.patch"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
+
+LICENSE="BSD"
+SLOT="0"
+
+IUSE="int64 dynamic openmp static-libs threads"
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+	default
+	find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
+		mv "${WORKDIR}"/*OpenBLAS* "${S}"
+}
+
+src_prepare() {
+	# openblas already does multi-jobs
+	MAKEOPTS+=" -j1"
+	cd "${S}"
+	epatch "${DISTDIR}"/${PN}-gentoo.patch
+}
+
+src_configure() {
+	# lapack and lapacke are not modified from upstream lapack
+	sed -i \
+		-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \
+		-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \
+		-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS}:" \
+		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
+		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
+		Makefile.rule || die
+}
+
+openblas_compile() {
+	local profname=$1
+	einfo "Compiling profile ${profname}"
+	# cflags already defined twice
+	unset CFLAGS
+	emake clean
+	emake libs shared ${openblas_flags}
+	mkdir -p libs && mv lib* libs/
+	# avoid pic when compiling static libraries, so re-compiling
+	if use static-libs; then
+		emake clean
+		emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
+		mv lib* libs/
+	fi
+	cat <<-EOF > ${profname}.pc
+		prefix=${EPREFIX}/usr
+		libdir=\${prefix}/$(get_libdir)
+		includedir=\${prefix}/include
+		Name: ${PN}
+		Description: ${DESCRIPTION}
+		Version: ${PV}
+		URL: ${HOMEPAGE}
+		Libs: -L\${libdir} -lopenblas
+		Libs.private: -lm
+		Cflags: -I\${includedir}/${PN}
+	EOF
+}
+
+src_compile() {
+	openblas_flags=""
+	use dynamic && \
+		openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1"
+	use int64 && \
+		openblas_flags+=" INTERFACE64=1"
+
+	# choose posix threads over openmp when the two are set
+	# yet to see the need of having the two profiles simultaneously
+	if use threads; then
+		openblas_flags+=" USE_THREAD=1 USE_OPENMP=0"
+	elif use openmp; then
+		openblas_flags+=" USE_THREAD=0 USE_OPENMP=1"
+	fi
+	openblas_compile openblas-int64
+	mv libs/lib* . || die
+}
+
+src_test() {
+	emake tests ${openblas_flags}
+}
+
+src_install() {
+	local pcfile
+	for pcfile in *.pc; do
+		local profname=${pcfile%.pc}
+		emake install \
+			PREFIX="${ED}"usr ${openblas_flags} \
+			OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
+			OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
+		use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
+		alternatives_for blas ${profname} 0 \
+			/usr/$(get_libdir)/pkgconfig/blas.pc ${pcfile}
+		alternatives_for cblas ${profname} 0 \
+			/usr/$(get_libdir)/pkgconfig/cblas.pc ${pcfile} \
+			/usr/include/cblas.h ${PN}/cblas.h
+		insinto /usr/$(get_libdir)/pkgconfig
+		doins ${pcfile}
+	done
+
+	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
+	dodoc *md Changelog.txt
+
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		cd "${ED}"/usr/$(get_libdir)
+		local d
+		for d in *.dylib ; do
+			ebegin "Correcting install_name of ${d}"
+			install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
+			eend $?
+		done
+	fi
+}

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index 008e107..f9834f6 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -4,96 +4,56 @@
 
 EAPI=5
 
-if [[ ${PV} == "9999" ]] ; then
-	_SCM=git-2
-	EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
-	SRC_URI=""
-	KEYWORDS=""
-else
-	SRC_URI="http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
-fi
-
-inherit eutils toolchain-funcs alternatives-2 multilib fortran-2 ${_SCM}
+EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
+EGIT_MASTER="develop"
+
+inherit eutils toolchain-funcs alternatives-2 multilib fortran-2 git-2
 
 DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
 HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
+KEYWORDS=""
+SRC_URI="http://dev.gentoo.org/~bicatali/distfiles/${PN}-gentoo.patch"
 
 LICENSE="BSD"
 SLOT="0"
 
-IUSE="+incblas int64 dynamic openmp static-libs threads"
+IUSE="int64 dynamic openmp static-libs threads"
 
 RDEPEND=""
 DEPEND="${RDEPEND}"
 
-src_unpack() {
-	unpack ${A}
-	mv "${WORKDIR}"/*OpenBLAS* "${S}" || die
-}
-
 src_prepare() {
-	epatch "${FILESDIR}"/${PN}-{sharedlibs-0.2,aliasing}.patch
-	# respect LDFLAGS
-	sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
-	# respect CFLAGS only if dynamic flag not enabled
-	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
+	# openblas already does multi-jobs
+	MAKEOPTS+=" -j1"
+	cd "${S}"
+	epatch "${DISTDIR}"/${PN}-gentoo.patch
 }
 
 src_configure() {
-	local use_openmp=$(use openmp && echo 1)
-	use threads && use openmp && use_openmp="" && \
-		einfo "openmp and threads enabled: using threads"
+	# lapack and lapacke are not modified from upstream lapack
 	sed -i \
-		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-		-e "s:^#\s*\(NO_LAPACKE\)\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):" \
+		-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS}:" \
+		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
+		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
 		Makefile.rule || die
 }
 
-src_compile() {
-	mkdir solibs
-	emake libs shared && mv *$(get_libname) 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
+openblas_compile() {
+	local profname=$1
+	einfo "Compiling profile ${profname}"
+	# cflags already defined twice
+	unset CFLAGS
+	emake clean
+	emake libs shared ${openblas_flags}
+	mkdir -p libs && mv lib* libs/
+	# avoid pic when compiling static libraries, so re-compiling
+	if use static-libs; then
+		emake clean
+		emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
+		mv lib* libs/
 	fi
-
-	dolib.so solibs/lib*$(get_libname)
-	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)
@@ -103,27 +63,57 @@ src_install() {
 		Version: ${PV}
 		URL: ${HOMEPAGE}
 		Libs: -L\${libdir} -lopenblas
-		Libs.private: -lm ${threads}
+		Libs.private: -lm
+		Cflags: -I\${includedir}/${PN}
 	EOF
+}
+
+src_compile() {
+	openblas_flags=""
+	use dynamic && \
+		openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1"
+	use int64 && \
+		openblas_flags+=" INTERFACE64=1"
+
+	# choose posix threads over openmp when the two are set
+	# yet to see the need of having the two profiles simultaneously
+	if use threads; then
+		openblas_flags+=" USE_THREAD=1 USE_OPENMP=0"
+	elif use openmp; then
+		openblas_flags+=" USE_THREAD=0 USE_OPENMP=1"
+	fi
+	openblas_compile openblas-int64
+	mv libs/lib* . || die
+}
 
-	alternatives_for blas ${profname} 0 \
-		/usr/$(get_libdir)/pkgconfig/blas.pc ${profname}.pc
+src_test() {
+	emake tests ${openblas_flags}
+}
 
-	if use incblas; then
-		echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}"
-		insinto /usr/include/${PN}
-		doins cblas.h common*.h config.h param.h
+src_install() {
+	local pcfile
+	for pcfile in *.pc; do
+		local profname=${pcfile%.pc}
+		emake install \
+			PREFIX="${ED}"usr ${openblas_flags} \
+			OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
+			OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
+		use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
+		alternatives_for blas ${profname} 0 \
+			/usr/$(get_libdir)/pkgconfig/blas.pc ${pcfile}
 		alternatives_for cblas ${profname} 0 \
-			/usr/$(get_libdir)/pkgconfig/cblas.pc ${profname}.pc \
+			/usr/$(get_libdir)/pkgconfig/cblas.pc ${pcfile} \
 			/usr/include/cblas.h ${PN}/cblas.h
-	fi
+		insinto /usr/$(get_libdir)/pkgconfig
+		doins ${pcfile}
+	done
 
-	insinto /usr/$(get_libdir)/pkgconfig
-	doins ${profname}.pc
 	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
+	dodoc *md Changelog.txt
 
 	if [[ ${CHOST} == *-darwin* ]] ; then
 		cd "${ED}"/usr/$(get_libdir)
+		local d
 		for d in *.dylib ; do
 			ebegin "Correcting install_name of ${d}"
 			install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"


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

* [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/
@ 2014-10-06  5:56 Justin Lecher
  0 siblings, 0 replies; 9+ messages in thread
From: Justin Lecher @ 2014-10-06  5:56 UTC (permalink / raw
  To: gentoo-commits

commit:     75c97de4f10002856e8a7964c9123856e6aadf38
Author:     gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  6 16:45:21 2014 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Sep 27 11:10:07 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=75c97de4

Add >=virtual/blas-2.1-r2[int64?] and >=virtual/cblas-2.0-r1[int64?] to RDEPEND. Use separate eselect modules for blas, blas-int64, cblas and cblas-int64. Bump to 0.2.11 using multi build. Remove openblas-9999-cpuid_x86.patch as a similar change has been applied by upstream.  Tweak the openblas_config.h file to be the same between ABIs.

---
 sci-libs/openblas/ChangeLog                        |  18 ++++
 ...-openblas_config_header_same_between_ABIs.patch |  21 +++++
 sci-libs/openblas/openblas-0.2.11.ebuild           |   1 +
 sci-libs/openblas/openblas-9999.ebuild             | 104 ++++++++++++++++-----
 4 files changed, 119 insertions(+), 25 deletions(-)

diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
index 68e0955..9f9c82e 100644
--- a/sci-libs/openblas/ChangeLog
+++ b/sci-libs/openblas/ChangeLog
@@ -2,6 +2,24 @@
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  06 Sep 2014; Mark Wright <gienah@gentoo.org> +openblas-0.2.11.ebuild,
+  openblas-9999.ebuild,
+  +files/openblas-0.2.11-openblas_config_header_same_between_ABIs.patch,
+  -files/openblas-9999-cpuid_x86.patch:
+  Remove openblas-9999-cpuid_x86.patch as a similar change has been applied by
+  upstream.  Tweak the openblas_config.h file to be the same between ABIs.
+
+*openblas-0.2.11 (30 Aug 2014)
+
+  30 Aug 2014; Mark Wright <gienah@gentoo.org> +openblas-0.2.11.ebuild,
+  openblas-9999.ebuild:
+  Bump to 0.2.11 using multi build
+
+  26 Apr 2014; Mark Wright <gienah@gentoo.org> openblas-9999.ebuild:
+  Add >=virtual/blas-2.1-r2[int64?] and >=virtual/cblas-2.0-r1[int64?] to
+  RDEPEND. Use separate eselect modules for blas, blas-int64, cblas and
+  cblas-int64.
+
   19 Feb 2014; Mark Wright <gienah@gentoo.org> openblas-9999.ebuild:
   Thanks to sfabbro: dodoc should be outside the function, they do not change
 

diff --git a/sci-libs/openblas/files/openblas-0.2.11-openblas_config_header_same_between_ABIs.patch b/sci-libs/openblas/files/openblas-0.2.11-openblas_config_header_same_between_ABIs.patch
new file mode 100644
index 0000000..7a85111
--- /dev/null
+++ b/sci-libs/openblas/files/openblas-0.2.11-openblas_config_header_same_between_ABIs.patch
@@ -0,0 +1,21 @@
+--- openblas-0.2.11-orig/getarch_2nd.c	2014-08-18 13:16:14.000000000 +1000
++++ openblas-0.2.11/getarch_2nd.c	2014-09-01 23:44:07.070560148 +1000
+@@ -64,13 +64,13 @@
+ 
+ 
+   if ((argc >= 2) && (*argv[1] == '1')) {
+-    printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 *  sizeof(float)));
+-    printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 *  sizeof(double)));
+-    printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 *  sizeof(float)));
+-    printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAULT_UNROLL_N * 2 * 2 *  sizeof(double)));
++    printf("#define SLOCAL_BUFFER_SIZE\t(SGEMM_DEFAULT_Q*SGEMM_DEFAULT_UNROLL_N*4*1*sizeof(float))\n");
++    printf("#define DLOCAL_BUFFER_SIZE\t(DGEMM_DEFAULT_Q*DGEMM_DEFAULT_UNROLL_N*2*1*sizeof(double))\n");
++    printf("#define CLOCAL_BUFFER_SIZE\t(CGEMM_DEFAULT_Q*CGEMM_DEFAULT_UNROLL_N*4*2*sizeof(float))\n");
++    printf("#define ZLOCAL_BUFFER_SIZE\t(ZGEMM_DEFAULT_Q*ZGEMM_DEFAULT_UNROLL_N*2*2*sizeof(double))\n");
+ 
+ #ifdef USE64BITINT
+-	printf("#define USE64BITINT\n");
++/*	printf("#define USE64BITINT\n"); */
+ #endif
+ 	printf("#define GEMM_MULTITHREAD_THRESHOLD\t%ld\n", (long int)GEMM_MULTITHREAD_THRESHOLD);
+   }

diff --git a/sci-libs/openblas/openblas-0.2.11.ebuild b/sci-libs/openblas/openblas-0.2.11.ebuild
new file mode 120000
index 0000000..2381753
--- /dev/null
+++ b/sci-libs/openblas/openblas-0.2.11.ebuild
@@ -0,0 +1 @@
+openblas-9999.ebuild
\ No newline at end of file

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index f012efd..e809907 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -4,18 +4,30 @@
 
 EAPI=5
 
-inherit alternatives-2 eutils fortran-2 git-r3 multibuild multilib-build toolchain-funcs
+inherit alternatives-2 eutils fortran-2 multibuild multilib-build toolchain-funcs
+
+SRC_URI+="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
+	EGIT_BRANCH="develop"
+	inherit git-r3
+	KEYWORDS=""
+else
+	SRC_URI+=" http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
+fi
 
 DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
 HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="http://dev.gentoo.org/~bicatali/distfiles/${PN}-gentoo.patch"
-EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
-EGIT_BRANCH="develop"
-
 LICENSE="BSD"
 SLOT="0"
 IUSE="dynamic int64 openmp static-libs threads"
-KEYWORDS=""
+
+RDEPEND="
+	>=virtual/blas-2.1-r2[int64?]
+	>=virtual/cblas-2.0-r1[int64?]"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig"
 
 INT64_SUFFIX="int64"
 BASE_PROFNAME="openblas"
@@ -60,7 +72,23 @@ get_profname() {
 	echo "${profname}"
 }
 
-get_libname() {
+get_blas_module() {
+	local module_name="blas"
+	if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
+		module_name+="-${INT64_SUFFIX}"
+	fi
+	echo "${module_name}"
+}
+
+get_cblas_module() {
+	local module_name="cblas"
+	if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
+		module_name+="-${INT64_SUFFIX}"
+	fi
+	echo "${module_name}"
+}
+
+get_openblas_libname() {
 	local libname="${BASE_PROFNAME}"
 	if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
 		libname+="_${INT64_SUFFIX}"
@@ -69,11 +97,6 @@ get_libname() {
 }
 
 int64_multilib_get_enabled_abis() {
-	# The file /usr/include/openblas/openblas_config.h is generated during the install.
-	# By listing the int64 variant first, the int64 variant /usr/include/openblas/openblas_config.h
-	# will be overwritten by the normal variant in the install, which removes the
-	# #define OPENBLAS_USE64BITINT for us.  We then specify it in Cflags in the
-	# /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
 	local MULTILIB_VARIANTS=( $(multilib_get_enabled_abis) )
 	local MULTIBUILD_VARIANTS=( )
 	for i in "${MULTILIB_VARIANTS[@]}"; do
@@ -114,8 +137,26 @@ int64_multilib_copy_sources() {
 	multibuild_copy_sources
 }
 
+src_unpack() {
+	if [[ ${PV} == "9999" ]] ; then
+		git-r3_src_unpack
+	else
+		default
+		if [[ ${PV} != "9999" ]] ; then
+			find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
+				mv "${WORKDIR}"/*OpenBLAS* "${S}"
+		fi
+	fi
+}
+
 src_prepare() {
-	epatch "${FILESDIR}/${PN}-9999-cpuid_x86.patch"
+	epatch "${DISTDIR}/${PN}-0.2.11-gentoo.patch"
+	epatch "${FILESDIR}/${PN}-0.2.11-openblas_config_header_same_between_ABIs.patch"
+	# lapack and lapacke are not modified from upstream lapack
+	sed \
+		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
+		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
+		-i Makefile.rule || die
 	local MULTIBUILD_VARIANTS=( $(int64_multilib_get_enabled_abis) )
 	int64_multilib_copy_sources
 }
@@ -123,13 +164,10 @@ src_prepare() {
 src_configure() {
 	local MULTIBUILD_VARIANTS=( $(int64_multilib_get_enabled_abis) )
 	my_configure() {
-		# lapack and lapacke are not modified from upstream lapack
 		sed \
-			-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \
-			-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \
+			-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \
+			-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \
 			-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS}:" \
-			-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-			-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
 			-i Makefile.rule || die
 	}
 	multibuild_foreach_variant run_in_build_dir _int64_multilib_multibuild_wrapper my_configure
@@ -142,7 +180,7 @@ src_compile() {
 	my_src_compile () {
 		local openblas_flags=$(get_openblas_flags)
 		local profname=$(get_profname)
-		local libname=$(get_libname)
+		local libname=$(get_openblas_libname)
 		einfo "Compiling profile ${profname}"
 		# cflags already defined twice
 		unset CFLAGS
@@ -166,14 +204,20 @@ src_compile() {
 			Libs: -L\${libdir} -l${libname}
 			Libs.private: -lm
 		EOF
+		local openblas_abi_defs=""
+		if [[ "${ABI}" == "x86" ]]; then
+			openblas_abi_defs="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1"
+		else
+			openblas_abi_defs="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1"
+		fi
 		if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
 			cat <<-EOF >> ${profname}.pc
-				Cflags: -DOPENBLAS_USE64BITINT -I\${includedir}/${PN}
+				Cflags: -DOPENBLAS_USE64BITINT ${openblas_abi_defs} -I\${includedir}/${PN}
 				Fflags=-fdefault-integer-8
 			EOF
 		else
 			cat <<-EOF >> ${profname}.pc
-				Cflags: -I\${includedir}/${PN}
+				Cflags: -I\${includedir}/${PN} ${openblas_abi_defs}
 				Fflags=
 			EOF
 		fi
@@ -199,15 +243,25 @@ src_install() {
 		local pcfile
 		for pcfile in *.pc; do
 			local profname=${pcfile%.pc}
+			# The file /usr/include/openblas/openblas_config.h is generated during the install.
+			# The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
+			# OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
+			# from /usr/include/openblas/openblas_config.h.  We then specify it in Cflags in
+			# the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
+			sed -e '/#define USE64BITINT/d' \
+				-e '/#define ARCH_X86/d' \
+				-e '/#define __\(32\|64\)BIT__/d' \
+				-i config_last.h \
+				|| die "Could not ensure there is no definition of USE64BITINT in config_last.h"
 			emake install \
 				PREFIX="${ED}"usr ${openblas_flags} \
 				OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
 				OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
 			use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
-			alternatives_for blas ${profname} 0 \
-				/usr/$(get_libdir)/pkgconfig/blas.pc ${pcfile}
-			alternatives_for cblas ${profname} 0 \
-				/usr/$(get_libdir)/pkgconfig/cblas.pc ${pcfile} \
+			alternatives_for $(get_blas_module) ${profname} 0 \
+				/usr/$(get_libdir)/pkgconfig/$(get_blas_module).pc ${pcfile}
+			alternatives_for $(get_cblas_module) ${profname} 0 \
+				/usr/$(get_libdir)/pkgconfig/$(get_cblas_module).pc ${pcfile} \
 				/usr/include/cblas.h ${PN}/cblas.h
 			insinto /usr/$(get_libdir)/pkgconfig
 			doins ${pcfile}


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

* [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/
@ 2017-04-29  9:50 Justin Lecher
  0 siblings, 0 replies; 9+ messages in thread
From: Justin Lecher @ 2017-04-29  9:50 UTC (permalink / raw
  To: gentoo-commits

commit:     bb7078923091f3a7e8acddde6a84b3acafd28c5b
Author:     François Bissey <francois.bissey <AT> canterbury <DOT> ac <DOT> nz>
AuthorDate: Thu Apr 27 12:46:26 2017 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Apr 27 12:46:26 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=bb707892

sci-libs/openblas: Bump openblas to 0.2.19 (#779)

* sci-libs/openblas: Bump openblas to latest

Package-Manager: portage-2.3.3

* sci-libs/openblas: add a few upstreamed patches

Package-Manager: portage-2.3.3

 sci-libs/openblas/files/openblas-0.2.19-MAKE.patch |  29 +++
 .../files/openblas-0.2.19-utest_ldflags.patch      |  13 ++
 sci-libs/openblas/openblas-0.2.19.ebuild           | 199 +++++++++++++++++++++
 3 files changed, 241 insertions(+)

diff --git a/sci-libs/openblas/files/openblas-0.2.19-MAKE.patch b/sci-libs/openblas/files/openblas-0.2.19-MAKE.patch
new file mode 100644
index 000000000..c77dd0f93
--- /dev/null
+++ b/sci-libs/openblas/files/openblas-0.2.19-MAKE.patch
@@ -0,0 +1,29 @@
+diff --git a/Makefile b/Makefile
+index 2ae0047..2071e10 100644
+--- a/Makefile
++++ b/Makefile
+@@ -278,13 +278,13 @@ lapack-timing : large.tgz timing.tgz
+ ifndef NOFORTRAN
+ 	(cd $(NETLIB_LAPACK_DIR); $(TAR) zxf ../timing.tgz TIMING)
+ 	(cd $(NETLIB_LAPACK_DIR)/TIMING; $(TAR) zxf ../../large.tgz )
+-	make -C $(NETLIB_LAPACK_DIR)/TIMING
++	$(MAKE) -C $(NETLIB_LAPACK_DIR)/TIMING
+ endif
+ 
+ 
+ lapack-test :
+ 	(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out)
+-	make -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc  xeigtstd  xeigtsts  xeigtstz  xlintstc  xlintstd  xlintstds  xlintstrfd  xlintstrfz  xlintsts  xlintstz  xlintstzc xlintstrfs xlintstrfc
++	$(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc  xeigtstd  xeigtsts  xeigtstz  xlintstc  xlintstd  xlintstds  xlintstrfd  xlintstrfz  xlintsts  xlintstz  xlintstzc xlintstrfs xlintstrfc
+ ifneq ($(CROSS), 1)
+ 	( cd $(NETLIB_LAPACK_DIR)/INSTALL; ./testlsame; ./testslamch; ./testdlamch; \
+         ./testsecond; ./testdsecnd; ./testieee; ./testversion )
+@@ -299,7 +299,7 @@ lapack-runtest:
+ 
+ blas-test:
+ 	(cd $(NETLIB_LAPACK_DIR)/BLAS && rm -f x* *.out)
+-	make -j 1 -C $(NETLIB_LAPACK_DIR) blas_testing
++	$(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR) blas_testing
+ 	(cd $(NETLIB_LAPACK_DIR)/BLAS && cat *.out)
+ 
+ 

diff --git a/sci-libs/openblas/files/openblas-0.2.19-utest_ldflags.patch b/sci-libs/openblas/files/openblas-0.2.19-utest_ldflags.patch
new file mode 100644
index 000000000..2ffd5babe
--- /dev/null
+++ b/sci-libs/openblas/files/openblas-0.2.19-utest_ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/utest/Makefile b/utest/Makefile
+index 3ccc0a0..ce809e3 100644
+--- a/utest/Makefile
++++ b/utest/Makefile
+@@ -18,7 +18,7 @@ endif
+ all : run_test
+ 
+ $(UTESTBIN): $(OBJS)
+-	$(CC) $(CFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
+ 
+ run_test: $(UTESTBIN)
+ ifndef CROSS

diff --git a/sci-libs/openblas/openblas-0.2.19.ebuild b/sci-libs/openblas/openblas-0.2.19.ebuild
new file mode 100644
index 000000000..3ff5f8502
--- /dev/null
+++ b/sci-libs/openblas/openblas-0.2.19.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+NUMERIC_MODULE_NAME="openblas"
+
+inherit alternatives-2 eutils multilib numeric numeric-int64-multibuild
+
+DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
+HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
+SRC_URI="http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz
+	http://sagetrac.lipn.univ-paris13.fr/sage/${PN}-0.2.19-clang-3.9.patch"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc64 ~x64-macos"
+IUSE="dynamic openmp static-libs threads"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+	virtual/pkgconfig"
+
+MULTILIB_WRAPPED_HEADERS=(
+	/usr/include/openblas/cblas.h
+	/usr/include/openblas/f77blas.h
+	/usr/include/openblas/openblas_config.h
+)
+
+PATCHES=(
+	"${DISTDIR}"/${PN}-0.2.19-clang-3.9.patch
+	"${FILESDIR}"/${PN}-0.2.19-MAKE.patch
+	"${FILESDIR}"/${PN}-0.2.19-utest_ldflags.patch
+	)
+
+get_openblas_flags() {
+	local openblas_flags=()
+	use dynamic && \
+		openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 )
+	$(numeric-int64_is_int64_build) && \
+		openblas_flags+=( INTERFACE64=1 )
+	# choose posix threads over openmp when the two are set
+	# yet to see the need of having the two profiles simultaneously
+	if use threads; then
+		openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 )
+	elif use openmp; then
+		openblas_flags+=( USE_OPENMP=1 )
+	fi
+	local profname=$(numeric-int64_get_module_name)
+	local libname="${profname//-/_}"
+	local underscoresuffix="${libname#${PN}}"
+	if [[ "${underscoresuffix}" != "_" ]]; then
+		local libnamesuffix="${underscoresuffix#_}"
+		openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} )
+	fi
+
+	[[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 )
+
+	echo "${openblas_flags[@]}"
+}
+
+get_openblas_abi_cflags() {
+	local openblas_abi_cflags=()
+	if [[ "${ABI}" == "x86" ]]; then
+		openblas_abi_cflags=( -DARCH_X86=1 -DOPENBLAS___32BIT__=1 )
+	elif [[ "${ABI}" == "amd64" ]]; then
+		openblas_abi_cflags=( -DARCH_X86_64=1 -DOPENBLAS___64BIT__=1 )
+	elif [[ "${ABI}" == "ppc64" ]]; then
+		openblas_abi_cflags=( -DARCH_POWER=1 -DOPENBLAS___64BIT__=1 )
+	else
+		die "unsupported abi: ${ABI}"
+	fi
+	$(numeric-int64_is_int64_build) && \
+		openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT )
+	use openmp && openblas_abi_cflags+=( -fopenmp )
+	echo "${openblas_abi_cflags[@]}"
+}
+
+src_unpack() {
+	default
+	find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
+		mv "${WORKDIR}"/*OpenBLAS* "${S}" || die
+}
+
+src_prepare() {
+	default
+
+	# lapack and lapacke are not modified from upstream lapack
+	sed \
+		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
+		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
+		-i Makefile.rule || die
+	numeric-int64-multibuild_copy_sources
+}
+
+src_configure() {
+	blas_configure() {
+		local openblas_abi_cflags="$(get_openblas_abi_cflags)"
+		local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
+		sed \
+			-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \
+			-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \
+			-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
+			-i Makefile.rule || die
+	}
+	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure
+}
+
+src_compile() {
+	# openblas already does multi-jobs
+	MAKEOPTS+=" -j1"
+	my_src_compile () {
+		local openblas_flags=$(get_openblas_flags)
+		# cflags already defined twice
+		unset CFLAGS || die
+		emake clean && emake libs shared ${openblas_flags}
+		mkdir -p libs && mv libopenblas* libs/ ||??die
+		# avoid pic when compiling static libraries, so re-compiling
+		if use static-libs; then
+			emake clean
+			emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
+			mv libopenblas* libs/ ||??die
+		fi
+		rm -f config.h config_last.h || die
+		# Note: prints this spurious warning: make: Nothing to be done for 'config.h'.
+		emake config.h
+		cp config.h config_last.h || die
+
+		mv libs/libopenblas* . || die
+	}
+	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile
+}
+
+src_test() {
+	my_src_test () {
+		local openblas_flags=$(get_openblas_flags)
+		emake tests ${openblas_flags}
+	}
+	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test
+}
+
+src_install() {
+	my_src_install() {
+		local openblas_flags=$(get_openblas_flags)
+		local profname=$(numeric-int64_get_module_name)
+		local pcfile
+		# The file /usr/include/openblas/openblas_config.h is generated during the install.
+		# The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
+		# OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
+		# from /usr/include/openblas/openblas_config.h.  We then specify it in Cflags in
+		# the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
+		sed -e '/#define USE64BITINT/d' \
+			-e '/#define ARCH_X86/d' \
+			-e '/#define __\(32\|64\)BIT__/d' \
+			-i config_last.h \
+			|| die "Could not ensure there is no definition of USE64BITINT in config_last.h"
+		emake install \
+			PREFIX="${ED}"usr ${openblas_flags} \
+			OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
+			OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
+		if ! use static-libs; then
+			rm "${ED}"usr/$(get_libdir)/lib*.a || die
+		fi
+
+		local openblas_abi_cflags=$(get_openblas_abi_cflags)
+		local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags)
+		local libname="${profname//-/_}"
+
+		create_pkgconfig \
+			--name "${profname}" \
+			--libs "-L\${libdir} -l${libname}" \
+			--libs-private "-lm" \
+			--cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \
+			${profname}
+
+		if [[ ${CHOST} == *-darwin* ]] ; then
+			cd "${ED}"/usr/$(get_libdir) ||??die
+			local d
+			for d in *.dylib; do
+				ebegin "Correcting install_name of ${d}"
+				install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die
+				eend $?
+			done
+		fi
+		if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
+			multilib_prepare_wrappers
+			multilib_check_headers
+		fi
+	}
+	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install
+
+	printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh ||??die
+	numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME}
+	numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME}
+
+	multilib_install_wrappers
+
+	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt
+}


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

* [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/
@ 2019-07-25  4:40 Benda XU
  0 siblings, 0 replies; 9+ messages in thread
From: Benda XU @ 2019-07-25  4:40 UTC (permalink / raw
  To: gentoo-commits

commit:     fb2465d7e6584f980f74bdd733664c8d33bfb29d
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 25 04:35:48 2019 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Thu Jul 25 04:39:39 2019 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=fb2465d7

sci-libs/openblas: merge into ::gentoo and remove from overlay.

Closes: https://github.com/gentoo/sci/issues/917
Closes: https://github.com/gentoo/sci/issues/888
Closes: https://github.com/gentoo/sci/issues/859
Closes: https://github.com/gentoo/sci/issues/704
Closes: https://github.com/gentoo/sci/issues/686
Closes: https://github.com/gentoo/sci/issues/631
Closes: https://github.com/gentoo/sci/issues/628
Closes: https://github.com/gentoo/sci/issues/20

Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 .../openblas/files/openblas-0.2.11-cpuid_x86.patch |  27 ---
 sci-libs/openblas/files/openblas-0.2.19-MAKE.patch |  29 ----
 .../files/openblas-0.2.19-utest_ldflags.patch      |  13 --
 .../openblas/files/openblas-0.2.20-non-glibc.patch | 144 ---------------
 sci-libs/openblas/metadata.xml                     |  19 --
 sci-libs/openblas/openblas-0.2.14-r1.ebuild        | 187 --------------------
 sci-libs/openblas/openblas-0.2.15-r1.ebuild        | 188 --------------------
 sci-libs/openblas/openblas-0.2.19-r1.ebuild        | 193 ---------------------
 sci-libs/openblas/openblas-0.2.20.ebuild           | 192 --------------------
 sci-libs/openblas/openblas-9999.ebuild             | 181 -------------------
 10 files changed, 1173 deletions(-)

diff --git a/sci-libs/openblas/files/openblas-0.2.11-cpuid_x86.patch b/sci-libs/openblas/files/openblas-0.2.11-cpuid_x86.patch
deleted file mode 100644
index c6f299132..000000000
--- a/sci-libs/openblas/files/openblas-0.2.11-cpuid_x86.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- openblas-9999-orig/cpuid_x86.c	2014-02-23 15:25:22.199394761 +1100
-+++ openblas-9999/cpuid_x86.c	2014-02-23 16:41:02.727372869 +1100
-@@ -57,9 +57,23 @@
- void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx);
- #else
- static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx){
-+#if __x86_64
-   __asm__ __volatile__
-     ("cpuid": "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (op) : "cc");
--
-+#else
-+  __asm volatile(
-+    "push %%ebx\n\t"
-+    "cpuid\n\t"
-+    "mov %%ebx, (%4)\n\t"
-+    "pop %%ebx"
-+    :"=a" (*eax),
-+    "=c" (*ecx),
-+    "=d" (*edx)
-+    :"a" (op),
-+    "cc"
-+    "S" (ebx)
-+    :"memory");
-+#endif
- }
- #endif
- 

diff --git a/sci-libs/openblas/files/openblas-0.2.19-MAKE.patch b/sci-libs/openblas/files/openblas-0.2.19-MAKE.patch
deleted file mode 100644
index c77dd0f93..000000000
--- a/sci-libs/openblas/files/openblas-0.2.19-MAKE.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 2ae0047..2071e10 100644
---- a/Makefile
-+++ b/Makefile
-@@ -278,13 +278,13 @@ lapack-timing : large.tgz timing.tgz
- ifndef NOFORTRAN
- 	(cd $(NETLIB_LAPACK_DIR); $(TAR) zxf ../timing.tgz TIMING)
- 	(cd $(NETLIB_LAPACK_DIR)/TIMING; $(TAR) zxf ../../large.tgz )
--	make -C $(NETLIB_LAPACK_DIR)/TIMING
-+	$(MAKE) -C $(NETLIB_LAPACK_DIR)/TIMING
- endif
- 
- 
- lapack-test :
- 	(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out)
--	make -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc  xeigtstd  xeigtsts  xeigtstz  xlintstc  xlintstd  xlintstds  xlintstrfd  xlintstrfz  xlintsts  xlintstz  xlintstzc xlintstrfs xlintstrfc
-+	$(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc  xeigtstd  xeigtsts  xeigtstz  xlintstc  xlintstd  xlintstds  xlintstrfd  xlintstrfz  xlintsts  xlintstz  xlintstzc xlintstrfs xlintstrfc
- ifneq ($(CROSS), 1)
- 	( cd $(NETLIB_LAPACK_DIR)/INSTALL; ./testlsame; ./testslamch; ./testdlamch; \
-         ./testsecond; ./testdsecnd; ./testieee; ./testversion )
-@@ -299,7 +299,7 @@ lapack-runtest:
- 
- blas-test:
- 	(cd $(NETLIB_LAPACK_DIR)/BLAS && rm -f x* *.out)
--	make -j 1 -C $(NETLIB_LAPACK_DIR) blas_testing
-+	$(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR) blas_testing
- 	(cd $(NETLIB_LAPACK_DIR)/BLAS && cat *.out)
- 
- 

diff --git a/sci-libs/openblas/files/openblas-0.2.19-utest_ldflags.patch b/sci-libs/openblas/files/openblas-0.2.19-utest_ldflags.patch
deleted file mode 100644
index 2ffd5babe..000000000
--- a/sci-libs/openblas/files/openblas-0.2.19-utest_ldflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/utest/Makefile b/utest/Makefile
-index 3ccc0a0..ce809e3 100644
---- a/utest/Makefile
-+++ b/utest/Makefile
-@@ -18,7 +18,7 @@ endif
- all : run_test
- 
- $(UTESTBIN): $(OBJS)
--	$(CC) $(CFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
-+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
- 
- run_test: $(UTESTBIN)
- ifndef CROSS

diff --git a/sci-libs/openblas/files/openblas-0.2.20-non-glibc.patch b/sci-libs/openblas/files/openblas-0.2.20-non-glibc.patch
deleted file mode 100644
index afde85585..000000000
--- a/sci-libs/openblas/files/openblas-0.2.20-non-glibc.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-From 480e697681763cf31f015eb1ebad49a495f562c5 Mon Sep 17 00:00:00 2001
-From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
-Date: Mon, 24 Jul 2017 16:17:50 +0200
-Subject: [PATCH] Revert "Honor cgroup/cpuset limits when enumerating cpus"
- (#1246)
-
----
- driver/others/init.c   | 49 +++++--------------------------------------------
- driver/others/memory.c | 37 -------------------------------------
- 2 files changed, 5 insertions(+), 81 deletions(-)
-
-diff --git a/driver/others/init.c b/driver/others/init.c
-index 4c75d72e4..3e6176967 100644
---- a/driver/others/init.c
-+++ b/driver/others/init.c
-@@ -778,11 +778,11 @@ static int initialized = 0;
- void gotoblas_affinity_init(void) {
- 
-   int cpu, num_avail;
--#ifndef USE_OPENMP	
-+#ifndef USE_OPENMP
-   cpu_set_t cpu_mask;
- #endif
-   int i;
--	
-+
-   if (initialized) return;
- 
-   initialized = 1;
-@@ -826,54 +826,15 @@ void gotoblas_affinity_init(void) {
-   common -> shmid = pshmid;
- 
-   if (common -> magic != SH_MAGIC) {
--    cpu_set_t *cpusetp;
--    int nums;
--    int ret;
--
- #ifdef DEBUG
-     fprintf(stderr, "Shared Memory Initialization.\n");
- #endif
- 
-     //returns the number of processors which are currently online
--
--    nums = sysconf(_SC_NPROCESSORS_CONF);
--     
--#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 3)
--    common->num_procs = nums;
--#elif __GLIBC_PREREQ(2, 7)
--    cpusetp = CPU_ALLOC(nums);
--    if (cpusetp == NULL) {
--        common->num_procs = nums;
--    } else {
--        size_t size;
--        size = CPU_ALLOC_SIZE(nums);
--        ret = sched_getaffinity(0,size,cpusetp);
--        if (ret!=0) 
--            common->num_procs = nums;
--        else
--            common->num_procs = CPU_COUNT_S(size,cpusetp);
--    }
--    CPU_FREE(cpusetp);
--#else
--    ret = sched_getaffinity(0,sizeof(cpu_set_t), cpusetp);
--    if (ret!=0) {
--        common->num_procs = nums;
--    } else {
--#if !__GLIBC_PREREQ(2, 6)  
--    int i;
--    int n = 0;
--    for (i=0;i<nums;i++)
--        if (CPU_ISSET(i,cpusetp)) n++;
--    common->num_procs = n;
--    }
--#else
--    common->num_procs = CPU_COUNT(sizeof(cpu_set_t),cpusetp);
--#endif
--
--#endif 
-+    common -> num_procs = sysconf(_SC_NPROCESSORS_CONF);;
- 
-     if(common -> num_procs > MAX_CPUS) {
--      fprintf(stderr, "\nOpenBLAS Warning : The number of CPU/Cores(%d) is beyond the limit(%d). Terminated.\n", common->num_procs, MAX_CPUS);
-+      fprintf(stderr, "\nOpenBLAS Warining : The number of CPU/Cores(%d) is beyond the limit(%d). Terminated.\n", common->num_procs, MAX_CPUS);
-       exit(1);
-     }
- 
-@@ -886,7 +847,7 @@ void gotoblas_affinity_init(void) {
-     if (common -> num_nodes > 1) numa_mapping();
- 
-     common -> final_num_procs = 0;
--    for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += rcount(common -> avail[i]) + 1;   //Make the max cpu number.
-+    for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += rcount(common -> avail[i]) + 1;   //Make the max cpu number. 
- 
-     for (cpu = 0; cpu < common -> final_num_procs; cpu ++) common -> cpu_use[cpu] =  0;
- 
-diff --git a/driver/others/memory.c b/driver/others/memory.c
-index 38d063715..916950315 100644
---- a/driver/others/memory.c
-+++ b/driver/others/memory.c
-@@ -175,44 +175,7 @@ int get_num_procs(void);
- #else
- int get_num_procs(void) {
-   static int nums = 0;
--cpu_set_t *cpusetp;
--size_t size;
--int ret;
--int i,n;
--
-   if (!nums) nums = sysconf(_SC_NPROCESSORS_CONF);
--#if !defined(OS_LINUX)
--     return nums;
--#endif
--     
--#if !defined(__GLIBC_PREREQ)
--   return nums;
--#endif   
--#if !__GLIBC_PREREQ(2, 3)
--   return nums;
--#endif   
--
--#if !__GLIBC_PREREQ(2, 7)
--  ret = sched_getaffinity(0,sizeof(cpu_set_t), cpusetp);
--  if (ret!=0) return nums;
--  n=0;
--#if !__GLIBC_PREREQ(2, 6)  
--  for (i=0;i<nums;i++)
--     if (CPU_ISSET(i,cpusetp)) n++;
--  nums=n;   
--#else
--  nums = CPU_COUNT(sizeof(cpu_set_t),cpusetp);
--#endif
--  return nums;
--#endif
--
--  cpusetp = CPU_ALLOC(nums);
--  if (cpusetp == NULL) return nums;
--  size = CPU_ALLOC_SIZE(nums);
--  ret = sched_getaffinity(0,size,cpusetp);
--  if (ret!=0) return nums;
--  nums = CPU_COUNT_S(size,cpusetp);
--  CPU_FREE(cpusetp);
-   return nums;
- }
- #endif

diff --git a/sci-libs/openblas/metadata.xml b/sci-libs/openblas/metadata.xml
deleted file mode 100644
index 55f42abc3..000000000
--- a/sci-libs/openblas/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-	<maintainer type="project">
-		<email>sci@gentoo.org</email>
-		<name>Gentoo Science Project</name>
-	</maintainer>
-	<longdescription lang="en">
-OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD
-version. See <pkg>sci-libs/gotoblas2</pkg> for more on GotoBLAS2.
-</longdescription>
-	<use>
-		<flag name="int64">Build the 64 bits integer library</flag>
-		<flag name="dynamic">Build dynamic architecture detection at run time (for multi targets)</flag>
-	</use>
-	<upstream>
-		<remote-id type="github">xianyi/OpenBLAS</remote-id>
-	</upstream>
-</pkgmetadata>

diff --git a/sci-libs/openblas/openblas-0.2.14-r1.ebuild b/sci-libs/openblas/openblas-0.2.14-r1.ebuild
deleted file mode 100644
index ba7aa8298..000000000
--- a/sci-libs/openblas/openblas-0.2.14-r1.ebuild
+++ /dev/null
@@ -1,187 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-NUMERIC_MODULE_NAME="openblas"
-
-inherit alternatives-2 eutils multilib numeric numeric-int64-multibuild
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="
-	https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz
-	https://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="dynamic openmp static-libs threads"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-
-MULTILIB_WRAPPED_HEADERS=(
-	/usr/include/openblas/openblas_config.h
-)
-
-PATCHES=(
-	"${DISTDIR}"/${PN}-0.2.11-gentoo.patch
-)
-
-get_openblas_flags() {
-	local openblas_flags=()
-	use dynamic && \
-		openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 )
-	$(numeric-int64_is_int64_build) && \
-		openblas_flags+=( INTERFACE64=1 )
-	# choose posix threads over openmp when the two are set
-	# yet to see the need of having the two profiles simultaneously
-	if use threads; then
-		openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 )
-	elif use openmp; then
-		openblas_flags+=( USE_OPENMP=1 )
-	fi
-	local profname=$(numeric-int64_get_module_name)
-	local libname="${profname//-/_}"
-	local underscoresuffix="${libname#${PN}}"
-	if [[ "${underscoresuffix}" != "_" ]]; then
-		local libnamesuffix="${underscoresuffix#_}"
-		openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} )
-	fi
-
-	[[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 )
-
-	echo "${openblas_flags[@]}"
-}
-
-get_openblas_abi_cflags() {
-	local openblas_abi_cflags=()
-	if [[ "${ABI}" == "x86" ]]; then
-		openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 )
-	else
-		openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 )
-	fi
-	$(numeric-int64_is_int64_build) && \
-		openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT )
-	echo "${openblas_abi_cflags[@]}"
-}
-
-src_unpack() {
-	default
-	find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
-		mv "${WORKDIR}"/*OpenBLAS* "${S}" || die
-}
-
-src_prepare() {
-	default
-
-	# lapack and lapacke are not modified from upstream lapack
-	sed \
-		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
-		-i Makefile.rule || die
-	numeric-int64-multibuild_copy_sources
-}
-
-src_configure() {
-	blas_configure() {
-		local openblas_abi_cflags="$(get_openblas_abi_cflags)"
-		local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
-		sed \
-			-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
-			-i Makefile.rule || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure
-}
-
-src_compile() {
-	# openblas already does multi-jobs
-	MAKEOPTS+=" -j1"
-	my_src_compile () {
-		local openblas_flags=$(get_openblas_flags)
-		# cflags already defined twice
-		unset CFLAGS || die
-		emake clean && emake libs shared ${openblas_flags}
-		mkdir -p libs && mv libopenblas* libs/ || die
-		# avoid pic when compiling static libraries, so re-compiling
-		if use static-libs; then
-			emake clean
-			emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
-			mv libopenblas* libs/ || die
-		fi
-
-		mv libs/libopenblas* . || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile
-}
-
-src_test() {
-	my_src_test () {
-		local openblas_flags=$(get_openblas_flags)
-		emake tests ${openblas_flags}
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test
-}
-
-src_install() {
-	my_src_install() {
-		local openblas_flags=$(get_openblas_flags)
-		local profname=$(numeric-int64_get_module_name)
-		local pcfile
-		# The file /usr/include/openblas/openblas_config.h is generated during the install.
-		# The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
-		# OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
-		# from /usr/include/openblas/openblas_config.h.  We then specify it in Cflags in
-		# the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
-		sed -e '/#define USE64BITINT/d' \
-			-e '/#define ARCH_X86/d' \
-			-e '/#define __\(32\|64\)BIT__/d' \
-			-i config_last.h \
-			|| die "Could not ensure there is no definition of USE64BITINT in config_last.h"
-		emake install \
-			DESTDIR="${D}" PREFIX="${EPREFIX}" ${openblas_flags} \
-			OPENBLAS_INCLUDE_DIR='$(PREFIX)'/usr/include/${PN} \
-			OPENBLAS_LIBRARY_DIR='$(PREFIX)'/usr/$(get_libdir)
-		if ! use static-libs; then
-			rm "${ED}"usr/$(get_libdir)/lib*.a || die
-		fi
-
-		local openblas_abi_cflags=$(get_openblas_abi_cflags)
-		local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags)
-		local libname="${profname//-/_}"
-
-		create_pkgconfig \
-			--name "${profname}" \
-			--libs "-L\${libdir} -l${libname}" \
-			--libs-private "-lm" \
-			--cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \
-			${profname}
-
-		if [[ ${CHOST} == *-darwin* ]] ; then
-			cd "${ED}"/usr/$(get_libdir) || die
-			local d
-			for d in *.dylib; do
-				ebegin "Correcting install_name of ${d}"
-				install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die
-				eend $?
-			done
-		fi
-		if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
-			multilib_prepare_wrappers
-			multilib_check_headers
-		fi
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install
-
-	printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh || die
-	numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME}
-	numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME}
-
-	multilib_install_wrappers
-
-	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt
-}

diff --git a/sci-libs/openblas/openblas-0.2.15-r1.ebuild b/sci-libs/openblas/openblas-0.2.15-r1.ebuild
deleted file mode 100644
index e4f0c89ed..000000000
--- a/sci-libs/openblas/openblas-0.2.15-r1.ebuild
+++ /dev/null
@@ -1,188 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-NUMERIC_MODULE_NAME="openblas"
-
-inherit alternatives-2 eutils multilib numeric numeric-int64-multibuild
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="
-	https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz
-	https://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="dynamic openmp static-libs threads"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-
-MULTILIB_WRAPPED_HEADERS=(
-	/usr/include/openblas/openblas_config.h
-)
-
-PATCHES=(
-	"${DISTDIR}"/${PN}-0.2.11-gentoo.patch
-)
-
-get_openblas_flags() {
-	local openblas_flags=()
-	use dynamic && \
-		openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 )
-	$(numeric-int64_is_int64_build) && \
-		openblas_flags+=( INTERFACE64=1 )
-	# choose posix threads over openmp when the two are set
-	# yet to see the need of having the two profiles simultaneously
-	if use threads; then
-		openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 )
-	elif use openmp; then
-		openblas_flags+=( USE_OPENMP=1 )
-	fi
-	local profname=$(numeric-int64_get_module_name)
-	local libname="${profname//-/_}"
-	local underscoresuffix="${libname#${PN}}"
-	if [[ "${underscoresuffix}" != "_" ]]; then
-		local libnamesuffix="${underscoresuffix#_}"
-		openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} )
-	fi
-
-	[[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 )
-
-	echo "${openblas_flags[@]}"
-}
-
-get_openblas_abi_cflags() {
-	local openblas_abi_cflags=()
-	if [[ "${ABI}" == "x86" ]]; then
-		openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 )
-	else
-		openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 )
-	fi
-	$(numeric-int64_is_int64_build) && \
-		openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT )
-	use openmp && openblas_abi_cflags+=( -fopenmp )
-	echo "${openblas_abi_cflags[@]}"
-}
-
-src_unpack() {
-	default
-	find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
-		mv "${WORKDIR}"/*OpenBLAS* "${S}" || die
-}
-
-src_prepare() {
-	default
-
-	# lapack and lapacke are not modified from upstream lapack
-	sed \
-		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
-		-i Makefile.rule || die
-	numeric-int64-multibuild_copy_sources
-}
-
-src_configure() {
-	blas_configure() {
-		local openblas_abi_cflags="$(get_openblas_abi_cflags)"
-		local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
-		sed \
-			-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
-			-i Makefile.rule || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure
-}
-
-src_compile() {
-	# openblas already does multi-jobs
-	MAKEOPTS+=" -j1"
-	my_src_compile () {
-		local openblas_flags=$(get_openblas_flags)
-		# cflags already defined twice
-		unset CFLAGS || die
-		emake clean && emake libs shared ${openblas_flags}
-		mkdir -p libs && mv libopenblas* libs/ || die
-		# avoid pic when compiling static libraries, so re-compiling
-		if use static-libs; then
-			emake clean
-			emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
-			mv libopenblas* libs/ || die
-		fi
-
-		mv libs/libopenblas* . || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile
-}
-
-src_test() {
-	my_src_test () {
-		local openblas_flags=$(get_openblas_flags)
-		emake tests ${openblas_flags}
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test
-}
-
-src_install() {
-	my_src_install() {
-		local openblas_flags=$(get_openblas_flags)
-		local profname=$(numeric-int64_get_module_name)
-		local pcfile
-		# The file /usr/include/openblas/openblas_config.h is generated during the install.
-		# The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
-		# OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
-		# from /usr/include/openblas/openblas_config.h.  We then specify it in Cflags in
-		# the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
-		sed -e '/#define USE64BITINT/d' \
-			-e '/#define ARCH_X86/d' \
-			-e '/#define __\(32\|64\)BIT__/d' \
-			-i config_last.h \
-			|| die "Could not ensure there is no definition of USE64BITINT in config_last.h"
-		emake install \
-			DESTDIR="${D}" PREFIX="${EPREFIX}" ${openblas_flags} \
-			OPENBLAS_INCLUDE_DIR='$(PREFIX)'/usr/include/${PN} \
-			OPENBLAS_LIBRARY_DIR='$(PREFIX)'/usr/$(get_libdir)
-		if ! use static-libs; then
-			rm "${ED}"usr/$(get_libdir)/lib*.a || die
-		fi
-
-		local openblas_abi_cflags=$(get_openblas_abi_cflags)
-		local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags)
-		local libname="${profname//-/_}"
-
-		create_pkgconfig \
-			--name "${profname}" \
-			--libs "-L\${libdir} -l${libname}" \
-			--libs-private "-lm" \
-			--cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \
-			${profname}
-
-		if [[ ${CHOST} == *-darwin* ]] ; then
-			cd "${ED}"/usr/$(get_libdir) || die
-			local d
-			for d in *.dylib; do
-				ebegin "Correcting install_name of ${d}"
-				install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die
-				eend $?
-			done
-		fi
-		if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
-			multilib_prepare_wrappers
-			multilib_check_headers
-		fi
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install
-
-	printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh || die
-	numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME}
-	numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME}
-
-	multilib_install_wrappers
-
-	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt
-}

diff --git a/sci-libs/openblas/openblas-0.2.19-r1.ebuild b/sci-libs/openblas/openblas-0.2.19-r1.ebuild
deleted file mode 100644
index 38378cecd..000000000
--- a/sci-libs/openblas/openblas-0.2.19-r1.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-NUMERIC_MODULE_NAME="openblas"
-
-inherit alternatives-2 eutils multilib numeric numeric-int64-multibuild
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz
-	https://sagetrac.lipn.univ-paris13.fr/sage/${PN}-0.2.19-clang-3.9.patch"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="dynamic openmp static-libs threads"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-
-MULTILIB_WRAPPED_HEADERS=(
-	/usr/include/openblas/openblas_config.h
-)
-
-PATCHES=(
-	"${DISTDIR}"/${PN}-0.2.19-clang-3.9.patch
-	"${FILESDIR}"/${PN}-0.2.19-MAKE.patch
-	"${FILESDIR}"/${PN}-0.2.19-utest_ldflags.patch
-	)
-
-get_openblas_flags() {
-	local openblas_flags=()
-	use dynamic && \
-		openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 )
-	$(numeric-int64_is_int64_build) && \
-		openblas_flags+=( INTERFACE64=1 )
-	# choose posix threads over openmp when the two are set
-	# yet to see the need of having the two profiles simultaneously
-	if use threads; then
-		openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 )
-	elif use openmp; then
-		openblas_flags+=( USE_OPENMP=1 )
-	fi
-	local profname=$(numeric-int64_get_module_name)
-	local libname="${profname//-/_}"
-	local underscoresuffix="${libname#${PN}}"
-	if [[ "${underscoresuffix}" != "_" ]]; then
-		local libnamesuffix="${underscoresuffix#_}"
-		openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} )
-	fi
-
-	[[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 )
-
-	echo "${openblas_flags[@]}"
-}
-
-get_openblas_abi_cflags() {
-	local openblas_abi_cflags=()
-	if [[ "${ABI}" == "x86" ]]; then
-		openblas_abi_cflags=( -DARCH_X86=1 -DOPENBLAS___32BIT__=1 )
-	elif [[ "${ABI}" == "amd64" ]]; then
-		openblas_abi_cflags=( -DARCH_X86_64=1 -DOPENBLAS___64BIT__=1 )
-	elif [[ "${ABI}" == "ppc64" ]]; then
-		openblas_abi_cflags=( -DARCH_POWER=1 -DOPENBLAS___64BIT__=1 )
-	else
-		die "unsupported abi: ${ABI}"
-	fi
-	$(numeric-int64_is_int64_build) && \
-		openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT )
-	use openmp && openblas_abi_cflags+=( -fopenmp )
-	echo "${openblas_abi_cflags[@]}"
-}
-
-src_unpack() {
-	default
-	find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
-		mv "${WORKDIR}"/*OpenBLAS* "${S}" || die
-}
-
-src_prepare() {
-	default
-
-	# lapack and lapacke are not modified from upstream lapack
-	sed \
-		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
-		-i Makefile.rule || die
-	numeric-int64-multibuild_copy_sources
-}
-
-src_configure() {
-	blas_configure() {
-		local openblas_abi_cflags="$(get_openblas_abi_cflags)"
-		local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
-		sed \
-			-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
-			-i Makefile.rule || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure
-}
-
-src_compile() {
-	# openblas already does multi-jobs
-	MAKEOPTS+=" -j1"
-	my_src_compile () {
-		local openblas_flags=$(get_openblas_flags)
-		# cflags already defined twice
-		unset CFLAGS || die
-		emake clean && emake libs shared ${openblas_flags}
-		mkdir -p libs && mv libopenblas* libs/ || die
-		# avoid pic when compiling static libraries, so re-compiling
-		if use static-libs; then
-			emake clean
-			emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
-			mv libopenblas* libs/ || die
-		fi
-
-		mv libs/libopenblas* . || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile
-}
-
-src_test() {
-	my_src_test () {
-		local openblas_flags=$(get_openblas_flags)
-		emake tests ${openblas_flags}
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test
-}
-
-src_install() {
-	my_src_install() {
-		local openblas_flags=$(get_openblas_flags)
-		local profname=$(numeric-int64_get_module_name)
-		local pcfile
-		# The file /usr/include/openblas/openblas_config.h is generated during the install.
-		# The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
-		# OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
-		# from /usr/include/openblas/openblas_config.h.  We then specify it in Cflags in
-		# the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
-		sed -e '/#define USE64BITINT/d' \
-			-e '/#define ARCH_X86/d' \
-			-e '/#define __\(32\|64\)BIT__/d' \
-			-i config_last.h \
-			|| die "Could not ensure there is no definition of USE64BITINT in config_last.h"
-		emake install \
-			DESTDIR="${D}" PREFIX="${EPREFIX}" ${openblas_flags} \
-			OPENBLAS_INCLUDE_DIR='$(PREFIX)'/usr/include/${PN} \
-			OPENBLAS_LIBRARY_DIR='$(PREFIX)'/usr/$(get_libdir)
-		if ! use static-libs; then
-			rm "${ED}"usr/$(get_libdir)/lib*.a || die
-		fi
-
-		local openblas_abi_cflags=$(get_openblas_abi_cflags)
-		local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags)
-		local libname="${profname//-/_}"
-
-		create_pkgconfig \
-			--name "${profname}" \
-			--libs "-l${libname}" \
-			--libs-private "-lm" \
-			--cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \
-			${profname}
-
-		if [[ ${CHOST} == *-darwin* ]] ; then
-			cd "${ED}"/usr/$(get_libdir) || die
-			local d
-			for d in *.dylib; do
-				ebegin "Correcting install_name of ${d}"
-				install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die
-				eend $?
-			done
-		fi
-		if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
-			multilib_prepare_wrappers
-			multilib_check_headers
-		fi
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install
-
-	printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh || die
-	numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME}
-	numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME}
-
-	multilib_install_wrappers
-
-	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt
-}

diff --git a/sci-libs/openblas/openblas-0.2.20.ebuild b/sci-libs/openblas/openblas-0.2.20.ebuild
deleted file mode 100644
index 838c334d6..000000000
--- a/sci-libs/openblas/openblas-0.2.20.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-NUMERIC_MODULE_NAME="openblas"
-
-inherit alternatives-2 eutils multilib numeric numeric-int64-multibuild
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="dynamic openmp static-libs threads"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-
-MULTILIB_WRAPPED_HEADERS=(
-	/usr/include/openblas/openblas_config.h
-)
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-0.2.20-non-glibc.patch
-	)
-
-get_openblas_flags() {
-	local openblas_flags=()
-	use dynamic && \
-		openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 )
-	$(numeric-int64_is_int64_build) && \
-		openblas_flags+=( INTERFACE64=1 )
-	# choose posix threads over openmp when the two are set
-	# yet to see the need of having the two profiles simultaneously
-	if use threads; then
-		openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 )
-	elif use openmp; then
-		openblas_flags+=( USE_OPENMP=1 )
-	else
-		openblas_flags+=( USE_THREAD=0 ) # single-threaded
-	fi
-	local profname=$(numeric-int64_get_module_name)
-	local libname="${profname//-/_}"
-	local underscoresuffix="${libname#${PN}}"
-	if [[ "${underscoresuffix}" != "_" ]]; then
-		local libnamesuffix="${underscoresuffix#_}"
-		openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} )
-	fi
-
-	[[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 )
-
-	echo "${openblas_flags[@]}"
-}
-
-get_openblas_abi_cflags() {
-	local openblas_abi_cflags=()
-	if [[ "${ABI}" == "x86" ]]; then
-		openblas_abi_cflags=( -DARCH_X86=1 -DOPENBLAS___32BIT__=1 )
-	elif [[ "${ABI}" == "amd64" ]]; then
-		openblas_abi_cflags=( -DARCH_X86_64=1 -DOPENBLAS___64BIT__=1 )
-	elif [[ "${ABI}" == "ppc64" ]]; then
-		openblas_abi_cflags=( -DARCH_POWER=1 -DOPENBLAS___64BIT__=1 )
-	else
-		die "unsupported abi: ${ABI}"
-	fi
-	$(numeric-int64_is_int64_build) && \
-		openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT )
-	use openmp && openblas_abi_cflags+=( -fopenmp )
-	echo "${openblas_abi_cflags[@]}"
-}
-
-src_unpack() {
-	default
-	find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
-		mv "${WORKDIR}"/*OpenBLAS* "${S}" || die
-}
-
-src_prepare() {
-	default
-
-	# lapack and lapacke are not modified from upstream lapack
-	sed \
-		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
-		-i Makefile.rule || die
-	numeric-int64-multibuild_copy_sources
-}
-
-src_configure() {
-	blas_configure() {
-		local openblas_abi_cflags="$(get_openblas_abi_cflags)"
-		local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
-		sed \
-			-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
-			-i Makefile.rule || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure
-}
-
-src_compile() {
-	# openblas already does multi-jobs
-	MAKEOPTS+=" -j1"
-	my_src_compile () {
-		local openblas_flags=$(get_openblas_flags)
-		# cflags already defined twice
-		unset CFLAGS || die
-		emake clean && emake libs shared ${openblas_flags}
-		mkdir -p libs && mv libopenblas* libs/ || die
-		# avoid pic when compiling static libraries, so re-compiling
-		if use static-libs; then
-			emake clean
-			emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
-			mv libopenblas* libs/ || die
-		fi
-
-		mv libs/libopenblas* . || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile
-}
-
-src_test() {
-	my_src_test () {
-		local openblas_flags=$(get_openblas_flags)
-		emake tests ${openblas_flags}
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test
-}
-
-src_install() {
-	my_src_install() {
-		local openblas_flags=$(get_openblas_flags)
-		local profname=$(numeric-int64_get_module_name)
-		local pcfile
-		# The file /usr/include/openblas/openblas_config.h is generated during the install.
-		# The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
-		# OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
-		# from /usr/include/openblas/openblas_config.h.  We then specify it in Cflags in
-		# the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
-		sed -e '/#define USE64BITINT/d' \
-			-e '/#define ARCH_X86/d' \
-			-e '/#define __\(32\|64\)BIT__/d' \
-			-i config_last.h \
-			|| die "Could not ensure there is no definition of USE64BITINT in config_last.h"
-		emake install \
-			DESTDIR="${D}" PREFIX="${EPREFIX}" ${openblas_flags} \
-			OPENBLAS_INCLUDE_DIR='$(PREFIX)'/usr/include/${PN} \
-			OPENBLAS_LIBRARY_DIR='$(PREFIX)'/usr/$(get_libdir)
-		if ! use static-libs; then
-			rm "${ED}"usr/$(get_libdir)/lib*.a || die
-		fi
-
-		local openblas_abi_cflags=$(get_openblas_abi_cflags)
-		local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags)
-		local libname="${profname//-/_}"
-
-		create_pkgconfig \
-			--name "${profname}" \
-			--libs "-l${libname}" \
-			--libs-private "-lm" \
-			--cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \
-			${profname}
-
-		if [[ ${CHOST} == *-darwin* ]] ; then
-			cd "${ED}"/usr/$(get_libdir) || die
-			local d
-			for d in *.dylib; do
-				ebegin "Correcting install_name of ${d}"
-				install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die
-				eend $?
-			done
-		fi
-		if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
-			multilib_prepare_wrappers
-			multilib_check_headers
-		fi
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install
-
-	printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh || die
-	numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME}
-	numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME}
-
-	multilib_install_wrappers
-
-	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt
-}

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
deleted file mode 100644
index e4ed2800f..000000000
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ /dev/null
@@ -1,181 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-NUMERIC_MODULE_NAME="openblas"
-
-inherit alternatives-2 eutils git-r3 multilib numeric numeric-int64-multibuild
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="https://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
-EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
-EGIT_BRANCH="develop"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS=""
-IUSE="dynamic openmp static-libs threads"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-
-MULTILIB_WRAPPED_HEADERS=(
-	/usr/include/openblas/openblas_config.h
-)
-
-PATCHES=(
-	"${DISTDIR}"/${PN}-0.2.11-gentoo.patch
-)
-
-get_openblas_flags() {
-	local openblas_flags=()
-	use dynamic && \
-		openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 )
-	$(numeric-int64_is_int64_build) && \
-		openblas_flags+=( INTERFACE64=1 )
-	# choose posix threads over openmp when the two are set
-	# yet to see the need of having the two profiles simultaneously
-	if use threads; then
-		openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 )
-	elif use openmp; then
-		openblas_flags+=( USE_OPENMP=1 )
-	fi
-	local profname=$(numeric-int64_get_module_name)
-	local libname="${profname//-/_}"
-	local underscoresuffix="${libname#${PN}}"
-	if [[ "${underscoresuffix}" != "_" ]]; then
-		local libnamesuffix="${underscoresuffix#_}"
-		openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} )
-	fi
-
-	[[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 )
-
-	echo "${openblas_flags[@]}"
-}
-
-get_openblas_abi_cflags() {
-	local openblas_abi_cflags=()
-	if [[ "${ABI}" == "x86" ]]; then
-		openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 )
-	else
-		openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 )
-	fi
-	$(numeric-int64_is_int64_build) && \
-		openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT )
-	echo "${openblas_abi_cflags[@]}"
-}
-
-src_prepare() {
-	default
-
-	# lapack and lapacke are not modified from upstream lapack
-	sed \
-		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
-		-i Makefile.rule || die
-	numeric-int64-multibuild_copy_sources
-}
-
-src_configure() {
-	blas_configure() {
-		local openblas_abi_cflags="$(get_openblas_abi_cflags)"
-		local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
-		sed \
-			-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \
-			-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
-			-i Makefile.rule || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure
-}
-
-src_compile() {
-	# openblas already does multi-jobs
-	MAKEOPTS+=" -j1"
-	my_src_compile () {
-		local openblas_flags=$(get_openblas_flags)
-		# cflags already defined twice
-		unset CFLAGS || die
-		emake clean && emake libs shared ${openblas_flags}
-		mkdir -p libs && mv libopenblas* libs/ || die
-		# avoid pic when compiling static libraries, so re-compiling
-		if use static-libs; then
-			emake clean
-			emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
-			mv libopenblas* libs/ || die
-		fi
-
-		mv libs/libopenblas* . || die
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile
-}
-
-src_test() {
-	my_src_test () {
-		local openblas_flags=$(get_openblas_flags)
-		emake tests ${openblas_flags}
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test
-}
-
-src_install() {
-	my_src_install() {
-		local openblas_flags=$(get_openblas_flags)
-		local profname=$(numeric-int64_get_module_name)
-		local pcfile
-		# The file /usr/include/openblas/openblas_config.h is generated during the install.
-		# The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
-		# OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
-		# from /usr/include/openblas/openblas_config.h.  We then specify it in Cflags in
-		# the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
-		sed -e '/#define USE64BITINT/d' \
-			-e '/#define ARCH_X86/d' \
-			-e '/#define __\(32\|64\)BIT__/d' \
-			-i config_last.h \
-			|| die "Could not ensure there is no definition of USE64BITINT in config_last.h"
-		emake install \
-			PREFIX="${ED}"usr ${openblas_flags} \
-			OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
-			OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
-		if ! use static-libs; then
-			rm "${ED}"usr/$(get_libdir)/lib*.a || die
-		fi
-
-		local openblas_abi_cflags=$(get_openblas_abi_cflags)
-		local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags)
-		local libname="${profname//-/_}"
-
-		create_pkgconfig \
-			--name "${profname}" \
-			--libs "-L\${libdir} -l${libname}" \
-			--libs-private "-lm" \
-			--cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \
-			${profname}
-
-		if [[ ${CHOST} == *-darwin* ]] ; then
-			cd "${ED}"/usr/$(get_libdir) || die
-			local d
-			for d in *.dylib; do
-				ebegin "Correcting install_name of ${d}"
-				install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die
-				eend $?
-			done
-		fi
-		if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
-			multilib_prepare_wrappers
-			multilib_check_headers
-		fi
-	}
-	numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install
-
-	printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh
-	numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME}
-	numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME}
-
-	multilib_install_wrappers
-
-	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt
-}


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

end of thread, other threads:[~2019-07-25  4:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-10 21:28 [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/ Sebastien Fabbro
  -- strict thread matches above, loose matches on Subject: below --
2019-07-25  4:40 Benda XU
2017-04-29  9:50 Justin Lecher
2014-10-06  5:56 Justin Lecher
2013-07-24 23:05 Sebastien Fabbro
2012-06-27 15:06 Sebastien Fabbro
2012-06-26 22:27 Sebastien Fabbro
2012-03-23 20:23 Andrea Arteaga
2011-08-04  0:30 Andrea Arteaga

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