[gentoo-commits] repo/gentoo:master commit in: media-libs/zxing-cpp/files/, media-libs/zxing-cpp/
commit: ae92b31796b80cc3e2b8e10f12e3d7118f5716ee
Author: Andreas Sturmlechner gentoo org>
AuthorDate: Sat Jul 5 12:31:41 2025 +
Commit: Andreas Sturmlechner gentoo org>
CommitDate: Sat Jul 5 17:51:49 2025 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae92b317
media-libs/zxing-cpp: drop 2.2.1, 2.2.1-r1
Signed-off-by: Andreas Sturmlechner gentoo.org>
media-libs/zxing-cpp/Manifest | 2 -
.../zxing-cpp/files/zxing-cpp-2.2.1-cmake.patch| 27
.../zxing-cpp/files/zxing-cpp-2.2.1-cxx20.patch| 29 -
media-libs/zxing-cpp/zxing-cpp-2.2.1-r1.ebuild | 50 --
media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild| 29 -
5 files changed, 137 deletions(-)
diff --git a/media-libs/zxing-cpp/Manifest b/media-libs/zxing-cpp/Manifest
index ac9ae2e59381..88f09c12f83d 100644
--- a/media-libs/zxing-cpp/Manifest
+++ b/media-libs/zxing-cpp/Manifest
@@ -1,4 +1,2 @@
-DIST zxing-cpp-2.2.1-test-samples.tar.gz 97082308 BLAKE2B
bcea839f766e5696bcaab58d1483e43ef3d4b504979ea4db3114236853db92c64f7079ed91977a158cda745d8a08c0c249bf1b10382daf5a9816bf4280b95092
SHA512
4de268d36a337d233a60eed477e8421294d42f357534f21aba9574ec929809a4666fe7a55e3b3ac1518460aedfbb0d615659cc0a170e3685790745066339b064
-DIST zxing-cpp-2.2.1.tar.gz 891055 BLAKE2B
c6a3343cd0389d930e83dd9db4d6aeca6d4dda715c22c0b10dd76460e9d55bdd8e994c2ac24ba5d5a4f5e2069fcb035b2e4651a380b6b39bcce4b90d0c754df8
SHA512
f1de8df783061a152a18cd9102ac0c579c40c76ab4a5ba9f30bcb8ddb532f3fac08736840a631adbf7c30a7fa00ce8d65625c8cd695288620601708e8f256a53
DIST zxing-cpp-2.3.0-test-samples.tar.gz 97053504 BLAKE2B
f8b3ca418885731bbd0c551b7c061e9ff8d7ac20cb4464abb0c2496f1235fed78826420f139666e73af53612ab87dc551f228e1e05c934b4a08a22c3da069def
SHA512
6c2bbad7a6229075f9cb0ccaa4f2bcddbf586baf15a2fb71a10fbddc6e591a33d08c737149c0688dd64c5b0fff1328bbd4975eba0e6ffd56b12d61f47469ae4a
DIST zxing-cpp-2.3.0.tar.gz 1008541 BLAKE2B
a0c94e1c276759e032695918f1d177e32b3ac4d1c60085872210ef9c97f2cc0c95a54972d18ec971bc6733ea9531be15d5155011ff8893e39706acd8d5c9a7bd
SHA512
be1c60a6b433c18f8dab56619553023370bfd3eddf49b0e16548466e1ebc2f1f37b48e0b36c2e74296a7274c4f0117d7052f1ffd7d1223d23e493451a11b4a80
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
deleted file mode 100644
index 58bffda307a6..
--- a/media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cmake.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 77475338af4920fe2568d69b2318a0d5e9be77ce Mon Sep 17 00:00:00 2001
-From: axxel
-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
deleted file mode 100644
index 9d89c9a8b38f..
--- a/media-libs/zxing-cpp/files/zxing-cpp-2.2.1-cxx20.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d98739ceaac1c477879b9c4fba89ea76dba2d539 Mon Sep 17 00:00:00 2001
-From: axxel
-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-r1.ebuild
b/media-libs/zxing-cpp/zxing-cpp-2.2.1-r1.ebuild
deleted file mode 100644
index ec4caae53536..
--- a/media-libs/zxing-cpp/zxing-cpp-2.2.1-r1.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2025 Gen
[gentoo-commits] repo/gentoo:master commit in: media-libs/zxing-cpp/files/, media-libs/zxing-cpp/
commit: e8c4a9753d3aedf41b1b4112191951fbd0f1cdde
Author: Alfred Wingate protonmail com>
AuthorDate: Fri Feb 28 19:01:55 2025 +
Commit: Sam James gentoo org>
CommitDate: Sat Mar 1 04:40:29 2025 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8c4a975
media-libs/zxing-cpp: reverse NDEBUG semantics
Otherwise debug files get generated in users home.
Signed-off-by: Alfred Wingate protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40820
Signed-off-by: Sam James gentoo.org>
.../files/zxing-cpp-2.3.0-reverse-NDEBUG.patch | 88 ++
...-cpp-2.3.0.ebuild => zxing-cpp-2.3.0-r1.ebuild} | 4 +
2 files changed, 92 insertions(+)
diff --git a/media-libs/zxing-cpp/files/zxing-cpp-2.3.0-reverse-NDEBUG.patch
b/media-libs/zxing-cpp/files/zxing-cpp-2.3.0-reverse-NDEBUG.patch
new file mode 100644
index ..e9ffa0d041e1
--- /dev/null
+++ b/media-libs/zxing-cpp/files/zxing-cpp-2.3.0-reverse-NDEBUG.patch
@@ -0,0 +1,88 @@
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1095196
+https://bugs.kde.org/show_bug.cgi?id=498240
+https://github.com/zxing-cpp/zxing-cpp/issues/900
+
+From 82806f5f92173b8cb4e1e9bee13a2d07a33fb69f Mon Sep 17 00:00:00 2001
+From: axxel
+Date: Sun, 5 Jan 2025 23:41:29 +0100
+Subject: [PATCH] c++: fix improper use of NDEBUG
+
+Thanks to Antonio Rojas for pointing it out to me.
+--- a/core/src/HybridBinarizer.cpp
b/core/src/HybridBinarizer.cpp
+@@ -143,7 +143,7 @@ static std::shared_ptr CalculateMatrix(const
uint8_t* __restrict lumi
+ {
+ auto matrix = std::make_shared(width, height);
+
+-#ifndef NDEBUG
++#ifdef PRINT_DEBUG
+ Matrix out(width, height);
+ Matrix out2(width, height);
+ #endif
+@@ -163,7 +163,7 @@ static std::shared_ptr CalculateMatrix(const
uint8_t* __restrict lumi
+ int average = sum / 25;
+ ThresholdBlock(luminances, xoffset, yoffset, average,
rowStride, *matrix);
+
+-#ifndef NDEBUG
++#ifdef PRINT_DEBUG
+ for (int yy = 0; yy < 8; ++yy)
+ for (int xx = 0; xx < 8; ++xx) {
+ out.set(xoffset + xx, yoffset + yy,
blackPoints(x, y));
+@@ -173,7 +173,7 @@ static std::shared_ptr CalculateMatrix(const
uint8_t* __restrict lumi
+ }
+ }
+
+-#ifndef NDEBUG
++#ifdef PRINT_DEBUG
+ std::ofstream file("thresholds.pnm");
+ file << "P5\n" << out.width() << ' ' << out.height() << "\n255\n";
+ file.write(reinterpret_cast(out.data()), out.size());
+@@ -260,7 +260,7 @@ static std::shared_ptr ThresholdImage(const
ImageView iv, const Matri
+ {
+ auto matrix = std::make_shared(iv.width(), iv.height());
+
+-#ifndef NDEBUG
++#ifdef PRINT_DEBUG
+ Matrix out(iv.width(), iv.height());
+ #endif
+
+@@ -270,7 +270,7 @@ static std::shared_ptr ThresholdImage(const
ImageView iv, const Matri
+ int xoffset = std::min(x * BLOCK_SIZE, iv.width() -
BLOCK_SIZE);
+ ThresholdBlock(iv.data(), xoffset, yoffset,
thresholds(x, y), iv.rowStride(), *matrix);
+
+-#ifndef NDEBUG
++#ifdef PRINT_DEBUG
+ for (int yy = 0; yy < 8; ++yy)
+ for (int xx = 0; xx < 8; ++xx)
+ out.set(xoffset + xx, yoffset + yy,
thresholds(x, y));
+@@ -278,7 +278,7 @@ static std::shared_ptr ThresholdImage(const
ImageView iv, const Matri
+ }
+ }
+
+-#ifndef NDEBUG
++#ifdef PRINT_DEBUG
+ std::ofstream file("thresholds_new.pnm");
+ file << "P5\n" << out.width() << ' ' << out.height() << "\n255\n";
+ file.write(reinterpret_cast(out.data()), out.size());
+--- a/core/src/oned/ODDataBarCommon.h
b/core/src/oned/ODDataBarCommon.h
+@@ -37,7 +37,7 @@ inline bool IsFinder(int a, int b, int c, int d, int e)
+ // (c < 5 + 10 * e) &&
+(a < 2 + 4 * e) &&
+(4 * a > n);
+-#if !defined(NDEBUG) && 0
++#if defined(PRINT_DEBUG) && 0
+ printf("[");
+ for (bool v :
+{w + 5 > 9 * n,
+--- a/test/unit/datamatrix/DMEncodeDecodeTest.cpp
b/test/unit/datamatrix/DMEncodeDecodeTest.cpp
+@@ -21,7 +21,7 @@ namespace {
+ ASSERT_EQ(matrix.empty(), false);
+
+ DecoderResult res = DataMatrix::Decode(matrix);
+-#ifndef NDEBUG
++#ifdef PRINT_DEBUG
+ if (!res.isValid() || data != res.text())
+ SaveAsPBM(matrix, "failed-datamatrix.pbm", 4);
+ #endif
diff --git a/media-libs/zxing-cpp/zxing-cpp-2.3.0.ebuild
b/media-libs/zxing-cpp/zxing-cpp-2.3.0-r1.ebuild
similarity index 95%
rename from media-libs/zxing-cpp/zxing-cpp-2.3.0.ebuild
rename to media-libs/zxing-cpp/zxing-cpp-2.3.0-r1.ebuild
index 8ba734404437..01d12af67225 100644
--- a/media-libs/zxing-cpp/zxing-cpp-2.3.0.ebuild
+++ b/media-libs/zxing-cpp/zxing-cpp-2.3.0-r1.ebuild
@@ -35,6 +35,10 @@ DEPEND="
)
[gentoo-commits] repo/gentoo:master commit in: media-libs/zxing-cpp/files/, media-libs/zxing-cpp/
commit: 8212399920e9b6d42c32e1fb87a8880435998db7
Author: Andreas Sturmlechner gentoo org>
AuthorDate: Mon Jan 9 22:27:42 2023 +
Commit: Andreas Sturmlechner gentoo org>
CommitDate: Tue Jan 10 00:04:33 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82123999
media-libs/zxing-cpp: add 2.0.0
Signed-off-by: Andreas Sturmlechner gentoo.org>
media-libs/zxing-cpp/Manifest | 1 +
.../files/zxing-cpp-2.0.0-fix-crash.patch | 24
media-libs/zxing-cpp/zxing-cpp-2.0.0.ebuild| 26 ++
3 files changed, 51 insertions(+)
diff --git a/media-libs/zxing-cpp/Manifest b/media-libs/zxing-cpp/Manifest
index 8a7287886422..663d55874d73 100644
--- a/media-libs/zxing-cpp/Manifest
+++ b/media-libs/zxing-cpp/Manifest
@@ -1,2 +1,3 @@
DIST zxing-cpp-1.3.0.tar.gz 97938087 BLAKE2B
f0c9c906ab2b534c67cf66605eca0ecc22a90fc9d69e23397bcb0bc8eaf3d68a7ad41631ea6d9c7f292ee03165d2e038d84f497307384205e2d6f37fef5dddba
SHA512
27821667dea3d09b91bf9825ff25483ed658d850fd238009f1c7e43b1b09e62d24b3a2cd78d4e39d29725931b32bfce3e21e7ec871830b3ad69a5a69c72d8de8
DIST zxing-cpp-1.4.0.tar.gz 1018225 BLAKE2B
98b6badfe0ddfa39650eb4fbfc02bc01f5237cdd5edfafd7b88067997a22caa2e64d067328b534c439d7d89fef5b6d48acf4bc29389142b332123b477f3e3dde
SHA512
05c5b9282f13b76fa0897b21e5b73cb7df0c52e62f1a2d9760fe774aa0378fde97f5f9896690b65b28b4b96ba6ad2703bed53ffaf9d3784636d29cbe860d4bad
+DIST zxing-cpp-2.0.0.tar.gz 856413 BLAKE2B
8069d3e39a7ddf99510777df477a5e3503e5eead7adcbf175123ab59de47c3da75bb8187533dad552a07b1475756ff3981d30eaa3e8088c5c9b991e22a7127bd
SHA512
fa22164f834a42194eafd0d3e9c09d953233c69843ac6e79c8d6513314be28d8082382b436c379368e687e0eed05cb5e566d2893ec6eb29233a36643904ae083
diff --git a/media-libs/zxing-cpp/files/zxing-cpp-2.0.0-fix-crash.patch
b/media-libs/zxing-cpp/files/zxing-cpp-2.0.0-fix-crash.patch
new file mode 100644
index ..e6b25633e8e9
--- /dev/null
+++ b/media-libs/zxing-cpp/files/zxing-cpp-2.0.0-fix-crash.patch
@@ -0,0 +1,24 @@
+From 23c19c5f98602a4d69d1667fff99678308b28b5b Mon Sep 17 00:00:00 2001
+From: liule
+Date: Fri, 6 Jan 2023 22:06:24 +0800
+Subject: [PATCH] fix crash when the source image is less than 3 pixels
+ width/height
+
+---
+ core/src/ReadBarcode.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/core/src/ReadBarcode.cpp b/core/src/ReadBarcode.cpp
+index 905dd191c..5ac61e250 100644
+--- a/core/src/ReadBarcode.cpp
b/core/src/ReadBarcode.cpp
+@@ -76,7 +76,8 @@ class LumImagePyramid
+
+ layers.push_back(iv);
+ // TODO: if only matrix codes were considered, then using
std::min would be sufficient (see #425)
+- while (threshold > 0 && std::max(layers.back().width(),
layers.back().height()) > threshold)
++ while (threshold > 0 && std::max(layers.back().width(),
layers.back().height()) > threshold &&
++ std::min(layers.back().width(),
layers.back().height()) >= N)
+ addLayer();
+ #if 0
+ // Reversing the layers means we'd start with the smallest.
that can make sense if we are only looking for a
diff --git a/media-libs/zxing-cpp/zxing-cpp-2.0.0.ebuild
b/media-libs/zxing-cpp/zxing-cpp-2.0.0.ebuild
new file mode 100644
index ..6da2db080577
--- /dev/null
+++ b/media-libs/zxing-cpp/zxing-cpp-2.0.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="C++ Multi-format 1D/2D barcode image processing library"
+HOMEPAGE="https://github.com/nu-book/zxing-cpp";
+SRC_URI="https://github.com/nu-book/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/3"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE=""
+
+PATCHES=( "${FILESDIR}/${P}-fix-crash.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_EXAMPLES=OFF # nothing is installed
+ -DBUILD_BLACKBOX_TESTS=OFF # FIXME: FetchContent.cmake module
usage
+ -DBUILD_UNIT_TESTS=OFF # for both tests options. no thanks. bug
#793173
+ )
+ cmake_src_configure
+}
[gentoo-commits] repo/gentoo:master commit in: media-libs/zxing-cpp/files/, media-libs/zxing-cpp/
commit: f9d4418788a98c6acd9b904cb806767487d55776
Author: Andreas Sturmlechner gentoo org>
AuthorDate: Thu Apr 9 17:17:15 2020 +
Commit: Andreas Sturmlechner gentoo org>
CommitDate: Thu Apr 9 21:36:22 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9d44187
media-libs/zxing-cpp: Fix pkgconfig version
Thanks-to: cyrillic hotmail.com>
Closes: https://bugs.gentoo.org/716818
Package-Manager: Portage-2.3.98, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner gentoo.org>
.../zxing-cpp/files/zxing-cpp-1.0.8-pkgconfig.patch | 10 ++
media-libs/zxing-cpp/zxing-cpp-1.0.8-r1.ebuild | 17 +
2 files changed, 27 insertions(+)
diff --git a/media-libs/zxing-cpp/files/zxing-cpp-1.0.8-pkgconfig.patch
b/media-libs/zxing-cpp/files/zxing-cpp-1.0.8-pkgconfig.patch
new file mode 100644
index 000..d1dda4f584e
--- /dev/null
+++ b/media-libs/zxing-cpp/files/zxing-cpp-1.0.8-pkgconfig.patch
@@ -0,0 +1,10 @@
+--- a/zxing.pc.in 2020-04-09 11:43:22.494219440 -0400
b/zxing.pc.in 2020-04-09 11:49:03.884867034 -0400
+@@ -5,6 +5,6 @@
+
+ Name: ZXing
+ Description: ZXing library set
+-Version: @VERSION@
++Version: @PROJECT_VERSION@
+ Libs: -L${libdir} -l@TARGET_ZXING@
+ Cflags: -I${includedir} -I${includedir}/ZXing
\ No newline at end of file
diff --git a/media-libs/zxing-cpp/zxing-cpp-1.0.8-r1.ebuild
b/media-libs/zxing-cpp/zxing-cpp-1.0.8-r1.ebuild
new file mode 100644
index 000..4d6ad244fdd
--- /dev/null
+++ b/media-libs/zxing-cpp/zxing-cpp-1.0.8-r1.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="C++ Multi-format 1D/2D barcode image processing library"
+HOMEPAGE="https://github.com/nu-book/zxing-cpp";
+SRC_URI="https://github.com/nu-book/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 arm64 x86"
+IUSE=""
+
+PATCHES=( "${FILESDIR}/${P}-pkgconfig.patch" ) # bug 716818
