dev-libs/sentry-native: new package, add 0.6.5

Needed by >=mail-mta/proton-mail-bridge-3[gui].

Signed-off-by: Marek Szuba <marecki@gentoo.org>
This commit is contained in:
Marek Szuba
2023-08-22 00:55:21 +01:00
parent 7d0228b796
commit cd98bb2598
4 changed files with 78 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST sentry-native-0.6.5.tar.gz 325573 BLAKE2B 6308bef5cc194c3eb8f6f30d1ee894f3d7528d31604f26d6d54cfcc1545ef561346f60c9f35e80662431ad6145cf27a4adac70255b01f230551a541fd4dae709 SHA512 0c0be06f72f53277c9a34ca6514dc96ad14b4239ee92ae65e00d45a515ce13bc314982a651c476ddbb453079ea3fc3fa0bb75cc683dce046f69f0fe1d024f32e

View File

@@ -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()

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>marecki@gentoo.org</email>
<name>Marek Szuba</name>
</maintainer>
<upstream>
<remote-id type="github">getsentry/sentry-native</remote-id>
</upstream>
<use>
<flag name="breakpad">Use <pkg>dev-util/breakpad</pkg> as the crash handler</flag>
<flag name="curl">Enable support for automated uploading of crash reports</flag>
</use>
</pkgmetadata>

View File

@@ -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
}