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 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; -+using utf8_t = std::vector; - - 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(utf8.data()), utf8.size()}, str); -+ const char8_t* data = reinterpret_cast(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