From 4496cbadab513d1fad737d48637a5a731b37b537 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 12 Jul 2020 22:37:05 +0100 Subject: sys-devel/sparse: bump up to 0.6.2 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Sergei Trofimovich --- sys-devel/sparse/sparse-0.6.2.ebuild | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sys-devel/sparse/sparse-0.6.2.ebuild (limited to 'sys-devel/sparse/sparse-0.6.2.ebuild') diff --git a/sys-devel/sparse/sparse-0.6.2.ebuild b/sys-devel/sparse/sparse-0.6.2.ebuild new file mode 100644 index 000000000000..8860a29313e7 --- /dev/null +++ b/sys-devel/sparse/sparse-0.6.2.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit eutils llvm multilib toolchain-funcs + +DESCRIPTION="C semantic parser" +HOMEPAGE="https://sparse.wiki.kernel.org/index.php/Main_Page" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://git.kernel.org/pub/scm/devel/${PN}/${PN}.git" + KEYWORDS="" +else + SRC_URI="https://www.kernel.org/pub/software/devel/${PN}/dist/${P}.tar.xz" + KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="gtk llvm sqlite test xml" +RESTRICT="!test? ( test )" + +LLVM_MAX_SLOT=10 + +RDEPEND="gtk? ( x11-libs/gtk+:2 ) + llvm? ( sys-devel/llvm:${LLVM_MAX_SLOT}= ) + sqlite? ( dev-db/sqlite:= ) + xml? ( dev-libs/libxml2 )" +DEPEND="${RDEPEND} + gtk? ( virtual/pkgconfig ) + xml? ( virtual/pkgconfig )" + +pkg_setup() { + use llvm && llvm_pkg_setup +} + +_emake() { + # Makefile does not allow for an easy override of flags. + # Collect them here and override default phases. + emake \ + CC="$(tc-getCC)" \ + LD="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + CFLAGS="${CFLAGS}" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + \ + HAVE_GTK=$(usex gtk) \ + HAVE_LLVM=$(usex llvm) \ + HAVE_SQLITE=$(usex sqlite) \ + HAVE_LIBXML=$(usex xml) \ + \ + V=1 \ + PREFIX="${EPREFIX}/usr" \ + \ + "$@" +} + +src_compile() { + _emake +} + +src_test() { + _emake check +} + +src_install() { + _emake DESTDIR="${D}" install + + dodoc FAQ README +} -- cgit v1.2.3-65-gdbad