From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 754B4158011 for ; Thu, 14 Jul 2022 09:28:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7E756E0C48; Thu, 14 Jul 2022 09:27:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 pigeon.gentoo.org (Postfix) with ESMTPS id 6045FE0C48 for ; Thu, 14 Jul 2022 09:27:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 5CA20340F7F for ; Thu, 14 Jul 2022 09:27:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 837A253A for ; Thu, 14 Jul 2022 09:27:56 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1657790859.f04d8f9baae0e45840a16248cff6a9ab127fc725.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/files/, kde-apps/kitinerary/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch kde-apps/kitinerary/kitinerary-22.04.3-r1.ebuild X-VCS-Directories: kde-apps/kitinerary/ kde-apps/kitinerary/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: f04d8f9baae0e45840a16248cff6a9ab127fc725 X-VCS-Branch: master Date: Thu, 14 Jul 2022 09:27:56 +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: afa05872-740c-4e9e-ab76-836354d555e9 X-Archives-Hash: 488aabe1ae6d053c52565b7059c40373 commit: f04d8f9baae0e45840a16248cff6a9ab127fc725 Author: Andreas Sturmlechner gentoo org> AuthorDate: Thu Jul 14 08:26:12 2022 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Thu Jul 14 09:27:39 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f04d8f9b kde-apps/kitinerary: Slot op, build w/ media-libs/zxing-cpp-1.4.0 Upstream commit e60195421aa159462353892ed32bf46ac8c57d19 Backported to 22.04.3. Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch | 68 ++++++++++++++++++++++ kde-apps/kitinerary/kitinerary-22.04.3-r1.ebuild | 53 +++++++++++++++++ 2 files changed, 121 insertions(+) diff --git a/kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch b/kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch new file mode 100644 index 000000000000..a208d2bfaed7 --- /dev/null +++ b/kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch @@ -0,0 +1,68 @@ +From bf83f8bd974925aec07a2e8dbfd50ad39995b428 Mon Sep 17 00:00:00 2001 +From: Volker Krause +Date: Fri, 8 Jul 2022 16:04:19 +0200 +Subject: [PATCH] Support ZXing 1.4.0 + +The previous code crashes (if it builds at all) with ZXing 1.4.0, so +distributions updating to 1.4.0 would need to apply this patch on top +of 22.04.3 as well. + +(cherry picked from commit e60195421aa159462353892ed32bf46ac8c57d19) +--- + src/lib/barcodedecoder.cpp | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/src/lib/barcodedecoder.cpp b/src/lib/barcodedecoder.cpp +index b38140a..40e0c64 100644 +--- a/src/lib/barcodedecoder.cpp ++++ b/src/lib/barcodedecoder.cpp +@@ -15,6 +15,7 @@ + #include + + #ifdef HAVE_ZXING ++#define ZX_USE_UTF8 1 + #ifdef ZXING_USE_READBARCODE + #include + #else +@@ -244,6 +245,30 @@ void BarcodeDecoder::decodeZxing(const QImage &img, BarcodeDecoder::BarcodeTypes + #endif + + if (res.isValid()) { ++#if ZXING_VERSION >= QT_VERSION_CHECK(1, 4, 0) ++ // detect content type ++ std::string zxUtf8Text; ++ if (res.contentType() == ZXing::ContentType::Text) { ++ result.contentType = Result::Any; ++ zxUtf8Text = res.text(); ++ // check if the text is ASCII-only (in which case we allow access as byte array as well) ++ if (std::any_of(zxUtf8Text.begin(), zxUtf8Text.end(), [](unsigned char c) { return c > 0x7F; })) { ++ result.contentType &= ~Result::ByteArray; ++ } ++ } else { ++ result.contentType = Result::ByteArray; ++ } ++ ++ // decode content ++ if (result.contentType & Result::ByteArray) { ++ QByteArray b; ++ b.resize(res.bytes().size()); ++ std::copy(res.bytes().begin(), res.bytes().end(), b.begin()); ++ result.content = b; ++ } else { ++ result.content = QString::fromStdString(zxUtf8Text); ++ } ++#else + // detect content type + result.contentType = Result::Any; + if (std::any_of(res.text().begin(), res.text().end(), [](const auto c) { return c > 255; })) { +@@ -262,6 +287,7 @@ void BarcodeDecoder::decodeZxing(const QImage &img, BarcodeDecoder::BarcodeTypes + } else { + result.content = QString::fromStdWString(res.text()); + } ++#endif + result.positive |= formatToType(res.format()); + } else { + result.negative |= format; +-- +2.35.1 + diff --git a/kde-apps/kitinerary/kitinerary-22.04.3-r1.ebuild b/kde-apps/kitinerary/kitinerary-22.04.3-r1.ebuild new file mode 100644 index 000000000000..75600a759039 --- /dev/null +++ b/kde-apps/kitinerary/kitinerary-22.04.3-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_QTHELP="true" +ECM_TEST="true" +PVCUT=$(ver_cut 1-3) +KFMIN=5.92.0 +QTMIN=5.15.4 +VIRTUALX_REQUIRED="test" +inherit ecm gear.kde.org + +DESCRIPTION="Data Model and Extraction System for Travel Reservation information" +HOMEPAGE="https://apps.kde.org/kontact/" + +LICENSE="LGPL-2.1+" +SLOT="5" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="+barcode pdf" + +REQUIRED_USE="test? ( pdf )" + +DEPEND=" + dev-libs/libphonenumber + dev-libs/libxml2:2 + dev-libs/openssl:= + >=dev-qt/qtdeclarative-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=kde-apps/kmime-${PVCUT}:5 + >=kde-apps/kpkpass-${PVCUT}:5 + >=kde-frameworks/karchive-${KFMIN}:5 + >=kde-frameworks/kcalendarcore-${KFMIN}:5 + >=kde-frameworks/kcontacts-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + sys-libs/zlib + barcode? ( >=media-libs/zxing-cpp-1.1.0:= ) + pdf? ( app-text/poppler:=[qt5] ) +" +RDEPEND="${DEPEND}" +BDEPEND="x11-misc/shared-mime-info" + +PATCHES=( "${FILESDIR}/${P}-zxing-cpp-1.4.0.patch" ) + +src_configure() { + local mycmakeargs=( + # sci-geosciences/osmctools; TODO: useful at all? + -DCMAKE_DISABLE_FIND_PACKAGE_OsmTools=ON + $(cmake_use_find_package barcode ZXing) + $(cmake_use_find_package pdf Poppler) + ) + ecm_src_configure +}