diff options
author | Sam James <sam@gentoo.org> | 2023-06-06 07:39:49 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-06-06 07:41:17 +0100 |
commit | 66d6ab30d3a32ac1d7863818c70422afa11b63a4 (patch) | |
tree | edd012cfbbea179586190e90ec70923c21591819 /dev-util/bear | |
parent | media-sound/ardour: Fix build with libc++ (diff) | |
download | gentoo-66d6ab30d3a32ac1d7863818c70422afa11b63a4.tar.gz gentoo-66d6ab30d3a32ac1d7863818c70422afa11b63a4.tar.bz2 gentoo-66d6ab30d3a32ac1d7863818c70422afa11b63a4.zip |
dev-util/bear: add 3.1.2
Closes: https://bugs.gentoo.org/896058
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/bear')
-rw-r--r-- | dev-util/bear/Manifest | 1 | ||||
-rw-r--r-- | dev-util/bear/bear-3.1.2.ebuild | 95 |
2 files changed, 96 insertions, 0 deletions
diff --git a/dev-util/bear/Manifest b/dev-util/bear/Manifest index 82b0fe16290c..2fd6ec1a7c9d 100644 --- a/dev-util/bear/Manifest +++ b/dev-util/bear/Manifest @@ -1,2 +1,3 @@ DIST bear-3.0.20.tar.gz 125393 BLAKE2B 826a774beeb0596038f69b345a3659fe58f897bdb1a63f5faeac1d4242ae3cf4bf346ab82d2f87934d0786e5c0d4e835837b838a62f5a92c28ffe5e6a3d6a900 SHA512 4cf0e648b73fd4c0ac109c4a853e203efccb34ac7373d6c2f3ee3d5089853b791008990df768871dfd1268324bcce97c44657b4c3a2d1383134cba3eaec40bdd DIST bear-3.0.21.tar.gz 125827 BLAKE2B f7dcd383f27c370edb2fa0225e8337b2abe086df25a0272f61051600c017527b4079750328cb811b6967ad6fab51647909333eb1d084e24060fe56ca1036e40d SHA512 9fe43a52fb30b7b413244576c6ea0d493bb720e54d0b6263280224efef4b0432dee46697df160ba7e76bc1a5c8735fe814e0eb686ed797658b563bcb8c5bb7e5 +DIST bear-3.1.2.tar.gz 127197 BLAKE2B b9ef373aab194f0e7330c5f457b88e3c11bb3b202940eff65ecbae79b123254df9629c06f4781570b19675834be80fba041b070820663a6b9a747fc6d269be25 SHA512 02701e8a53b9d776ca838248f5b5d149d7ded6e024ce65bd1ca3b440ab1bf95691dc3d36bb28f043ce24bc1da6e666fb022ff92fa9df7c3142451742de16ca3e diff --git a/dev-util/bear/bear-3.1.2.ebuild b/dev-util/bear/bear-3.1.2.ebuild new file mode 100644 index 000000000000..a02a930c0f9c --- /dev/null +++ b/dev-util/bear/bear-3.1.2.ebuild @@ -0,0 +1,95 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..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 ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="test" + +RDEPEND=" + >=dev-cpp/nlohmann_json-3.11.2:= + >=dev-db/sqlite-3.14:= + >=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? ( + sys-devel/libtool + $(python_gen_any_dep ' + dev-python/lit[${PYTHON_USEDEP}] + ') + ) +" + +RESTRICT="!test? ( test )" + +S="${WORKDIR}/${P^}" + +PATCHES=( + "${FILESDIR}"/${PN}-3.0.21-libfmt-10.0.0.patch +) + +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 +} |