[arch-commits] Commit in leatherman/repos (6 files)

Felix Yan felixonmars at archlinux.org
Tue Jun 8 16:43:43 UTC 2021


    Date: Tuesday, June 8, 2021 @ 16:43:42
  Author: felixonmars
Revision: 959701

archrelease: copy trunk to community-staging-x86_64

Added:
  leatherman/repos/community-staging-x86_64/
  leatherman/repos/community-staging-x86_64/1.12.4-shared_nowide.patch
    (from rev 959700, leatherman/trunk/1.12.4-shared_nowide.patch)
  leatherman/repos/community-staging-x86_64/PKGBUILD
    (from rev 959700, leatherman/trunk/PKGBUILD)
  leatherman/repos/community-staging-x86_64/build-against-ruby27.patch
    (from rev 959700, leatherman/trunk/build-against-ruby27.patch)
  leatherman/repos/community-staging-x86_64/gcc11.patch
    (from rev 959700, leatherman/trunk/gcc11.patch)
  leatherman/repos/community-staging-x86_64/librapidjson-1.1.patch
    (from rev 959700, leatherman/trunk/librapidjson-1.1.patch)

----------------------------+
 1.12.4-shared_nowide.patch |  108 +++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD                   |   90 +++++++++++++++++++++++++++++++++++
 build-against-ruby27.patch |   13 +++++
 gcc11.patch                |   58 +++++++++++++++++++++++
 librapidjson-1.1.patch     |   53 +++++++++++++++++++++
 5 files changed, 322 insertions(+)

Copied: leatherman/repos/community-staging-x86_64/1.12.4-shared_nowide.patch (from rev 959700, leatherman/trunk/1.12.4-shared_nowide.patch)
===================================================================
--- community-staging-x86_64/1.12.4-shared_nowide.patch	                        (rev 0)
+++ community-staging-x86_64/1.12.4-shared_nowide.patch	2021-06-08 16:43:42 UTC (rev 959701)
@@ -0,0 +1,108 @@
+diff --git a/nowide/CMakeLists.txt b/nowide/CMakeLists.txt
+index ff9dba6..5d1b9ce 100644
+--- a/nowide/CMakeLists.txt
++++ b/nowide/CMakeLists.txt
+@@ -1,7 +1,5 @@
+ find_package(Boost 1.54 REQUIRED)
+ 
+-add_leatherman_includes(${Boost_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../vendor/nowide/include")
+-add_leatherman_headers(../vendor/nowide/include/boost)
+ if(WIN32)
+     add_leatherman_library(../vendor/nowide/src/iostream.cpp)
+ endif()
+--- leatherman-1.10.0/execution/CMakeLists.txt~	2020-06-03 10:30:05.027479897 +0100
++++ leatherman-1.10.0/execution/CMakeLists.txt	2020-06-03 10:30:18.871483297 +0100
+@@ -1,4 +1,4 @@
+-find_package(Boost 1.54 REQUIRED COMPONENTS regex filesystem system)
++find_package(Boost 1.73 REQUIRED COMPONENTS regex filesystem system nowide)
+ 
+ add_leatherman_deps("${Boost_LIBRARIES}")
+ if ("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
+@@ -10,7 +10,6 @@
+ add_leatherman_includes("${Boost_INCLUDE_DIRS}")
+ 
+ leatherman_dependency(util)
+-leatherman_dependency(nowide)
+ leatherman_dependency(locale)
+ leatherman_dependency(logging)
+ leatherman_dependency(file_util)
+--- leatherman-1.10.0/file_util/CMakeLists.txt~	2020-06-03 10:30:05.031479898 +0100
++++ leatherman-1.10.0/file_util/CMakeLists.txt	2020-06-03 10:31:04.550494516 +0100
+@@ -1,9 +1,8 @@
+-find_package(Boost 1.54 REQUIRED COMPONENTS regex filesystem system)
++find_package(Boost 1.73 REQUIRED COMPONENTS regex filesystem system nowide)
+ 
+ add_leatherman_deps("${Boost_LIBRARIES}")
+ add_leatherman_includes("${Boost_INCLUDE_DIRS}")
+ 
+-leatherman_dependency(nowide)
+ leatherman_dependency(locale)
+ leatherman_dependency(logging)
+ leatherman_dependency(util)
+--- leatherman-1.10.0/logging/CMakeLists.txt~	2020-06-03 10:30:05.035479898 +0100
++++ leatherman-1.10.0/logging/CMakeLists.txt	2020-06-03 10:30:19.092483352 +0100
+@@ -4,7 +4,6 @@
+ add_leatherman_deps(${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+ add_leatherman_includes("${Boost_INCLUDE_DIRS}")
+ 
+-leatherman_dependency(nowide)
+ leatherman_dependency(locale)
+ 
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "SunOS")
+--- 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/util/CMakeLists.txt~	2020-06-03 10:05:44.277172451 +0100
++++ leatherman-1.10.0/util/CMakeLists.txt	2020-06-03 10:06:52.969185017 +0100
+@@ -1,10 +1,8 @@
+-find_package(Boost 1.54 REQUIRED date_time chrono system)
++find_package(Boost 1.73 REQUIRED date_time chrono system nowide)
+ 
+ add_leatherman_deps(${Boost_LIBRARIES})
+ add_leatherman_includes("${Boost_INCLUDE_DIRS}")
+ 
+-leatherman_dependency(nowide)
+-
+ if(WIN32)
+     set(PLATFORM_SRCS "src/windows/time.cc" "src/windows/environment.cc" "src/windows/scoped_handle.cc")
+     set(PLATFORM_TESTS "tests/windows/environment.cc")
+--- 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,6 @@
+ #include <leatherman/util/environment.hpp>
+-#include <boost/nowide/cenv.hpp>
++#include <boost/nowide/cstdlib.hpp>
++#include <boost/system/error_code.hpp>
+ #include <stdexcept>
+ 
+ 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;

Copied: leatherman/repos/community-staging-x86_64/PKGBUILD (from rev 959700, leatherman/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-06-08 16:43:42 UTC (rev 959701)
@@ -0,0 +1,90 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Christian Rebischke <chris.rebischke at archlinux.org>
+# Contributor: Jonathan Steel <jsteel at archlinux.org>
+
+pkgname=leatherman
+pkgver=1.12.4
+pkgrel=2
+pkgdesc="Collection of C++ and CMake utility libraries"
+arch=('x86_64')
+url="https://github.com/puppetlabs/leatherman"
+license=('APACHE')
+depends=('boost-libs' 'libcurl.so' 'icu' 'gcc-libs' 'glibc')
+makedepends=('boost' 'cmake' 'rapidjson' 'python')
+checkdepends=('ruby2.7')
+optdepends=('python: cpplint cmake script')
+provides=(
+  leatherman_curl.so
+  leatherman_dynamic_library.so
+  leatherman_execution.so
+  leatherman_file_util.so
+  leatherman_json_container.so
+  leatherman_locale.so
+  leatherman_logging.so
+  leatherman_ruby.so
+  leatherman_util.so
+)
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/puppetlabs/leatherman/archive/${pkgver}.tar.gz"
+        librapidjson-1.1.patch
+        1.12.4-shared_nowide.patch
+        gcc11.patch
+        build-against-ruby27.patch)
+
+sha512sums=('b2645a5049856f93c30bb89e87e3a47cf8137aeac73708248b2b228874818063fb31440ca2bd760783e8c95e880fe7ae34a387fcc448efee01dd0cda48089b55'
+            'bf05009e466ea62282a78c16fe23e8cfacfbb6e5da9fdf118bf7b1b257a3b48c5c5665ef080bfdf12c9088cb4e180358d11a5bd05e2e658bdbe8f35e0bba4969'
+            '1f95d6e0ac1000d2eb8cdfee6184ca74d2bb96a9dec50cdd1539cb7e3060decbf1e4863fa2594ce1cf3405b1edf270b94b82f1c9ca79aaeb6f32f11d10c7eece'
+            '7d5418f4ade7b614eb22120a36ff02bf52ed10cf400b9c8cbca201684735b8ad7ff2a682f8602eb3a2d74c14b362c594d621b27c0f13f64716835b2bbfce7732'
+            '86b2adaa55560fa6564b84041fcc27268f74acf85bf082723b7b721313168806c4dcb3ce48bf166c6b2ab7249e3880266b573bb98028f1b5bc2f80bdce1e89b0')
+
+prepare() {
+  cd "${pkgname}-${pkgver}"
+
+  # Ruby 2.3 fix: replace rb_data_object_alloc symbol with rb_data_object_wrap
+  sed -i 's/rb_data_object_alloc/rb_data_object_wrap/g' \
+    $( grep -rl rb_data_object_alloc ruby)
+
+  patch -Np1 < ../librapidjson-1.1.patch
+  # Boost 1.74 provides nowide, and since leatherman vendors nowide it has to be patched out.
+  patch -Np1 < ../1.12.4-shared_nowide.patch
+  # Fix build with GCC 11
+  patch -Np1 -i ../gcc11.patch
+  # update leatherman to use ruby-2.7 and not ruby
+  patch -Np1 < ../build-against-ruby27.patch
+}
+
+build() {
+  cd "${pkgname}-${pkgver}"
+
+  # Work around hang in leatherman_test
+  CXXFLAGS+=' -fno-strict-overflow'
+
+  mkdir -p build
+  cd build
+
+  cmake \
+    -DCMAKE_BUILD_TYPE=None \
+    -DENABLE_CXX_WERROR=OFF \
+    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+    -DBoost_NO_BOOST_CMAKE=ON \
+    -DLEATHERMAN_SHARED=ON \
+    -DLEATHERMAN_USE_ICU=ON \
+    ..
+  make
+}
+
+check() {
+  cd "${pkgname}-${pkgver}"/build
+
+  make test
+}
+
+package() {
+  cd "${pkgname}-${pkgver}"
+
+  make -C build install DESTDIR="${pkgdir}"
+
+  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
+  install -Dm644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:

Copied: leatherman/repos/community-staging-x86_64/build-against-ruby27.patch (from rev 959700, leatherman/trunk/build-against-ruby27.patch)
===================================================================
--- community-staging-x86_64/build-against-ruby27.patch	                        (rev 0)
+++ community-staging-x86_64/build-against-ruby27.patch	2021-06-08 16:43:42 UTC (rev 959701)
@@ -0,0 +1,13 @@
+diff --git a/ruby/src/api.cc b/ruby/src/api.cc
+index 72a6144..3f8ad5d 100644
+--- a/ruby/src/api.cc
++++ b/ruby/src/api.cc
+@@ -505,7 +505,7 @@ namespace leatherman { namespace ruby {
+         }
+ 
+         // Search the path for ruby.exe and query it for the location of its library.
+-        string ruby = execution::which("ruby");
++        string ruby = execution::which("ruby-2.7");
+         if (ruby.empty()) {
+             LOG_DEBUG("ruby could not be found on the PATH.");
+             return library;

Copied: leatherman/repos/community-staging-x86_64/gcc11.patch (from rev 959700, leatherman/trunk/gcc11.patch)
===================================================================
--- community-staging-x86_64/gcc11.patch	                        (rev 0)
+++ community-staging-x86_64/gcc11.patch	2021-06-08 16:43:42 UTC (rev 959701)
@@ -0,0 +1,58 @@
+From 162559cddbb1796ba22a6355dfd9d126c4c216eb Mon Sep 17 00:00:00 2001
+From: mihaibuzgau <mihai.buzgau at puppet.com>
+Date: Tue, 25 May 2021 12:46:50 +0300
+Subject: [PATCH] (PA-3604) update code to compile with new compilers
+
+---
+ util/inc/leatherman/util/scope_exit.hpp      | 5 +++--
+ util/inc/leatherman/util/scoped_resource.hpp | 5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/util/inc/leatherman/util/scope_exit.hpp b/util/inc/leatherman/util/scope_exit.hpp
+index 3aed675..3f2f3df 100644
+--- a/util/inc/leatherman/util/scope_exit.hpp
++++ b/util/inc/leatherman/util/scope_exit.hpp
+@@ -5,6 +5,7 @@
+ #pragma once
+ 
+ #include <functional>
++#include <cstddef>
+ 
+ namespace leatherman { namespace util {
+ 
+@@ -51,9 +52,9 @@ namespace leatherman { namespace util {
+     private:
+         explicit scope_exit(scope_exit const&) = delete;
+         scope_exit& operator=(scope_exit const&) = delete;
+-        void* operator new(size_t) = delete;
++        void* operator new(std::size_t) = delete;
+         void operator delete(void*) = delete;
+-        void* operator new[](size_t) = delete;
++        void* operator new[](std::size_t) = delete;
+         void operator delete[](void* ptr) = delete;
+ 
+         std::function<void()> _callback;
+diff --git a/util/inc/leatherman/util/scoped_resource.hpp b/util/inc/leatherman/util/scoped_resource.hpp
+index 2ff19fc..062026f 100644
+--- a/util/inc/leatherman/util/scoped_resource.hpp
++++ b/util/inc/leatherman/util/scoped_resource.hpp
+@@ -5,6 +5,7 @@
+ #pragma once
+ 
+ #include <functional>
++#include <cstddef>
+ 
+ namespace leatherman { namespace util {
+     /**
+@@ -121,9 +122,9 @@ namespace leatherman { namespace util {
+         std::function<void(T&)> _deleter;
+ 
+      private:
+-        void* operator new(size_t) = delete;
++        void* operator new(std::size_t) = delete;
+         void operator delete(void*) = delete;
+-        void* operator new[](size_t) = delete;
++        void* operator new[](std::size_t) = delete;
+         void operator delete[](void* ptr) = delete;
+     };
+ 

Copied: leatherman/repos/community-staging-x86_64/librapidjson-1.1.patch (from rev 959700, leatherman/trunk/librapidjson-1.1.patch)
===================================================================
--- community-staging-x86_64/librapidjson-1.1.patch	                        (rev 0)
+++ community-staging-x86_64/librapidjson-1.1.patch	2021-06-08 16:43:42 UTC (rev 959701)
@@ -0,0 +1,53 @@
+From 0ed6a7b65d89e439f3ea325e3d4cd8e7579a0f8f Mon Sep 17 00:00:00 2001
+From: Michael Smith <michael.smith at puppet.com>
+Date: Tue, 5 Sep 2017 11:14:57 -0700
+Subject: [PATCH] (LTH-130) Use rapidjson 1.1.0
+
+rapidjson is no longer vendored, it must be installed on the system
+independently.
+---
+ CMakeLists.txt                |   1 -
+ json_container/CMakeLists.txt |   6 +++---
+ rapidjson/CMakeLists.txt      |   1 -
+ 6 files changed, 10 insertions(+), 5 deletions(-)
+ delete mode 100644 rapidjson/CMakeLists.txt
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3d9a9a2..3ba6cd2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -64,7 +64,6 @@ add_leatherman_dir(nowide)
+ add_leatherman_dir(util)
+ add_leatherman_dir(locale)
+ add_leatherman_dir(logging)
+-add_leatherman_dir(rapidjson)
+ add_leatherman_dir(json_container)
+ add_leatherman_dir(file_util)
+ add_leatherman_dir(curl)
+diff --git a/json_container/CMakeLists.txt b/json_container/CMakeLists.txt
+index 09efa38..df10fc3 100644
+--- a/json_container/CMakeLists.txt
++++ b/json_container/CMakeLists.txt
+@@ -1,11 +1,11 @@
+ find_package(Boost 1.54 REQUIRED COMPONENTS regex)
++find_package(RapidJSON 1.1.0 REQUIRED)
+ 
+ add_leatherman_deps("${Boost_LIBRARIES}")
+-add_leatherman_includes("${Boost_INCLUDE_DIRS}")
++add_leatherman_includes("${Boost_INCLUDE_DIRS} ${RAPIDJSON_INCLUDE_DIRS}")
+ 
+-leatherman_dependency(rapidjson)
+ leatherman_dependency(locale)
+ 
+ add_leatherman_library("src/json_container.cc")
+ add_leatherman_headers("inc/leatherman")
+-add_leatherman_test("tests/json_container_test.cc")
+\ No newline at end of file
++add_leatherman_test("tests/json_container_test.cc")
+diff --git a/rapidjson/CMakeLists.txt b/rapidjson/CMakeLists.txt
+deleted file mode 100644
+index 0e7dd0d..0000000
+--- a/rapidjson/CMakeLists.txt
++++ /dev/null
+@@ -1 +0,0 @@
+-add_leatherman_vendored("rapidjson-1.0.2.zip" "rapidjson" "include")



More information about the arch-commits mailing list