From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- sci-libs/lapack-reference/Manifest | 4 + .../files/eselect.lapack.reference | 4 + .../files/eselect.lapack.reference-ng | 1 + .../files/lapack-reference-3.1.1-test-fix.patch | 36 +++++++ .../lapack-reference-3.2.1-parallel-make.patch | 112 +++++++++++++++++++++ .../lapack-reference-3.1.1-r1.ebuild | 91 +++++++++++++++++ .../lapack-reference-3.2.1-r1.ebuild | 98 ++++++++++++++++++ .../lapack-reference-3.2.1-r3.ebuild | 101 +++++++++++++++++++ sci-libs/lapack-reference/metadata.xml | 13 +++ 9 files changed, 460 insertions(+) create mode 100644 sci-libs/lapack-reference/Manifest create mode 100644 sci-libs/lapack-reference/files/eselect.lapack.reference create mode 100644 sci-libs/lapack-reference/files/eselect.lapack.reference-ng create mode 100644 sci-libs/lapack-reference/files/lapack-reference-3.1.1-test-fix.patch create mode 100644 sci-libs/lapack-reference/files/lapack-reference-3.2.1-parallel-make.patch create mode 100644 sci-libs/lapack-reference/lapack-reference-3.1.1-r1.ebuild create mode 100644 sci-libs/lapack-reference/lapack-reference-3.2.1-r1.ebuild create mode 100644 sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild create mode 100644 sci-libs/lapack-reference/metadata.xml (limited to 'sci-libs/lapack-reference') diff --git a/sci-libs/lapack-reference/Manifest b/sci-libs/lapack-reference/Manifest new file mode 100644 index 00000000000..a98415cbb8d --- /dev/null +++ b/sci-libs/lapack-reference/Manifest @@ -0,0 +1,4 @@ +DIST lapack-3.2.1.tgz 4792502 SHA256 5825f83971157001fd4235514afe8ff5fc16e1c06b2e872e442c242efd6c166d SHA512 a89b88540f8e5b05b7c58e8e301a5068729ceb35fcb2143edfff1644458ff1a375e5185492cf116b50409fe0c17b51c253a2987f4df83e9f9c3968a4b77e5d97 WHIRLPOOL f5c4be0a4e595ea5276a4878ab6e3578bb621be72142b6bf6cb15fc45bd52558c89b04a7ee0d1558b4f0aa9d1cff9cad43667f2251762dc8ad6aa5e687536149 +DIST lapack-lite-3.1.1.tgz 5332509 SHA256 505a13272d0d71c45ea52be2de74b0562b234ea3ccf5160665c7a2ee74a58437 SHA512 492b932ef313339ce6b4e63ac8f778489e6870b0eb85f7b086f3c844e75f98e7f85382c7556dfa368ab8320b6f02d1df8ccfcb40b5c0b7c2d74518b7c309e75c WHIRLPOOL 11145043d16b8c2972229e17a24e92e62987c08e84d91b81a7f4767b80f13844faffb2a2798b321a78c7127d849a0fd60cbb1605f03e150b4eaa6c230f0e7fdd +DIST lapack-reference-3.1.1-autotools.patch.bz2 7233 SHA256 63e2c0b64118ca20aed3ca52dbc553ba924c242d3a0b07e6236dee99ede16802 SHA512 3ae61a9d569bdbe3d416652feedf1ae26fe85b23d919fb9d493e1474e616eeb23e87738ecb4970dde5f320812d3bb71c0f3c432548ab8e978941d90afe4cb418 WHIRLPOOL 449d9bf9c7f58c019804708b10f902919e55a722af6fe31904cd7b941074c66c68ef809e56fcce99e6f946da8e69be383b838a6a866ede6ee925268d6b24d423 +DIST lapack-reference-3.2.1-autotools.patch.bz2 13338 SHA256 de2ab4ea9723f549c77b38d932e5ddb55b7b5583b0050e527505210460dcdf76 SHA512 957e8c7646a0d6ade9c0dfdaf2aa665a01f932dfda376ba1db164106fb174793e6504cdbed7daf158f23bb69502937963cb2e2d45ac720980d3832f6fc0fedbd WHIRLPOOL 8872222a124cd8593c8441034b6fd47463193e03bdebafc8b2790ebc73f49eb811762dc9cd98949bda0af7869f9d12b9ebbfc23457b5393d88c00a013c4f419d diff --git a/sci-libs/lapack-reference/files/eselect.lapack.reference b/sci-libs/lapack-reference/files/eselect.lapack.reference new file mode 100644 index 00000000000..fe1a777b2dc --- /dev/null +++ b/sci-libs/lapack-reference/files/eselect.lapack.reference @@ -0,0 +1,4 @@ +lapack/reference/liblapack.so /usr/@LIBDIR@/liblapack.so +lapack/reference/liblapack.so.0 /usr/@LIBDIR@/liblapack.so.0 +lapack/reference/liblapack.a /usr/@LIBDIR@/liblapack.a +../lapack/reference/lapack.pc /usr/@LIBDIR@/pkgconfig/lapack.pc diff --git a/sci-libs/lapack-reference/files/eselect.lapack.reference-ng b/sci-libs/lapack-reference/files/eselect.lapack.reference-ng new file mode 100644 index 00000000000..11231ea7128 --- /dev/null +++ b/sci-libs/lapack-reference/files/eselect.lapack.reference-ng @@ -0,0 +1 @@ +../lapack/reference/lapack.pc /usr/@LIBDIR@/pkgconfig/lapack.pc diff --git a/sci-libs/lapack-reference/files/lapack-reference-3.1.1-test-fix.patch b/sci-libs/lapack-reference/files/lapack-reference-3.1.1-test-fix.patch new file mode 100644 index 00000000000..e9b754403f3 --- /dev/null +++ b/sci-libs/lapack-reference/files/lapack-reference-3.1.1-test-fix.patch @@ -0,0 +1,36 @@ +diff -Naur lapack-lite-3.1.1/TESTING/ctest.in lapack-lite-3.1.1-new/TESTING/ctest.in +--- lapack-lite-3.1.1/TESTING/ctest.in 2007-02-26 13:20:47.000000000 -0500 ++++ lapack-lite-3.1.1-new/TESTING/ctest.in 2007-07-24 10:19:31.000000000 -0400 +@@ -32,5 +32,4 @@ + CQL 8 List types on next line if 0 < NTYPES < 8 + CQP 6 List types on next line if 0 < NTYPES < 6 + CTZ 3 List types on next line if 0 < NTYPES < 3 +-CLS 6 List types on next line if 0 < NTYPES < 6 + CEQ +diff -Naur lapack-lite-3.1.1/TESTING/dtest.in lapack-lite-3.1.1-new/TESTING/dtest.in +--- lapack-lite-3.1.1/TESTING/dtest.in 2007-02-26 13:20:49.000000000 -0500 ++++ lapack-lite-3.1.1-new/TESTING/dtest.in 2007-07-24 10:19:36.000000000 -0400 +@@ -30,5 +30,4 @@ + DQL 8 List types on next line if 0 < NTYPES < 8 + DQP 6 List types on next line if 0 < NTYPES < 6 + DTZ 3 List types on next line if 0 < NTYPES < 3 +-DLS 6 List types on next line if 0 < NTYPES < 6 + DEQ +diff -Naur lapack-lite-3.1.1/TESTING/stest.in lapack-lite-3.1.1-new/TESTING/stest.in +--- lapack-lite-3.1.1/TESTING/stest.in 2007-02-26 13:20:49.000000000 -0500 ++++ lapack-lite-3.1.1-new/TESTING/stest.in 2007-07-24 10:19:48.000000000 -0400 +@@ -30,5 +30,4 @@ + SQL 8 List types on next line if 0 < NTYPES < 8 + SQP 6 List types on next line if 0 < NTYPES < 6 + STZ 3 List types on next line if 0 < NTYPES < 3 +-SLS 6 List types on next line if 0 < NTYPES < 6 + SEQ +diff -Naur lapack-lite-3.1.1/TESTING/ztest.in lapack-lite-3.1.1-new/TESTING/ztest.in +--- lapack-lite-3.1.1/TESTING/ztest.in 2007-02-26 13:20:49.000000000 -0500 ++++ lapack-lite-3.1.1-new/TESTING/ztest.in 2007-07-24 10:19:42.000000000 -0400 +@@ -32,5 +32,4 @@ + ZQL 8 List types on next line if 0 < NTYPES < 8 + ZQP 6 List types on next line if 0 < NTYPES < 6 + ZTZ 3 List types on next line if 0 < NTYPES < 3 +-ZLS 6 List types on next line if 0 < NTYPES < 6 + ZEQ diff --git a/sci-libs/lapack-reference/files/lapack-reference-3.2.1-parallel-make.patch b/sci-libs/lapack-reference/files/lapack-reference-3.2.1-parallel-make.patch new file mode 100644 index 00000000000..72bc71ca2d9 --- /dev/null +++ b/sci-libs/lapack-reference/files/lapack-reference-3.2.1-parallel-make.patch @@ -0,0 +1,112 @@ +diff -Nauru lapack-3.2.1.old/TESTING/EIG/Makefile lapack-3.2.1/TESTING/EIG/Makefile +--- lapack-3.2.1.old/TESTING/EIG/Makefile 2008-11-17 17:51:24.000000000 -0500 ++++ lapack-3.2.1/TESTING/EIG/Makefile 2009-12-12 11:23:22.000000000 -0500 +@@ -126,25 +126,25 @@ + double: ../xeigtstd + complex16: ../xeigtstz + +-../xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ; \ +- $(LOADER) $(LOADOPTS) -o xeigtsts \ +- $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ +- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtsts $@ +- +-../xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ; \ +- $(LOADER) $(LOADOPTS) -o xeigtstc \ +- $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ +- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstc $@ +- +-../xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ; \ +- $(LOADER) $(LOADOPTS) -o xeigtstd \ +- $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ +- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstd $@ +- +-../xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ; \ +- $(LOADER) $(LOADOPTS) -o xeigtstz \ +- $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ +- ../../$(LAPACKLIB) $(BLASLIB) && mv xeigtstz $@ ++../xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ++ $(LOADER) $(LOADOPTS) \ ++ $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ ++ ../../$(LAPACKLIB) $(BLASLIB) -o ../xeigtsts ++ ++../xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ++ $(LOADER) $(LOADOPTS) \ ++ $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ ++ ../../$(LAPACKLIB) $(BLASLIB) -o ../xeigtstc ++ ++../xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ++ $(LOADER) $(LOADOPTS) \ ++ $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ ++ ../../$(LAPACKLIB) $(BLASLIB) -o ../xeigtstd ++ ++../xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ++ $(LOADER) $(LOADOPTS) \ ++ $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ ++ ../../$(LAPACKLIB) $(BLASLIB) -o ../xeigtstz + + $(AEIGTST): $(FRC) + $(SCIGTST): $(FRC) +@@ -169,4 +169,5 @@ + zchkee.o: zchkee.f + $(FORTRAN) $(DRVOPTS) -c $< -o $@ + +-.f.o : ; $(FORTRAN) $(OPTS) -c $< -o $@ ++.f.o : ++ $(FORTRAN) $(OPTS) -c $< -o $@ +diff -Nauru lapack-3.2.1.old/TESTING/LIN/Makefile lapack-3.2.1/TESTING/LIN/Makefile +--- lapack-3.2.1.old/TESTING/LIN/Makefile 2009-02-10 12:23:05.000000000 -0500 ++++ lapack-3.2.1/TESTING/LIN/Makefile 2009-12-12 07:22:41.000000000 -0500 +@@ -238,43 +238,43 @@ + + ../xlintsts : $(ALINTST) $(SLINTST) $(SCLNTST) + $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(SLINTST) \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o xlintsts && mv xlintsts $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o ../xlintsts + + ../xlintstc : $(ALINTST) $(CLINTST) $(SCLNTST) + $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(CLINTST) \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o xlintstc && mv xlintstc $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o ../xlintstc + + ../xlintstd : $(ALINTST) $(DLINTST) $(DZLNTST) + $(LOADER) $(LOADOPTS) $^ \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o xlintstd && mv xlintstd $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o ../xlintstd + + ../xlintstz : $(ALINTST) $(ZLINTST) $(DZLNTST) + $(LOADER) $(LOADOPTS) $(ALINTST) $(DZLNTST) $(ZLINTST) \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o xlintstz && mv xlintstz $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o ../xlintstz + + ../xlintstds : $(DSLINTST) + $(LOADER) $(LOADOPTS) $(DSLINTST) \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o xlintstds && mv xlintstds $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o ../xlintstds + + ../xlintstzc : $(ZCLINTST) + $(LOADER) $(LOADOPTS) $(ZCLINTST) \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o xlintstzc && mv xlintstzc $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o ../xlintstzc + + ../xlintstrfs : $(SLINTSTRFP) + $(LOADER) $(LOADOPTS) $(SLINTSTRFP) \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o xlintstrfs && mv xlintstrfs $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o ../xlintstrfs + + ../xlintstrfd : $(DLINTSTRFP) + $(LOADER) $(LOADOPTS) $(DLINTSTRFP) \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o xlintstrfd && mv xlintstrfd $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o ../xlintstrfd + + ../xlintstrfc : $(CLINTSTRFP) + $(LOADER) $(LOADOPTS) $(CLINTSTRFP) \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o xlintstrfc && mv xlintstrfc $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o ../xlintstrfc + + ../xlintstrfz : $(ZLINTSTRFP) + $(LOADER) $(LOADOPTS) $(ZLINTSTRFP) \ +- ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o xlintstrfz && mv xlintstrfz $@ ++ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o ../xlintstrfz + + $(ALINTST): $(FRC) + $(SCLNTST): $(FRC) diff --git a/sci-libs/lapack-reference/lapack-reference-3.1.1-r1.ebuild b/sci-libs/lapack-reference/lapack-reference-3.1.1-r1.ebuild new file mode 100644 index 00000000000..f6d42304bbc --- /dev/null +++ b/sci-libs/lapack-reference/lapack-reference-3.1.1-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit autotools eutils fortran-2 flag-o-matic multilib toolchain-funcs + +MyPN="${PN/-reference/}" + +DESCRIPTION="FORTRAN reference implementation of LAPACK Linear Algebra PACKage" +HOMEPAGE="http://www.netlib.org/lapack/index.html" +SRC_URI=" + http://www.netlib.org/lapack/${MyPN}-lite-${PV}.tgz + mirror://gentoo/${P}-autotools.patch.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 s390 sparc x86 ~x86-fbsd" +IUSE="doc" + +RDEPEND=" + app-eselect/eselect-lapack + virtual/blas" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/lapack-docs )" + +S="${WORKDIR}/${MyPN}-lite-${PV}" + +pkg_setup() { + fortran-2_pkg_setup + if [[ $(tc-getFC) =~ if ]]; then + ewarn "Using Intel Fortran at your own risk" + export LDFLAGS="$(raw-ldflags)" + export NOOPT_FFLAGS=-O + fi + ESELECT_PROF=reference +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${WORKDIR}"/${P}-autotools.patch + epatch "${FILESDIR}"/${P}-test-fix.patch + eautoreconf + + # set up the testing routines + sed -e "s:g77:$(tc-getFC):" \ + -e "s:-funroll-all-loops -O3:${FFLAGS} $($(tc-getPKG_CONFIG) --cflags blas):" \ + -e "s:LOADOPTS =:LOADOPTS = ${LDFLAGS} $($(tc-getPKG_CONFIG) --cflags blas):" \ + -e "s:../../blas\$(PLAT).a:$($(tc-getPKG_CONFIG) --libs blas):" \ + -e "s:lapack\$(PLAT).a:SRC/.libs/liblapack.a:" \ + make.inc.example > make.inc \ + || die "Failed to set up make.inc" +} + +src_compile() { + econf \ + --libdir="/usr/$(get_libdir)/lapack/reference" \ + --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc README || die "dodoc failed" + eselect lapack add $(get_libdir) "${FILESDIR}"/eselect.lapack.reference ${ESELECT_PROF} +} + +src_test() { + cd "${S}"/TESTING/MATGEN + emake || die "Failed to create tmglib.a" + cd "${S}"/TESTING + emake || die "lapack-reference tests failed." +} + +pkg_postinst() { + local p=lapack + local current_lib=$(eselect ${p} show | cut -d' ' -f2) + if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then + # work around eselect bug #189942 + local configfile="${ROOT}"/etc/env.d/${p}/$(get_libdir)/config + [[ -e ${configfile} ]] && rm -f ${configfile} + eselect ${p} set ${ESELECT_PROF} + elog "${p} has been eselected to ${ESELECT_PROF}" + else + elog "Current eselected ${p} is ${current_lib}" + elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):" + elog "\t eselect ${p} set ${ESELECT_PROF}" + fi +} diff --git a/sci-libs/lapack-reference/lapack-reference-3.2.1-r1.ebuild b/sci-libs/lapack-reference/lapack-reference-3.2.1-r1.ebuild new file mode 100644 index 00000000000..b5665f128e0 --- /dev/null +++ b/sci-libs/lapack-reference/lapack-reference-3.2.1-r1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 + +inherit autotools eutils fortran-2 flag-o-matic multilib toolchain-funcs + +MyPN="${PN/-reference/}" +PATCH_V="3.2.1" + +DESCRIPTION="FORTRAN reference implementation of LAPACK Linear Algebra PACKage" +HOMEPAGE="http://www.netlib.org/lapack/index.html" +SRC_URI=" + mirror://gentoo/${MyPN}-${PV}.tgz + mirror://gentoo/${PN}-${PATCH_V}-autotools.patch.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="doc" + +RDEPEND=" + app-eselect/eselect-lapack + virtual/blas" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/lapack-docs )" + +S="${WORKDIR}/${MyPN}-${PV}" + +pkg_setup() { + fortran-2_pkg_setup + if [[ $(tc-getFC) =~ if ]]; then + ewarn "Using Intel Fortran at your own risk" + export LDFLAGS="$(raw-ldflags)" + export NOOPT_FFLAGS=-O + fi + ESELECT_PROF=reference +} + +src_prepare() { + epatch "${WORKDIR}"/${PN}-${PATCH_V}-autotools.patch + epatch "${FILESDIR}"/${P}-parallel-make.patch + eautoreconf + + # set up the testing routines + sed -e "s:g77:$(tc-getFC):" \ + -e "s:-funroll-all-loops -O3:${FFLAGS} $($(tc-getPKG_CONFIG) --cflags blas):" \ + -e "s:LOADOPTS =:LOADOPTS = ${LDFLAGS} $($(tc-getPKG_CONFIG) --cflags blas):" \ + -e "s:../../blas\$(PLAT).a:$($(tc-getPKG_CONFIG) --libs blas):" \ + -e "s:lapack\$(PLAT).a:SRC/.libs/liblapack.a:" \ + make.inc.example > make.inc \ + || die "Failed to set up make.inc" + + cp "${FILESDIR}"/eselect.lapack.reference "${T}"/ + sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.lapack.reference || die + if [[ ${CHOST} == *-darwin* ]] ; then + sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \ + "${T}"/eselect.lapack.reference || die + fi +} + +src_configure() { + econf \ + --libdir="${EPREFIX}/usr/$(get_libdir)/lapack/reference" \ + --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc README || die "dodoc failed" + eselect lapack add $(get_libdir) "${T}"/eselect.lapack.reference ${ESELECT_PROF} +} + +src_test() { + cd "${S}"/TESTING/MATGEN + emake -j1 || die "Failed to create tmglib.a" + cd "${S}"/TESTING + emake -j1 || die "lapack-reference tests failed." +} + +pkg_postinst() { + local p=lapack + local current_lib=$(eselect ${p} show | cut -d' ' -f2) + if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then + # work around eselect bug #189942 + local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config + [[ -e ${configfile} ]] && rm -f ${configfile} + eselect ${p} set ${ESELECT_PROF} + elog "${p} has been eselected to ${ESELECT_PROF}" + else + elog "Current eselected ${p} is ${current_lib}" + elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):" + elog "\t eselect ${p} set ${ESELECT_PROF}" + fi +} diff --git a/sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild b/sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild new file mode 100644 index 00000000000..f91f05edd73 --- /dev/null +++ b/sci-libs/lapack-reference/lapack-reference-3.2.1-r3.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 + +inherit autotools eutils fortran-2 flag-o-matic multilib toolchain-funcs + +MyPN="${PN/-reference/}" +PATCH_V="3.2.1" + +DESCRIPTION="FORTRAN reference implementation of LAPACK Linear Algebra PACKage" +HOMEPAGE="http://www.netlib.org/lapack/index.html" +SRC_URI=" + mirror://gentoo/${MyPN}-${PV}.tgz + mirror://gentoo/${PN}-${PATCH_V}-autotools.patch.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="" +IUSE="doc" + +RDEPEND=" + app-eselect/eselect-lapack + virtual/blas" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/lapack-docs )" + +S="${WORKDIR}/${MyPN}-${PV}" + +pkg_setup() { + fortran-2_pkg_setup + if [[ $(tc-getFC) =~ if ]]; then + ewarn "Using Intel Fortran at your own risk" + export LDFLAGS="$(raw-ldflags)" + export NOOPT_FFLAGS=-O + fi + ESELECT_PROF=reference +} + +src_prepare() { + epatch "${WORKDIR}"/${PN}-${PATCH_V}-autotools.patch + epatch "${FILESDIR}"/${P}-parallel-make.patch + eautoreconf + + # set up the testing routines + sed -e "s:g77:$(tc-getFC):" \ + -e "s:-funroll-all-loops -O3:${FFLAGS} $($(tc-getPKG_CONFIG) --cflags blas):" \ + -e "s:LOADOPTS =:LOADOPTS = ${LDFLAGS} $($(tc-getPKG_CONFIG) --cflags blas):" \ + -e "s:../../blas\$(PLAT).a:$($(tc-getPKG_CONFIG) --libs blas):" \ + -e "s:lapack\$(PLAT).a:SRC/.libs/liblapack.a:" \ + make.inc.example > make.inc \ + || die "Failed to set up make.inc" + + cp "${FILESDIR}"/eselect.lapack.reference-ng "${T}"/eselect.lapack.reference || die + sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.lapack.reference || die + if [[ ${CHOST} == *-darwin* ]] ; then + sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \ + "${T}"/eselect.lapack.reference || die + fi + sed \ + -e '/Libs:/s|: |: -L${libdir} |g' \ + -i lapack.pc.in || die +} + +src_configure() { + econf \ + --libdir="${EPREFIX}/usr/$(get_libdir)/lapack/reference" \ + --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc README || die "dodoc failed" + eselect lapack add $(get_libdir) "${T}"/eselect.lapack.reference ${ESELECT_PROF} +} + +src_test() { + cd "${S}"/TESTING/MATGEN + emake -j1 || die "Failed to create tmglib.a" + cd "${S}"/TESTING + emake -j1 || die "lapack-reference tests failed." +} + +pkg_postinst() { + local p=lapack + local current_lib=$(eselect ${p} show | cut -d' ' -f2) + if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then + # work around eselect bug #189942 + local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config + [[ -e ${configfile} ]] && rm -f ${configfile} + eselect ${p} set ${ESELECT_PROF} + elog "${p} has been eselected to ${ESELECT_PROF}" + else + elog "Current eselected ${p} is ${current_lib}" + elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):" + elog "\t eselect ${p} set ${ESELECT_PROF}" + fi +} diff --git a/sci-libs/lapack-reference/metadata.xml b/sci-libs/lapack-reference/metadata.xml new file mode 100644 index 00000000000..41e8160d30c --- /dev/null +++ b/sci-libs/lapack-reference/metadata.xml @@ -0,0 +1,13 @@ + + + + sci + +LAPACK is a comprehensive library that does linear algebra +operations including matrix inversions, least squared solutions to +linear sets of equations, eigenvector analysis, singular value +decomposition, etc. It is a very comprehensive and reputable package +that has found extensive use in the scientific community. +This package installs the reference FORTRAN 77 implementation from Netlib. + + -- cgit v1.2.1