summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-11-10 07:57:37 +0000
committerSam James <sam@gentoo.org>2022-11-10 07:57:49 +0000
commit921eead920ebbe9bce2f67d097f9aef5dd79415a (patch)
tree49ca26c79cb5167b6b9ffdd19e12134f367348b7 /dev-util
parentdev-lang/spidermonkey: cover more scenarios with AS="$(tc-getCC) -c" (diff)
downloadgentoo-921eead920ebbe9bce2f67d097f9aef5dd79415a.tar.gz
gentoo-921eead920ebbe9bce2f67d097f9aef5dd79415a.tar.bz2
gentoo-921eead920ebbe9bce2f67d097f9aef5dd79415a.zip
dev-util/bear: add 3.0.20
Closes: https://bugs.gentoo.org/861176 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/bear/Manifest1
-rw-r--r--dev-util/bear/bear-3.0.20.ebuild91
2 files changed, 92 insertions, 0 deletions
diff --git a/dev-util/bear/Manifest b/dev-util/bear/Manifest
index c654704a0b5f..b33a606156fb 100644
--- a/dev-util/bear/Manifest
+++ b/dev-util/bear/Manifest
@@ -1,2 +1,3 @@
DIST bear-2.4.4.tar.gz 50347 BLAKE2B 73fa332cf97413e55c588f8830806a26c6905299af902c6cf1f39fd576c6261690239c1b502b28b5a2aa24e5ca521c3f1dd58aacd60e00ece4fe1840f5656155 SHA512 4ee3fd5c846149029fe9e4104e2a0d0e318a15215aa80fc5dc376e22ebea510384b02d4d62765495343cab537bacd2b1b0130c00246e081feb4e543761a594e5
DIST bear-3.0.19.tar.gz 125086 BLAKE2B 0c6a27359e8c88ab0dbaa3f5442a87efeaba4f6a9b8d0912ad026231421e2555a524b194a19972f549600951bc1f6620398c48338f7eac8850ba6c3969f2e6ac SHA512 688766a76cc3bee1dc82478d29d6e8754618f92633c842586fce95f2f1096764902ffd64a6f2f59101e58eba5472bf39ddb178c3dfcd48491fa4eb63d111585c
+DIST bear-3.0.20.tar.gz 125393 BLAKE2B 826a774beeb0596038f69b345a3659fe58f897bdb1a63f5faeac1d4242ae3cf4bf346ab82d2f87934d0786e5c0d4e835837b838a62f5a92c28ffe5e6a3d6a900 SHA512 4cf0e648b73fd4c0ac109c4a853e203efccb34ac7373d6c2f3ee3d5089853b791008990df768871dfd1268324bcce97c44657b4c3a2d1383134cba3eaec40bdd
diff --git a/dev-util/bear/bear-3.0.20.ebuild b/dev-util/bear/bear-3.0.20.ebuild
new file mode 100644
index 000000000000..d4c5a6e6cc28
--- /dev/null
+++ b/dev-util/bear/bear-3.0.20.ebuild
@@ -0,0 +1,91 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit cmake python-any-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 ~riscv ~x86"
+IUSE="test"
+
+RDEPEND="
+ >=dev-cpp/nlohmann_json-3.7.3:=
+ >=dev-db/sqlite-3.14:=
+ dev-libs/libfmt:=
+ dev-libs/protobuf:=
+ >=dev-libs/spdlog-1.5
+ >=net-libs/grpc-1.26:=
+"
+
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-cpp/gtest-1.10
+ )
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ sys-devel/libtool
+ $(python_gen_any_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}/${P^}"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
+ # Turn off testing before installation
+ sed -i 's/TEST_BEFORE_INSTALL/TEST_EXCLUDE_FROM_MAIN/g' CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_UNIT_TESTS="$(usex test)"
+ -DENABLE_FUNC_TESTS="$(usex test)"
+ )
+ cmake_src_configure
+}
+
+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 network-sandbox ${FEATURES}; then
+ ewarn "\'FEATURES=network-sandbox\' 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 "test may use optional tools if found: qmake gfortran valgrind"
+ # unit tests
+ cmake_run_in "${BUILD_DIR}/subprojects/Build/BearSource" ctest --verbose
+ # functional tests
+ cmake_run_in "${BUILD_DIR}/subprojects/Build/BearTest" ctest --verbose
+ fi
+}