git: 5d36a85f4aee - main - textproc/zxing-cpp: Update to 2.3.0

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Fri, 21 Feb 2025 09:04:21 UTC
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5d36a85f4aee0c36d29b46e898ab1cdfc469e4e5

commit 5d36a85f4aee0c36d29b46e898ab1cdfc469e4e5
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2025-02-21 09:00:20 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-02-21 09:03:31 +0000

    textproc/zxing-cpp: Update to 2.3.0
    
    https://github.com/zxing-cpp/zxing-cpp/releases/tag/v2.3.0
    
    PR:             283847
---
 textproc/zxing-cpp/Makefile                        |  9 +++++++--
 textproc/zxing-cpp/distinfo                        |  6 +++---
 textproc/zxing-cpp/files/patch-core_CMakeLists.txt | 13 -------------
 textproc/zxing-cpp/files/patch-core_src_Utf.cpp    | 21 ---------------------
 textproc/zxing-cpp/pkg-plist                       |  7 ++++---
 5 files changed, 14 insertions(+), 42 deletions(-)

diff --git a/textproc/zxing-cpp/Makefile b/textproc/zxing-cpp/Makefile
index 912bc1a8c38c..10a974876801 100644
--- a/textproc/zxing-cpp/Makefile
+++ b/textproc/zxing-cpp/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	zxing-cpp
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.2.1
+DISTVERSION=	2.3.0
 CATEGORIES=	textproc
 
 MAINTAINER=	kde@FreeBSD.org
@@ -10,7 +10,9 @@ WWW=		https://github.com/zxing-cpp/zxing-cpp
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		cmake compiler:c++17-lang iconv
+TEST_DEPENDS=	googletest>0:devel/googletest
+
+USES=		cmake:testing compiler:c++20-lang iconv pathfix
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
 
@@ -20,5 +22,8 @@ CMAKE_ON=	BUILD_SHARED_LIBS
 # * blackbox test (fetches third party source)
 CMAKE_OFF=	BUILD_EXAMPLES \
 		BUILD_BLACKBOX_TESTS
+CMAKE_TESTING_ON=	ZXING_UNIT_TESTS
+
+PLIST_SUB=	SOVERSION=${DISTVERSION}
 
 .include <bsd.port.mk>
diff --git a/textproc/zxing-cpp/distinfo b/textproc/zxing-cpp/distinfo
index 483e99bd93c3..95c06b18a597 100644
--- a/textproc/zxing-cpp/distinfo
+++ b/textproc/zxing-cpp/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1702517883
-SHA256 (zxing-cpp-zxing-cpp-v2.2.1_GH0.tar.gz) = 02078ae15f19f9d423a441f205b1d1bee32349ddda7467e2c84e8f08876f8635
-SIZE (zxing-cpp-zxing-cpp-v2.2.1_GH0.tar.gz) = 891055
+TIMESTAMP = 1736003728
+SHA256 (zxing-cpp-zxing-cpp-v2.3.0_GH0.tar.gz) = 64e4139103fdbc57752698ee15b5f0b0f7af9a0331ecbdc492047e0772c417ba
+SIZE (zxing-cpp-zxing-cpp-v2.3.0_GH0.tar.gz) = 1008541
diff --git a/textproc/zxing-cpp/files/patch-core_CMakeLists.txt b/textproc/zxing-cpp/files/patch-core_CMakeLists.txt
deleted file mode 100644
index e323686f7010..000000000000
--- a/textproc/zxing-cpp/files/patch-core_CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-zxing-cpp 1.4.0 startd to only install the headers to the public interface.
-Libreoffice is unfortunately depending on some internal parts.
-
---- core/CMakeLists.txt.orig	2022-08-27 06:46:09 UTC
-+++ core/CMakeLists.txt
-@@ -141,6 +141,7 @@ set (PUBLIC_HEADERS
- # define subset of public headers that get distributed with the binaries
- set (PUBLIC_HEADERS
-     src/BarcodeFormat.h
-+    src/BitArray.h # expose private header used by Libreoffice
-     src/BitHacks.h
-     src/ByteArray.h
-     src/CharacterSet.h
diff --git a/textproc/zxing-cpp/files/patch-core_src_Utf.cpp b/textproc/zxing-cpp/files/patch-core_src_Utf.cpp
deleted file mode 100644
index cf8e04839b92..000000000000
--- a/textproc/zxing-cpp/files/patch-core_src_Utf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
---- core/src/Utf.cpp.orig	2023-12-10 23:43:27 UTC
-+++ core/src/Utf.cpp
-@@ -20,7 +20,7 @@ using char8_t = uint8_t;
- #if __cplusplus <= 201703L
- using char8_t = uint8_t;
- #endif
--using utf8_t = std::basic_string_view<char8_t>;
-+using utf8_t = std::vector<char8_t>;
- 
- using state_t = uint8_t;
- constexpr state_t kAccepted = 0;
-@@ -118,7 +118,8 @@ std::wstring FromUtf8(std::string_view utf8)
- std::wstring FromUtf8(std::string_view utf8)
- {
- 	std::wstring str;
--	AppendFromUtf8({reinterpret_cast<const char8_t*>(utf8.data()), utf8.size()}, str);
-+	const char8_t* data = reinterpret_cast<const char8_t*>(utf8.data());
-+	AppendFromUtf8({data, data + utf8.size()}, str);
- 	return str;
- }
- 
diff --git a/textproc/zxing-cpp/pkg-plist b/textproc/zxing-cpp/pkg-plist
index 7ba8a02b982b..5b3729939a4e 100644
--- a/textproc/zxing-cpp/pkg-plist
+++ b/textproc/zxing-cpp/pkg-plist
@@ -1,5 +1,5 @@
+include/ZXing/Barcode.h
 include/ZXing/BarcodeFormat.h
-include/ZXing/BitArray.h
 include/ZXing/BitHacks.h
 include/ZXing/BitMatrix.h
 include/ZXing/BitMatrixIO.h
@@ -21,14 +21,15 @@ include/ZXing/ReaderOptions.h
 include/ZXing/Result.h
 include/ZXing/StructuredAppend.h
 include/ZXing/TextUtfEncoding.h
+include/ZXing/Version.h
 include/ZXing/ZXAlgorithms.h
-include/ZXing/ZXConfig.h
+include/ZXing/ZXingCpp.h
 include/ZXing/ZXVersion.h
 lib/cmake/ZXing/ZXingConfig.cmake
 lib/cmake/ZXing/ZXingConfigVersion.cmake
 lib/cmake/ZXing/ZXingTargets-%%CMAKE_BUILD_TYPE%%.cmake
 lib/cmake/ZXing/ZXingTargets.cmake
 lib/libZXing.so
-lib/libZXing.so.2.2.1
+lib/libZXing.so.%%SOVERSION%%
 lib/libZXing.so.3
 libdata/pkgconfig/zxing.pc