summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-libs/scotch/ChangeLog39
-rw-r--r--sci-libs/scotch/Manifest7
-rw-r--r--sci-libs/scotch/files/Makefile.inc.in19
-rw-r--r--sci-libs/scotch/files/metis-header.patch11
-rw-r--r--sci-libs/scotch/files/respect-ldflags.patch86
-rw-r--r--sci-libs/scotch/metadata.xml26
-rw-r--r--sci-libs/scotch/scotch-5.1.11-r1.ebuild142
7 files changed, 330 insertions, 0 deletions
diff --git a/sci-libs/scotch/ChangeLog b/sci-libs/scotch/ChangeLog
new file mode 100644
index 0000000..5b92419
--- /dev/null
+++ b/sci-libs/scotch/ChangeLog
@@ -0,0 +1,39 @@
+# ChangeLog for sci-libs/scotch
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scotch/ChangeLog,v 1.5 2011/05/17 10:08:20 xarthisius Exp $
+
+*scotch-5.1.11-r1 (23 May 2011)
+
+ 23 May 2011; Sébastien Fabbro <bicatali@gentoo.org>
+ +scotch-5.1.11-r1.ebuild, +files/Makefile.inc.in, +files/metis-header.patch,
+ +files/respect-ldflags.patch, +metadata.xml:
+ Adapted for alternatives and virtual/metis
+
+ 17 May 2011; Kacper Kowalik <xarthisius@gentoo.org> files/Makefile.inc.in:
+ Fix underlinking wrt #367495. Thanks to Diego Elio Pettenò
+ <flameeyes@gentoo.org> for the report.
+
+ 15 Mar 2011; Sébastien Fabbro <bicatali@gentoo.org> scotch-5.1.11.ebuild:
+ Added linking with zlib, librt and libm for as-needed
+
+*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)
+
+ 15 Jan 2010; Patrick Lauer <pal@gentoo.org> +scotch-5.1.7.ebuild,
+ +files/Makefile.inc_5.1.7, +files/shared-libs_5.1.7.patch:
+ Bump, thanks to Oliver Borm. Fixes #301012 and #297656
+
+*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/Manifest b/sci-libs/scotch/Manifest
new file mode 100644
index 0000000..18fdc22
--- /dev/null
+++ b/sci-libs/scotch/Manifest
@@ -0,0 +1,7 @@
+AUX Makefile.inc.in 369 RMD160 3261d40521cff31e0f6a4c20799578145eb7a570 SHA1 4e616420e499c7993f673f3df3519c3883f7c94f SHA256 d31c8abd49e662b0bb6af56602277e3d70c2274c9ce19110967c93539032178d
+AUX metis-header.patch 381 RMD160 f364262003c72bd6f6614f0d2dae8f3be4495f2f SHA1 52ade3b7948c933f713602d39ddca88e6bb9eebe SHA256 271fe884e6a8eb423f89dbbb1fc9a73f742526d76233b1f81ab9b8d0b7d27091
+AUX respect-ldflags.patch 3867 RMD160 87a069731aa5a6a15ba892d1333419c0cc6fbcc5 SHA1 add77e8e11604adb2461112117c858b429d0d1e3 SHA256 b277e980cc6e671604dae0e5a4cba28255a786b4294f800ec20ca88d10d8aa49
+DIST scotch_5.1.11_esmumps.tgz 3952439 RMD160 f8db2bb02cbdadb7e02782daccddcdc4cdec4cac SHA1 b62501e0bf7fd24af3712647578b3e764f166287 SHA256 595ccc664ba070264b851a27b7860042a6bc716d6aade93e0909619decfabc92
+EBUILD scotch-5.1.11-r1.ebuild 3848 RMD160 b119c6c794de32b247faaff044072fed5ba46034 SHA1 b11afe91693694eaccc39b93df9033a6388c4f39 SHA256 b8fd090acaed19932c0ecb6c971a372f5ea477f808e0f5f4e776cb3e7715514d
+MISC ChangeLog 1652 RMD160 5963ad94730256f2f101297b64cb84515c7a5eaa SHA1 a36592fd16555697ee2598b78b56a5c4baf144f6 SHA256 cfdf9f9005e6ce68df603c126dbf55897ee1bf1226ff89165a2f454d15f0cbb1
+MISC metadata.xml 1007 RMD160 1ef66d65ea2ff3022b287a12a26e1b08360390ff SHA1 5e624702b7ead9d165c0c698c77d76306439020c SHA256 fd9d3ef83d702452fa572e5ff3217f42819579e3510dbad5fac4081b07cb5d16
diff --git a/sci-libs/scotch/files/Makefile.inc.in b/sci-libs/scotch/files/Makefile.inc.in
new file mode 100644
index 0000000..f4d9cdf
--- /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@ -pthread $(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/metis-header.patch b/sci-libs/scotch/files/metis-header.patch
new file mode 100644
index 0000000..6768583
--- /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/respect-ldflags.patch b/sci-libs/scotch/files/respect-ldflags.patch
new file mode 100644
index 0000000..7486005
--- /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
new file mode 100644
index 0000000..62e57c7
--- /dev/null
+++ b/sci-libs/scotch/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<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-r1.ebuild b/sci-libs/scotch/scotch-5.1.11-r1.ebuild
new file mode 100644
index 0000000..210e339
--- /dev/null
+++ b/sci-libs/scotch/scotch-5.1.11-r1.ebuild
@@ -0,0 +1,142 @@
+# 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.2 2011/03/15 16:58:35 bicatali Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs versionator alternatives-2
+
+# 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 tools"
+
+DEPEND="sys-devel/bison
+ sys-libs/zlib
+ mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MYP}/src"
+
+make_shared_lib() {
+ local libstatic=${1}
+ local soname=$(basename "${1%.a}").so.$(get_major_version)
+ shift
+ einfo "Making ${soname}"
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname="${soname}" \
+ -Wl,--whole-archive "${libstatic}" -Wl,--no-whole-archive \
+ "$@" -o $(dirname "${libstatic}")/"${soname}" || die "${soname} failed"
+}
+
+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
+ make_shared_lib libscotch/libscotcherr.a
+ make_shared_lib libscotch/libscotcherrexit.a
+ make_shared_lib libscotch/libscotch.a -L. -lscotcherr -lz -lm -lrt
+ make_shared_lib esmumps/libesmumps.a -Llibscotch -lscotch
+ make_shared_lib libscotchmetis/libscotchmetis.a -Llibscotch -lscotch
+
+ if use mpi; then
+ emake PICFLAGS=-fPIC ptscotch
+ export LINK=mpicc
+ make_shared_lib libscotch/libptscotcherr.a
+ make_shared_lib libscotch/libptscotcherrexit.a
+ make_shared_lib libscotch/libptscotch.a -Llibscotch -lptscotcherr -lz -lm -lrt
+ make_shared_lib esmumps/libptesmumps.a -Llibscotch -lptscotch
+ make_shared_lib libscotchmetis/libptscotchparmetis.a -Llibscotch -lptscotch
+ 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)
+
+ insinto /usr/include/scotch
+ doins include/*
+
+ cat <<-EOF > scotchmetis.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ptscotch
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -lscotchmetis -lscotcherr -lscotch
+ Private: -lm -lz -lrt
+ Cflags: -I\${includedir}/scotch
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins scotchmetis.pc
+ alternatives_for metis scotch 0 \
+ "/usr/$(get_libdir)/pkgconfig/metis.pc" "scotchmetis.pc"
+ cat <<-EOF > ptscotchmetis.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ptscotch
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -lptscotchmetis -lptscotcherr -lptscotch
+ Private: -lm -lz -lrt
+ Cflags: -I\${includedir}/scotch
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ptscotchmetis.pc
+ alternatives_for metis-mpi scotch 0 \
+ "/usr/$(get_libdir)/pkgconfig/metis-mpi.pc" "ptscotchmetis.pc"
+
+ dodoc README.txt
+
+ if use tools; then
+ 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
+ fi
+
+ use doc && dodoc doc/*.pdf
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/* tgt grf
+ fi
+}