Compare commits

..

No commits in common. "rawhide" and "f42" have entirely different histories.

2 changed files with 8 additions and 60 deletions

View file

@ -1,29 +0,0 @@
From 8153a1add19018f65527faad3c4d3941705baf39 Mon Sep 17 00:00:00 2001
From: Craig Scott <craig.scott@crascit.com>
Date: Wed, 16 Aug 2023 15:55:44 +1000
Subject: [PATCH] Specify CMake policy range to avoid deprecation warning
CMake 3.27 started issuing a deprecation warning for any
cmake_minimum_required() call that specified a minimum
version older than 3.5. Specifying a version range instead of
a simple minimum version avoids that warning without
raising the minimum supported CMake version. The NEW
policy behavior will be used for all policies introduced up to
CMake 3.14 with this change.
---
CMakeLists.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46dc18059..1ae92e2b7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,6 @@
-# 3.5 is actually available almost everywhere, but this a good minimum
-cmake_minimum_required(VERSION 3.4)
+# 3.5 is actually available almost everywhere, but this a good minimum.
+# 3.14 as the upper policy limit avoids CMake deprecation warnings.
+cmake_minimum_required(VERSION 3.4...3.14)
# enable MSVC_RUNTIME_LIBRARY target property
# see https://cmake.org/cmake/help/latest/policy/CMP0091.html

View file

@ -2,7 +2,7 @@
Name: yaml-cpp
Version: 0.8.0
Release: 6%{?dist}
Release: 2%{?dist}
License: MIT
Summary: A YAML parser and emitter for C++
@ -11,12 +11,10 @@ Source0: https://github.com/jbeder/yaml-cpp/archive/%{version}/%{name}-%{
Patch0: yaml-cpp-include.patch
# Allow CMake 4.0 build
Patch1: https://github.com/jbeder/yaml-cpp/pull/1211.patch
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
%description
yaml-cpp is a YAML parser and emitter in C++ written around the YAML 1.2 spec.
@ -41,34 +39,26 @@ The %{name}-static package contains the static library for %{name}.
%autosetup -p1
%build
# Define separate build directories for static and shared
%global _vpath_builddir %{_target_platform}-${variant}
variant=static
%cmake \
%cmake -B build_static \
-DCMAKE_BUILD_TYPE=Release \
-DYAML_CPP_BUILD_TOOLS:BOOL=OFF \
-DYAML_CPP_FORMAT_SOURCE:BOOL=OFF \
-DYAML_CPP_INSTALL:BOOL=ON \
-DYAML_BUILD_SHARED_LIBS:BOOL=OFF \
-DYAML_CPP_BUILD_TESTS:BOOL=OFF
%make_build -C build_static
variant=shared
%cmake \
%cmake -B build_shared \
-DCMAKE_BUILD_TYPE=Release \
-DYAML_CPP_BUILD_TOOLS:BOOL=OFF \
-DYAML_CPP_FORMAT_SOURCE:BOOL=OFF \
-DYAML_CPP_INSTALL:BOOL=ON \
-DYAML_BUILD_SHARED_LIBS:BOOL=ON \
-DYAML_CPP_BUILD_TESTS:BOOL=OFF
for variant in static shared; do
%cmake_build
done
%make_build -C build_shared
%install
variant=static
%cmake_install
%make_install -C build_static yaml-cpp
# Move files so they don't get trampled
mv %{buildroot}%{_libdir}/cmake/%{name} \
@ -76,8 +66,7 @@ mv %{buildroot}%{_libdir}/cmake/%{name} \
mv %{buildroot}%{_libdir}/pkgconfig/%{name}.pc \
%{buildroot}%{_libdir}/pkgconfig/%{name}-static.pc
variant=shared
%cmake_install
%make_install -C build_shared
%files
%doc CONTRIBUTING.md README.md
@ -97,18 +86,6 @@ variant=shared
%{_libdir}/pkgconfig/%{name}-static.pc
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu May 15 2025 Cristian Le <git@lecris.dev> - 0.8.0-3
- Allow to build with CMake 4.0 and Ninja generator
* Sun Jan 26 2025 Richard Shaw <hobbes1069@gmail.com> - 0.8.0-2
- Added patch for FTBFS, BZ#2341591.