dev-cpp/yaml-cpp: add 0.9.0

Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/41
Merges: https://codeberg.org/gentoo/gentoo/pulls/41
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Alexey Sokolov
2026-02-11 08:32:25 +00:00
committed by Sam James
parent dfc84bb7d7
commit e656d574ba
5 changed files with 105 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST yaml-cpp-0.8.0.gh.tar.gz 1017151 BLAKE2B 5fd3eaec06bc04215afd2aa14ae8cd35f829f700f104931a51dbd8bb22e4e87f5cd5f2f975d3a2f464226d7165d3d106aa17bc7eab8a812c2545d2212011cf11 SHA512 aae9d618f906117d620d63173e95572c738db518f4ff1901a06de2117d8deeb8045f554102ca0ba4735ac0c4d060153a938ef78da3e0da3406d27b8298e5f38e
DIST yaml-cpp-0.9.0.tar.gz 1056093 BLAKE2B c686fa5d51e9f28eea191647385e2cdef1269ad5dd361fe876b18bf45f85dd1872f4a30b6abe1cdcb534793c16bd9073ee5fb14fb8940885163a1ce0643f8068 SHA512 59f730e8c5744f1ccd542c1144db8d4d949012f72aab0b84ba4a818db25a0f847569b61238ab72ed5b0b2e9482b8d5007651b7185f4ca9e99045d5160259b565

View File

@@ -0,0 +1,10 @@
https://github.com/jbeder/yaml-cpp/pull/1400
--- a/test/cmake/CMakeLists.txt
+++ b/test/cmake/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.5...3.30)
project(yaml-cpp-consumer LANGUAGES CXX)
find_package(yaml-cpp CONFIG REQUIRED)

View File

@@ -0,0 +1,25 @@
dev-cpp/gtest requires c++ 14+
https://github.com/jbeder/yaml-cpp/pull/1374
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -105,7 +105,7 @@ target_include_directories(yaml-cpp
if (NOT DEFINED CMAKE_CXX_STANDARD)
set_target_properties(yaml-cpp
PROPERTIES
- CXX_STANDARD 11)
+ CXX_STANDARD 14)
endif()
if(YAML_CPP_MAIN_PROJECT)
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -49,7 +49,7 @@ target_link_libraries(yaml-cpp-tests
set_property(TARGET yaml-cpp-tests PROPERTY CXX_STANDARD_REQUIRED ON)
if (NOT DEFINED CMAKE_CXX_STANDARD)
- set_target_properties(yaml-cpp-tests PROPERTIES CXX_STANDARD 11)
+ set_target_properties(yaml-cpp-tests PROPERTIES CXX_STANDARD 14)
endif()

View File

@@ -0,0 +1,24 @@
https://github.com/jbeder/yaml-cpp/pull/1401
From 8d58b447fa7cafc3b9fdb5d4ca3e80239c111198 Mon Sep 17 00:00:00 2001
From: Simon Gene Gottlieb <simon@gottliebtfreitag.de>
Date: Wed, 11 Feb 2026 17:55:43 +0100
Subject: [PATCH] fix: floating point conversion on x86 (32bit)
---
src/fptostring.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fptostring.cpp b/src/fptostring.cpp
index e1722aeed..9176d73bd 100644
--- a/src/fptostring.cpp
+++ b/src/fptostring.cpp
@@ -28,7 +28,7 @@ namespace fp_formatting {
* assert(buffer[1] == '2');
* assert(buffer[2] == '3');
*/
-int ConvertToChars(char* begin, char* end, size_t value, int width=1) {
+int ConvertToChars(char* begin, char* end, uint64_t value, int width=1) {
// precondition of this function (will trigger in debug build)
assert(width >= 1);
assert(end >= begin); // end must be after begin

View File

@@ -0,0 +1,45 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib
DESCRIPTION="YAML parser and emitter in C++"
HOMEPAGE="https://github.com/jbeder/yaml-cpp"
SRC_URI="https://github.com/jbeder/yaml-cpp/archive/refs/tags/${P}.tar.gz"
S="${WORKDIR}/yaml-cpp-${P}"
LICENSE="MIT"
SLOT="0/$(ver_cut 0-2)"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="
test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )
"
PATCHES=(
"${FILESDIR}/yaml-cpp-0.9.0-cmakever.patch"
"${FILESDIR}/yaml-cpp-0.9.0-cxxstd.patch"
"${FILESDIR}/yaml-cpp-0.9.0-precision.patch"
)
src_prepare() {
rm -r test/googletest-* || die
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DYAML_BUILD_SHARED_LIBS=ON
-DYAML_CPP_BUILD_TOOLS=OFF # Don't have install rule
-DYAML_CPP_BUILD_TESTS=$(usex test)
-DYAML_USE_SYSTEM_GTEST=ON
-DYAML_CPP_FORMAT_SOURCE=OFF
)
cmake-multilib_src_configure
}