diff options
author | Kevin Daudt <kdaudt@alpinelinux.org> | 2021-01-18 05:49:22 +0000 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2021-01-18 11:29:49 +0000 |
commit | c2868dae68126ff7aeb643e4720b2f0a80258312 (patch) | |
tree | 255f4cf330bb5288cf0bb868821fa78ef3bce2e7 | |
parent | 98a9dddd6dd74b50f038aac79e3932c27ad67c63 (diff) | |
download | aports-c2868dae68126ff7aeb643e4720b2f0a80258312.tar.gz aports-c2868dae68126ff7aeb643e4720b2f0a80258312.tar.bz2 aports-c2868dae68126ff7aeb643e4720b2f0a80258312.tar.xz |
testing/horizon: fix ftbfs
Due to `-Werror`, this fails to build on gcc >= 10.0.1. This has been
[reported][0] to json upstream, and fixed in this [pr][1].
Backport the fix to horizon
[0]:https://github.com/nlohmann/json/issues/1939
[1]:https://github.com/nlohmann/json/pull/2144
-rw-r--r-- | testing/horizon/APKBUILD | 7 | ||||
-rw-r--r-- | testing/horizon/json-cast-character-to-unsigned-for-comparrison.patch | 19 |
2 files changed, 24 insertions, 2 deletions
diff --git a/testing/horizon/APKBUILD b/testing/horizon/APKBUILD index bc57ca1c71..346d7f6f5b 100644 --- a/testing/horizon/APKBUILD +++ b/testing/horizon/APKBUILD @@ -18,7 +18,9 @@ makedepends="bcnm-dev boost-dev cmake curl-dev eudev-dev libarchive-dev linux-headers parted-dev skalibs-dev util-linux-dev libxkbfile-dev" subpackages="$pkgname-image $pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-tools" -source="https://code.foxkit.us/adelie/horizon/-/archive/$pkgver/horizon-$pkgver.tar.gz" +source="https://code.foxkit.us/adelie/horizon/-/archive/$pkgver/horizon-$pkgver.tar.gz + json-cast-character-to-unsigned-for-comparrison.patch + " build() { if [ "$CBUILD" != "$CHOST" ]; then @@ -124,4 +126,5 @@ PROFILE "$subpkgdir"/usr/share/xsessions/horizon.desktop } -sha512sums="3ff46980387454f85a326ac3ea123b55cf16fc339faec48fdc77f10334e0bd93e8cf51e6adeed516d2e4309cf4426b9d1ac6760cdd479b196a5f4aa33c1f3a28 horizon-0.9.6.tar.gz" +sha512sums="3ff46980387454f85a326ac3ea123b55cf16fc339faec48fdc77f10334e0bd93e8cf51e6adeed516d2e4309cf4426b9d1ac6760cdd479b196a5f4aa33c1f3a28 horizon-0.9.6.tar.gz +5ab7a35d239210e031739c4149fd8e68570ea0efd278a2eac9330d6e30c601d1310b9c17523563a41424c2a8aa2452e5a9bcbce5d8087330d2697cd1b77b312f json-cast-character-to-unsigned-for-comparrison.patch" diff --git a/testing/horizon/json-cast-character-to-unsigned-for-comparrison.patch b/testing/horizon/json-cast-character-to-unsigned-for-comparrison.patch new file mode 100644 index 0000000000..78bf28c8ac --- /dev/null +++ b/testing/horizon/json-cast-character-to-unsigned-for-comparrison.patch @@ -0,0 +1,19 @@ +Description: GCC 10.0.1 started to warn on redundant comparisons. Horizon +builds with -Werror, so this warning is turned into an error. Upstream fixed this, +so backport to Horizon. + +Based on https://github.com/nlohmann/json/pull/2144/commits/23051df2c71dd3f9698e01de3cbfab0034c6e50e + +diff --git a/3rdparty/json.hpp b/3rdparty/json.hpp +index 06da815..58e3f27 100644 +--- a/3rdparty/json.hpp ++++ b/3rdparty/json.hpp +@@ -8491,7 +8491,7 @@ scan_number_done: + std::string result; + for (const auto c : token_string) + { +- if ('\x00' <= c and c <= '\x1F') ++ if (static_cast<unsigned char>(c) <= '\x1F') + { + // escape control characters + std::array<char, 9> cs{{}}; |