summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-10-04 14:35:21 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2024-10-04 15:01:24 +0200
commitb6405d399294fba767ee6047ab2267286f423a84 (patch)
treef55122715a94fcfe3ad7db3f946a53264828df5b /media-libs
parentsci-astronomy/kstars: add 3.7.3 (diff)
downloadgentoo-b6405d399294fba767ee6047ab2267286f423a84.tar.gz
gentoo-b6405d399294fba767ee6047ab2267286f423a84.tar.bz2
gentoo-b6405d399294fba767ee6047ab2267286f423a84.zip
media-libs/zxing-cpp: Fix build with >=libcxx-19
Closes: https://bugs.gentoo.org/939897 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cmake.patch27
-rw-r--r--media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cxx20.patch29
-rw-r--r--media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild5
3 files changed, 61 insertions, 0 deletions
diff --git a/media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cmake.patch b/media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cmake.patch
new file mode 100644
index 000000000000..58bffda307a6
--- /dev/null
+++ b/media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cmake.patch
@@ -0,0 +1,27 @@
+From 77475338af4920fe2568d69b2318a0d5e9be77ce Mon Sep 17 00:00:00 2001
+From: axxel <awagger@gmail.com>
+Date: Fri, 15 Mar 2024 22:23:17 +0100
+Subject: [PATCH] cmake: if (NOT CMAKE_CXX...) should have been if (NOT DEFINED
+ CMAKE_CXX...)
+
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 678fa6b62b..d7a1d81c85 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -61,10 +61,10 @@ if(NOT BUILD_DEPENDENCIES IN_LIST BUILD_DEPENDENCIES_LIST)
+ message(FATAL_ERROR "BUILD_DEPENDENCIES must be one of ${BUILD_DEPENDENCIES_LIST}")
+ endif()
+
+-if (NOT CMAKE_CXX_STANDARD)
++if (NOT DEFINED CMAKE_CXX_STANDARD)
+ set (CMAKE_CXX_STANDARD 17)
+ endif()
+-if (NOT CMAKE_CXX_EXTENSIONS)
++if (NOT DEFINED CMAKE_CXX_EXTENSIONS)
+ set (CMAKE_CXX_EXTENSIONS OFF)
+ endif()
+
diff --git a/media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cxx20.patch b/media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cxx20.patch
new file mode 100644
index 000000000000..9d89c9a8b38f
--- /dev/null
+++ b/media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cxx20.patch
@@ -0,0 +1,29 @@
+From d98739ceaac1c477879b9c4fba89ea76dba2d539 Mon Sep 17 00:00:00 2001
+From: axxel <awagger@gmail.com>
+Date: Sun, 22 Sep 2024 22:39:11 +0200
+Subject: [PATCH] cmake: switch to c++-20 by default for the core library
+
+I finally accept the incurred performance penalty from the position
+independent DataMatrix detection by default.
+
+This is finally fixing #386. It also (sufficiently) fixes #822 and thereby
+supersedes #836.
+---
+ CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b602712d79..fee4c68cdc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -71,7 +71,9 @@ if(NOT ZXING_DEPENDENCIES IN_LIST ZXING_DEPENDENCIES_LIST)
+ endif()
+
+ if (NOT DEFINED CMAKE_CXX_STANDARD)
+- set (CMAKE_CXX_STANDARD 17)
++ set (CMAKE_CXX_STANDARD 20)
++ # Allow the fallback to earlier versions if the compiler does not support it.
++ set(CMAKE_CXX_STANDARD_REQUIRED OFF)
+ endif()
+ if (NOT DEFINED CMAKE_CXX_EXTENSIONS)
+ set (CMAKE_CXX_EXTENSIONS OFF)
diff --git a/media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild b/media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild
index 1fac2dd0fe8e..e1dcb9341fc3 100644
--- a/media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild
+++ b/media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild
@@ -14,6 +14,11 @@ SLOT="0/3"
KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv x86"
IUSE=""
+PATCHES=(
+ "${FILESDIR}/${P}-cmake.patch"
+ "${FILESDIR}/${P}-cxx20.patch" # bug 939897
+)
+
src_configure() {
local mycmakeargs=(
-DBUILD_EXAMPLES=OFF # nothing is installed