Rebuilt and patched for Boost 1.73

Upstream Boost.Nowide doesn't have cenv.hpp, use cstdlib.hpp instead.

It also isn't header-only, so requires linking to libboost_nowide.
This commit is contained in:
Jonathan Wakely 2020-06-02 23:29:39 +01:00
parent 70ead984a3
commit 629b826aa4
3 changed files with 68 additions and 4 deletions

9
leatherman-gcc10.patch Normal file
View File

@ -0,0 +1,9 @@
--- leatherman-1.10.0/util/src/environment.cc~ 2020-06-02 23:10:13.101632739 +0100
+++ leatherman-1.10.0/util/src/environment.cc 2020-06-02 23:10:25.560638191 +0100
@@ -1,5 +1,6 @@
#include <leatherman/util/environment.hpp>
#include <boost/nowide/cstdlib.hpp>
+#include <stdexcept>
using namespace std;

View File

@ -6,7 +6,7 @@
Name: leatherman
Version: 1.10.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Collection of C++ and CMake utility libraries
# leatherman is ASL 2.0
@ -18,12 +18,14 @@ Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
# This unbundles boost-nowide and the boost libraries do not need
# to have the path to nowide added as it's included already
Patch0: shared_nowide.patch
# Add missing include for <stdexcept>, no longer indirectly included in GCC 10
Patch1: leatherman-gcc10.patch
BuildRequires: cmake%{?cmake_suffix} >= 3.2.2
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: boost%{?boost_suffix}-devel >= 1.54
BuildRequires: boost-nowide-devel
BuildRequires: boost-devel
BuildRequires: libcurl-devel
BuildRequires: gettext
Provides: bundled(rapidjson) = 1.0.2
@ -34,8 +36,8 @@ Provides: bundled(rapidjson) = 1.0.2
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
# Building againse leatherman requires the boost nowide headers present
Requires: boost-nowide-devel
# Building against leatherman requires the boost nowide headers present
Requires: boost-devel
# Strictly speaking, it is needed only if curl feature is activated
Requires: libcurl-devel%{?_isa}
@ -83,6 +85,9 @@ mv %{buildroot}%{_libdir}/cmake/%{name} %{buildroot}%{_libdir}/cmake%{cmake_suff
%{_libdir}/cmake%{?cmake_suffix}/%{name}/
%changelog
* Tue Jun 02 2020 Jonathan Wakely <jwakely@redhat.com> - 1.10.0-2
- Rebuilt and patched for Boost 1.73
* Tue Jan 28 2020 Adam Tkac <vonsch@gmail.com> - 1.10.1-1
- update to 1.10.0

View File

@ -10,3 +10,53 @@ index ff9dba6..5d1b9ce 100644
if(WIN32)
add_leatherman_library(../vendor/nowide/src/iostream.cpp)
endif()
--- leatherman-1.10.0/logging/CMakeLists.txt~ 2020-06-02 23:25:07.073023981 +0100
+++ leatherman-1.10.0/logging/CMakeLists.txt 2020-06-02 23:25:14.889027402 +0100
@@ -1,4 +1,4 @@
-find_package(Boost 1.54 REQUIRED COMPONENTS log log_setup thread date_time filesystem system chrono regex)
+find_package(Boost 1.73 REQUIRED COMPONENTS log log_setup thread date_time filesystem system chrono regex nowide)
find_package(Threads)
add_leatherman_deps(${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
--- leatherman-1.10.0/tests/CMakeLists.txt~ 2020-06-02 23:24:17.146002133 +0100
+++ leatherman-1.10.0/tests/CMakeLists.txt 2020-06-02 23:26:17.780054923 +0100
@@ -1,8 +1,8 @@
-set(BOOST_REQUIRED_COMPONENTS system date_time chrono log log_setup thread filesystem regex)
+set(BOOST_REQUIRED_COMPONENTS system date_time chrono log log_setup thread filesystem regex nowide)
if (LEATHERMAN_USE_LOCALES)
set(BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS} locale)
endif()
-find_package(Boost "1.54" REQUIRED COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
+find_package(Boost "1.73" REQUIRED COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
include_directories(BEFORE ${LEATHERMAN_CATCH_INCLUDE} ${LEATHERMAN_INCLUDE_DIRS})
add_executable(leatherman_test main.cc ${LEATHERMAN_TEST_SRCS})
--- leatherman-1.10.0/file_util/src/file.cc~ 2019-12-14 20:46:29.000000000 +0000
+++ leatherman-1.10.0/file_util/src/file.cc 2020-06-02 22:42:45.100963441 +0100
@@ -1,6 +1,6 @@
#include <leatherman/file_util/file.hpp>
#include <boost/nowide/fstream.hpp>
-#include <boost/nowide/cenv.hpp>
+#include <boost/nowide/cstdlib.hpp>
#include <boost/filesystem.hpp>
#include <sstream>
#include <leatherman/logging/logging.hpp>
--- leatherman-1.10.0/util/src/environment.cc~ 2019-12-14 20:46:29.000000000 +0000
+++ leatherman-1.10.0/util/src/environment.cc 2020-06-02 22:42:45.101963441 +0100
@@ -1,5 +1,5 @@
#include <leatherman/util/environment.hpp>
-#include <boost/nowide/cenv.hpp>
+#include <boost/nowide/cstdlib.hpp>
using namespace std;
--- leatherman-1.10.0/util/tests/environment.cc~ 2019-12-14 20:46:29.000000000 +0000
+++ leatherman-1.10.0/util/tests/environment.cc 2020-06-02 22:42:45.103963442 +0100
@@ -1,6 +1,6 @@
#include <catch.hpp>
#include <leatherman/util/environment.hpp>
-#include <boost/nowide/cenv.hpp>
+#include <boost/nowide/cstdlib.hpp>
using namespace std;
using namespace leatherman::util;