aboutsummaryrefslogtreecommitdiffstats
path: root/community/rapidjson
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-09-26 16:54:10 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-09-26 17:04:11 +0000
commitcb8c901d59cadc7442b9a588fda3fa9b6c8908f3 (patch)
treeaf1d2d88e4a10559a775d8c9b4ad13b1b1967c04 /community/rapidjson
parent1622f7c905bc251e56b62a84a2c350e8b5b827df (diff)
community/rapidjson: fix build with gcc8 by disable Werror
Diffstat (limited to 'community/rapidjson')
-rw-r--r--community/rapidjson/APKBUILD6
-rw-r--r--community/rapidjson/disable-Werror.patch54
2 files changed, 58 insertions, 2 deletions
diff --git a/community/rapidjson/APKBUILD b/community/rapidjson/APKBUILD
index 6889ca84ab5..00e0cd89a09 100644
--- a/community/rapidjson/APKBUILD
+++ b/community/rapidjson/APKBUILD
@@ -3,7 +3,7 @@
# Note: This package contains only header files.
pkgname=rapidjson
pkgver=1.1.0
-pkgrel=2
+pkgrel=3
pkgdesc="A fast JSON parser/generator for C++ with both SAX/DOM style API"
url="http://rapidjson.org/"
arch="noarch"
@@ -15,6 +15,7 @@ subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/miloyip/$pkgname/archive/v$pkgver.tar.gz
do-not-include-gtest-src-dir.patch
disable-march-cxx-flag.patch
+ disable-Werror.patch
"
builddir="$srcdir/$pkgname-$pkgver"
@@ -49,4 +50,5 @@ package() {
sha512sums="2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff rapidjson-1.1.0.tar.gz
b6027268c3a10c602ab3df783790d3af537a9f23e74651bdd0a0dc6810144eeba37f15e12576f4b357e538c634e979b7c128e95294e60788f59d69ccb8367f6f do-not-include-gtest-src-dir.patch
-7b5b0a33cec087358841a6c8ec38c68f510ccb0eef33894e8b6c5fa8d41c6bcdd46015f71a0888156f87bd809b52318aae17703faff63579248994d98f8a540f disable-march-cxx-flag.patch"
+7b5b0a33cec087358841a6c8ec38c68f510ccb0eef33894e8b6c5fa8d41c6bcdd46015f71a0888156f87bd809b52318aae17703faff63579248994d98f8a540f disable-march-cxx-flag.patch
+8f62dd40a51f9502e6b358c6752a7ab82f1ab4b557bfb946798fda912c61ac5dd6163311842ac3ab9b17866168c0d07f69b75e5e8daf8a55a7b76ec965b6fc08 disable-Werror.patch"
diff --git a/community/rapidjson/disable-Werror.patch b/community/rapidjson/disable-Werror.patch
new file mode 100644
index 00000000000..32ae9599133
--- /dev/null
+++ b/community/rapidjson/disable-Werror.patch
@@ -0,0 +1,54 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9fc5273..3991718 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -50,7 +50,7 @@ if(CCACHE_FOUND)
+ endif(CCACHE_FOUND)
+
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
+ if (RAPIDJSON_BUILD_CXX11)
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+@@ -73,7 +73,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ endif()
+ endif()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-missing-field-initializers")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-missing-field-initializers")
+ if (RAPIDJSON_BUILD_CXX11)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ endif()
+diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
+index 4d448cc..47d19ed 100644
+--- a/example/CMakeLists.txt
++++ b/example/CMakeLists.txt
+@@ -26,9 +26,9 @@ include_directories("../include/")
+ add_definitions(-D__STDC_FORMAT_MACROS)
+
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Werror -Wall -Wextra -Weffc++ -Wswitch-default")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -Wextra -Weffc++ -Wswitch-default")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything")
+ endif()
+
+ foreach (example ${EXAMPLES})
+diff --git a/test/unittest/CMakeLists.txt b/test/unittest/CMakeLists.txt
+index b3204d6..d1c0add 100644
+--- a/test/unittest/CMakeLists.txt
++++ b/test/unittest/CMakeLists.txt
+@@ -37,9 +37,9 @@ if(CCACHE_FOUND)
+ endif(CCACHE_FOUND)
+
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything")
+ # If the user is running a newer version of Clang that includes the
+ # -Wdouble-promotion, we will ignore that warning.
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.7)