Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/pastix/
Date: Mon, 22 Feb 2016 09:36:06
Message-Id: 1456133600.00087329d3e4694c25f0610a3e453ffebfb23728.jlec@gentoo
1 commit: 00087329d3e4694c25f0610a3e453ffebfb23728
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 22 07:05:28 2016 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 22 09:33:20 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00087329
7
8 sci-libs/pastix: Import from science overlay
9
10 Package-Manager: portage-2.2.27
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 sci-libs/pastix/Manifest | 1 +
14 sci-libs/pastix/metadata.xml | 23 +++++++
15 sci-libs/pastix/pastix-5.2.2_p9.ebuild | 122 +++++++++++++++++++++++++++++++++
16 3 files changed, 146 insertions(+)
17
18 diff --git a/sci-libs/pastix/Manifest b/sci-libs/pastix/Manifest
19 new file mode 100644
20 index 0000000..882d924
21 --- /dev/null
22 +++ b/sci-libs/pastix/Manifest
23 @@ -0,0 +1 @@
24 +DIST pastix_release_bugfix9_351ef60.tar.bz2 2526795 SHA256 58f8cc3aa0fdd9029114b48cc8923ea111919ade94a8c43c9fc5cd016110a90d SHA512 2cc25f5861fd7cd1235a7deea8fbdd5a56b6b7812aefb74d6cf4804c1e954fa86b616602f6db91b9abb430be9ee3e2fcd8a91f7c06cebf1edd4bac132d04b2a5 WHIRLPOOL 5e96b630a1d8e4b34cbcc1ed40538019d24b1fe79231996dbc38c1aedc0d9d62545676c47beb87a617bc1ad891fc70ae388733ffae7f03fd90ef4b6b47430654
25
26 diff --git a/sci-libs/pastix/metadata.xml b/sci-libs/pastix/metadata.xml
27 new file mode 100644
28 index 0000000..387eff2
29 --- /dev/null
30 +++ b/sci-libs/pastix/metadata.xml
31 @@ -0,0 +1,23 @@
32 +<?xml version="1.0" encoding="UTF-8"?>
33 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
34 +<pkgmetadata>
35 + <maintainer type="project">
36 + <email>sci@g.o</email>
37 + <name>Gentoo Science Project</name>
38 + </maintainer>
39 + <longdescription lang="en">
40 + PaStiX (Parallel Sparse matriX package) is a scientific library that
41 + provides a high performance parallel solver for very large sparse
42 + linear systems based on direct methods. Numerical algorithms are
43 + implemented in single or double precision (real or complex) using
44 + LLt, LDLt and LU with static pivoting (for non symmetric matrices
45 + having a symmetric pattern). This solver provides also an adaptive
46 + blockwise iLU(k) factorization that can be used as a parallel
47 + preconditioner using approximated supernodes to build a coarser
48 + block structure of the incomplete factors.
49 +</longdescription>
50 + <use>
51 + <flag name="int64">Build the 64 bits integer library</flag>
52 + <flag name="starpu">Build and link with <pkg>dev-libs/starpu</pkg></flag>
53 + </use>
54 +</pkgmetadata>
55
56 diff --git a/sci-libs/pastix/pastix-5.2.2_p9.ebuild b/sci-libs/pastix/pastix-5.2.2_p9.ebuild
57 new file mode 100644
58 index 0000000..e51bebe
59 --- /dev/null
60 +++ b/sci-libs/pastix/pastix-5.2.2_p9.ebuild
61 @@ -0,0 +1,122 @@
62 +# Copyright 1999-2016 Gentoo Foundation
63 +# Distributed under the terms of the GNU General Public License v2
64 +# $Id$
65 +
66 +EAPI=5
67 +
68 +inherit eutils fortran-2 toolchain-funcs multilib
69 +
70 +# TODO:
71 +# testing: emake examples?
72 +# better doc instalation and building
73 +# pypastix (separate package?)
74 +# multilib with eselect?
75 +# static libs building without pic
76 +# metis?
77 +
78 +# commit id: change every version
79 +CID=351ef60
80 +# package id: change every version, see the link on inriaforge
81 +PID=33558
82 +# leave empty if this is not a post release bug fix
83 +PPV=bugfix9_
84 +MYPN=pastix_release
85 +
86 +DESCRIPTION="Parallel solver for very large sparse linear systems"
87 +HOMEPAGE="http://pastix.gforge.inria.fr"
88 +SRC_URI="https://gforge.inria.fr/frs/download.php/${PID}/${MYPN}_${PPV}${CID}.tar.bz2"
89 +
90 +LICENSE="CeCILL-C"
91 +SLOT="0"
92 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
93 +IUSE="doc int64 mpi smp starpu static-libs"
94 +
95 +RDEPEND="
96 + sci-libs/scotch:0=[int64?,mpi?]
97 + sys-apps/hwloc:0=
98 + virtual/blas
99 + mpi? ( virtual/mpi )
100 + starpu? ( dev-libs/starpu:0= )"
101 +DEPEND="${RDEPEND}
102 + virtual/pkgconfig"
103 +
104 +S="${WORKDIR}/${MYPN}_${CID}/src"
105 +
106 +src_prepare() {
107 + sed -e 's/^\(HOSTARCH\s*=\).*/\1 ${HOST}/' \
108 + -e "s:^\(CCPROG\s*=\).*:\1 $(tc-getCC):" \
109 + -e "s:^\(CFPROG\s*=\).*:\1 $(tc-getFC):" \
110 + -e "s:^\(CF90PROG\s*=\).*:\1 $(tc-getFC):" \
111 + -e "s:^\(MPCCPROG\s*=\).*:\1 mpicc -cc=$(tc-getCC):" \
112 + -e "s:^\(MPCXXPROG\s*=\).*:\1 mpic++ -cxx=$(tc-getCXX):" \
113 + -e "s:^\(MCFPROG\s*=\).*:\1 mpif90 -f90=$(tc-getFC):" \
114 + -e "s:^\(ARPROG\s*=\).*:\1 $(tc-getAR):" \
115 + -e "s:^\(CCFOPT\s*=\).*:\1 ${FFLAGS}:" \
116 + -e "s:^\(CCFDEB\s*=\).*:\1 ${FFLAGS}:" \
117 + -e 's:^\(EXTRALIB\s*=\).*:\1 -lm -lrt:' \
118 + -e "s:^#\s*\(ROOT\s*=\).*:\1 \$(DESTDIR)${EPREFIX%/}/usr:" \
119 + -e 's:^#\s*\(INCLUDEDIR\s*=\).*:\1 $(ROOT)/include:' \
120 + -e 's:^#\s*\(BINDIR\s*=\).*:\1 $(ROOT)/bin:' \
121 + -e "s:^#\s*\(LIBDIR\s*=\).*:\1 \$(ROOT)/$(get_libdir):" \
122 + -e 's:^#\s*\(SHARED\s*=\).*:\1 1:' \
123 + -e 's:^#\s*\(SOEXT\s*=\).*:\1 .so:' \
124 + -e '/fPIC/s/^#//g' \
125 + -e "s:^#\s*\(SHARED_FLAGS\s*=.*\):\1 ${LDFLAGS}:" \
126 + -e "s:pkg-config:$(tc-getPKG_CONFIG):g" \
127 + -e "s:^\(BLASLIB\s*=\).*:\1 $($(tc-getPKG_CONFIG) --libs blas):" \
128 + -e "s:^\s*\(HWLOC_HOME\s*?=\).*:\1 ${EPREFIX}/usr:" \
129 + -e "s:-I\$(HWLOC_INC):$($(tc-getPKG_CONFIG) --cflags hwloc):" \
130 + -e "s:-L\$(HWLOC_LIB) -lhwloc:$($(tc-getPKG_CONFIG) --libs hwloc):" \
131 + -e "s:^\s*\(SCOTCH_HOME\s*?=\).*:\1 ${EPREFIX}/usr:" \
132 + -e "s:^\s*\(SCOTCH_INC\s*?=.*\):\1/scotch:" \
133 + -e "s:^\s*\(SCOTCH_LIB\s*?=.*\)lib:\1$(get_libdir):" \
134 + config/LINUX-GNU.in > config.in || die
135 + sed -i -e 's/__SO_NAME__,$@/__SO_NAME__,$(notdir $@)/g' Makefile || die
136 +}
137 +
138 +src_configure() {
139 + if use amd64; then
140 + sed -i \
141 + -e 's/^\(VERSIONBIT\s*=\).*/\1 _64bit/' config.in || die
142 + fi
143 +
144 + if use int64; then
145 + sed -i \
146 + -e '/VERSIONINT.*_int64/s/#//' \
147 + -e '/CCTYPES.*INTSSIZE64/s/#//' config.in || die
148 + fi
149 +
150 + if ! use mpi; then
151 + sed -i \
152 + -e '/VERSIONMPI.*_nompi/s/#//' \
153 + -e '/CCTYPES.*NOMPI/s/#//' \
154 + -e '/MPCCPROG\s*= $(CCPROG)/s/#//' \
155 + -e '/MCFPROG\s*= $(CFPROG)/s/#//' \
156 + -e 's/-DDISTRIBUTED//' \
157 + -e 's/-lptscotch/-lscotch/g' \
158 + config.in || die
159 + fi
160 +
161 + if ! use smp; then
162 + sed \
163 + -e '/VERSIONSMP.*_nosmp/s/#//' \
164 + -e '/CCTYPES.*NOSMP/s/#//' \
165 + -i config.in || die
166 + fi
167 +
168 + if use starpu; then
169 + sed -i -e '/libstarpu/s/#//g' config.in || die
170 + fi
171 +}
172 +
173 +src_compile() {
174 + emake all drivers
175 +}
176 +
177 +src_install() {
178 + default
179 + sed -i -e "s:${D}::g" "${ED}"/usr/bin/pastix-conf || die
180 + # quick and dirty (static libs should really be built without pic)
181 + cd .. || die
182 + dodoc README.txt doc/refcard/refcard.pdf
183 +}