commit:     2a78e7f1bfd34a0f1ac7710725077999c06805e0
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun May  2 07:28:41 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun May  2 07:28:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a78e7f1

media-libs/zxing-cpp: Fix build with GCC-11

Closes: https://bugs.gentoo.org/787560
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../zxing-cpp/files/zxing-cpp-1.1.1-gcc11.patch    | 22 ++++++++++++++++++++++
 media-libs/zxing-cpp/zxing-cpp-1.1.1.ebuild        |  4 +++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/media-libs/zxing-cpp/files/zxing-cpp-1.1.1-gcc11.patch 
b/media-libs/zxing-cpp/files/zxing-cpp-1.1.1-gcc11.patch
new file mode 100644
index 00000000000..13adad906c0
--- /dev/null
+++ b/media-libs/zxing-cpp/files/zxing-cpp-1.1.1-gcc11.patch
@@ -0,0 +1,22 @@
+From 427e814ebcfd2e55e1c18531b7e4aa9d6a1ca6fc Mon Sep 17 00:00:00 2001
+From: Christophe Giboudeaux <[email protected]>
+Date: Tue, 9 Feb 2021 09:28:23 +0100
+Subject: [PATCH] Fix build with GCC 11
+
+Starting with GCC 11, the  'limits' header is not included transitively 
anymore.
+---
+ core/src/Pattern.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/core/src/Pattern.h b/core/src/Pattern.h
+index 4bbe6d26..c4a3f7c5 100644
+--- a/core/src/Pattern.h
++++ b/core/src/Pattern.h
+@@ -22,6 +22,7 @@
+ #include <cmath>
+ #include <cstddef>
+ #include <cstdint>
++#include <limits>
+ #include <numeric>
+ #include <vector>
+ 

diff --git a/media-libs/zxing-cpp/zxing-cpp-1.1.1.ebuild 
b/media-libs/zxing-cpp/zxing-cpp-1.1.1.ebuild
index a43d3881a65..3b38eb67cad 100644
--- a/media-libs/zxing-cpp/zxing-cpp-1.1.1.ebuild
+++ b/media-libs/zxing-cpp/zxing-cpp-1.1.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -16,6 +16,8 @@ IUSE="test"
 
 RESTRICT="!test? ( test )"
 
+PATCHES=( "${FILESDIR}/${P}-gcc11.patch" )
+
 src_configure() {
        local mycmakeargs=(
                -DBUILD_EXAMPLES=OFF # nothing is installed

Reply via email to