diff --git a/testing/horizon/APKBUILD b/testing/horizon/APKBUILD index bc57ca1c7117..346d7f6f5b47 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 000000000000..78bf28c8ac14 --- /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(c) <= '\x1F') + { + // escape control characters + std::array cs{{}};