# # spec file for package yaml-cpp # # Copyright (c) 2022-2023 ZhuningOS # %define library_name libyaml-cpp0_6 Name: yaml-cpp Version: 0.6.3 Release: 150400.4.3.1 Summary: YAML parser and emitter in C++ License: MIT Group: Development/Libraries/C and C++ URL: https://github.com/jbeder/yaml-cpp/ Source: https://github.com/jbeder/yaml-cpp/archive/%{name}-%{version}.tar.gz # PATCH-FIX-UPSTREAM bsc#1032144 CVE-2017-5950 Stack overflow in SingleDocParser::HandleNode() Patch0: yaml-cpp-CVE-2017-5950.patch # PATCH-FIX-UPSTREAM bsc#1121227 CVE-2018-20573 # PATCH-FIX-UPSTREAM bsc#1121230 CVE-2018-20574 # PATCH-FIX-UPSTREAM bsc#1122004 CVE-2019-6285 # PATCH-FIX-UPSTREAM bsc#1122021 CVE-2019-6292 Patch2: cve-2018-20574.patch # PATCH-HACK-SUSE yaml-cpp-abi-breakage.patch bsc1200624 bsc1178332 bsc1178331 bsc1160171 sbrabec@suse.com -- Re-add symbol from the old ABI to prevent ABI breakage. Patch3: yaml-cpp-abi-breakage.patch BuildRequires: cmake BuildRequires: pkgconfig BuildRequires: sed %if %{?suse_version} >= 1330 BuildRequires: gcc BuildRequires: gcc-c++ %else BuildRequires: gcc6 BuildRequires: gcc6-c++ %endif %description A YAML parser and emitter in C++ matching the YAML 1.2 spec. %package -n %{library_name} Summary: YAML parser and emitter in C++ Group: Development/Libraries/C and C++ %description -n %{library_name} A YAML parser and emitter in C++ matching the YAML 1.2 spec. %package devel Summary: Development files for %{name} Group: Development/Libraries/C and C++ Requires: %{library_name} = %{version} %description devel Development files for %{name} library. %prep %autosetup -n %{name}-%{name}-%{version} -p1 %build export CC=gcc export CXX=g++ %if 0%{?suse_version} < 1330 export CC=gcc-6 export CXX=g++-6 %endif %cmake \ -DYAML_BUILD_SHARED_LIBS:BOOL=ON \ -DYAML_CPP_BUILD_TESTS:BOOL=OFF \ -DCMAKE_C_COMPILER=$CC \ -DCMAKE_CXX_COMPILER=$CXX make %{?_smp_mflags} %install %cmake_install %post -n %{library_name} -p /sbin/ldconfig %postun -n %{library_name} -p /sbin/ldconfig %files -n %{library_name} %license LICENSE %{_libdir}/libyaml-cpp.so.* %files devel %{_includedir}/yaml-cpp/ %{_libdir}/libyaml-cpp.so %{_libdir}/pkgconfig/yaml-cpp.pc %{_libdir}/cmake/%{name}/ %changelog