From cd98bb25989a12fb6d7bea3fe6d6c0e2490c2ecd Mon Sep 17 00:00:00 2001 From: Marek Szuba Date: Tue, 22 Aug 2023 00:55:21 +0100 Subject: [PATCH] dev-libs/sentry-native: new package, add 0.6.5 Needed by >=mail-mta/proton-mail-bridge-3[gui]. Signed-off-by: Marek Szuba --- dev-libs/sentry-native/Manifest | 1 + .../sentry-native-0.6.5_no-fuzz-test.patch | 20 +++++++++ dev-libs/sentry-native/metadata.xml | 15 +++++++ .../sentry-native/sentry-native-0.6.5.ebuild | 42 +++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 dev-libs/sentry-native/Manifest create mode 100644 dev-libs/sentry-native/files/sentry-native-0.6.5_no-fuzz-test.patch create mode 100644 dev-libs/sentry-native/metadata.xml create mode 100644 dev-libs/sentry-native/sentry-native-0.6.5.ebuild diff --git a/dev-libs/sentry-native/Manifest b/dev-libs/sentry-native/Manifest new file mode 100644 index 0000000000000..edea38c2f4c52 --- /dev/null +++ b/dev-libs/sentry-native/Manifest @@ -0,0 +1 @@ +DIST sentry-native-0.6.5.tar.gz 325573 BLAKE2B 6308bef5cc194c3eb8f6f30d1ee894f3d7528d31604f26d6d54cfcc1545ef561346f60c9f35e80662431ad6145cf27a4adac70255b01f230551a541fd4dae709 SHA512 0c0be06f72f53277c9a34ca6514dc96ad14b4239ee92ae65e00d45a515ce13bc314982a651c476ddbb453079ea3fc3fa0bb75cc683dce046f69f0fe1d024f32e diff --git a/dev-libs/sentry-native/files/sentry-native-0.6.5_no-fuzz-test.patch b/dev-libs/sentry-native/files/sentry-native-0.6.5_no-fuzz-test.patch new file mode 100644 index 0000000000000..70231c02da9e7 --- /dev/null +++ b/dev-libs/sentry-native/files/sentry-native-0.6.5_no-fuzz-test.patch @@ -0,0 +1,20 @@ +On the one hand the bundled upstream README only mentions sentry_test_unit +as a test suite meant for the users to run, on the other comments +in sentry_fuzz_json sources state that it has to be built in a very +special - and performance-killing - way in order to work. + +--- a/tests/unit/CMakeLists.txt ++++ b/tests/unit/CMakeLists.txt +@@ -89,6 +89,7 @@ + + add_test(NAME sentry_test_unit COMMAND sentry_test_unit) + ++if(0) + add_executable(sentry_fuzz_json + ${SENTRY_SOURCES} + fuzz.c +@@ -114,3 +115,4 @@ + endif() + + add_test(NAME sentry_fuzz_json COMMAND sentry_fuzz_json) ++endif() diff --git a/dev-libs/sentry-native/metadata.xml b/dev-libs/sentry-native/metadata.xml new file mode 100644 index 0000000000000..aecfa74c176ae --- /dev/null +++ b/dev-libs/sentry-native/metadata.xml @@ -0,0 +1,15 @@ + + + + + marecki@gentoo.org + Marek Szuba + + + getsentry/sentry-native + + + Use dev-util/breakpad as the crash handler + Enable support for automated uploading of crash reports + + diff --git a/dev-libs/sentry-native/sentry-native-0.6.5.ebuild b/dev-libs/sentry-native/sentry-native-0.6.5.ebuild new file mode 100644 index 0000000000000..c3aebc25ea41c --- /dev/null +++ b/dev-libs/sentry-native/sentry-native-0.6.5.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Sentry SDK for C, C++ and native applications" +HOMEPAGE="https://sentry.io/ https://github.com/getsentry/sentry-native" +SRC_URI="https://github.com/getsentry/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+breakpad +curl test" + +RESTRICT="!test? ( test )" + +RDEPEND=" + breakpad? ( dev-util/breakpad ) + curl? ( net-misc/curl ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.6.5_no-fuzz-test.patch +) + +src_configure() { + local mycmakeargs=( + -DSENTRY_BUILD_EXAMPLES=OFF + -DSENTRY_BACKEND=$(usex breakpad "breakpad" "inproc") + -DSENTRY_BUILD_TESTS=$(usex test) + -DSENTRY_TRANSPORT=$(usex curl "curl" "none") + ) + # Avoid "not used by the project" warnings when USE=-breakpad + if use breakpad; then + mycmakeargs+=( -DSENTRY_BREAKPAD_SYSTEM=ON ) + fi + + cmake_src_configure +}