summaryrefslogtreecommitdiff
blob: 721d35dbab42b83ae99e15a566adb22bdd8aaddf (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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit flag-o-matic llvm

if [ "${PV}" = "9999" ]; then
	LLVM_VERSION="6.0.0"
	LLVM_SLOT=6
	EGIT_REPO_URI="https://github.com/lanl/Byfl.git"
	inherit autotools git-r3
	KEYWORDS=""
else
	LLVM_VERSION="6.0.0"
	LLVM_SLOT=6
	MY_P="${P}-llvm-${LLVM_VERSION}"
	SRC_URI="https://github.com/lanl/Byfl/releases/download/v${MY_P#${PN}-}/${MY_P}.tar.gz"
	KEYWORDS="~amd64 ~amd64-linux"
fi

DESCRIPTION="Compiler-based Application Analysis"
HOMEPAGE="https://github.com/lanl/Byfl"

SLOT="0"
LICENSE="BSD"
IUSE="hdf5 static-libs sqlite"

RDEPEND="
	>=sys-devel/clang-${LLVM_VERSION}:${LLVM_SLOT}
	>=sys-devel/llvm-${LLVM_VERSION}:${LLVM_SLOT}
	sys-devel/binutils:*
	dev-lang/perl:=
	dev-perl/Switch
	hdf5? ( sci-libs/hdf5[cxx] )
	sqlite? ( dev-db/sqlite:3 )"
DEPEND="${RDEPEND}"

src_prepare() {
	default
	[[ ${PV} = 9999 ]] && eautoreconf
}

src_configure() {
	append-cxxflags -std=c++11
	use sqlite || export ac_cv_lib_sqlite3_sqlite3_errstr=no
	econf H5CXX=$(usex hdf5 h5c++ no)
}