blob: 871dbe7072695efd4adc9df091bafdd44d7b4d55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit eutils fortran
DESCRIPTION="Scalable Performance Analysis of Large-Scale Applications"
HOMEPAGE="http://www.fz-juelich.de/jsc/scalasca/"
SRC_URI="http://www.fz-juelich.de/jsc/datapool/scalasca/${P}.tar.gz"
LICENSE="scalasca"
SLOT="0"
KEYWORDS="~x86"
IUSE="examples fortran mpi openmp"
DEPEND="mpi? ( virtual/mpi )
x11-libs/qt-core:4
x11-libs/qt-gui:4"
RDEPEND="${DEPEND}"
FORTRAN="g77 gfortran ifc"
pkg_setup() {
use fortran && fortran_pkg_setup
}
src_prepare() {
sed -e "s:CFLAGS =.*:CFLAGS = ${CFLAGS}:" \
-e "s:CXXFLAGS =.*:CXXFLAGS = ${CXXFLAGS}:" \
-e "s:SZLIB_OPTFLAGS =.*:SZLIB_OPTFLAGS =:" \
-i mf/Makefile.defs.linux-gomp mf/Makefile.defs.linux-gnu \
|| die "sed CFLAGS,CXXFLAGS failed"
sed -e "s:DOCDIR =.*:DOCDIR = \${PREFIX}/share/doc/${PF}:" \
-i mf/common.defs \
|| die "sed DOCDIR failed"
}
src_configure() {
local myconf
use openmp || myconf="${myconf} --disable-omp"
use mpi || myconf="${myconf} --disable-mpi"
./configure --prefix="${EPREFIX}"/usr ${myconf} --compiler=gnu || die "configure failed"
}
src_compile() {
#multi job build is broken
emake -j1 || die "emake failed"
}
src_install() {
#no DESTDIR support
emake install PREFIX="${D}"/"${EPREFIX}"/usr || die "Installing failed"
#examples are always installed in /usr
cd "${D}"/"${EPREFIX}"/usr
if use examples; then
insinto "/usr/share/${PN}"
doins -r example
fi
rm -rf example
}
|