summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-06-09 09:07:27 +0000
committerJustin Lecher <jlec@gentoo.org>2010-06-09 09:07:27 +0000
commit8c201be64857f9c0e6e36688acdca0b30463fd7d (patch)
treeddb21a471ba083675bbb60d6df8163ba70f6b968 /sci-libs
parentsrc_compile-v1.eblit not committed with previous change (diff)
downloadgentoo-2-8c201be64857f9c0e6e36688acdca0b30463fd7d.tar.gz
gentoo-2-8c201be64857f9c0e6e36688acdca0b30463fd7d.tar.bz2
gentoo-2-8c201be64857f9c0e6e36688acdca0b30463fd7d.zip
New addition
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/punc/ChangeLog11
-rw-r--r--sci-libs/punc/files/0.2_p1-configure.patch49
-rw-r--r--sci-libs/punc/files/0.2_p1-underlinking.patch144
-rw-r--r--sci-libs/punc/metadata.xml24
-rw-r--r--sci-libs/punc/punc-0.2_p1.ebuild67
5 files changed, 295 insertions, 0 deletions
diff --git a/sci-libs/punc/ChangeLog b/sci-libs/punc/ChangeLog
new file mode 100644
index 000000000000..ef0b6a8a7abf
--- /dev/null
+++ b/sci-libs/punc/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sci-libs/punc
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/punc/ChangeLog,v 1.1 2010/06/09 09:07:27 jlec Exp $
+
+*punc-0.2_p1 (09 Jun 2010)
+
+ 09 Jun 2010; Justin Lecher <jlec@gentoo.org>
+ +files/0.2_p1-configure.patch, +files/0.2_p1-underlinking.patch,
+ +punc-0.2_p1.ebuild, +metadata.xml:
+ New addition
+
diff --git a/sci-libs/punc/files/0.2_p1-configure.patch b/sci-libs/punc/files/0.2_p1-configure.patch
new file mode 100644
index 000000000000..7f4ce9788073
--- /dev/null
+++ b/sci-libs/punc/files/0.2_p1-configure.patch
@@ -0,0 +1,49 @@
+diff --git a/configure.ac b/configure.ac
+index 633803d..279fad6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -348,7 +348,7 @@ else
+ AC_CHECK_LIB(blas,dscal_,
+ [blas_use="yes";blas_lib="${blas_lib_path}-lblas"],
+ [blas_use="";blas_lib=""],
+- [${blas_lib_path}-lblas -lvf2c])
++ [${blas_lib_path}-lblas])
+ if test -z "${blas_use}"; then
+ AC_MSG_RESULT([** BLAS library missing ...will BUILD **])
+ blas="blas";
+@@ -410,7 +410,7 @@ else
+ AC_CHECK_LIB(lapack,dsysv_,
+ [lapack_use="yes";lapack_lib="${lapack_lib_path}-llapack"],
+ [lapack_use="";lapack_lib=""],
+- [${lapack_lib_path}-llapack ${blas_lib} -lvf2c])
++ [${lapack_lib_path}-llapack ${blas_lib}])
+ if test -z "${lapack_use}"; then
+ AC_MSG_RESULT([** LAPACK library missing ...will BUILD **])
+ lapack="lapack";
+@@ -472,7 +472,7 @@ else
+ AC_CHECK_LIB(superlu,Destroy_SuperMatrix_Store,
+ [superlu_use="yes";superlu_lib="${superlu_lib_path}-lsuperlu"],
+ [superlu_use="";superlu_lib=""],
+- [${superlu_lib_path}-lsuperlu ${lapack_lib} ${blas_lib} -lvf2c])
++ [${superlu_lib_path}-lsuperlu ${lapack_lib} ${blas_lib}])
+ if test -z "${superlu_use}"; then
+ AC_MSG_RESULT([** SUPERLU library missing ...will BUILD **])
+ superlu="superlu";
+@@ -534,7 +534,7 @@ else
+ AC_CHECK_LIB(arpack,dsgets_,
+ [arpack_use="yes";arpack_lib="${arpack_lib_path}-larpack"],
+ [arpack_use="";arpack_lib=""],
+- [${arpack_lib_path}-larpack ${blas_lib} -lvf2c])
++ [${arpack_lib_path}-larpack ${blas_lib}])
+ if test -z "${arpack_use}"; then
+ AC_MSG_RESULT([** ARPACK library missing ...will BUILD **])
+ arpack="arpack";
+@@ -658,7 +658,7 @@ else
+ AC_CHECK_LIB(pmg,buildg_,
+ [pmg_use="yes";pmg_lib="${pmg_lib_path}-lpmg"],
+ [pmg_use="";pmg_lib=""],
+- [${pmg_lib_path}-lpmg ${blas_lib} -lvf2c])
++ [${pmg_lib_path}-lpmg ${blas_lib}])
+ if test -z "${pmg_use}"; then
+ AC_MSG_RESULT([** PMG library missing ...will BUILD **])
+ pmg="pmg";
diff --git a/sci-libs/punc/files/0.2_p1-underlinking.patch b/sci-libs/punc/files/0.2_p1-underlinking.patch
new file mode 100644
index 000000000000..f83c93f1edc5
--- /dev/null
+++ b/sci-libs/punc/files/0.2_p1-underlinking.patch
@@ -0,0 +1,144 @@
+diff --git a/configure.ac b/configure.ac
+index 633803d..89a9fb4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -50,7 +50,8 @@ dnl 2. checks for programs
+ AC_LANG_C
+ AC_PROG_CC
+ AC_PROG_CPP
+-AC_DISABLE_SHARED
++AC_PROG_F77
++AC_F77_LIBRARY_LDFLAGS
+ AM_PROG_LIBTOOL
+
+ dnl 3. checks for libraries
+@@ -348,7 +349,7 @@ else
+ AC_CHECK_LIB(blas,dscal_,
+ [blas_use="yes";blas_lib="${blas_lib_path}-lblas"],
+ [blas_use="";blas_lib=""],
+- [${blas_lib_path}-lblas -lvf2c])
++ [${blas_lib_path}-lblas])
+ if test -z "${blas_use}"; then
+ AC_MSG_RESULT([** BLAS library missing ...will BUILD **])
+ blas="blas";
+@@ -410,7 +411,7 @@ else
+ AC_CHECK_LIB(lapack,dsysv_,
+ [lapack_use="yes";lapack_lib="${lapack_lib_path}-llapack"],
+ [lapack_use="";lapack_lib=""],
+- [${lapack_lib_path}-llapack ${blas_lib} -lvf2c])
++ [${lapack_lib_path}-llapack ${blas_lib}])
+ if test -z "${lapack_use}"; then
+ AC_MSG_RESULT([** LAPACK library missing ...will BUILD **])
+ lapack="lapack";
+@@ -472,7 +473,7 @@ else
+ AC_CHECK_LIB(superlu,Destroy_SuperMatrix_Store,
+ [superlu_use="yes";superlu_lib="${superlu_lib_path}-lsuperlu"],
+ [superlu_use="";superlu_lib=""],
+- [${superlu_lib_path}-lsuperlu ${lapack_lib} ${blas_lib} -lvf2c])
++ [${superlu_lib_path}-lsuperlu ${lapack_lib} ${blas_lib}])
+ if test -z "${superlu_use}"; then
+ AC_MSG_RESULT([** SUPERLU library missing ...will BUILD **])
+ superlu="superlu";
+@@ -534,7 +535,7 @@ else
+ AC_CHECK_LIB(arpack,dsgets_,
+ [arpack_use="yes";arpack_lib="${arpack_lib_path}-larpack"],
+ [arpack_use="";arpack_lib=""],
+- [${arpack_lib_path}-larpack ${blas_lib} -lvf2c])
++ [${arpack_lib_path}-larpack ${blas_lib}])
+ if test -z "${arpack_use}"; then
+ AC_MSG_RESULT([** ARPACK library missing ...will BUILD **])
+ arpack="arpack";
+@@ -658,7 +659,7 @@ else
+ AC_CHECK_LIB(pmg,buildg_,
+ [pmg_use="yes";pmg_lib="${pmg_lib_path}-lpmg"],
+ [pmg_use="";pmg_lib=""],
+- [${pmg_lib_path}-lpmg ${blas_lib} -lvf2c])
++ [${pmg_lib_path}-lpmg ${blas_lib}])
+ if test -z "${pmg_use}"; then
+ AC_MSG_RESULT([** PMG library missing ...will BUILD **])
+ pmg="pmg";
+@@ -846,10 +847,6 @@ AC_OUTPUT([
+ src/base/Makefile
+
+ src/vf2c/Makefile
+- src/blas/Makefile
+- src/lapack/Makefile
+- src/superlu/Makefile
+- src/arpack/Makefile
+ src/cgcode/Makefile
+ src/pmg/Makefile
+
+diff --git a/src/aaa_lib/Makefile.am b/src/aaa_lib/Makefile.am
+index e338300..903dd2f 100644
+--- a/src/aaa_lib/Makefile.am
++++ b/src/aaa_lib/Makefile.am
+@@ -92,11 +92,11 @@ libdir = ${prefix}/lib/${fetk_cpu_vendor_os}
+ lib_LTLIBRARIES = libpunc.la ${LIBVF2C} ${LIBBLAS} ${LIBLAPACK} ${LIBSUPERLU} ${LIBARPACK} ${LIBCGCODE} ${LIBPMG}
+
+ libpunc_la_SOURCES =
+-libpunc_la_LIBADD = ${BASE_LIBS}
++libpunc_la_LIBADD = ${BASE_LIBS} -lm
+ libpunc_la_LDFLAGS = -version-info ${FETK_VERSION}
+
+ libvf2c_la_SOURCES =
+-libvf2c_la_LIBADD = ${VF2C_LIBS}
++libvf2c_la_LIBADD = ${VF2C_LIBS} -lgfortran -lf2c -lm
+ libvf2c_la_LDFLAGS = -version-info ${FETK_VERSION}
+
+ libblas_la_SOURCES =
+@@ -108,7 +108,7 @@ liblapack_la_LIBADD = ${LAPACK_LIBS}
+ liblapack_la_LDFLAGS = -version-info ${FETK_VERSION}
+
+ libsuperlu_la_SOURCES =
+-libsuperlu_la_LIBADD = ${SUPERLU_LIBS}
++libsuperlu_la_LIBADD = ${SUPERLU_LIBS}
+ libsuperlu_la_LDFLAGS = -version-info ${FETK_VERSION}
+
+ libarpack_la_SOURCES =
+@@ -116,10 +116,9 @@ libarpack_la_LIBADD = ${ARPACK_LIBS}
+ libarpack_la_LDFLAGS = -version-info ${FETK_VERSION}
+
+ libcgcode_la_SOURCES =
+-libcgcode_la_LIBADD = ${CGCODE_LIBS}
++libcgcode_la_LIBADD = ${CGCODE_LIBS} ${VF2C_LIBS} -lblas -lgfortran -lm
+ libcgcode_la_LDFLAGS = -version-info ${FETK_VERSION}
+
+ libpmg_la_SOURCES =
+-libpmg_la_LIBADD = ${PMG_LIBS}
++libpmg_la_LIBADD = ${VF2C_LIBS} ${PMG_LIBS} ${BASE_LIBS} -lgfortran -lf2c -lmaloc -lm
+ libpmg_la_LDFLAGS = -version-info ${FETK_VERSION}
+-
+diff --git a/src/pmg/Makefile.am b/src/pmg/Makefile.am
+index 6f3108d..154aeba 100644
+--- a/src/pmg/Makefile.am
++++ b/src/pmg/Makefile.am
+@@ -38,11 +38,12 @@ always_built_SUBDIRS =
+ SUBDIRS = $(always_built_SUBDIRS) .
+ THISLIB = pmg
+
+-noinst_LTLIBRARIES = libpmg.la
++lib_LTLIBRARIES = libpmg.la
+
+-SRC = buildAd.c buildBd.c buildGd.c buildPd.c cgd.c cgmgd.c cgmgdrvd.c gsd.c matvecd.c mblasd.c mgcsd.c mgdrvd.c mgfasd.c mgsubd.c mikpckd.c mlinpckd.c ncgd.c ncgdrvd.c newdrvd.c newtond.c ngsd.c ngsdrvd.c ninterpd.c nrchd.c nrchdrvd.c nsmoothd.c nsord.c nsordrvd.c nwjd.c nwjdrvd.c powerd.c rchd.c smoothd.c sord.c wjd.c
++SRC = buildAd.c buildBd.c buildGd.c buildPd.c cgd.c cgmgd.c cgmgdrvd.c gsd.c matvecd.c mblasd.c mgcsd.c mgdrvd.c mgfasd.c mgsubd.c mikpckd.c mlinpckd.c ncgd.c ncgdrvd.c newdrvd.c newtond.c ngsd.c ngsdrvd.c ninterpd.c nrchd.c nrchdrvd.c nsmoothd.c nsord.c nsordrvd.c nwjd.c nwjdrvd.c powerd.c rchd.c smoothd.c sord.c wjd.c secd.c pded.f
+
+ libpmg_la_SOURCES = ${SRC}
++libpmg_la_LIBADD = -lf2c ../vf2c/libvf2c.la
+ INCLUDES = @maloc_inc@
+ AM_CFLAGS = @profile@ @pedantic_ansi@
+
+diff --git a/src/vf2c/main.c b/src/vf2c/main.c
+index 4539749..6577570 100644
+--- a/src/vf2c/main.c
++++ b/src/vf2c/main.c
+@@ -134,7 +134,9 @@ f_init();
+ #ifndef NO_ONEXIT
+ ONEXIT(f_exit);
+ #endif
+-MAIN__();
++int MAIN__( )
++ { return(0);
++}
+ #ifdef NO_ONEXIT
+ f_exit();
+ #endif
diff --git a/sci-libs/punc/metadata.xml b/sci-libs/punc/metadata.xml
new file mode 100644
index 000000000000..cc35dc3a4a07
--- /dev/null
+++ b/sci-libs/punc/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer>
+ <email>jlec@gentoo.org</email>
+</maintainer>
+<longdescription>
+ PUNC (Portable Understructure for Numerical Computing) is a small standard
+ collection of software libraries for numerical computing. The PUNC
+ collection includes reference implementations of the standard (dense matrix)
+ linear algebra tools BLAS and LAPACK, and also includes some newer (sparse
+ matrix) linear algebra tools ARPACK, SuperLU, CgCode, and PMG. PUNC also
+ provides some additional basic infrastructure such as the standard F2C
+ header and corresponding library (libF2C), to support the use of F2C'd
+ FORTRAN codes, and some other standard tools used to build numerical
+ simulation software, such as the HDF5 library. While most of the libraries
+ included in PUNC are completely stand-alone, and are the reference
+ implementations developed by the individual library authors, PUNC also
+ provides some Object-oriented C wrappers (written by the FETK developers)
+ for use with Object-oriented C/C++ codes such as FETK . This is accomplished
+ by building PUNC on top of FETK 's MALOC library.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-libs/punc/punc-0.2_p1.ebuild b/sci-libs/punc/punc-0.2_p1.ebuild
new file mode 100644
index 000000000000..c089d63b11c5
--- /dev/null
+++ b/sci-libs/punc/punc-0.2_p1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/punc/punc-0.2_p1.ebuild,v 1.1 2010/06/09 09:07:27 jlec Exp $
+
+EAPI="3"
+
+inherit autotools multilib
+
+MY_PV="${PV}"
+MY_P="${PN}-${MY_PV/_p/-}"
+
+DESCRIPTION="Portable Understructure for Numerical Computing"
+HOMEPAGE="http://fetk.org/codes/punc/index.html"
+SRC_URI="http://www.fetk.org/codes/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug mpi static-libs"
+
+DEPEND="
+ dev-libs/maloc[mpi?]
+ sci-libs/arpack[mpi?]
+ sci-libs/superlu
+ virtual/blas
+ virtual/mpi"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ rm -rf src/{blas,lapack,arpack,superlu}
+ epatch "${FILESDIR}"/${PV}-underlinking.patch
+
+ cp tools/tests/pmg/*.f src/pmg/ -vfi
+ cp tools/tests/pmg/*.c src/pmg/ -vfi
+ cp src/pmg/vpmg.h src/vf2c/punc/vpmg.h
+ eautoreconf
+}
+
+src_configure() {
+ export FETK_INCLUDE="${EPREFIX}/usr/include"
+ export FETK_LIBRARY="${EPREFIX}/usr/$(get_libdir)"
+ export FETK_LAPACK_LIBRARY="$(pkg-config --libs lapack)"
+ export FETK_BLAS_LIBRARY="${FETK_LIBRARY}"
+ export FETK_SUPERLU_LIBRARY="-lsuperlu"
+ export FETK_ARPACK_LIBRARY="${EPREFIX}/usr/$(get_libdir)"
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable debug vdebug) \
+ --enable-shared \
+ --enable-pmgforce \
+ --enable-cgcodeforce \
+ --enable-vf2cforce
+
+ sed -e "s|libdir = \${prefix}/lib/\${fetk_cpu_vendor_os}|libdir = \${prefix}/$(get_libdir)/|" \
+ -i src/aaa_lib/Makefile || \
+ die "failed to patch lib Makefile"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+
+ dohtml doc/index.html || die "failed to install html docs"
+}
+