/[gentoo-x86]/sci-libs/spooles/spooles-2.2.ebuild
Gentoo

Contents of /sci-libs/spooles/spooles-2.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri Aug 3 20:03:59 2012 UTC (8 years, 1 month ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -3 lines
keyword amd64-linux x86-linux

(Portage version: 2.2.01.20796-prefix/cvs/Linux x86_64)

1 bicatali 1.2 # Copyright 1999-2012 Gentoo Foundation
2 bicatali 1.1 # Distributed under the terms of the GNU General Public License v2
3 bicatali 1.2 # $Header: /var/cvsroot/gentoo-x86/sci-libs/spooles/spooles-2.2.ebuild,v 1.1 2011/03/05 18:20:52 bicatali Exp $
4 bicatali 1.1
5     EAPI=4
6     inherit eutils toolchain-funcs versionator flag-o-matic
7    
8     MYP=${PN}.${PV}
9    
10     DESCRIPTION="SParse Object Oriented Linear Equations Solver"
11     HOMEPAGE="http://www.netlib.org/linalg/spooles"
12     SRC_URI="http://www.netlib.org/linalg/${PN}/${MYP}.tgz"
13    
14     LICENSE="public-domain"
15     SLOT="0"
16 bicatali 1.2 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
17 bicatali 1.1 IUSE="mpi static-libs threads"
18    
19     RDEPEND="mpi? ( virtual/mpi )"
20     DEPEND="${RDEPEND}"
21    
22     S="${WORKDIR}"
23    
24     make_shared_lib() {
25     local soname=$(basename "${1%.a}").so.$(get_major_version)
26     einfo "Making ${soname}"
27     ${2:-$(tc-getCC)} ${LDFLAGS} \
28     -shared -Wl,-soname="${soname}" \
29     -Wl,--whole-archive "${1}" -Wl,--no-whole-archive \
30     -o $(dirname "${1}")/"${soname}" || return 1
31     }
32    
33     src_prepare() {
34     epatch "${FILESDIR}"/${P}-I2Ohash-64bit.patch
35     epatch "${FILESDIR}"/${P}-makefiles.patch
36     epatch "${FILESDIR}"/${P}-formats.patch
37     find . -name makefile -exec \
38     sed -i -e 's:make:$(MAKE):g' '{}' \;
39     sed -e "s/@CC@/$(tc-getCC)/" \
40     -e "s/@AR@/$(tc-getAR)/" \
41     -e "s/@RANLIB@/$(tc-getRANLIB)/" \
42     "${FILESDIR}"/Make.inc.in > Make.inc || die
43     }
44    
45     src_compile () {
46     append-flags -fPIC
47     emake lib
48     use threads && emake -C MT lib
49     use mpi && emake -C MPI CC=mpicc lib
50     make_shared_lib libspooles.a $(use mpi && echo mpicc) || die "shared lib failed"
51     if use static-libs; then
52     filter-flags -fPIC
53     emake clean
54     emake lib
55     use threads && emake -C MT lib
56     use mpi && emake -C MPI CC=mpicc lib
57     fi
58     }
59    
60     src_install () {
61     dolib.so libspooles.so.2
62     dosym libspooles.so.2 /usr/$(get_libdir)/libspooles.so
63     use static-libs && dolib.a libspooles.a
64     find . -name '*.h' -print0 | \
65     xargs -0 -n1 --replace=headerfile install -D headerfile tmp/headerfile
66     insinto /usr/include/${PN}
67     doins -r tmp/*
68     }

  ViewVC Help
Powered by ViewVC 1.1.20