summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sokolov <alexey+gentoo@asokolov.org>2024-05-25 21:59:08 +0100
committerJoonas Niilola <juippis@gentoo.org>2024-07-03 08:30:17 +0300
commitfc815399a844265855f7b5faaa56e1a608fc8056 (patch)
tree2ef0244e6a17bd701d8c152f46540ed4a07ddb06 /dev-util
parentdev-util/bear: drop 3.0.20-r1, 3.0.21, 3.1.2 (diff)
downloadgentoo-fc815399a844265855f7b5faaa56e1a608fc8056.tar.gz
gentoo-fc815399a844265855f7b5faaa56e1a608fc8056.tar.bz2
gentoo-fc815399a844265855f7b5faaa56e1a608fc8056.zip
dev-util/bear: add 3.1.4
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Closes: https://github.com/gentoo/gentoo/pull/36816 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/bear/Manifest1
-rw-r--r--dev-util/bear/bear-3.1.4.ebuild93
2 files changed, 94 insertions, 0 deletions
diff --git a/dev-util/bear/Manifest b/dev-util/bear/Manifest
index 7f7b17831dbd..80708b32dbc4 100644
--- a/dev-util/bear/Manifest
+++ b/dev-util/bear/Manifest
@@ -1 +1,2 @@
DIST bear-3.1.3.tar.gz 127766 BLAKE2B 8fdb5b9bf8e1e026df2296b0d45f23ce1a9157dda28b2656d36c0799e2f02965711ecdf09780d075e18965afc6a771dbf26501e9e1e3b26f4784d4191e168748 SHA512 34039b51a7cd636bdb7fb716f69d6c70de3e7bfc5e2c83a3040942010fb7effe49b0afa0d29be182eb550d57b024fbe5bea779a7fda5f86201865bf491ba1672
+DIST bear-3.1.4.tar.gz 127672 BLAKE2B 18deb1172fcd8afdf4721a04b5d72b182190afd92d645841023033d187c812a0a30805af2bfb67b794ab8a8f0ca42965bebab6d035e95e2a25c5fccfe48a1afd SHA512 c63da7586d25a64dd8b3ff82f37505b36071dd064deb973c012840bc52ff6aec861fca21422b86b11629e86dc43d156b233d21b01e689369f0726799083afa98
diff --git a/dev-util/bear/bear-3.1.4.ebuild b/dev-util/bear/bear-3.1.4.ebuild
new file mode 100644
index 000000000000..6abba52decd6
--- /dev/null
+++ b/dev-util/bear/bear-3.1.4.ebuild
@@ -0,0 +1,93 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake multiprocessing 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"
+S="${WORKDIR}/${P^}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-cpp/abseil-cpp:=
+ >=dev-cpp/nlohmann_json-3.11.2:=
+ >=dev-libs/libfmt-9.1.0:=
+ dev-libs/protobuf:=
+ >=dev-libs/spdlog-1.11.0:=
+ >=net-libs/grpc-1.49.2:=
+"
+
+DEPEND="
+ ${RDEPEND}
+ test? (
+ >=dev-cpp/gtest-1.13
+ )
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ dev-build/libtool
+ $(python_gen_any_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+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() {
+ # TODO: remove this when https://bugs.gentoo.org/928346 is fixed
+ export CMAKE_BUILD_PARALLEL_LEVEL=$(makeopts_jobs)
+
+ 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
+}