6 Commits

4 changed files with 68 additions and 3 deletions

1
baselibs.conf Normal file
View File

@@ -0,0 +1 @@
libyaml-cpp0_8

39
yaml-cpp-gcc15.patch Normal file
View File

@@ -0,0 +1,39 @@
From 7b469b4220f96fb3d036cf68cd7bd30bd39e61d2 Mon Sep 17 00:00:00 2001
From: Christopher Fore <csfore@posteo.net>
Date: Wed, 14 Aug 2024 21:02:32 -0400
Subject: [PATCH] emitterutils: Explicitly include <cstdint>
GCC 15 will no longer include it by default, resulting in build
failures in projects that do not explicitly include it.
Error:
src/emitterutils.cpp:221:11: error: 'uint16_t' was not declared in this scope
221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
| ^~~~~~~~
src/emitterutils.cpp:13:1: note: 'uint16_t' is defined in header '<cstdint>';
this is probably fixable by adding '#include <cstdint>'
12 | #include "yaml-cpp/null.h"
+++ |+#include <cstdint>
13 | #include "yaml-cpp/ostream_wrapper.h"
Tests pass.
Closes: #1307
See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
See-also: https://bugs.gentoo.org/937412
Signed-off-by: Christopher Fore <csfore@posteo.net>
---
src/emitterutils.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/emitterutils.cpp b/src/emitterutils.cpp
index fc41011a5..f801b1d0c 100644
--- a/src/emitterutils.cpp
+++ b/src/emitterutils.cpp
@@ -1,4 +1,5 @@
#include <algorithm>
+#include <cstdint>
#include <iomanip>
#include <sstream>

View File

@@ -1,3 +1,21 @@
-------------------------------------------------------------------
Fri Mar 21 22:33:11 UTC 2025 - Shawn Dunn <sfalken@opensuse.org>
- Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to fix FTBFS with cmake4
- Add %check section
-------------------------------------------------------------------
Thu Feb 13 09:45:14 UTC 2025 - pgajdos@suse.com
- added patches
fix https://github.com/jbeder/yaml-cpp/commit/7b469b4220f96fb3d036cf68cd7bd30bd39e61d2
+ yaml-cpp-gcc15.patch
-------------------------------------------------------------------
Mon Oct 28 08:09:19 UTC 2024 - Martin Hauke <mardnh@gmx.de>
- Add baselibs.conf
-------------------------------------------------------------------
Thu Aug 17 13:13:20 UTC 2023 - Antonio Teixeira <antonio.teixeira@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package yaml-cpp
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,7 +25,10 @@ License: MIT
Group: Development/Libraries/C and C++
URL: https://github.com/jbeder/yaml-cpp/
Source: https://github.com/jbeder/yaml-cpp/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
Source98: baselibs.conf
# https://github.com/jbeder/yaml-cpp/commit/7b469b4220f96fb3d036cf68cd7bd30bd39e61d2
Patch0: yaml-cpp-gcc15.patch
BuildRequires: cmake >= 3.5
BuildRequires: pkgconfig
BuildRequires: sed
%if %{?suse_version} >= 1330
@@ -68,13 +71,17 @@ export CXX=g++-6
-DYAML_BUILD_SHARED_LIBS:BOOL=ON \
-DYAML_CPP_BUILD_TESTS:BOOL=OFF \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX
-DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
make %{?_smp_mflags}
%install
%cmake_install
%check
%ctest
%post -n %{library_name} -p /sbin/ldconfig
%postun -n %{library_name} -p /sbin/ldconfig