summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-09-19 03:15:23 +0100
committerSam James <sam@gentoo.org>2021-09-19 03:24:20 +0100
commitc5ea3c2cc75ac22165cd80e75298a75b30031294 (patch)
treea2410a7ca5f71e6dc0ac45b64c02ef04c7ab3b52 /sys-devel/sparse
parentsys-devel/smatch: add 1.72 (diff)
downloadgentoo-c5ea3c2cc75ac22165cd80e75298a75b30031294.tar.gz
gentoo-c5ea3c2cc75ac22165cd80e75298a75b30031294.tar.bz2
gentoo-c5ea3c2cc75ac22165cd80e75298a75b30031294.zip
sys-devel/sparse: add 0.6.4
Closes: https://bugs.gentoo.org/812551 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel/sparse')
-rw-r--r--sys-devel/sparse/Manifest1
-rw-r--r--sys-devel/sparse/sparse-0.6.4.ebuild73
-rw-r--r--sys-devel/sparse/sparse-9999.ebuild18
3 files changed, 84 insertions, 8 deletions
diff --git a/sys-devel/sparse/Manifest b/sys-devel/sparse/Manifest
index a706e2ac3fcc..7c1cf179d14e 100644
--- a/sys-devel/sparse/Manifest
+++ b/sys-devel/sparse/Manifest
@@ -1 +1,2 @@
DIST sparse-0.6.3.tar.xz 350676 BLAKE2B 5c8f54f3b7d2095df30b9a59a151e307ebedac5dbb6910ab5684b298c2b427e55dd43697e698fd289fb0d8e824ba4d72c2761772babb9f438e622f439ab3448d SHA512 33170065ea5967d7c640a7551acc78d7efee9f7aa6a9edf6afe2cdd8a04ea5cebe7b5dcdeebf791d384542b8bcdd4e818c75e7ae2e7aa4e1edbd56b68367b28f
+DIST sparse-0.6.4.tar.xz 370840 BLAKE2B 4b21d26c87df65f08928438c311582a45f4cbbb5ed2bb399c3521d1e40630006d794b4f1e545693e82225f086968cf686c5bfb29059644a31812120f07caebe2 SHA512 4ada31e588469d15862579dd7eb926ce1ad717bf96d38d425b9153f2efe73949fdda5bc59d05d926614a08d70e656e4ff531a5f0a1cf8e7725c596dcdba169f9
diff --git a/sys-devel/sparse/sparse-0.6.4.ebuild b/sys-devel/sparse/sparse-0.6.4.ebuild
new file mode 100644
index 000000000000..3304272807ef
--- /dev/null
+++ b/sys-devel/sparse/sparse-0.6.4.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LLVM_MAX_SLOT=12
+inherit 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"
+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+:2 )
+ 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_MAX_SLOT}" || \
+ has_version "sys-devel/llvm:$((${LLVM_MAX_SLOT} - 1))" \
+ has_version "sys-devel/llvm:$((${LLVM_MAX_SLOT} - 2))"
+}
+
+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
+}
diff --git a/sys-devel/sparse/sparse-9999.ebuild b/sys-devel/sparse/sparse-9999.ebuild
index 0fcda7847330..3304272807ef 100644
--- a/sys-devel/sparse/sparse-9999.ebuild
+++ b/sys-devel/sparse/sparse-9999.ebuild
@@ -3,6 +3,7 @@
EAPI=7
+LLVM_MAX_SLOT=12
inherit llvm multilib toolchain-funcs
DESCRIPTION="C semantic parser"
@@ -21,16 +22,20 @@ 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}= )
+ llvm? ( <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):= )
sqlite? ( dev-db/sqlite:= )
xml? ( dev-libs/libxml2 )"
-DEPEND="${RDEPEND}
- gtk? ( virtual/pkgconfig )
+DEPEND="${RDEPEND}"
+BDEPEND="gtk? ( virtual/pkgconfig )
xml? ( virtual/pkgconfig )"
+llvm_check_deps() {
+ has_version "sys-devel/llvm:${LLVM_MAX_SLOT}" || \
+ has_version "sys-devel/llvm:$((${LLVM_MAX_SLOT} - 1))" \
+ has_version "sys-devel/llvm:$((${LLVM_MAX_SLOT} - 2))"
+}
+
pkg_setup() {
use llvm && llvm_pkg_setup
}
@@ -44,15 +49,12 @@ _emake() {
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" \
- \
"$@"
}