summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-24 04:03:25 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-24 04:07:38 -0800
commit7f9e2cc58269ddd27b1ff422045f7eb1bc06b592 (patch)
tree50ad332df840103dfd57fd5d2f2607b4ed088e47 /dev-util/bear
parentnet-dns/opendnssec: update ldns dep (diff)
downloadgentoo-7f9e2cc58269ddd27b1ff422045f7eb1bc06b592.tar.gz
gentoo-7f9e2cc58269ddd27b1ff422045f7eb1bc06b592.tar.bz2
gentoo-7f9e2cc58269ddd27b1ff422045f7eb1bc06b592.zip
dev-util/bear: fix automagic completion installation
install with out eclass instead unconditionally Closes: https://bugs.gentoo.org/829806 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-util/bear')
-rw-r--r--dev-util/bear/bear-2.4.4-r1.ebuild71
-rw-r--r--dev-util/bear/bear-2.4.4.ebuild12
2 files changed, 82 insertions, 1 deletions
diff --git a/dev-util/bear/bear-2.4.4-r1.ebuild b/dev-util/bear/bear-2.4.4-r1.ebuild
new file mode 100644
index 000000000000..af4cedd7fc4f
--- /dev/null
+++ b/dev-util/bear/bear-2.4.4-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit bash-completion-r1 cmake python-single-r1
+
+DESCRIPTION="Build EAR generates a compilation database for clang tooling"
+HOMEPAGE="https://github.com/rizsotto/Bear"
+SRC_URI="https://github.com/rizsotto/Bear/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 ~ppc64 x86"
+IUSE="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="test? (
+ app-shells/bash
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
+)"
+
+RDEPEND="${PYTHON_DEPS}"
+
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}/${P^}"
+
+src_configure() {
+ local mycmakeargs=( -DUSE_SHELL_COMPLETION=OFF )
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ # need to fix it now, before tests are run
+ python_fix_shebang "${BUILD_DIR}"/bear/bear
+ python_fix_shebang test/functional/tools/cdb_diff.py
+}
+
+src_install() {
+ cmake_src_install
+ dobashcomp shell-completion/bash/bear
+}
+
+src_test() {
+ if has sandbox ${FEATURES}; then
+ ewarn "\'FEATURES=sandbox\' detected"
+ ewarn "Bear overrides LD_PRELOAD and conflicts with gentoo sandbox"
+ ewarn "Skipping tests"
+ elif
+ has usersandbox ${FEATURES}; then
+ ewarn "\'FEATURES=usersandbox\' detected"
+ ewarn "Skipping tests"
+ elif
+ has_version -b 'sys-devel/gcc-config[-native-symlinks]'; then
+ ewarn "\'sys-devel/gcc-config[-native-symlinks]\' detected, tests call /usr/bin/cc directly (hardcoded)"
+ ewarn "and will fail without generic cc symlink"
+ ewarn "Skipping tests"
+ else
+ einfo "removing unwanted/unsupported/xfail tests"
+ rm -v test/functional/cases/{end-to-end/scons.ft,intercept/cuda/successful_build.fts,run_pep8.ft} || die
+ einfo "test may use optional tools if found: qmake gfortran"
+ cmake_build check
+ fi
+}
diff --git a/dev-util/bear/bear-2.4.4.ebuild b/dev-util/bear/bear-2.4.4.ebuild
index e7c189ffb934..af4cedd7fc4f 100644
--- a/dev-util/bear/bear-2.4.4.ebuild
+++ b/dev-util/bear/bear-2.4.4.ebuild
@@ -5,7 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
-inherit cmake python-single-r1
+inherit bash-completion-r1 cmake python-single-r1
DESCRIPTION="Build EAR generates a compilation database for clang tooling"
HOMEPAGE="https://github.com/rizsotto/Bear"
@@ -31,6 +31,11 @@ RESTRICT="!test? ( test )"
S="${WORKDIR}/${P^}"
+src_configure() {
+ local mycmakeargs=( -DUSE_SHELL_COMPLETION=OFF )
+ cmake_src_configure
+}
+
src_compile() {
cmake_src_compile
# need to fix it now, before tests are run
@@ -38,6 +43,11 @@ src_compile() {
python_fix_shebang test/functional/tools/cdb_diff.py
}
+src_install() {
+ cmake_src_install
+ dobashcomp shell-completion/bash/bear
+}
+
src_test() {
if has sandbox ${FEATURES}; then
ewarn "\'FEATURES=sandbox\' detected"