[packages/yaml-cpp] - updated to 0.9.0 + upstream fix (new soname)
qboosh
qboosh at pld-linux.org
Tue Sep 15 21:58:49 CEST 2026
commit d9307bffcd30dae60607240358538f8dc1426a52
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Sep 15 21:58:59 2026 +0200
- updated to 0.9.0 + upstream fix (new soname)
yaml-cpp-fix-double-on-32bit.patch | 22 ++++++++++++++++++++
yaml-cpp-gtest-no-install.patch | 10 ----------
yaml-cpp.spec | 41 +++++++++++++++++++++++++++-----------
3 files changed, 51 insertions(+), 22 deletions(-)
---
diff --git a/yaml-cpp.spec b/yaml-cpp.spec
index fed266d..80d1e4e 100644
--- a/yaml-cpp.spec
+++ b/yaml-cpp.spec
@@ -1,17 +1,25 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
Summary: YAML parser and emitter for C++
Summary(pl.UTF-8): Biblioteka C++ analizująca i generująca YAML
Name: yaml-cpp
-Version: 0.8.0
+Version: 0.9.0
Release: 1
License: MIT
Group: Libraries
#Source0Download: https://github.com/jbeder/yaml-cpp/releases
-Source0: https://github.com/jbeder/yaml-cpp/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 1d2c7975edba60e995abe3c4af6480e5
-Patch0: %{name}-gtest-no-install.patch
+Source0: https://github.com/jbeder/yaml-cpp/releases/download/%{name}-%{version}/%{name}-%{name}-%{version}.tar.gz
+# Source0-md5: 6c75a439ee8bf59c4d7db9b3af1a070a
+Patch0: %{name}-fix-double-on-32bit.patch
URL: https://github.com/jbeder/yaml-cpp/
-BuildRequires: cmake >= 3.4
-BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: cmake >= 3.5
+%if %{with tests}
+BuildRequires: gmock-devel
+BuildRequires: gtest-devel
+%endif
+BuildRequires: libstdc++-devel >= 6:7
BuildRequires: rpmbuild(macros) >= 1.605
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -26,7 +34,7 @@ Summary: Header files for yaml-cpp library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki yaml-cpp
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: libstdc++-devel >= 6:4.7
+Requires: libstdc++-devel >= 6:7
%description devel
Header files for yaml-cpp library.
@@ -35,7 +43,7 @@ Header files for yaml-cpp library.
Pliki nagłówkowe biblioteki yaml-cpp.
%prep
-%setup -q
+%setup -q -c
%patch -P0 -p1
%build
@@ -44,11 +52,20 @@ cd build
# .pc file requires relative INCLUDEDIR, LIBDIR
# DATADIR is used for arch-dependent .pc and cmake files
%cmake .. \
+ %{!?with_tests:-DBUILD_TESTING=OFF} \
+ -DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_INCLUDEDIR=include \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
- -DCMAKE_INSTALL_DATADIR=%{_lib}
+ -DCMAKE_INSTALL_DATADIR=%{_lib} \
+ %{?with_tests:-DYAML_CPP_BUILD_TESTS=ON} \
+ -DYAML_USE_SYSTEM_GTEST=ON
+
%{__make}
+%if %{with tests}
+ctest
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -64,12 +81,12 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc LICENSE README.md
-%attr(755,root,root) %{_libdir}/libyaml-cpp.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libyaml-cpp.so.0.8
+%{_libdir}/libyaml-cpp.so.*.*.*
+%ghost %{_libdir}/libyaml-cpp.so.0.9
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libyaml-cpp.so
+%{_libdir}/libyaml-cpp.so
%{_includedir}/yaml-cpp
%{_pkgconfigdir}/yaml-cpp.pc
%{_libdir}/cmake/yaml-cpp
diff --git a/yaml-cpp-fix-double-on-32bit.patch b/yaml-cpp-fix-double-on-32bit.patch
new file mode 100644
index 0000000..e26a7d0
--- /dev/null
+++ b/yaml-cpp-fix-double-on-32bit.patch
@@ -0,0 +1,22 @@
+From ebb85dd462f1d5842f4a059225553ded71c5c5e2 Mon Sep 17 00:00:00 2001
+From: Simon Gene Gottlieb <simon at 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
diff --git a/yaml-cpp-gtest-no-install.patch b/yaml-cpp-gtest-no-install.patch
deleted file mode 100644
index 57015cc..0000000
--- a/yaml-cpp-gtest-no-install.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- yaml-cpp-yaml-cpp-0.7.0/test/CMakeLists.txt.orig 2021-07-10 17:53:22.000000000 +0200
-+++ yaml-cpp-yaml-cpp-0.7.0/test/CMakeLists.txt 2022-07-02 08:00:07.984458875 +0200
-@@ -2,6 +2,7 @@ find_package(Threads REQUIRED)
-
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
- set(BUILD_MOCK ON CACHE BOOL "" FORCE)
-+set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
- set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
-
- add_subdirectory(
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/yaml-cpp.git/commitdiff/d9307bffcd30dae60607240358538f8dc1426a52
More information about the pld-cvs-commit
mailing list