summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2015-07-21 02:47:54 +0000
committerPatrick Lauer <patrick@gentoo.org>2015-07-21 02:47:54 +0000
commitf2490ecaa1cf444b77c167929a5383ea6fde0026 (patch)
tree7520fff204f316621789f309773ffc6c8e6102a3 /sci-libs
parentFix sparc32 sigaction ABI breakage #550836. (diff)
downloadhistorical-f2490ecaa1cf444b77c167929a5383ea6fde0026.tar.gz
historical-f2490ecaa1cf444b77c167929a5383ea6fde0026.tar.bz2
historical-f2490ecaa1cf444b77c167929a5383ea6fde0026.zip
Bump for #555280
Package-Manager: portage-2.2.20/cvs/Linux x86_64
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/scotch/ChangeLog8
-rw-r--r--sci-libs/scotch/Manifest15
-rw-r--r--sci-libs/scotch/files/scotch-6.0.4-as-needed.patch128
-rw-r--r--sci-libs/scotch/scotch-6.0.4.ebuild166
4 files changed, 305 insertions, 12 deletions
diff --git a/sci-libs/scotch/ChangeLog b/sci-libs/scotch/ChangeLog
index 1b82fe0ede99..f4c712cfc623 100644
--- a/sci-libs/scotch/ChangeLog
+++ b/sci-libs/scotch/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/scotch
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scotch/ChangeLog,v 1.19 2015/02/22 10:59:53 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scotch/ChangeLog,v 1.20 2015/07/21 02:47:44 patrick Exp $
+
+*scotch-6.0.4 (21 Jul 2015)
+
+ 21 Jul 2015; Patrick Lauer <patrick@gentoo.org>
+ +files/scotch-6.0.4-as-needed.patch, +scotch-6.0.4.ebuild:
+ Bump for #555280
22 Feb 2015; Pacho Ramos <pacho@gentoo.org> scotch-6.0.0.ebuild:
amd64/x86 stable, bug #540494
diff --git a/sci-libs/scotch/Manifest b/sci-libs/scotch/Manifest
index 4a91c6022ccf..da8d87021ab8 100644
--- a/sci-libs/scotch/Manifest
+++ b/sci-libs/scotch/Manifest
@@ -1,18 +1,11 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
AUX scotch-5.1.12b-as-needed.patch 4878 SHA256 e9084641e7cea9fdf21293a4ae7dcf65b73837e3ba59881d32dafa08bde88a8a SHA512 9f5bf65999978d851b0c61de2235af982e6d1d057af5906d328f2a4b83775f8dd567f1386eecc186d6ec1287d8e84215a88b879ec77de4ac6de5b129ad263411 WHIRLPOOL 122321a4d85a936aceb96a6a2c522c7ee3493e5b1ec76f30d2815388464f3f7681928c71d11595c983a3825b44bba7e8c54b95af94539041bb1cd7b4c3107c7e
AUX scotch-6.0.0-as-needed.patch 5874 SHA256 b9159d4808c91d8846ce05bfe96cd787d777a7195dfd17bc1f589dbcec22495b SHA512 efb458b53ceaa40c140e0920a3e31ab563f347a3bc21d727c338f4b971e4312ef680bb248e99dd609b5191f9e91460a1aa2149932d4277c5bc6406ef0206c24e WHIRLPOOL ecb7f9accb734521414e405a040f31b55065f101d62f82cfed9059994ce5d4ab6b762d1e1b83bc32a1894c0ffbf7bd0b00adad5f054f5edf04af74b925f01b8a
+AUX scotch-6.0.4-as-needed.patch 6168 SHA256 7fc05da3c313df9ef94511c0e70465c52b63d6470419bbcf384720084c2ebaf4 SHA512 cd58425866a1726f776318e3792e72d7250686f033ceeda57f0f007fdb4c5e1c2bc3c9346630e39f16023f2a3d70cd106b357c21e5406a1c44b49a316655d8dd WHIRLPOOL ce0b8aa2b22d8153247920bfc8b8de09c07fa95ab67c8b1331992d2346cfbd48402a7b0bb40812725d41995a64c8f6b1f226d3eeb6437d0457d745f3503303bf
DIST scotch_5.1.12b_esmumps.tar.gz 3989632 SHA256 82654e63398529cd3bcc8eefdd51d3b3161c0429bb11770e31f8eb0c3790db6e SHA512 8d6e085029f1ec13b74bd583b8fb378db9aef8a005b96bfb726b68a4608caeb31bf7ecaf1af27566e2e4a38dfea03a017d5c2e8dd262562b238cfb113b223671 WHIRLPOOL 85679809826ce09df8a05b09026179dcf4a1424f9f9c44ce97ba172fd18b7dc3af669c686d4ea5b169501dcb011ceab419d0391ae378712302977fb55f35abb8
DIST scotch_6.0.0_esmumps.tar.gz 4534976 SHA256 8206127d038bda868dda5c5a7f60ef8224f2e368298fbb01bf13fa250e378dd4 SHA512 4509a58363957b009cfc56a0a1ade31e2cb718f50edf7674d00471ee375251d03630e988036e14f545f9f4f270ff4a8b4ebe66a6f9e05b5d769b643bcf9d6067 WHIRLPOOL 7083a767d13d24b7b2640109643bb309bfc267a191537d77d6e31828eb1f875f2d0055f18e4038ebb24536c7d098b1d365524ea06092e1253f894351ba1157c3
+DIST scotch_6.0.4_esmumps.tar.gz 4804966 SHA256 f53f4d71a8345ba15e2dd4e102a35fd83915abf50ea73e1bf6efe1bc2b4220c7 SHA512 0fcf639ab1a09451256444005f1a4a739403159e3ab22c34fbcedc481be387cd4c86be6fb029b4b5816220564f64f662434bf7f1d3921ed18be081ae2a7a9ee2 WHIRLPOOL cadceb30086d586faaefe992dd75329565ce44c4da252526147a88a47be61b92f5ccdeec8cc1c5e3ff5f560c7f296e1aa1e872495ed91c70f3e8272a07435105
EBUILD scotch-5.1.12b.ebuild 4560 SHA256 23f394979de4efd158440bdfa9d848233dc7ed35701b9277f8110d55fcc8fb0b SHA512 34f35de629bd963f521ad478cec5ce376fce445dfed091e6f61f45ffa7e41f71ff097071d2e908e9e8b75fbfb88d58a6ce696b8ebe2da8493a63b27a7288fc3a WHIRLPOOL 57287383f9127052c97b7661bba2713ef41228807175ce3f6e65c5c62daea886356b1c86aae2f0bdaa389b912ecf03db102f75a902caa437725319656e431ab4
EBUILD scotch-6.0.0.ebuild 4737 SHA256 5dc0919c6e2d5f36bba0a68671410c17002a0c21b9581220228672ad808183ec SHA512 68767ca84f8133a983fcd88d95d93e298c87126ebe270c996efe13e6b4fe5e34917f58c2e6f37cffd813df9830c47cb0700a0b5c4d3758fca85a1e11bf1cf530 WHIRLPOOL 47ad4b4a914177cfb40ba88cc9e069639766240510770d06f0bee79e2cd768c976a1a6b94d028bc2ecad27a03d0f5c3e7f9dd08afea911f2fafb5d2c5f93a8bf
-MISC ChangeLog 3618 SHA256 14613e3c6fddd992434c1907f782e54f1041828ae670972f0282ec7123a8c850 SHA512 21b9a1b1073842e0a9f837bc1fe09b1e4c795fef649e3bd45cb9d8313b85f9ca9d8edbf655f2e9a9e34e651983d4aa7f5cd103559fad5adc886c8508ae9992e6 WHIRLPOOL ea8ffef541912c981e09506d073f1fdd3fda6ed2c6becea5a3b22e7f08d4236d896aaac572749c0d541e283430cc1a2586e3dfd30c1d6c55a81c0b12469d7755
+EBUILD scotch-6.0.4.ebuild 4739 SHA256 ca30a28a8e4e0d80caf6075839758e3c3f13d58282e922d6669479e926e57e64 SHA512 5a63ac8735f53b052eb8aaddb47a384949e717652c1c3843ae1b19388ab2bcae278dda58326b038994b783802fd8284d33cb830d4bbcd4454d3d89c7c0e8c0ae WHIRLPOOL 0fbec2953743c2badc756f310daa8fd9f4293be15d0ea1f3d027fcaed4d798ca7ae7f029a7bed2b251b4c84300543567921fbae1f36b237a2550b3f03763dd53
+MISC ChangeLog 3780 SHA256 cf4827e85ca121e1c8c84fdadfd65d2394ad65fdba205dde06bfbd83292ea41c SHA512 f2801e46d2710f1c529e5e09a66ba20815fa1e190684ea160a442194508db5e3ae4a4a88be5583f51943f513b99b78c57200630cf75a708413e88569f4fb14c9 WHIRLPOOL 4b3d4cfcab5882e5a251873b7874a863617bfb465caaedd14ff48916be388c0731172ff9715b60da6425d1b0a9089c0fd4629cdb50fbb041f8ba35ea3072b365
MISC metadata.xml 1208 SHA256 2a72e20c8562cb65091e4f91ffa545dcde4bc9e99865bfffbca497616ec69b7c SHA512 d89064ca2b4e87c94a113bcafad0b52d4a5b625fdb116cc48c34331261a179ad1466cb3e85076de6b561001459326cc55bb40a5f2fadad7a0d92960901b52f1c WHIRLPOOL 2ec6d91f123f3fee0620a1682d5bc081fa58143ad3570d03156eb9d07755e27c81d50a39a3c8737268dd753ebed096437879226c0a4a9b8273d0051741cf745e
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2
-
-iEYEAREIAAYFAlTptqoACgkQCaWpQKGI+9RD7ACgh3tBEfHerBl2NGJCr4jmNu2M
-ji8An08AqsOh829Q96jmIcHJoKUVUIKc
-=gqJW
------END PGP SIGNATURE-----
diff --git a/sci-libs/scotch/files/scotch-6.0.4-as-needed.patch b/sci-libs/scotch/files/scotch-6.0.4-as-needed.patch
new file mode 100644
index 000000000000..449449bec073
--- /dev/null
+++ b/sci-libs/scotch/files/scotch-6.0.4-as-needed.patch
@@ -0,0 +1,128 @@
+diff -Nur scotch_6.0.4/src/check/Makefile scotch_6.0.4_patched/src/check/Makefile
+--- scotch_6.0.4/src/check/Makefile 2015-03-01 03:18:02.000000000 -0700
++++ scotch_6.0.4_patched/src/check/Makefile 2015-07-17 15:15:58.447398954 -0600
+@@ -53,7 +53,7 @@
+ $(CC) $(CFLAGS) $(CLIBFLAGS) -I$(SCOTCHINCLUDEDIR) -c $(<) -o $(@)
+
+ %$(EXE) : %.c
+- $(CC) $(CFLAGS) -I$(SCOTCHINCLUDEDIR) -L$(SCOTCHLIBDIR) $(<) -o $(@) $(SCOTCHLIBS) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(SCOTCHINCLUDEDIR) -L$(SCOTCHLIBDIR) $(<) $(SCOTCHLIBS) $(LIBS) -o $(@)
+
+ ##
+ ## Project rules.
+diff -Nur scotch_6.0.4/src/esmumps/Makefile scotch_6.0.4_patched/src/esmumps/Makefile
+--- scotch_6.0.4/src/esmumps/Makefile 2015-03-13 17:32:06.000000000 -0600
++++ scotch_6.0.4_patched/src/esmumps/Makefile 2015-07-17 15:17:47.389600699 -0600
+@@ -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) -lscotch -l$(SCOTCHLIB)errexit -lm
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(includedir) $(<) -L$(libdir) -L. -l$(ESMUMPSLIB) -l$(SCOTCHLIB) -lscotch -l$(SCOTCHLIB)errexit $(LIBS) -o $(@)
+
+ ##
+ ## Project rules.
+@@ -57,7 +57,7 @@
+ libesmumps$(LIB) \
+ main_esmumps$(EXE)
+
+-ptscotch : clean
++ptscotch : clean common.h
+ $(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC="$(CCP)" SCOTCHLIB=ptscotch ESMUMPSLIB=ptesmumps \
+ libesmumps$(LIB) \
+ main_esmumps$(EXE)
+@@ -160,6 +160,6 @@
+ order.h \
+ symbol.h \
+ esmumps.h \
+- lib$(ESMUMPSLIB)$(LIB) \
++ libesmumps$(LIB) \
+ $(libdir)/lib$(SCOTCHLIB)$(LIB) \
+ $(libdir)/lib$(SCOTCHLIB)errexit$(LIB)
+diff -Nur scotch_6.0.4/src/libscotch/Makefile scotch_6.0.4_patched/src/libscotch/Makefile
+--- scotch_6.0.4/src/libscotch/Makefile 2014-09-23 13:28:28.000000000 -0600
++++ scotch_6.0.4_patched/src/libscotch/Makefile 2015-07-17 15:19:17.320116484 -0600
+@@ -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.
+@@ -2937,14 +2937,14 @@
+ mapping.h \
+ order.h \
+ parser.h
+- $(CCD) $(CFLAGS) -DSCOTCH_VERSION=$(VERSION) -DSCOTCH_RELEASE=$(RELEASE) -DSCOTCH_PATCHLEVEL=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS)
++ $(CCD) $(CFLAGS) $(LDFLAGS) -DSCOTCH_VERSION=$(VERSION) -DSCOTCH_RELEASE=$(RELEASE) -DSCOTCH_PATCHLEVEL=$(PATCHLEVEL) $(<) $(LIBS) -o $(@)
+
+ ptdummysizes$(EXE) : dummysizes.c \
+ module.h \
+ common.h \
+ dgraph.h \
+ dorder.h
+- $(CCD) $(CFLAGS) -DSCOTCH_VERSION=$(VERSION) -DSCOTCH_RELEASE=$(RELEASE) -DSCOTCH_PATCHLEVEL=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS)
++ $(CCD) $(CFLAGS) $(LDFLAGS) -DSCOTCH_VERSION=$(VERSION) -DSCOTCH_RELEASE=$(RELEASE) -DSCOTCH_PATCHLEVEL=$(PATCHLEVEL) $(<) $(LIBS) -o $(@)
+
+ scotch.h : dummysizes$(EXE) \
+ library.h
+diff -Nur scotch_6.0.4/src/libscotchmetis/Makefile scotch_6.0.4_patched/src/libscotchmetis/Makefile
+--- scotch_6.0.4/src/libscotchmetis/Makefile 2011-09-06 10:46:48.000000000 -0600
++++ scotch_6.0.4_patched/src/libscotchmetis/Makefile 2015-07-17 15:19:42.648698497 -0600
+@@ -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) -o $(@)
+
+ ##
+ ## Project rules.
+diff -Nur scotch_6.0.4/src/scotch/Makefile scotch_6.0.4_patched/src/scotch/Makefile
+--- scotch_6.0.4/src/scotch/Makefile 2015-02-24 15:39:44.000000000 -0700
++++ scotch_6.0.4_patched/src/scotch/Makefile 2015-07-17 15:22:25.275015105 -0600
+@@ -41,13 +41,13 @@
+ include ../Makefile.inc
+
+ %$(EXE) : %$(OBJ)
+- $(CC) $(CFLAGS) -I$(includedir) -I../libscotch $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -lscotch -l$(SCOTCHLIB)errexit $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(includedir) -I../libscotch $(<) -L$(libdir) -l$(SCOTCHLIB) -lscotch -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) -lscotch -l$(SCOTCHLIB)errexit $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(includedir) -I../libscotch $(<) -L$(libdir) -l$(SCOTCHLIB) -lscotch -l$(SCOTCHLIB)errexit $(LIBS) -o $(@)
+
+ ##
+ ## Project rules.
+@@ -209,7 +209,7 @@
+ $(libdir)/libptscotch$(LIB) \
+ $(libdir)/libptscotcherrexit$(LIB) \
+ dgmap.h
+- $(CC) $(CFLAGS) -I$(includedir) -I../libscotch $(<) -DSCOTCH_COMPILE_PART -o $(@) -L$(libdir) -lptscotch -lscotch -lptscotcherrexit $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(includedir) -I../libscotch $(<) -DSCOTCH_COMPILE_PART -L$(libdir) -lptscotch -lscotch -lptscotcherrexit $(LIBS) -o $(@)
+
+ dgscat$(EXE) : dgscat.c \
+ ../libscotch/module.h \
+@@ -321,7 +321,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.c \
+ ../libscotch/module.h \
+@@ -330,7 +330,7 @@
+ $(libdir)/libscotch$(LIB) \
+ $(libdir)/libscotcherrexit$(LIB) \
+ gmap.h
+- $(CC) $(CFLAGS) -I$(includedir) -I../libscotch $(<) -DSCOTCH_COMPILE_PART -o $(@) -L$(libdir) -lscotch -lscotcherrexit $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I$(includedir) -I../libscotch $(<) -DSCOTCH_COMPILE_PART -L$(libdir) -lscotch -lscotcherrexit $(LIBS) -o $(@)
+
+ gscat$(EXE) : gscat.c \
+ ../libscotch/module.h \
diff --git a/sci-libs/scotch/scotch-6.0.4.ebuild b/sci-libs/scotch/scotch-6.0.4.ebuild
new file mode 100644
index 000000000000..b18c939bd8d1
--- /dev/null
+++ b/sci-libs/scotch/scotch-6.0.4.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scotch/scotch-6.0.4.ebuild,v 1.1 2015/07/21 02:47:44 patrick Exp $
+
+EAPI=5
+
+inherit eutils toolchain-funcs versionator flag-o-matic multilib
+
+# use esmumps version to allow linking with mumps
+MYP="${PN}_${PV}_esmumps"
+# download id on gforge changes every goddamn release
+DID=34618
+SOVER=$(get_major_version)
+
+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}.tar.gz"
+
+LICENSE="CeCILL-2"
+SLOT="0/${SOVER}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc int64 mpi static-libs tools threads"
+
+DEPEND="
+ sys-libs/zlib
+ mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P/-/_}
+
+static_to_shared() {
+ local libstatic=${1}; shift
+ local libname=$(basename ${libstatic%.a})
+ local soname=${libname}$(get_libname ${SOVER})
+ local libdir=$(dirname ${libstatic})
+
+ einfo "Making ${soname} from ${libstatic}"
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+ -Wl,-all_load -Wl,${libstatic} \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ else
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname=${soname} \
+ -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ [[ $(get_version_component_count) -gt 1 ]] && \
+ ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
+ ln -s ${soname} ${libdir}/${libname}$(get_libname)
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-as-needed.patch
+ use int64 && append-cflags -DIDXSIZE64
+ if use threads; then
+ append-cflags "-DSCOTCH_PTHREAD_NUMBER=$(nproc)"
+ else
+ append-cflags "-DSCOTCH_PTHREAD_NUMBER=1"
+ sed -i \
+ -e 's/ -DSCOTCH_PTHREAD//' \
+ src/Make.inc/Makefile.inc.i686_pc_linux3 || die
+ fi
+ sed -e "s/gcc/$(tc-getCC)/" \
+ -e "s/-O3/${CFLAGS} -pthread/" \
+ -e "s/ ar/ $(tc-getAR)/" \
+ -e "s/ranlib/$(tc-getRANLIB)/" \
+ -e "s/LDFLAGS/LIBS/" \
+ src/Make.inc/Makefile.inc.i686_pc_linux3 > src/Makefile.inc || die
+}
+
+src_compile() {
+ emake -C src CLIBFLAGS=-fPIC scotch esmumps
+ static_to_shared lib/libscotcherr.a
+ static_to_shared lib/libscotcherrexit.a
+ static_to_shared lib/libscotch.a -Llib -lz -lm -lrt -lpthread -lscotcherr
+ static_to_shared lib/libesmumps.a -Llib -lscotch
+ static_to_shared lib/libscotchmetis.a -Llib -lscotch
+
+ if use mpi; then
+ emake -C src CLIBFLAGS=-fPIC ptscotch ptesmumps
+ export LINK=mpicc
+ static_to_shared lib/libptscotcherr.a
+ static_to_shared lib/libptscotcherrexit.a
+ static_to_shared lib/libptscotch.a -Llib -lscotch -lptscotcherr -lz -lm -lrt
+ static_to_shared lib/libptesmumps.a -Llib -lscotch -lptscotch
+ static_to_shared lib/libptscotchparmetis.a -Llib -lscotch -lptscotch
+ fi
+ if use static-libs; then
+ emake -C src clean
+ emake -C src
+ use mpi && emake -C src ptscotch
+ fi
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}/lib" emake -C src check
+}
+
+src_install() {
+ dolib.so lib/lib*$(get_libname)*
+ use static-libs && dolib.a lib/*.a
+
+ insinto /usr/include/scotch
+ doins include/*
+
+ cat <<-EOF > scotchmetis.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: scotchmetis
+ 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
+
+ # not sure it is actually a full replacement of metis
+ #alternatives_for metis scotch 0 \
+ # /usr/$(get_libdir)/pkgconfig/metis.pc scotchmetis.pc
+
+ if use mpi; then
+ cat <<-EOF > ptscotchparmetis.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ptscotchparmetis
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -lptscotchparmetis -lptscotcherr -lptscotch
+ Private: -lm -lz -lrt
+ Cflags: -I\${includedir}/scotch
+ Requires: scotchmetis
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ptscotchparmetis.pc
+ # not sure it is actually a full replacement of parmetis
+ #alternatives_for metis-mpi ptscotch 0 \
+ # /usr/$(get_libdir)/pkgconfig/metis-mpi.pc ptscotchparmetis.pc
+ fi
+
+ dodoc README.txt
+
+ if use tools; then
+ local b m
+ pushd bin > /dev/null
+ for b in *; do
+ newbin ${b} scotch_${b}
+ done
+ popd > /dev/null
+
+ pushd man/man1 > /dev/null
+ for m in *; do
+ newman ${m} scotch_${m}
+ done
+ popd > /dev/null
+ fi
+
+ use doc && dodoc doc/*.pdf
+}