[arch-commits] Commit in msgpack-c/trunk (PKGBUILD test-cflags.patch)

Baptiste Jonglez zorun at archlinux.org
Sun Jun 11 15:33:20 UTC 2017


    Date: Sunday, June 11, 2017 @ 15:33:19
  Author: zorun
Revision: 236208

msgpack-c: Clean up and update to 2.1.2

- use a proper tarball
- don't treat warnings as errors in tests (since it makes the build fail...)
- set CMAKE_BUILD_TYPE=Release (although I'm not sure it changes anything)
- general syntax cleanup

Added:
  msgpack-c/trunk/test-cflags.patch
Modified:
  msgpack-c/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   39 +++++++++++++++++++++++++--------------
 test-cflags.patch |   11 +++++++++++
 2 files changed, 36 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-06-11 14:28:18 UTC (rev 236207)
+++ PKGBUILD	2017-06-11 15:33:19 UTC (rev 236208)
@@ -1,33 +1,44 @@
-# Maintainer: Anatol Pomozov
+# Maintainer: Baptiste Jonglez
 # Contributor: Leen Jewel <leenjewel at gmail.com>
 # Contributor: Auguste Pop <auguste [at] gmail [dot] com>
 
 pkgname=msgpack-c
-pkgver=2.1.1
-_tag=cpp-$pkgver
+pkgver=2.1.2
 pkgrel=1
 pkgdesc='An efficient object serialization library'
-arch=(i686 x86_64)
+arch=("i686" "x86_64")
 url='http://msgpack.org/'
-license=(Apache)
-depends=(glibc)
-checkdepends=(gtest)
-makedepends=(cmake)
-source=($pkgname-$pkgver.zip::https://github.com/msgpack/msgpack-c/archive/$_tag.zip)
-sha1sums=('9e8911ae670e879c4210aa939ffcbd353c1f78c5')
+license=("Apache")
+depends=("glibc")
+checkdepends=("gtest")
+makedepends=("cmake")
+source=("https://github.com/msgpack/msgpack-c/releases/download/cpp-${pkgver}/msgpack-${pkgver}.tar.gz"
+        "test-cflags.patch")
+sha256sums=('4f855ac251e927a478aa69e4d3087ec2d5eb62e034e3a7897c1d5d2df97b7863'
+            '0e6bd401c3ff6f6c68e8beca682b1ecb1b125092a1b1739757294c3c040ba481')
 
+prepare() {
+  cd "msgpack-${pkgver}"
+  # Remove -Werror when building tests (useless and makes build fail)
+  patch -p0 < ../test-cflags.patch
+}
+
 build() {
-  cd msgpack-c-$_tag 
-  cmake -DCMAKE_INSTALL_PREFIX=/usr -DMSGPACK_CXX11=ON .
+  cd "msgpack-${pkgver}"
+  cmake -DCMAKE_INSTALL_PREFIX=/usr \
+        -DMSGPACK_CXX11=ON \
+        -DMSGPACK_BUILD_EXAMPLES=OFF \
+        -DCMAKE_BUILD_TYPE=Release \
+        .
   make
 }
 
 check() {
-  cd msgpack-c-$_tag
+  cd "msgpack-${pkgver}"
   make test 
 }
 
 package() {
-  cd msgpack-c-$_tag
+  cd "msgpack-${pkgver}"
   make DESTDIR="$pkgdir" install
 }

Added: test-cflags.patch
===================================================================
--- test-cflags.patch	                        (rev 0)
+++ test-cflags.patch	2017-06-11 15:33:19 UTC (rev 236208)
@@ -0,0 +1,11 @@
+--- test/CMakeLists.txt.old	2017-06-11 17:11:18.413443078 +0200
++++ test/CMakeLists.txt	2017-06-11 17:11:39.383317557 +0200
+@@ -80,7 +80,7 @@
+     )
+     ADD_TEST (${source_file_we} ${source_file_we})
+     IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+-        SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3 ")
++        SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -g -O3 ")
+     ENDIF ()
+     IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+         SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags")



More information about the arch-commits mailing list