summaryrefslogtreecommitdiff
path: root/media-libs/zxing-cpp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-03-01 19:28:40 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-03-01 19:28:40 +0000
commitd628c1f8493d09e3deb5d19971cd21691d8758e4 (patch)
tree7afecb9f9148ecf631ac2093143278e041cc5acd /media-libs/zxing-cpp
parent4b1be5ef874aaeb61a2116048e0c2312e53f8c69 (diff)
gentoo auto-resync : 01:03:2025 - 19:28:40
Diffstat (limited to 'media-libs/zxing-cpp')
-rw-r--r--media-libs/zxing-cpp/Manifest3
-rw-r--r--media-libs/zxing-cpp/files/zxing-cpp-2.3.0-reverse-NDEBUG.patch88
-rw-r--r--media-libs/zxing-cpp/zxing-cpp-2.3.0-r1.ebuild (renamed from media-libs/zxing-cpp/zxing-cpp-2.3.0.ebuild)4
3 files changed, 94 insertions, 1 deletions
diff --git a/media-libs/zxing-cpp/Manifest b/media-libs/zxing-cpp/Manifest
index dcd845997df3..35b44d6d4eca 100644
--- a/media-libs/zxing-cpp/Manifest
+++ b/media-libs/zxing-cpp/Manifest
@@ -1,10 +1,11 @@
AUX zxing-cpp-2.2.1-cmake.patch 842 BLAKE2B edcda3cda092597c54cdb1873ccd5b5187817f08d58a78a18415943756e7f432b54bf012e009626ceb7873d459b51970d9bd2c75a08424ab2ca17e169aa973cd SHA512 fb37b4ee81538f4ea524bfe274440c43c06365cbe8e6db2284ef4bb1f005b6ff61cc357d19b049c7ebba6e9afd363585932ae462680648aab6c1ed96d6d0e6b7
AUX zxing-cpp-2.2.1-cxx20.patch 1033 BLAKE2B 47866787c62a18fa7424a70775ccf184432aa3cf49f8cd3db83b6974eadd498fa6b2831c6aa4d3f12134f9e8dd84010faee45943dfdccff8e88535034b9aab6a SHA512 90d2f6e41607f016e95e7e7f66251507c909e58dc3f589115244253276d8dd7607989c60f80ea7441f0b91e47fca383ba851922d96300a322feb3163fbac2e4c
+AUX zxing-cpp-2.3.0-reverse-NDEBUG.patch 3178 BLAKE2B 0eef893b3e4f5bb7783ae795e7aaf4b72fc2d66a39c3268ca9680e9383ec5278964a28b3e26239c24784ace1df75f8a9a9d56cc8ac01f9a26aa6b87075733a42 SHA512 215fe8af5c6dead7759f38adfe8bb8d8f9911261549a89b6fc4c727d02325e211507f8f75ba6fa87562b42aac9e5cc03a4a207950e80a1458be3f9b4b94050c2
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
EBUILD zxing-cpp-2.2.1-r1.ebuild 1113 BLAKE2B 44bac8b78b5fec4fed499578a0e1cc622abe94ab4b1ddcd026db18530757c2edafa9eb2f01096c37bc16f340a64daa1d942fcfa768935c735d87968f45f607a4 SHA512 5b8a1c1318545e9e8b6a1432ca67a4aa0dd3da60697abce5b52854fdbc4051d9958f5a287a9f5be819c4561458447ed941b265c8db1e3b48bcb97fc0586525d7
EBUILD zxing-cpp-2.2.1.ebuild 765 BLAKE2B 6d4754e55c03051d507b124d36a52adfbce81d7aa0d1c477ad4a5ed0a5694d0b43a4fcc6c932bd6086a3080a4cbf1114b4743996f48925861ea688934b919fcf SHA512 31218574b93f51eb72d471b312a1b321d632a0d2de1d38094e314d1d4e65f0ce8ba92cbdd56e0a5334a209242091c3a790f29b10b233f7d296e117325f3676e2
-EBUILD zxing-cpp-2.3.0.ebuild 1317 BLAKE2B cfe3dae95157d86f5656d9eac2fc65c470e3d32dc136d5b7c4d5d843f7b534a01e3a59b321b0073146bbc6b5488ab8617fddb5a0fadf00452f3c394a685d21e6 SHA512 75ff0de603147e5510f9fac9d10060bfd21eb260bfcb0ced77820213087b2e9fa4b74d65a32051bf20b77d2611297248a614a9d909c9a9d9821ec5fbf6266567
+EBUILD zxing-cpp-2.3.0-r1.ebuild 1382 BLAKE2B 531c111c8adde2b232ddd6305869c291adf1828b004973348f868987c3c217f4e0ed9ff41550ac23bb973b91adb456e1ef3d6f11c306c7d781521cb666cf39af SHA512 a3b482b7ef52b4b111884a1ff3f60197f4e949873dcede448f29e054f5d9d89c58094435a7a048df50f51fb676bbe7fafb448035cc0dccd5116eea4ae78869cd
MISC metadata.xml 444 BLAKE2B 8279b511be23858c1a6fe42181d63e6430986f0df5e27701444acdf6fbfefa6541143ade57079c3255ad3b2e99edf7a5905f3f71a66e642248c5a1fb0440153d SHA512 d4b24b56f9a01bcc2dabe5efe03323f09f7fe5f0eb2c28331958a63cea036282958f91bee0463530bccfea1d092eb541109245443019dd6d6b13e4bcba05c1f5
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 000000000000..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 <awagger@gmail.com>
+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<BitMatrix> CalculateMatrix(const uint8_t* __restrict lumi
+ {
+ auto matrix = std::make_shared<BitMatrix>(width, height);
+
+-#ifndef NDEBUG
++#ifdef PRINT_DEBUG
+ Matrix<uint8_t> out(width, height);
+ Matrix<uint8_t> out2(width, height);
+ #endif
+@@ -163,7 +163,7 @@ static std::shared_ptr<BitMatrix> 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<BitMatrix> 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<const char*>(out.data()), out.size());
+@@ -260,7 +260,7 @@ static std::shared_ptr<BitMatrix> ThresholdImage(const ImageView iv, const Matri
+ {
+ auto matrix = std::make_shared<BitMatrix>(iv.width(), iv.height());
+
+-#ifndef NDEBUG
++#ifdef PRINT_DEBUG
+ Matrix<uint8_t> out(iv.width(), iv.height());
+ #endif
+
+@@ -270,7 +270,7 @@ static std::shared_ptr<BitMatrix> 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<BitMatrix> 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<const char*>(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
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="
)
"
+PATCHES=(
+ "${FILESDIR}"/zxing-cpp-2.3.0-reverse-NDEBUG.patch
+)
+
src_prepare() {
if use test ; then
ln -s "${WORKDIR}"/test/samples "${S}"/test/samples || die