From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 749791582EF for ; Sat, 01 Mar 2025 04:41:33 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 60885343078 for ; Sat, 01 Mar 2025 04:41:33 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 960121102D0; Sat, 01 Mar 2025 04:41:29 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 8AAEE1102D0 for ; Sat, 01 Mar 2025 04:41:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3198C34306B for ; Sat, 01 Mar 2025 04:41:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7050016E6 for ; Sat, 01 Mar 2025 04:41:27 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1740804029.e8c4a9753d3aedf41b1b4112191951fbd0f1cdde.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/zxing-cpp/files/, media-libs/zxing-cpp/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/zxing-cpp/files/zxing-cpp-2.3.0-reverse-NDEBUG.patch media-libs/zxing-cpp/zxing-cpp-2.3.0-r1.ebuild media-libs/zxing-cpp/zxing-cpp-2.3.0.ebuild X-VCS-Directories: media-libs/zxing-cpp/ media-libs/zxing-cpp/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: e8c4a9753d3aedf41b1b4112191951fbd0f1cdde X-VCS-Branch: master Date: Sat, 01 Mar 2025 04:41:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 78daf489-b511-4f26-aa67-5b2ec4a5aac6 X-Archives-Hash: 8511938b5fa4ae46dfd4949137c86fb9 commit: e8c4a9753d3aedf41b1b4112191951fbd0f1cdde Author: Alfred Wingate protonmail com> AuthorDate: Fri Feb 28 19:01:55 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sat Mar 1 04:40:29 2025 +0000 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 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 +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=" ) " +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