diff options
Diffstat (limited to 'dev-util/bear')
-rw-r--r-- | dev-util/bear/Manifest | 2 | ||||
-rw-r--r-- | dev-util/bear/bear-3.1.3.ebuild | 90 |
2 files changed, 92 insertions, 0 deletions
diff --git a/dev-util/bear/Manifest b/dev-util/bear/Manifest index 6c018991d858..cf768ddf5540 100644 --- a/dev-util/bear/Manifest +++ b/dev-util/bear/Manifest @@ -3,7 +3,9 @@ AUX bear-3.0.21-libfmt-10.0.0.patch 936 BLAKE2B 1ac889c2bfa057cc6b25fa473a88b05a 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 +DIST bear-3.1.3.tar.gz 127766 BLAKE2B 8fdb5b9bf8e1e026df2296b0d45f23ce1a9157dda28b2656d36c0799e2f02965711ecdf09780d075e18965afc6a771dbf26501e9e1e3b26f4784d4191e168748 SHA512 34039b51a7cd636bdb7fb716f69d6c70de3e7bfc5e2c83a3040942010fb7effe49b0afa0d29be182eb550d57b024fbe5bea779a7fda5f86201865bf491ba1672 EBUILD bear-3.0.20-r1.ebuild 2130 BLAKE2B 032ab0d9e944f03b29a31756b7b482a7b29c27e85767e25a6d32c94b0e5c98252d7d847df991989346625d90e92179a8307eba883758776c4653d1c99081302a SHA512 6b97b0d7e42951d9e78f0ba6940500b2d397f8326e1453041e088bada11e57c62828d5a02f5ea16f023ae0fe4d8651d1a0c62439392ea5cb39cb54691b454de7 EBUILD bear-3.0.21.ebuild 2269 BLAKE2B c90eeb683137b82948a2fa44a0131188dcf3c94d46b25eac9b5e7a0dc63d1d834bd7b816b15d0dbe24a23161c86ce9de93dc8235b1c2a35bb2ffb6e36a4fbb4b SHA512 a9d88ebf9da3caf67f5800ab7c4ebfc775e47a6237c5b12ea07615ae9dcddf1593525b830bc1a346b93abf79347a212d88605010ed0d60e113a5349bfaf540eb EBUILD bear-3.1.2.ebuild 2220 BLAKE2B b875eecaf7a24e34dc87c902245d7441c5dc3246dd2be472fd24ff26a97faa579e2c4cafeb123fa72f3fc3e9624f7648b29b962cd8a11026c24e368c53979db5 SHA512 3d0ee1c27cd77d814588e05da5d11be266f5b2745afdd313360eb1e2efa3a61d80e459cac5625413739ca2331f4a3486a80aff64608ca3832d0d73bdc05156a9 +EBUILD bear-3.1.3.ebuild 2161 BLAKE2B f7ba0db9ec50827b09a8556c01faf67317e8df5c9109a054db979360357dd76471592ae22892df57e58981e92069870d26b903be57de8fb12e62695bbfbe6c3e SHA512 13305c6157d52338b01349d4617c78a5e51114df19645df45e551b7d21ee8c7611cf7a1d943abf502b008eee57eac29a903a59b146755a79548f21c851e49b9c MISC metadata.xml 915 BLAKE2B 74d981eed24b95353d225061c11b11e3f7aedddd6fb3b79a96bc98f2d348d64ea4598337f5b946d94ac64278eaa9bce5a3ade0f9564d9e3f3b4031574569f20c SHA512 010b17d6da15e7b5a4079864c7c2f3f11c8531faddee1ab226c1d6c3f646079c52ef4495e4685bae6eeec8702801ddbd41c4bd2e1aaa82400c1265e2ecad1957 diff --git a/dev-util/bear/bear-3.1.3.ebuild b/dev-util/bear/bear-3.1.3.ebuild new file mode 100644 index 000000000000..d07cd15e5151 --- /dev/null +++ b/dev-util/bear/bear-3.1.3.ebuild @@ -0,0 +1,90 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +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" +S="${WORKDIR}/${P^}" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="test" +RESTRICT="!test? ( 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}] + ') + ) +" + +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 +} |