diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /sys-devel/sparse/sparse-0.6.4-r2.ebuild | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'sys-devel/sparse/sparse-0.6.4-r2.ebuild')
-rw-r--r-- | sys-devel/sparse/sparse-0.6.4-r2.ebuild | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/sys-devel/sparse/sparse-0.6.4-r2.ebuild b/sys-devel/sparse/sparse-0.6.4-r2.ebuild new file mode 100644 index 000000000000..726fd8b0cfe3 --- /dev/null +++ b/sys-devel/sparse/sparse-0.6.4-r2.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LLVM_MAX_SLOT=14 +inherit llvm 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" +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 )" + +RDEPEND="gtk? ( x11-libs/gtk+:3 ) + llvm? ( <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):= ) + sqlite? ( dev-db/sqlite:= ) + xml? ( dev-libs/libxml2 )" +DEPEND="${RDEPEND}" +BDEPEND="gtk? ( virtual/pkgconfig ) + xml? ( virtual/pkgconfig )" + +llvm_check_deps() { + has_version "sys-devel/llvm:${LLVM_SLOT}" && \ + has_version -r "sys-devel/llvm:${LLVM_SLOT}" +} + +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 +} |