summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2011-03-05 00:27:49 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2011-03-05 00:27:49 +0000
commita409951cd99f59189dd0c78c122182b470ee52f3 (patch)
treefb2b8c5273537b2235ab31116f1056d34f396e4b /sci-libs
parentFix headers placement. Per bug #357359. (diff)
downloadgentoo-2-a409951cd99f59189dd0c78c122182b470ee52f3.tar.gz
gentoo-2-a409951cd99f59189dd0c78c122182b470ee52f3.tar.bz2
gentoo-2-a409951cd99f59189dd0c78c122182b470ee52f3.zip
Version bump. Rewrote from scratch. Closing bug #324561 and bug #335468.
(Portage version: 2.1.9.42/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/scotch/ChangeLog11
-rw-r--r--sci-libs/scotch/files/Makefile.inc19
-rw-r--r--sci-libs/scotch/files/Makefile.inc.in19
-rw-r--r--sci-libs/scotch/files/mmkt-typo.patch11
-rw-r--r--sci-libs/scotch/files/respect-ldflags.patch86
-rw-r--r--sci-libs/scotch/metadata.xml23
-rw-r--r--sci-libs/scotch/scotch-5.1.11.ebuild99
-rw-r--r--sci-libs/scotch/scotch-5.1.6.ebuild66
8 files changed, 231 insertions, 103 deletions
diff --git a/sci-libs/scotch/ChangeLog b/sci-libs/scotch/ChangeLog
index 1350a8daa082..8b19f386b1d8 100644
--- a/sci-libs/scotch/ChangeLog
+++ b/sci-libs/scotch/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-libs/scotch
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scotch/ChangeLog,v 1.2 2010/01/15 22:43:52 patrick Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scotch/ChangeLog,v 1.3 2011/03/05 00:27:49 bicatali Exp $
+
+*scotch-5.1.11 (05 Mar 2011)
+
+ 05 Mar 2011; Sébastien Fabbro <bicatali@gentoo.org> -scotch-5.1.6.ebuild,
+ +scotch-5.1.11.ebuild, +files/Makefile.inc.in, +files/respect-ldflags.patch,
+ -files/Makefile.inc, -files/mmkt-typo.patch, metadata.xml:
+ Version bump. Rewrote from scratch. Closing bug #324561 and bug #335468.
*scotch-5.1.7 (15 Jan 2010)
diff --git a/sci-libs/scotch/files/Makefile.inc b/sci-libs/scotch/files/Makefile.inc
deleted file mode 100644
index 7285c467983b..000000000000
--- a/sci-libs/scotch/files/Makefile.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-EXE =
-LIB = .a
-OBJ = .o
-
-MAKE = make
-AR = ar
-ARFLAGS = -ruv
-CAT = cat
-CC = gcc
-CCP = mpicc
-CFLAGS = -g -O3 -I. -fPIC -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD
-LDFLAGS = -lz -lm -lrt
-CP = cp
-LEX = flex
-LN = ln
-MKDIR = mkdir
-MV = mv
-RANLIB = ranlib
-YACC = bison -y
diff --git a/sci-libs/scotch/files/Makefile.inc.in b/sci-libs/scotch/files/Makefile.inc.in
new file mode 100644
index 000000000000..85e3b6be6785
--- /dev/null
+++ b/sci-libs/scotch/files/Makefile.inc.in
@@ -0,0 +1,19 @@
+EXE =
+LIB = .a
+OBJ = .o
+
+AR = @AR@
+ARFLAGS = -ruv
+CAT = cat
+CCS = @CC@
+CCP = mpicc
+CCD = @CC@
+CFLAGS = @CFLAGS@ $(PICFLAGS) -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME
+LIBS = -lz -lm -lrt
+CP = cp
+LEX = flex
+LN = ln
+MKDIR = mkdir
+MV = mv
+RANLIB = @RANLIB@
+YACC = bison -y
diff --git a/sci-libs/scotch/files/mmkt-typo.patch b/sci-libs/scotch/files/mmkt-typo.patch
deleted file mode 100644
index a3371739cbc0..000000000000
--- a/sci-libs/scotch/files/mmkt-typo.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- scotch-5.1.6.dfsg.orig/src/libscotch/library_graph_io_mmkt_f.c 2008-03-14 18:15:59.000000000 +0000
-+++ scotch-5.1.6.dfsg/src/libscotch/library_graph_io_mmkt_f.c 2008-07-21 15:12:48.000000000 +0000
-@@ -121,7 +121,7 @@
- */
-
- FORTRAN ( \
--SCOTCHFGRAPHGEOMSAVEMMKT, scotchfgraphgeomsavechac, ( \
-+SCOTCHFGRAPHGEOMSAVEMMKT, scotchfgraphgeomsavemmkt, ( \
- const SCOTCH_Graph * const grafptr, \
- const SCOTCH_Geom * const geomptr, \
- const int * const filegrfptr, \
diff --git a/sci-libs/scotch/files/respect-ldflags.patch b/sci-libs/scotch/files/respect-ldflags.patch
new file mode 100644
index 000000000000..74860051c6ee
--- /dev/null
+++ b/sci-libs/scotch/files/respect-ldflags.patch
@@ -0,0 +1,86 @@
+diff -Nur src.orig/esmumps/Makefile src/esmumps/Makefile
+--- src.orig/esmumps/Makefile 2011-03-04 21:33:24.000000000 +0000
++++ src/esmumps/Makefile 2011-03-04 23:38:01.000000000 +0000
+@@ -44,7 +44,7 @@
+ $(CC) $(CFLAGS) $(CLIBFLAGS) -I$(includedir) -c $(<) -o $(@)
+
+ %$(EXE) : %.c
+- $(CC) $(CFLAGS) -I$(includedir) $(<) -o $(@) -L$(libdir) $(LDFLAGS) -L. -l$(ESMUMPSLIB) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(includedir) $(<) -L$(libdir) -L. -l$(ESMUMPSLIB) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LIBS) -o $(@)
+
+ ##
+ ## Project rules.
+@@ -57,9 +57,10 @@
+ libesmumps$(LIB) \
+ main_esmumps$(EXE)
+
+-ptscotch : clean
++ptscotch : clean common.h
++ $(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC=$(CCP) SCOTCHLIB=ptscotch ESMUMPSLIB=ptesmumps \
++ libesmumps$(LIB);
+ $(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC=$(CCP) SCOTCHLIB=ptscotch ESMUMPSLIB=ptesmumps \
+- libesmumps$(LIB) \
+ main_esmumps$(EXE)
+
+ install :
+diff -Nur src.orig/libscotch/Makefile src/libscotch/Makefile
+--- src.orig/libscotch/Makefile 2011-03-04 21:33:24.000000000 +0000
++++ src/libscotch/Makefile 2011-03-04 21:55:27.000000000 +0000
+@@ -43,7 +43,7 @@
+ $(CC) $(CFLAGS) $(CLIBFLAGS) -c $(<) -o $(@)
+
+ %$(EXE) : %.c
+- $(CC) $(CFLAGS) -DSCOTCH_VERSION=$(VERSION) -DSCOTCH_RELEASE=$(RELEASE) -DSCOTCH_PATCHLEVEL=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -DSCOTCH_VERSION=$(VERSION) -DSCOTCH_RELEASE=$(RELEASE) -DSCOTCH_PATCHLEVEL=$(PATCHLEVEL) $(<) $(LIBS) -o $(@)
+
+ ##
+ ## Project rules.
+@@ -2515,7 +2515,7 @@
+ mapping.h \
+ order.h \
+ parser.h
+- $(CCD) $(CFLAGS) -DSCOTCH_VERSION=$(VERSION) -DSCOTCH_RELEASE=$(RELEASE) -DSCOTCH_PATCHLEVEL=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS)
++ $(CCD) $(CFLAGS) $(LDLFAGS) -DSCOTCH_VERSION=$(VERSION) -DSCOTCH_RELEASE=$(RELEASE) -DSCOTCH_PATCHLEVEL=$(PATCHLEVEL) $(<) -o $(@) $(LIBS)
+
+ scotch.h : dummysizes$(EXE) \
+ library.h
+diff -Nur src.orig/libscotchmetis/Makefile src/libscotchmetis/Makefile
+--- src.orig/libscotchmetis/Makefile 2011-03-04 21:33:24.000000000 +0000
++++ src/libscotchmetis/Makefile 2011-03-04 21:56:06.000000000 +0000
+@@ -44,7 +44,7 @@
+ $(CC) $(CFLAGS) $(CLIBFLAGS) -I$(includedir) -I../libscotch -c $(<) -o $(@)
+
+ %$(EXE) : %.c
+- $(CC) $(CFLAGS) -I$(includedir) -I../libscotch $(<) -o $(@) -L$(libdir) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(includedir) -I../libscotch $(<) -L$(libdir) $(LIBS) -o $(@)
+
+ ##
+ ## Project rules.
+diff -Nur src.orig/scotch/Makefile src/scotch/Makefile
+--- src.orig/scotch/Makefile 2011-03-04 21:33:24.000000000 +0000
++++ src/scotch/Makefile 2011-03-04 21:58:59.000000000 +0000
+@@ -41,13 +41,13 @@
+ include ../Makefile.inc
+
+ %$(EXE) : %$(OBJ)
+- $(CC) $(CFLAGS) -I$(includedir) -I../libscotch $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(includedir) -I../libscotch $(<) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LIBS) -o $(@)
+
+ %$(OBJ) : %.c
+ $(CC) $(CFLAGS) -I$(includedir) -I../libscotch -c $(<) -o $(@)
+
+ %$(EXE) : %.c
+- $(CC) $(CFLAGS) -I$(includedir) -I../libscotch $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(includedir) -I../libscotch $(<) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LIBS) -o $(@)
+
+ ##
+ ## Project rules.
+@@ -314,7 +314,7 @@
+ gout_o.c \
+ $(includedir)/scotch.h \
+ $(libdir)/libscotch$(LIB)
+- $(CC) $(CFLAGS) -I../libscotch -I$(includedir) gout_c.c gout_o.c -o $(@) -L$(libdir) -lscotch -lscotcherrexit $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I../libscotch -I$(includedir) gout_c.c gout_o.c -L$(libdir) -lscotch -lscotcherrexit $(LIBS) -o $(@)
+
+ gpart$(EXE) : gmap$(EXE)
+ -$(RM) gpart$(EXE)
diff --git a/sci-libs/scotch/metadata.xml b/sci-libs/scotch/metadata.xml
index 199db2e8871c..62e57c71e0d2 100644
--- a/sci-libs/scotch/metadata.xml
+++ b/sci-libs/scotch/metadata.xml
@@ -1,13 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>no-herd</herd>
- <maintainer>
- <email>patrick@gentoo.org</email>
- <name>Patrick Lauer</name>
- </maintainer>
+<herd>sci</herd>
+<maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+</maintainer>
<maintainer>
<email>oli.borm@web.de</email>
<name>Oliver Borm</name>
</maintainer>
+<longdescription lang='en'>
+ SCOTCH is a software package and libraries for graph, mesh and
+ hypergraph partitioning, static mapping, and sparse matrix block
+ ordering.
+ Its purpose of Scotch is to apply graph theory, with a divide and
+ conquer approach, to scientific computing problems such as graph and
+ mesh partitioning, static mapping, and sparse matrix ordering, in
+ application domains ranging from structural mechanics to operating
+ systems or bio-chemistry.
+ The SCOTCH distribution is a set of programs and libraries which
+ implement the static mapping and sparse matrix reordering algorithms
+ developed within the SCOTCH project.
+</longdescription>
</pkgmetadata>
diff --git a/sci-libs/scotch/scotch-5.1.11.ebuild b/sci-libs/scotch/scotch-5.1.11.ebuild
new file mode 100644
index 000000000000..5f0833474188
--- /dev/null
+++ b/sci-libs/scotch/scotch-5.1.11.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scotch/scotch-5.1.11.ebuild,v 1.1 2011/03/05 00:27:49 bicatali Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs versionator
+
+# use esmumps version to allow linking with mumps
+MYP="${PN}_${PV}_esmumps"
+# download id on gforge changes every goddamn release
+DID=28044
+
+DESCRIPTION="Software for graph, mesh and hypergraph partitioning"
+HOMEPAGE="http://www.labri.u-bordeaux.fr/perso/pelegrin/scotch/"
+SRC_URI="http://gforge.inria.fr/frs/download.php/${DID}/${MYP}.tgz"
+
+LICENSE="CeCILL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples mpi static-libs"
+
+DEPEND="sys-devel/bison
+ sys-libs/zlib
+ mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MYP}/src"
+
+make_shared_lib() {
+ local soname=$(basename "${1%.a}").so.$(get_major_version)
+ einfo "Making ${soname}"
+ ${2:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname="${soname}" \
+ -Wl,--whole-archive "${1}" -Wl,--no-whole-archive \
+ -o $(dirname "${1}")/"${soname}" || return 1
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/metis-header.patch
+ epatch "${FILESDIR}"/respect-ldflags.patch
+ sed -e "s/@CFLAGS@/${CFLAGS}/" \
+ -e "s/@CC@/$(tc-getCC)/" \
+ -e "s/@AR@/$(tc-getAR)/" \
+ -e "s/@RANLIB@/$(tc-getRANLIB)/" \
+ "${FILESDIR}"/Makefile.inc.in > Makefile.inc || die
+}
+
+src_compile() {
+ emake PICFLAGS=-fPIC
+ local lib
+ for lib in $(find . -name lib\*.a); do
+ make_shared_lib ${lib} || die "shared ${lib} failed"
+ done
+ if use mpi; then
+ emake PICFLAGS=-fPIC ptscotch
+ for lib in $(find . -name libpt\*.a); do
+ make_shared_lib ${lib} mpicc || die "shared ${lib} failed"
+ done
+ fi
+ if use static-libs; then
+ emake clean
+ emake
+ use mpi && emake ptscotch
+ fi
+}
+
+src_install() {
+ cd ..
+ local l b m
+ for l in $(find . -name \*.so.\*); do
+ dolib.so ${l}
+ dosym $(basename ${l}) /usr/$(get_libdir)/$(basename ${l%.*})
+ done
+ use static-libs && dolib.a $(find . -name \*.a)
+
+ pushd bin > /dev/null
+ for b in *; do
+ newbin ${b} scotch_${b}
+ done
+ popd
+
+ pushd man/man1 > /dev/null
+ for m in *; do
+ newman ${m} scotch_${m}
+ done
+ popd > /dev/null
+
+ insinto /usr/include/scotch
+ doins include/*
+
+ dodoc README.txt
+
+ use doc && dodoc doc/*.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/* tgt grf
+ fi
+}
diff --git a/sci-libs/scotch/scotch-5.1.6.ebuild b/sci-libs/scotch/scotch-5.1.6.ebuild
deleted file mode 100644
index 427ef0725564..000000000000
--- a/sci-libs/scotch/scotch-5.1.6.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scotch/scotch-5.1.6.ebuild,v 1.1 2009/09/03 16:58:50 patrick Exp $
-
-EAPI="2"
-
-inherit eutils
-
-DESCRIPTION="Software package and libraries for graph partitioning, static mapping, and sparse matrix block ordering"
-HOMEPAGE="http://www.labri.u-bordeaux.fr/perso/pelegrin/scotch/"
-SRC_URI="http://gforge.inria.fr/frs/download.php/5218/${PN}_${PV}.tgz"
-
-LICENSE="CeCILL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="mpi"
-
-DEPEND="sys-devel/bison
- mpi? ( virtual/mpi )"
-RDEPEND="${DEPEND}"
-
-S=${WORKDIR}"/scotch_5.0/src"
-
-src_prepare() {
- epatch "${FILESDIR}"/mmkt-typo.patch
- epatch "${FILESDIR}"/shared-libs.patch
- epatch "${FILESDIR}"/metis-header.patch
-}
-
-src_configure() {
- cp "${FILESDIR}"/Makefile.inc ./
-}
-
-src_compile() {
- emake -j1 || die "make failed"
- use mpi && (emake -j1 ptscotch || die "make failed")
-}
-
-src_install() {
- dodir "/usr"
- emake prefix="${D}/usr" install
-
- use mpi && dobin "${S}"/../bin/{dgord,dgscat,dgtst}
-
- dolib.so "${S}"/{libscotch,libscotchmetis}/*.so
- if [ "$(get_libdir)" != "lib" ]; then
- mv "${D}"/usr/lib/* "${D}"/usr/$(get_libdir)
- rm -rf "${D}"/usr/lib
- fi
-
- insinto /usr/include/scotch
- doins "${S}"/libscotch/*.h
-
- insinto /usr/include/scotchmetis
- doins "${S}"/libscotchmetis/*.h
-
- mv "${D}"/usr/include/*scotch*.h "${D}"/usr/include/scotch/
-
- insinto "/usr/share/${PN}/tgt"
- doins "${S}"/../tgt/*
- insinto "/usr/share/${PN}/grf"
- doins "${S}"/../grf/*
-
- cd "${S}/../doc"
- dodoc *
-}