public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/yyjson/files/, dev-libs/yyjson/
@ 2023-08-14 10:16 Viorel Munteanu
  0 siblings, 0 replies; 2+ messages in thread
From: Viorel Munteanu @ 2023-08-14 10:16 UTC (permalink / raw
  To: gentoo-commits

commit:     e71c58b4dee7daf30150376b64f2f911862d4895
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 14 10:07:46 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Aug 14 10:16:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e71c58b4

dev-libs/yyjson: new package, add 0.7.0

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 dev-libs/yyjson/Manifest                           |  1 +
 .../yyjson/files/yyjson-0.7.0-disable-werror.patch | 12 +++++++
 dev-libs/yyjson/metadata.xml                       | 10 ++++++
 dev-libs/yyjson/yyjson-0.7.0.ebuild                | 39 ++++++++++++++++++++++
 4 files changed, 62 insertions(+)

diff --git a/dev-libs/yyjson/Manifest b/dev-libs/yyjson/Manifest
new file mode 100644
index 000000000000..a81627194462
--- /dev/null
+++ b/dev-libs/yyjson/Manifest
@@ -0,0 +1 @@
+DIST yyjson-0.7.0.tar.gz 1511395 BLAKE2B a088ecaf049b4fd5562a15759dfb67e5a1612ca848a658898bf7b9fe2e8bf7df1270d2a4fe477a92df8963065fb60ce5dbf69da5eb7fa1e282f821222329032d SHA512 91a14d2292cebc5d3eb0954511c1d27d6fa45f778febe73bac700acdbeba3bfc485db444d49cab903dc323eacdb74625059465e4a45a1eca5a1e397768f422f5

diff --git a/dev-libs/yyjson/files/yyjson-0.7.0-disable-werror.patch b/dev-libs/yyjson/files/yyjson-0.7.0-disable-werror.patch
new file mode 100644
index 000000000000..5dd1aacbfca7
--- /dev/null
+++ b/dev-libs/yyjson/files/yyjson-0.7.0-disable-werror.patch
@@ -0,0 +1,12 @@
+Upstream sets -Werror by default, this is not recommended in Gentoo.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -325,7 +325,6 @@
+         set(YYJSON_BASE_FLAGS
+             -pedantic
+             -pedantic-errors
+-            -Werror
+             -Wall
+             -Wextra
+             -Wconversion

diff --git a/dev-libs/yyjson/metadata.xml b/dev-libs/yyjson/metadata.xml
new file mode 100644
index 000000000000..e0e600014091
--- /dev/null
+++ b/dev-libs/yyjson/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+	<maintainer type="person">
+		<email>ceamac@gentoo.org</email>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">ibireme/yyjson</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/dev-libs/yyjson/yyjson-0.7.0.ebuild b/dev-libs/yyjson/yyjson-0.7.0.ebuild
new file mode 100644
index 000000000000..30376e8e222a
--- /dev/null
+++ b/dev-libs/yyjson/yyjson-0.7.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Fast JSON library in C"
+HOMEPAGE="https://github.com/ibireme/yyjson https://ibireme.github.io/yyjson/doc/doxygen/html/"
+SRC_URI="https://github.com/ibireme/yyjson/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT test? ( BSD )"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="doc test"
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="doc? ( app-doc/doxygen )"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.7.0-disable-werror.patch )
+
+src_configure() {
+	local mycmakeargs=(
+		-DYYJSON_BUILD_DOC=$(usex doc)
+		-DYYJSON_BUILD_TESTS=$(usex test)
+	)
+	# TODO: -DYYJSON_ENABLE_VALGRIND=$(usex test)
+	# https://github.com/ibireme/yyjson/issues/134
+
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	use doc && dodoc -r "${BUILD_DIR}"/doxygen/html
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/yyjson/files/, dev-libs/yyjson/
@ 2023-08-15  8:00 Viorel Munteanu
  0 siblings, 0 replies; 2+ messages in thread
From: Viorel Munteanu @ 2023-08-15  8:00 UTC (permalink / raw
  To: gentoo-commits

commit:     38ce591f8ff78ad13ec3b03e5794b5f0673f873d
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 15 07:59:31 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Tue Aug 15 08:00:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38ce591f

dev-libs/yyjson: fix for clang 16 + valgrind

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../files/yyjson-0.7.0-fix-clang-16-valgrind.patch | 24 ++++++++++++++++++++++
 ...{yyjson-0.7.0.ebuild => yyjson-0.7.0-r1.ebuild} |  8 +++++---
 2 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/dev-libs/yyjson/files/yyjson-0.7.0-fix-clang-16-valgrind.patch b/dev-libs/yyjson/files/yyjson-0.7.0-fix-clang-16-valgrind.patch
new file mode 100644
index 000000000000..33a1ceee5a26
--- /dev/null
+++ b/dev-libs/yyjson/files/yyjson-0.7.0-fix-clang-16-valgrind.patch
@@ -0,0 +1,24 @@
+https://github.com/ibireme/yyjson/commit/841a8c5603a1e393d95300a55b44ebc324497e82
+
+From: ibireme <ibireme@gmail.com>
+Date: Mon, 14 Aug 2023 21:33:31 +0800
+Subject: [PATCH] Fix clang-16 valgrind fail: #134
+
+--- a/src/yyjson.c
++++ b/src/yyjson.c
+@@ -2670,6 +2670,7 @@ yyjson_mut_val *yyjson_merge_patch(yyjson_mut_doc *doc,
+     builder = yyjson_mut_obj(doc);
+     if (unlikely(!builder)) return NULL;
+     
++    memset(&local_orig, 0, sizeof(local_orig));
+     if (!yyjson_is_obj(orig)) {
+         orig = &local_orig;
+         orig->tag = builder->tag;
+@@ -2721,6 +2722,7 @@ yyjson_mut_val *yyjson_mut_merge_patch(yyjson_mut_doc *doc,
+     builder = yyjson_mut_obj(doc);
+     if (unlikely(!builder)) return NULL;
+     
++    memset(&local_orig, 0, sizeof(local_orig));
+     if (!yyjson_mut_is_obj(orig)) {
+         orig = &local_orig;
+         orig->tag = builder->tag;

diff --git a/dev-libs/yyjson/yyjson-0.7.0.ebuild b/dev-libs/yyjson/yyjson-0.7.0-r1.ebuild
similarity index 82%
rename from dev-libs/yyjson/yyjson-0.7.0.ebuild
rename to dev-libs/yyjson/yyjson-0.7.0-r1.ebuild
index 30376e8e222a..506382b3e617 100644
--- a/dev-libs/yyjson/yyjson-0.7.0.ebuild
+++ b/dev-libs/yyjson/yyjson-0.7.0-r1.ebuild
@@ -19,15 +19,17 @@ RESTRICT="!test? ( test )"
 
 BDEPEND="doc? ( app-doc/doxygen )"
 
-PATCHES=( "${FILESDIR}"/${PN}-0.7.0-disable-werror.patch )
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.7.0-disable-werror.patch
+	"${FILESDIR}"/${PN}-0.7.0-fix-clang-16-valgrind.patch
+)
 
 src_configure() {
 	local mycmakeargs=(
 		-DYYJSON_BUILD_DOC=$(usex doc)
 		-DYYJSON_BUILD_TESTS=$(usex test)
+		-DYYJSON_ENABLE_VALGRIND=$(usex test)
 	)
-	# TODO: -DYYJSON_ENABLE_VALGRIND=$(usex test)
-	# https://github.com/ibireme/yyjson/issues/134
 
 	cmake_src_configure
 }


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

end of thread, other threads:[~2023-08-15  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14 10:16 [gentoo-commits] repo/gentoo:master commit in: dev-libs/yyjson/files/, dev-libs/yyjson/ Viorel Munteanu
  -- strict thread matches above, loose matches on Subject: below --
2023-08-15  8:00 Viorel Munteanu

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