From 62cd572ef934d84163603827a12cc6031984cc1d Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 11 Oct 2016 02:31:54 +0200 Subject: community/msgpack-c: move from testing --- community/msgpack-c/APKBUILD | 41 +++++++++++++++++ community/msgpack-c/cflags.patch | 96 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 community/msgpack-c/APKBUILD create mode 100644 community/msgpack-c/cflags.patch (limited to 'community/msgpack-c') diff --git a/community/msgpack-c/APKBUILD b/community/msgpack-c/APKBUILD new file mode 100644 index 0000000000..5a5fa4d874 --- /dev/null +++ b/community/msgpack-c/APKBUILD @@ -0,0 +1,41 @@ +# Contributor: Daniel Sabogal +# Maintainer: Jakub Jirutka +pkgname=msgpack-c +_pkgname=msgpack-c-cpp +pkgver=2.0.0 +pkgrel=1 +pkgdesc="An efficient object serialization library" +url="https://msgpack.org" +arch="all" +license="Boost" +depends="" +makedepends="cmake" +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/msgpack/$pkgname/archive/cpp-$pkgver.tar.gz + cflags.patch" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + mkdir -p "$builddir"/build + cd "$builddir"/build + + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_C_FLAGS="$CFLAGS -DNDEBUG" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS -DNDEBUG" \ + -DCMAKE_VERBOSE_MAKEFILE=TRUE \ + || return 1 + make || return 1 +} + +package() { + cd "$builddir"/build + make DESTDIR="$pkgdir"/ install +} + +md5sums="3b88515a48275e2301c5feaccebd8afb msgpack-c-2.0.0.tar.gz +f9068b1906767a23bd78421a83a45134 cflags.patch" +sha256sums="eb20b4bf15f20bad149ec82fffac74f16de2a8a797e321a3f8189d63263a511e msgpack-c-2.0.0.tar.gz +2305f5133bb7d3551f443f50f02cd5cc6ba74932365610f04e42d6137a6481de cflags.patch" +sha512sums="5611f3ac1831dde8c1dc90b09d98f1466fac88659a20014b26a64137c6dfc5d6204c1cb5435f4a93ca00f614aa6d3cf538e815966309b7de195d3e70d44e236f msgpack-c-2.0.0.tar.gz +987e1c50cd9006c080101c5cd0f03ac4c29c990bbf65530325ea5b02f3dd9376f7ba422f90f0c1dfb6d06ab79e6e78cc80be917ec2598b558a2a87d6eba0a1ca cflags.patch" diff --git a/community/msgpack-c/cflags.patch b/community/msgpack-c/cflags.patch new file mode 100644 index 0000000000..d2fcda5dbf --- /dev/null +++ b/community/msgpack-c/cflags.patch @@ -0,0 +1,96 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,13 +190,6 @@ + ADD_SUBDIRECTORY (test) + ENDIF () + +-IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +- IF (MSGPACK_ENABLE_SHARED) +- SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3 -DPIC") +- ENDIF () +- SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3" ) +-ENDIF () +- + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + IF (MSGPACK_ENABLE_SHARED) + SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -78,9 +78,6 @@ + ${CMAKE_THREAD_LIBS_INIT} + ) + 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 ") +- ENDIF () + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") + ENDIF () +--- a/example/boost/CMakeLists.txt ++++ b/example/boost/CMakeLists.txt +@@ -11,9 +11,6 @@ + ${source_file_we} + ${source_file} + ) +- 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") +- ENDIF () + + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") +--- a/example/c/CMakeLists.txt ++++ b/example/c/CMakeLists.txt +@@ -19,9 +19,6 @@ + TARGET_LINK_LIBRARIES (${source_file_we} + msgpackc + ) +- 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") +- ENDIF () + + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") +--- a/example/cpp03/CMakeLists.txt ++++ b/example/cpp03/CMakeLists.txt +@@ -37,9 +37,6 @@ + ${source_file_we} + ${source_file} + ) +- 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") +- ENDIF () + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]") + STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +@@ -59,7 +56,7 @@ + pthread + ) + 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 -pthread") ++ SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-pthread") + ENDIF () + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]") +@@ -92,10 +89,6 @@ + ) + ENDIF () + +- 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 -O3") +- ENDIF () +- + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") + ENDIF () +--- a/example/cpp11/CMakeLists.txt ++++ b/example/cpp11/CMakeLists.txt +@@ -14,9 +14,6 @@ + ${source_file_we} + ${source_file} + ) +- 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 ") +- ENDIF () + + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") -- cgit v1.2.3