From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5EB081382C5 for ; Wed, 1 Jul 2020 21:23:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8C891E0919; Wed, 1 Jul 2020 21:23:39 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 62DE7E0919 for ; Wed, 1 Jul 2020 21:23:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D899C34ED87 for ; Wed, 1 Jul 2020 21:23:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4E389274 for ; Wed, 1 Jul 2020 21:23:36 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1593638559.097ae2bc2410e259bc95344bfb8bacfb0c20720d.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bear/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/bear/Manifest dev-util/bear/bear-2.4.3.ebuild dev-util/bear/metadata.xml X-VCS-Directories: dev-util/bear/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 097ae2bc2410e259bc95344bfb8bacfb0c20720d X-VCS-Branch: master Date: Wed, 1 Jul 2020 21:23:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 73d848d1-776d-48ca-b7a4-a9fd877aa336 X-Archives-Hash: 484a87ca47db6d36b38f5663bd15a3e4 commit: 097ae2bc2410e259bc95344bfb8bacfb0c20720d Author: Georgy Yakovlev gentoo org> AuthorDate: Wed Jul 1 21:18:33 2020 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Wed Jul 1 21:22:39 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=097ae2bc dev-util/bear: new package, compile_commands.json generator used to feed clangd/lsp and other tools. Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Georgy Yakovlev gentoo.org> dev-util/bear/Manifest | 1 + dev-util/bear/bear-2.4.3.ebuild | 61 +++++++++++++++++++++++++++++++++++++++++ dev-util/bear/metadata.xml | 19 +++++++++++++ 3 files changed, 81 insertions(+) diff --git a/dev-util/bear/Manifest b/dev-util/bear/Manifest new file mode 100644 index 00000000000..bbfa7c76de5 --- /dev/null +++ b/dev-util/bear/Manifest @@ -0,0 +1 @@ +DIST bear-2.4.3.tar.gz 49933 BLAKE2B 2a91c30d81f9d0e58a25458579f6b0c867c07d2e532bd2ed29305645e152bd564156f708c4a07a683577412b3fdab1f106685ecf1ad88eaad2f33f0bc43a5baa SHA512 a4690cfc9938d8752ca5c8322ca4c5039746ade059e4459e7f3f91b2bf3d36ea691a5d855cab7a4e7ad8ff76478c48c4394593e069a1cf8396ead41017421753 diff --git a/dev-util/bear/bear-2.4.3.ebuild b/dev-util/bear/bear-2.4.3.ebuild new file mode 100644 index 00000000000..83600bfdb38 --- /dev/null +++ b/dev-util/bear/bear-2.4.3.ebuild @@ -0,0 +1,61 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8} ) + +inherit cmake python-single-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/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~ppc64" +IUSE="test" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DEPEND="test? ( + app-shells/bash + $(python_gen_cond_dep ' + dev-python/lit[${PYTHON_USEDEP}] + ') +)" + +RDEPEND="${PYTHON_DEPS}" + +RESTRICT="!test? ( test )" + +S="${WORKDIR}/${P^}" + +src_compile() { + cmake_src_compile + # need to fix it now, before tests are run + python_fix_shebang "${BUILD_DIR}"/bear/bear + python_fix_shebang test/functional/tools/cdb_diff.py +} + +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_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 "removing unwanted/unsupported/xfail tests" + rm -v test/functional/cases/{end-to-end/scons.ft,intercept/cuda/successful_build.fts,run_pep8.ft} || die + einfo "test may use optional tools if found: qmake gfortran" + cmake_build check + fi +} diff --git a/dev-util/bear/metadata.xml b/dev-util/bear/metadata.xml new file mode 100644 index 00000000000..f8c8a305d1e --- /dev/null +++ b/dev-util/bear/metadata.xml @@ -0,0 +1,19 @@ + + + + + gyakovlev@gentoo.org + Georgy Yakovlev + + + Bear is a tool that generates a compilation database for clang tooling. + The concept behind Bear is: to execute the original build command and intercept the exec calls issued by the build tool. + To achieve that, Bear uses the LD_PRELOAD or DYLD_INSERT_LIBRARIES mechanisms provided by the dynamic linker. + Bear has two components: the library and the binary. + The library redefines the exec methods to be used by all child processes. + The executable enables the use of the library for child processes and writes the output file. + + + rizsotto/Bear + +