1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils llvm multilib toolchain-funcs
8 DESCRIPTION="C semantic parser"
9 HOMEPAGE="https://sparse.wiki.kernel.org/index.php/Main_Page"
11 if [[ ${PV} == "9999" ]] ; then
13 EGIT_REPO_URI="https://git.kernel.org/pub/scm/devel/${PN}/${PN}.git"
16 SRC_URI="https://www.kernel.org/pub/software/devel/${PN}/dist/${P}.tar.xz"
17 KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
22 IUSE="gtk llvm test xml"
23 RESTRICT="!test? ( test )"
27 RDEPEND="gtk? ( x11-libs/gtk+:2 )
28 llvm? ( sys-devel/llvm:${LLVM_MAX_SLOT}= )
29 xml? ( dev-libs/libxml2 )"
31 gtk? ( virtual/pkgconfig )
32 xml? ( virtual/pkgconfig )"
35 # Makefile does not allow for an easy override of flags.
36 # Collect them here and override default phases.
42 PKG_CONFIG="$(tc-getPKG_CONFIG)" \
44 HAVE_GTK=$(usex gtk) \
45 HAVE_LLVM=$(usex llvm) \
46 HAVE_LIBXML=$(usex xml) \
49 PREFIX="${EPREFIX}/usr" \
63 _emake DESTDIR="${D}" install