[arch-commits] Commit in leatherman/trunk (PKGBUILD librapidjson-1.1.patch)

Levente Polyak anthraxx at archlinux.org
Wed Aug 14 08:32:59 UTC 2019


    Date: Wednesday, August 14, 2019 @ 08:32:59
  Author: anthraxx
Revision: 499181

upgpkg: leatherman 1.7.0-2 (use rapidjson from repo and provide lib sonames)

Added:
  leatherman/trunk/librapidjson-1.1.patch
Modified:
  leatherman/trunk/PKGBUILD

------------------------+
 PKGBUILD               |   43 +++++++++++++++++++++++++++++---------
 librapidjson-1.1.patch |   53 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-08-14 08:32:07 UTC (rev 499180)
+++ PKGBUILD	2019-08-14 08:32:59 UTC (rev 499181)
@@ -1,17 +1,30 @@
 # Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
 # Contributor: Jonathan Steel <jsteel at archlinux.org>
 
 pkgname=leatherman
 pkgver=1.7.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Collection of C++ and CMake utility libraries"
 arch=('x86_64')
 url="https://github.com/puppetlabs/leatherman"
 license=('APACHE')
-makedepends=('boost' 'cmake' 'rapidjson')
+depends=('boost-libs' 'libcurl.so' 'icu' 'gcc-libs' 'glibc')
+makedepends=('boost' 'cmake' 'rapidjson' 'python')
 checkdepends=('ruby')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/puppetlabs/leatherman/archive/${pkgver}.tar.gz")
-sha512sums=('d7a475ecc6bea3e2239482e96c673ca3cded21c4538c9416241f8cf402ab70189cc4e4ff86c5b9daf7d74b864f292feeaf380289b347c54adf8afcf43c83e788')
+optdepends=('python: cpplint cmake script')
+provides=(
+  leatherman_execution.so
+  leatherman_dynamic_library.so
+  leatherman_util.so
+  leatherman_locale.so
+  leatherman_file_util.so
+  leatherman_logging.so
+)
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/puppetlabs/leatherman/archive/${pkgver}.tar.gz"
+        librapidjson-1.1.patch)
+sha512sums=('d7a475ecc6bea3e2239482e96c673ca3cded21c4538c9416241f8cf402ab70189cc4e4ff86c5b9daf7d74b864f292feeaf380289b347c54adf8afcf43c83e788'
+            'bf05009e466ea62282a78c16fe23e8cfacfbb6e5da9fdf118bf7b1b257a3b48c5c5665ef080bfdf12c9088cb4e180358d11a5bd05e2e658bdbe8f35e0bba4969')
 
 prepare() {
   cd "${pkgname}-${pkgver}"
@@ -19,24 +32,31 @@
   # 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
 }
 
 build() {
   cd "${pkgname}-${pkgver}"
 
-  # Do not treat warnings as errors
-  CXXFLAGS+=' -Wno-error'
-
   # Work around hang in leatherman_test
   CXXFLAGS+=' -fno-strict-overflow'
 
-  cmake -DCMAKE_INSTALL_PREFIX=/usr
+  mkdir -p build
+  cd build
 
+  cmake \
+    -DCMAKE_BUILD_TYPE=None \
+    -DENABLE_CXX_WERROR=OFF \
+    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+    -DLEATHERMAN_SHARED=ON \
+    -DLEATHERMAN_USE_ICU=ON \
+    ..
   make
 }
 
 check() {
-  cd "${pkgname}-${pkgver}"
+  cd "${pkgname}-${pkgver}"/build
 
   make test
 }
@@ -44,7 +64,10 @@
 package() {
   cd "${pkgname}-${pkgver}"
 
-  make install DESTDIR="${pkgdir}"
+  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:

Added: librapidjson-1.1.patch
===================================================================
--- librapidjson-1.1.patch	                        (rev 0)
+++ librapidjson-1.1.patch	2019-08-14 08:32:59 UTC (rev 499181)
@@ -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