public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/bear/files/, dev-util/bear/
@ 2023-04-16  5:26 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2023-04-16  5:26 UTC (permalink / raw
  To: gentoo-commits

commit:     67dd4fbd591c399f461f63d61a6012d7bf7e6237
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 16 05:20:22 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 16 05:26:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67dd4fbd

dev-util/bear: fix tests w/ clang 16

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/bear/bear-3.0.21.ebuild                   |  4 +++
 .../bear/files/bear-3.0.21-clang16-tests.patch     | 32 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/dev-util/bear/bear-3.0.21.ebuild b/dev-util/bear/bear-3.0.21.ebuild
index 14481878c2f2..6b0aff0cffe9 100644
--- a/dev-util/bear/bear-3.0.21.ebuild
+++ b/dev-util/bear/bear-3.0.21.ebuild
@@ -45,6 +45,10 @@ RESTRICT="!test? ( test )"
 
 S="${WORKDIR}/${P^}"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.0.21-clang16-tests.patch
+)
+
 pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }

diff --git a/dev-util/bear/files/bear-3.0.21-clang16-tests.patch b/dev-util/bear/files/bear-3.0.21-clang16-tests.patch
new file mode 100644
index 000000000000..19c63ba60849
--- /dev/null
+++ b/dev-util/bear/files/bear-3.0.21-clang16-tests.patch
@@ -0,0 +1,32 @@
+https://github.com/rizsotto/Bear/pull/521
+
+From 472cbed312444cdcef9102e924c79070ea1d3ab2 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Sat, 15 Apr 2023 19:37:41 +0200
+Subject: [PATCH] Avoid implicit function declarations in tests, for C99
+ compatibility
+
+Include <stdio.h> for printf and define _GNU_SOURCE for execvpe.
+
+Future compilers will not support implicit function declartions by
+default, causing these tests to fail to build.
+--- a/test/cases/intercept/preload/errno_reset.c
++++ b/test/cases/intercept/preload/errno_reset.c
+@@ -5,6 +5,7 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
++#include <stdio.h>
+ 
+ int main()
+ {
+--- a/test/cases/intercept/preload/posix/execvpe/success.c
++++ b/test/cases/intercept/preload/posix/execvpe/success.c
+@@ -8,6 +8,7 @@
+ #include "config.h"
+ 
+ #if defined HAVE_UNISTD_H
++#define _GNU_SOURCE
+ #include <unistd.h>
+ #endif
+ 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/bear/files/, dev-util/bear/
@ 2023-05-13  3:31 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2023-05-13  3:31 UTC (permalink / raw
  To: gentoo-commits

commit:     3fb39e3eb87994c558a17415713deb49dc3c0052
Author:     jinqiang zhang <peeweep <AT> 0x0 <DOT> ee>
AuthorDate: Wed May 10 21:29:22 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 13 03:29:49 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fb39e3e

dev-util/bear: fix fails compile with libfmt-10.0.0

Closes: https://bugs.gentoo.org/906082
Signed-off-by: jinqiang zhang <peeweep <AT> 0x0.ee>
Closes: https://github.com/gentoo/gentoo/pull/30982
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/bear/bear-3.0.21.ebuild                   |  1 +
 .../bear/files/bear-3.0.21-libfmt-10.0.0.patch     | 26 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/dev-util/bear/bear-3.0.21.ebuild b/dev-util/bear/bear-3.0.21.ebuild
index 6a865c940fcb..814b202089e1 100644
--- a/dev-util/bear/bear-3.0.21.ebuild
+++ b/dev-util/bear/bear-3.0.21.ebuild
@@ -47,6 +47,7 @@ S="${WORKDIR}/${P^}"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.0.21-clang16-tests.patch
+	"${FILESDIR}"/${PN}-3.0.21-libfmt-10.0.0.patch
 )
 
 pkg_setup() {

diff --git a/dev-util/bear/files/bear-3.0.21-libfmt-10.0.0.patch b/dev-util/bear/files/bear-3.0.21-libfmt-10.0.0.patch
new file mode 100644
index 000000000000..7c8425e46ede
--- /dev/null
+++ b/dev-util/bear/files/bear-3.0.21-libfmt-10.0.0.patch
@@ -0,0 +1,26 @@
+BUG: https://bugs.gentoo.org/906082
+UPSTREAM: https://github.com/rizsotto/Bear/pull/526
+
+From 46a032fa0fc8131779ece13f26735ec84be891e8 Mon Sep 17 00:00:00 2001
+From: jinqiang zhang <peeweep@0x0.ee>
+Date: Thu, 11 May 2023 03:33:17 +0800
+Subject: [PATCH] dependency: fix fmt 10.0.0 incompatibilities (#526)
+
+Signed-off-by: jinqiang zhang <peeweep@0x0.ee>
+---
+ source/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index 6da1131f..fe6b710b 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -29,7 +29,7 @@ find_package(spdlog REQUIRED)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(gRPC REQUIRED IMPORTED_TARGET protobuf grpc++)
+ 
+-if (fmt_VERSION_MAJOR EQUAL 9)
++if (fmt_VERSION_MAJOR GREATER_EQUAL 9)
+     set(FMT_NEEDS_OSTREAM_FORMATTER 1)
+     set(HAVE_FMT_STD_H 1) # FIXME: this should be done with `check_include_file`
+ endif ()


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/bear/files/, dev-util/bear/
@ 2024-07-09 12:52 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-07-09 12:52 UTC (permalink / raw
  To: gentoo-commits

commit:     e204cb10f52f821ddaf924f90af17cacf735669b
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Mon Jul  8 10:56:46 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul  9 12:51:26 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e204cb10

dev-util/bear: add 3.1.4-r1

- fixes cuda build
- Do not skip test based on FEATURES, per PMS Appendix B

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/bear/bear-3.1.4-r1.ebuild         | 112 +++++++++++++++++++++++++++++
 dev-util/bear/files/bear-3.1.4-tests.patch |  49 +++++++++++++
 2 files changed, 161 insertions(+)

diff --git a/dev-util/bear/bear-3.1.4-r1.ebuild b/dev-util/bear/bear-3.1.4-r1.ebuild
new file mode 100644
index 000000000000..d573a78f9b17
--- /dev/null
+++ b/dev-util/bear/bear-3.1.4-r1.ebuild
@@ -0,0 +1,112 @@
+# 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"
+)
+
+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 "${CMAKE_SKIP_TESTS[*]}"))" )
+
+	export LIT_OPTS="${mylitopts[*]}"
+
+	BUILD_DIR="${BUILD_DIR}/subprojects/Build/BearTest" cmake_src_test
+}

diff --git a/dev-util/bear/files/bear-3.1.4-tests.patch b/dev-util/bear/files/bear-3.1.4-tests.patch
new file mode 100644
index 000000000000..d6df55908cbc
--- /dev/null
+++ b/dev-util/bear/files/bear-3.1.4-tests.patch
@@ -0,0 +1,49 @@
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Subject: [PATCH] Fix tests
+# https://github.com/rizsotto/Bear/issues/445
+diff --git a/test/lit.cfg b/test/lit.cfg
+index 2a3868a..cf0c9de 100644
+--- a/test/lit.cfg
++++ b/test/lit.cfg
+@@ -31,6 +31,7 @@ config.excludes = []
+ 
+ config.environment['LC_CTYPE'] = 'en_US.UTF-8'
+ config.environment['PATH'] = ":".join([os.path.join(this_dir, 'bin'), os.environ.get('PATH')])
++config.environment['PYTHONDONTWRITEBYTECODE'] = '1'
+ 
+ # add bear install directory in case if it's not in the path
+ if '_BEAR_BIN_DIR' in lit_config.params:
+@@ -161,6 +162,12 @@ if which('nvcc'):
+     path = which('nvcc')
+     config.substitutions.append(('%{cuda}', path))
+     config.available_features.add('cuda')
++    if 'NVCC_PREPEND_FLAGS' in os.environ:
++        config.environment['NVCC_PREPEND_FLAGS'] = os.environ.get('NVCC_PREPEND_FLAGS')
++    if 'NVCC_APPEND_FLAGS' in os.environ:
++        config.environment['NVCC_APPEND_FLAGS'] = os.environ.get('NVCC_APPEND_FLAGS')
++    if 'NVCC_CCBIN' in os.environ:
++        config.environment['NVCC_CCBIN'] = os.environ.get('NVCC_CCBIN')
+ 
+ 
+ # check if libtool command is available
+@@ -183,7 +183,7 @@ if which('fakeroot'):
+ 
+ 
+ # check if valgrind is available
+-if which('valgrind'):
++if which('valgrind') and False:
+     path = which('valgrind')
+     config.substitutions.append(('%{valgrind}', path))
+     config.available_features.add('valgrind')
+diff --git a/test/cases/compilation/output/compile_cuda.sh b/test/cases/compilation/output/compile_cuda.sh
+index 41b8b37..9ef4954 100644
+--- a/test/cases/compilation/output/compile_cuda.sh
++++ b/test/cases/compilation/output/compile_cuda.sh
+@@ -8,5 +8,5 @@
+ 
+ touch successful_build_1.cu successful_build_2.cu
+ 
+-$CC -c -o successful_build_1.o successful_build_1.cu;
+-$CC -c -o successful_build_2.o successful_build_2.cu;
++$CC${NVCC_CCBIN:+ -ccbin ${NVCC_CCBIN}}${NVCC_PREPEND_FLAGS:+ ${NVCC_PREPEND_FLAGS}} -c -o successful_build_1.o successful_build_1.cu${NVCC_APPEND_FLAGS:+ ${NVCC_APPEND_FLAGS}};
++$CC${NVCC_CCBIN:+ -ccbin ${NVCC_CCBIN}}${NVCC_PREPEND_FLAGS:+ ${NVCC_PREPEND_FLAGS}} -c -o successful_build_2.o successful_build_2.cu${NVCC_APPEND_FLAGS:+ ${NVCC_APPEND_FLAGS}};


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-09 12:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-13  3:31 [gentoo-commits] repo/gentoo:master commit in: dev-util/bear/files/, dev-util/bear/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-07-09 12:52 Sam James
2023-04-16  5:26 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox