summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-libs/scotch/ChangeLog12
-rw-r--r--sci-libs/scotch/files/Makefile.inc19
-rw-r--r--sci-libs/scotch/files/metis-header.patch11
-rw-r--r--sci-libs/scotch/files/mmkt-typo.patch11
-rw-r--r--sci-libs/scotch/files/shared-libs.patch45
-rw-r--r--sci-libs/scotch/metadata.xml13
-rw-r--r--sci-libs/scotch/scotch-5.1.6.ebuild66
7 files changed, 177 insertions, 0 deletions
diff --git a/sci-libs/scotch/ChangeLog b/sci-libs/scotch/ChangeLog
new file mode 100644
index 000000000000..a8d254463afb
--- /dev/null
+++ b/sci-libs/scotch/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for sci-libs/scotch
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scotch/ChangeLog,v 1.1 2009/09/03 16:58:50 patrick Exp $
+
+*scotch-5.1.6 (03 Sep 2009)
+
+ 03 Sep 2009; Patrick Lauer <patrick@gentoo.org> +scotch-5.1.6.ebuild,
+ +files/Makefile.inc, +files/metis-header.patch, +files/mmkt-typo.patch,
+ +files/shared-libs.patch, +metadata.xml:
+ Initial import of scotch, dependency of OpenFoam. Ebuild by Richard
+ Westwell and Oliver Borm. Fixes #220823
+
diff --git a/sci-libs/scotch/files/Makefile.inc b/sci-libs/scotch/files/Makefile.inc
new file mode 100644
index 000000000000..7285c467983b
--- /dev/null
+++ b/sci-libs/scotch/files/Makefile.inc
@@ -0,0 +1,19 @@
+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/metis-header.patch b/sci-libs/scotch/files/metis-header.patch
new file mode 100644
index 000000000000..676858373287
--- /dev/null
+++ b/sci-libs/scotch/files/metis-header.patch
@@ -0,0 +1,11 @@
+--- scotch-5.1.6.dfsg/src/libscotchmetis/metis.h~ 2007-09-03 11:14:42.000000000 -0400
++++ scotch-5.1.6.dfsg/src/libscotchmetis/metis.h 2008-08-26 15:09:30.000000000 -0400
+@@ -55,6 +55,8 @@
+ /** **/
+ /************************************************************/
+
++typedef int idxtype;
++
+ /*
+ ** The function prototypes.
+ */
diff --git a/sci-libs/scotch/files/mmkt-typo.patch b/sci-libs/scotch/files/mmkt-typo.patch
new file mode 100644
index 000000000000..a3371739cbc0
--- /dev/null
+++ b/sci-libs/scotch/files/mmkt-typo.patch
@@ -0,0 +1,11 @@
+--- 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/shared-libs.patch b/sci-libs/scotch/files/shared-libs.patch
new file mode 100644
index 000000000000..fc5e9cda3e61
--- /dev/null
+++ b/sci-libs/scotch/files/shared-libs.patch
@@ -0,0 +1,45 @@
+--- scotch-5.1.6.dfsg/src/libscotch/Makefile~ 2008-05-29 09:01:12.000000000 +0000
++++ scotch-5.1.6.dfsg/src/libscotch/Makefile 2008-07-21 14:34:37.000000000 +0000
+@@ -55,8 +55,8 @@
+ $(MAKE) SCOTCHLIB=scotch \
+ scotch.h \
+ scotchf.h \
+- libscotch$(LIB) \
+ libscotcherr$(LIB) \
++ libscotch$(LIB) \
+ libscotcherrexit$(LIB)
+
+ ptscotch : clean
+@@ -2127,6 +2127,8 @@
+ vmesh_separate_zr$(OBJ) \
+ vmesh_separate_st$(OBJ) \
+ vmesh_store$(OBJ)
++ $(CC) -shared -Wl,-soname,lib$(SCOTCHLIB)-5.1.so -L. -lscotcherr -lz -lpthread -lm -lrt -o lib$(SCOTCHLIB)-5.1.so $^
++ ln -s lib$(SCOTCHLIB)-5.1.so lib$(SCOTCHLIB).so
+ $(AR) $(ARFLAGS) lib$(SCOTCHLIB)$(LIB) $(?)
+ -$(RANLIB) lib$(SCOTCHLIB)$(LIB)
+
+@@ -2139,9 +2141,13 @@
+ -$(RANLIB) $(@)
+
+ libscotcherr$(LIB) : library_error$(OBJ)
++ $(CC) -shared -Wl,-soname,libscotcherr-5.1.so -o libscotcherr-5.1.so $^
++ ln -s libscotcherr-5.1.so libscotcherr.so
+ $(AR) $(ARFLAGS) $(@) $(?)
+ -$(RANLIB) $(@)
+
+ libscotcherrexit$(LIB) : library_error_exit$(OBJ)
++ $(CC) -shared -Wl,-soname,libscotcherrexit-5.1.so -o libscotcherrexit-5.1.so $^
++ ln -s libscotcherrexit-5.1.so libscotcherrexit.so
+ $(AR) $(ARFLAGS) $(@) $(?)
+ -$(RANLIB) $(@)
+--- scotch-5.0.6.dfsg/src/libscotchmetis/Makefile~ 2008-05-07 16:23:07.000000000 +0000
++++ scotch-5.0.6.dfsg/src/libscotchmetis/Makefile 2008-07-18 19:45:15.000000000 +0000
+@@ -120,5 +120,7 @@
+ metis_graph_order_f$(OBJ) \
+ metis_graph_part$(OBJ) \
+ metis_graph_part_f$(OBJ)
++ $(CC) -shared -Wl,-soname,libscotchmetis-5.1.so -L../libscotch -lscotch -o libscotchmetis-5.1.so $^
++ ln -s libscotchmetis-5.1.so libscotchmetis.so
+ $(AR) $(ARFLAGS) $(@) $(^)
+ -$(RANLIB) $(@)
diff --git a/sci-libs/scotch/metadata.xml b/sci-libs/scotch/metadata.xml
new file mode 100644
index 000000000000..199db2e8871c
--- /dev/null
+++ b/sci-libs/scotch/metadata.xml
@@ -0,0 +1,13 @@
+<?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>
+<maintainer>
+ <email>oli.borm@web.de</email>
+ <name>Oliver Borm</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sci-libs/scotch/scotch-5.1.6.ebuild b/sci-libs/scotch/scotch-5.1.6.ebuild
new file mode 100644
index 000000000000..427ef0725564
--- /dev/null
+++ b/sci-libs/scotch/scotch-5.1.6.ebuild
@@ -0,0 +1,66 @@
+# 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 *
+}