aboutsummaryrefslogtreecommitdiff
blob: 64dd29d6122935161dd5b84b90cfa7bda072fd68 (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
68
69
70
71
72
73
# Copyright 2019-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

DESCRIPTION="Scalable Performance Analysis of Large-Scale Applications"
HOMEPAGE="https://www.scalasca.org/scalasca/software/scalasca-2.x/download.html"
SRC_URI="http://apps.fz-juelich.de/${PN}/releases/${PN}/${PV}/dist/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+openmp"

RDEPEND="
	dev-libs/cubelib
	dev-libs/cubew
	gui-libs/cubegui
	sys-cluster/otf2
	sys-cluster/scorep
	sys-libs/binutils-libs
	sys-libs/zlib
	virtual/mpi
"
DEPEND="${RDEPEND}"
BDEPEND="
	sys-devel/bison
	sys-devel/flex
"

src_prepare() {
	rm -r vendor || die
	default
}

src_configure() {
	tc-export CC CXX FC F77 CPP

	export MPICC=/usr/bin/mpicc
	export MPICXX=/usr/bin/mpicxx
	export MPIF77=/usr/bin/mpif77
	export MPIFC=/usr/bin/mpifc

	export MPI_CFLAGS="${CFLAGS}"
	export MPI_CXXFLAGS="${CXXFLAGS}"
	export MPI_CPPFLAGS="${CPPFLAGS}"
	export MPI_F77LAGS="${F77FLAGS}"
	export MPI_FCLAGS="${FCFLAGS}"
	export MPI_LDFLAGS="${LDFLAGS}"

	local myconf=(
		--disable-platform-mic
		--disable-static
		--enable-shared
		--with-cubew="${EPREFIX}/usr"
		--with-libz="${EPREFIX}/usr"
		--with-otf2="${EPREFIX}/usr"
		$(use_enable openmp)
	)
	econf "${myconf[@]}"
}

src_install() {
	default
	mkdir -p "${ED}/usr/share/doc/${PF}/html" || die
	mv "${ED}/usr/share/doc/${PF}/manual/html" "${ED}/usr/share/doc/${PF}/html/manual" || die
	mv "${ED}/usr/share/doc/${PF}/patterns" "${ED}/usr/share/doc/${PF}/html/patterns" || die
	docompress -x "/usr/share/doc/${PF}/html"

	find "${ED}" -name '*.la' -delete || die
}