diff options
author | 2024-10-13 00:46:35 +0100 | |
---|---|---|
committer | 2024-11-18 10:06:23 +0100 | |
commit | 9a578c2afc7eae26280483c467c5a91afb4fec3c (patch) | |
tree | 56d410c1c5ce1bc1575b4c3cf1293976f4abb5a9 /dev-util | |
parent | dev-qt/qtwebengine: quick fix for build race conditions (qt6) (diff) | |
download | gentoo-9a578c2afc7eae26280483c467c5a91afb4fec3c.tar.gz gentoo-9a578c2afc7eae26280483c467c5a91afb4fec3c.tar.bz2 gentoo-9a578c2afc7eae26280483c467c5a91afb4fec3c.zip |
dev-util/bear: add 3.1.5
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Closes: https://github.com/gentoo/gentoo/pull/38963
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/bear/Manifest | 1 | ||||
-rw-r--r-- | dev-util/bear/bear-3.1.5.ebuild | 113 |
2 files changed, 114 insertions, 0 deletions
diff --git a/dev-util/bear/Manifest b/dev-util/bear/Manifest index 5e3903a5bc18..4b6cbb75bce1 100644 --- a/dev-util/bear/Manifest +++ b/dev-util/bear/Manifest @@ -1 +1,2 @@ DIST bear-3.1.4.tar.gz 127672 BLAKE2B 18deb1172fcd8afdf4721a04b5d72b182190afd92d645841023033d187c812a0a30805af2bfb67b794ab8a8f0ca42965bebab6d035e95e2a25c5fccfe48a1afd SHA512 c63da7586d25a64dd8b3ff82f37505b36071dd064deb973c012840bc52ff6aec861fca21422b86b11629e86dc43d156b233d21b01e689369f0726799083afa98 +DIST bear-3.1.5.tar.gz 152228 BLAKE2B 64d03d1ca5b1473e4d0b2106969285a2391471a0027cf387c72fe70769293fa361196cb1d37ebb528d27b5741b792472fad09688761ab7f73dc0ea7db96d8be1 SHA512 acf233f7bb8215694734b6c947c965323c0a5ea0c2a6bbb210a37e38fdf545326ca8de3a7b31ce81469756afd1c02233775ddc5936fd04132f216def6e3ce1de diff --git a/dev-util/bear/bear-3.1.5.ebuild b/dev-util/bear/bear-3.1.5.ebuild new file mode 100644 index 000000000000..b3a0ae0c42c0 --- /dev/null +++ b/dev-util/bear/bear-3.1.5.ebuild @@ -0,0 +1,113 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) + +inherit cuda 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="cuda test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-libs/libfmt-9.1.0:= + dev-libs/protobuf:= + >=dev-libs/spdlog-1.11.0:= + >=net-libs/grpc-1.49.2:= + cuda? ( dev-util/nvidia-cuda-toolkit ) +" + +DEPEND=" + ${RDEPEND} + >=dev-cpp/nlohmann_json-3.11.2:= + test? ( + >=dev-cpp/gtest-1.13 + ) +" + +BDEPEND=" + virtual/pkgconfig + test? ( + dev-build/libtool + $(python_gen_any_dep ' + dev-python/lit[${PYTHON_USEDEP}] + ') + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-3.1.4-tests.patch" + "${FILESDIR}/${PN}-3.1.4-reduce-grpc-verbosity.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() { + # 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 "tests will fail" + fi + if has usersandbox "${FEATURES}"; then + ewarn "FEATURES=usersandbox detected" + ewarn "tests will fail" + fi + if + has network-sandbox "${FEATURES}"; then + ewarn "FEATURES=network-sandbox detected" + ewarn "tests will fail" + fi + if + 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" + fi + + einfo "test may use optional tools if found: gfortran libtool nvcc valgrind" + + # unit tests + BUILD_DIR="${BUILD_DIR}/subprojects/Build/BearSource" cmake_src_test + + # functional tests + if use cuda; then + NVCC_CCBIN="$(cuda_gccdir)" + export NVCC_CCBIN + else + LIT_SKIP_TESTS+=( "cases/compilation/output/compile_cuda.sh" ) + fi + + mylitopts+=(-j "$(makeopts_jobs)" ) + [[ -n "${LIT_SKIP_TESTS[*]}" ]] && mylitopts+=( --filter-out "($( IFS='|'; echo "${LIT_SKIP_TESTS[*]}"))" ) + + export LIT_OPTS="${mylitopts[*]}" + + BUILD_DIR="${BUILD_DIR}/subprojects/Build/BearTest" cmake_src_test +} |