Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db6c2dc0cd | ||
|
|
21474c78e9 | ||
|
|
0a64fb057b | ||
|
|
117550bab9 |
2 changed files with 60 additions and 8 deletions
29
1211.patch
Normal file
29
1211.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Name: yaml-cpp
|
||||
Version: 0.8.0
|
||||
Release: 2%{?dist}
|
||||
Release: 6%{?dist}
|
||||
|
||||
License: MIT
|
||||
Summary: A YAML parser and emitter for C++
|
||||
|
|
@ -11,10 +11,12 @@ 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.
|
||||
|
|
@ -39,26 +41,34 @@ The %{name}-static package contains the static library for %{name}.
|
|||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%cmake -B build_static \
|
||||
# Define separate build directories for static and shared
|
||||
%global _vpath_builddir %{_target_platform}-${variant}
|
||||
|
||||
variant=static
|
||||
%cmake \
|
||||
-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
|
||||
|
||||
%cmake -B build_shared \
|
||||
variant=shared
|
||||
%cmake \
|
||||
-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
|
||||
%make_build -C build_shared
|
||||
|
||||
for variant in static shared; do
|
||||
%cmake_build
|
||||
done
|
||||
|
||||
%install
|
||||
%make_install -C build_static yaml-cpp
|
||||
variant=static
|
||||
%cmake_install
|
||||
|
||||
# Move files so they don't get trampled
|
||||
mv %{buildroot}%{_libdir}/cmake/%{name} \
|
||||
|
|
@ -66,7 +76,8 @@ mv %{buildroot}%{_libdir}/cmake/%{name} \
|
|||
mv %{buildroot}%{_libdir}/pkgconfig/%{name}.pc \
|
||||
%{buildroot}%{_libdir}/pkgconfig/%{name}-static.pc
|
||||
|
||||
%make_install -C build_shared
|
||||
variant=shared
|
||||
%cmake_install
|
||||
|
||||
%files
|
||||
%doc CONTRIBUTING.md README.md
|
||||
|
|
@ -86,6 +97,18 @@ mv %{buildroot}%{_libdir}/pkgconfig/%{name}.pc \
|
|||
%{_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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue