From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qolpc-0002DS-8K for garchives@archives.gentoo.org; Thu, 04 Aug 2011 00:30:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 67F0F21C0EB; Thu, 4 Aug 2011 00:30:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 19EEA21C0EB for ; Thu, 4 Aug 2011 00:30:27 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 719D62AC010 for ; Thu, 4 Aug 2011 00:30:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BB5968003C for ; Thu, 4 Aug 2011 00:30:26 +0000 (UTC) From: "Andrea Arteaga" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrea Arteaga" Message-ID: <088ed0d541b43463b41f80c4c596a1b41f9bf5a9.spiros@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/, sci-libs/openblas/files/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/openblas/ChangeLog sci-libs/openblas/files/openblas-aliasing.patch sci-libs/openblas/files/openblas-sharedlibs.patch sci-libs/openblas/metadata.xml sci-libs/openblas/openblas-0.1_alpha2.ebuild sci-libs/openblas/openblas-9999.ebuild X-VCS-Directories: sci-libs/openblas/ sci-libs/openblas/files/ X-VCS-Committer: spiros X-VCS-Committer-Name: Andrea Arteaga X-VCS-Revision: 088ed0d541b43463b41f80c4c596a1b41f9bf5a9 Date: Thu, 4 Aug 2011 00:30:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 60b7ee2ccdd9e0ba91d60afaead94aaa commit: 088ed0d541b43463b41f80c4c596a1b41f9bf5a9 Author: Andrea Arteaga gmail com> AuthorDate: Thu Aug 4 00:30:05 2011 +0000 Commit: Andrea Arteaga gmail com> CommitDate: Thu Aug 4 00:30:05 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sci.git;a=3Dc= ommit;h=3D088ed0d5 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 openblas-0.1_alpha2.= ebuild + Import from bicatali overlay. Added alpha version. + + 20 Jun 2011; S=C3=A9bastien Fabbro openblas-9999= .ebuild: + Added more include files, thanks Fran=C3=A7ois Bissey for his note + + 31 May 2011; S=C3=A9bastien Fabbro openblas-9999= .ebuild, + +files/openblas-aliasing.patch: + Fixed shared libs. Make ebuild easier to debug with a generated rule M= akefile + instead of dynamic. Added a aliasing patch. Switched to EAPI4. + + 23 Feb 2011; S=C3=A9bastien Fabbro openblas-9999= .ebuild, + files/openblas-sharedlibs.patch: + fixed ldflags propagation + +*openblas-9999 (23 Feb 2011) + + 23 Feb 2011; S=C3=A9bastien Fabbro +openblas-999= 9.ebuild, + +files/openblas-sharedlibs.patch, +metadata.xml: + Initial import + diff --git a/sci-libs/openblas/files/openblas-aliasing.patch b/sci-libs/o= penblas/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 =3D 0; node < MAX_NODES; node ++) common -> node_info[node]= =3D 0; +=20 + while ((dir =3D readdir(dp)) !=3D NULL) { +- if (*(unsigned int *) dir -> d_name =3D=3D 0x065646f6eU) { ++ if (*(char *) dir -> d_name =3D=3D 0x065646f6eU) { +=20 + node =3D atoi(&dir -> d_name[4]); +=20 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) +=20 + ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c +- $(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \ +- -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ +- -Wl,--retain-symbols-file=3Dlinux.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=3D= $(LIBSONAME) \ ++ -Wl,--retain-symbols-file=3Dlinux.def $(EXTRALIB) -o ../$(LIBSONAME) ++ $(CC) $(CFLAGS) -w linktest.c ../$(LIBSONAME) $(FEXTRALIB) -o linktest= && echo OK. + rm -f linktest +=20 + endif +@@ -110,10 +110,10 @@ + so : ../$(LIBSONAME) +=20 + ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c +- $(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \ +- -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ +- -Wl,--retain-symbols-file=3Dlinux.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=3D= $(LIBSONAME) \ ++ -Wl,--retain-symbols-file=3Dlinux.def $(EXTRALIB) -o ../$(LIBSONAME) ++ $(CC) $(CFLAGS) -w linktest.c ../$(LIBSONAME) $(FEXTRALIB) -o linktest= && echo OK. + rm -f linktest +=20 + endif +@@ -129,9 +129,9 @@ + ifeq ($(OSNAME), SunOS) +=20 + 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=3D$(LIBSONAME) \ ++ -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB) -= o ../$(LIBSONAME)=20 ++ $(CC) $(CFLAGS) -w linktest.c ../$(LIBSONAME) $(FEXTRALIB) -o linktes= t && echo OK. + rm -f linktest +=20 + 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 @@ + + + +sci + + OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD + version. See sci-libs/gotoblas2 for more on GotoBLAS2. + + + Build the 64 bits integer library + Build the CBLAS interface + Build dynamic architecture detection at run tim= e (for multi targets) + + diff --git a/sci-libs/openblas/openblas-0.1_alpha2.ebuild b/sci-libs/open= blas/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=3D4 + +inherit eutils toolchain-funcs alternatives-2 git-2 + +DESCRIPTION=3D"Optimized BLAS library based on GotoBLAS2" +HOMEPAGE=3D"http://xianyi.github.com/OpenBLAS/" +EGIT_REPO_URI=3D"git://github.com/xianyi/OpenBLAS.git" +EGIT_COMMIT=3D"v0.1alpha2.2" + +LICENSE=3D"BSD" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" + +IUSE=3D"+incblas int64 dynamic openmp static-libs threads" + +RDEPEND=3D"virtual/fortran" +DEPEND=3D"${RDEPEND}" + +S=3D"${WORKDIR}/${MYPN}" + +pkg_setup() { + ewarn "If the compilation fails, try setting the TARGET environment var= iable" + 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*=3D/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=3D$(use openmp && echo 1) + use threads && use openmp && use_openmp=3D"" && \ + einfo "openmp and threads enabled: using threads" + sed -i \ + -e "s:^#\s*\(NO_LAPACK\)\s*=3D.*:\1=3D1:" \ + -e "s:^#\s*\(CC\)\s*=3D.*:\1=3D$(tc-getCC):" \ + -e "s:^#\s*\(FC\)\s*=3D.*:\1=3D$(tc-getFC):" \ + -e "s:^#\s*\(USE_THREAD\)\s*=3D.*:\1=3D$(use threads && echo 1 || echo= 0):" \ + -e "s:^#\s*\(USE_OPENMP\)\s*=3D.*:\1=3D${use_openmp}:" \ + -e "s:^#\s*\(DYNAMIC_ARCH\)\s*=3D.*:\1=3D$(use dynamic && echo 1):" \ + -e "s:^#\s*\(INTERFACE64\)\s*=3D.*:\1=3D$(use int64 && echo 1):" \ + -e "s:^#\s*\(NO_CBLAS\)\s*=3D.*:\1=3D$(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=3D +} + +src_test() { + emake tests +} + +src_install() { + local profname=3D${PN} threads + use int64 && profname=3D${profname}-int64 + if use threads; then + threads=3D"-pthread" + profname=3D${profname}-threads + elif use openmp; then + profname=3D${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=3D${EPREFIX}/usr + libdir=3D\${prefix}/$(get_libdir) + includedir=3D\${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}.tx= t +} diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/o= penblas-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=3D4 + +inherit eutils toolchain-funcs alternatives-2 git-2 + +DESCRIPTION=3D"Optimized BLAS library based on GotoBLAS2" +HOMEPAGE=3D"http://xianyi.github.com/OpenBLAS/" +EGIT_REPO_URI=3D"git://github.com/xianyi/OpenBLAS.git" + +LICENSE=3D"BSD" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" + +IUSE=3D"+incblas int64 dynamic openmp static-libs threads" + +RDEPEND=3D"virtual/fortran" +DEPEND=3D"${RDEPEND}" + +S=3D"${WORKDIR}/${MYPN}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-{sharedlibs,aliasing}.patch + # respect LDFLAGS + sed -i -e '/^LDFLAGS\s*=3D/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=3D$(use openmp && echo 1) + use threads && use openmp && use_openmp=3D"" && \ + einfo "openmp and threads enabled: using threads" + sed -i \ + -e "s:^#\s*\(NO_LAPACK\)\s*=3D.*:\1=3D1:" \ + -e "s:^#\s*\(CC\)\s*=3D.*:\1=3D$(tc-getCC):" \ + -e "s:^#\s*\(FC\)\s*=3D.*:\1=3D$(tc-getFC):" \ + -e "s:^#\s*\(USE_THREAD\)\s*=3D.*:\1=3D$(use threads && echo 1 || echo= 0):" \ + -e "s:^#\s*\(USE_OPENMP\)\s*=3D.*:\1=3D${use_openmp}:" \ + -e "s:^#\s*\(DYNAMIC_ARCH\)\s*=3D.*:\1=3D$(use dynamic && echo 1):" \ + -e "s:^#\s*\(INTERFACE64\)\s*=3D.*:\1=3D$(use int64 && echo 1):" \ + -e "s:^#\s*\(NO_CBLAS\)\s*=3D.*:\1=3D$(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=3D +} + +src_test() { + emake tests +} + +src_install() { + local profname=3D${PN} threads + use int64 && profname=3D${profname}-int64 + if use threads; then + threads=3D"-pthread" + profname=3D${profname}-threads + elif use openmp; then + profname=3D${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=3D${EPREFIX}/usr + libdir=3D\${prefix}/$(get_libdir) + includedir=3D\${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}.tx= t +}