zxing-cpp: upgrade to 3.1.0

The removed patches have been fixed upstream

Downloaded from https://github.com/zxing-cpp/zxing-cpp/releases/download/v3.1.0/zxing-cpp-3.1.0.tar.gz

Change-Id: I8ae75d7f3f2aadb9b5ec48dc2c19f77dc02ac701
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207775
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Xisco Fauli
2026-07-08 23:46:12 +02:00
parent fa81448cf1
commit 141ada3727
8 changed files with 6 additions and 112 deletions
+2 -2
View File
@@ -701,8 +701,8 @@ ZXCVBN_C_TARBALL := zxcvbn-c-2.6.tar.gz
# three static lines
# so that git cherry-pick
# will not run into conflicts
ZXING_SHA256SUM := e957f13e2ad4e31badb3d9af3f6ba8999a3ca3c9cc4d6bafc98032f9cce1a090
ZXING_TARBALL := zxing-cpp-3.0.2.tar.gz
ZXING_SHA256SUM := a3eb825154f05242283e7d94d8ebdcf95beb3a534eba393cce504e91c9b215bd
ZXING_TARBALL := zxing-cpp-3.1.0.tar.gz
# three static lines
# so that git cherry-pick
# will not run into conflicts
@@ -1,45 +0,0 @@
From 9fb2ecdd5209ca22823b143b66e7123da8e66a76 Mon Sep 17 00:00:00 2001
From: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Mon, 2 Mar 2026 20:48:22 +0100
Subject: [PATCH] Silence deprecated-declarations warnings on Windows too
Seen when building zxing-cpp as an external library in LibreOffice
E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\zxing\core\src\ReaderOptions.h(173): error C2220: the following warning is treated as an error
E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\zxing\core\src\ReaderOptions.h(173): warning C4996: 'ZXing::ReaderOptions::tryCode39ExtendedMode': was declared deprecated
E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\zxing\core\src\ReaderOptions.h(176): warning C4996: 'ZXing::ReaderOptions::validateCode39CheckSum': was declared deprecated
E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\zxing\core\src\ReaderOptions.h(180): warning C4996: 'ZXing::ReaderOptions::validateITFCheckSum': was declared deprecated
---
core/src/ReaderOptions.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/core/src/ReaderOptions.h b/core/src/ReaderOptions.h
index 9804faf1..509637e0 100644
--- a/core/src/ReaderOptions.h
+++ b/core/src/ReaderOptions.h
@@ -156,10 +156,13 @@ public:
#undef ZX_PROPERTY
- // Silence deprecated-declarations warnings, only happening here for deprecated inline functions and only with GCC
+ // Silence deprecated-declarations warnings, only happening here for deprecated inline functions
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#elif defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable : 4996)
#endif
#define ZX_DEPRECATED_PROPERTY(TYPE, NAME, SETTER, GET_IMPL, SET_IMPL) \
@@ -183,6 +186,8 @@ public:
#ifdef __GNUC__
#pragma GCC diagnostic pop
+#elif defined(_MSC_VER)
+#pragma warning(pop)
#endif
#ifdef ZXING_INTERNAL
--
2.39.5
@@ -1,30 +0,0 @@
From 475a022e0c85edfc58b525bb7debe40df455b380 Mon Sep 17 00:00:00 2001
From: axxel <awagger@gmail.com>
Date: Tue, 3 Mar 2026 13:23:16 +0100
Subject: [PATCH] TextEncoder: add missing #include "Version.h"
Fails to compile with -DZXING_READERS=OFF -DZXING_WRITERS=NEW and without
precompiled headers.
Thanks to @x1sc0 for reporting this (showed up in LibreOffice's own build
system).
---
core/src/TextEncoder.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core/src/TextEncoder.cpp b/core/src/TextEncoder.cpp
index 06dc524d..afcaef85 100644
--- a/core/src/TextEncoder.cpp
+++ b/core/src/TextEncoder.cpp
@@ -9,6 +9,8 @@
#include "ECI.h"
#include "Utf.h"
#include "ZXAlgorithms.h"
+#include "Version.h"
+
#ifdef ZXING_USE_ZINT
#include <zint.h>
#else
--
2.39.5
+3 -3
View File
@@ -27,8 +27,8 @@
+
+// Version numbering
+#define ZXING_VERSION_MAJOR 3
+#define ZXING_VERSION_MINOR 0
+#define ZXING_VERSION_PATCH 2
+#define ZXING_VERSION_MINOR 1
+#define ZXING_VERSION_PATCH 0
+#define ZXING_VERSION_SUFFIX ""
+
+#define ZXING_VERSION_STR "3.0.2"
+#define ZXING_VERSION_STR "3.1.0"
+1 -5
View File
@@ -44,8 +44,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,zxing,\
UnpackedTarball/zxing/core/src/ECI \
UnpackedTarball/zxing/core/src/Error \
UnpackedTarball/zxing/core/src/GTIN \
UnpackedTarball/zxing/core/src/GenericGF \
UnpackedTarball/zxing/core/src/GenericGFPoly \
UnpackedTarball/zxing/core/src/GlobalHistogramBinarizer \
UnpackedTarball/zxing/core/src/GridSampler \
UnpackedTarball/zxing/core/src/HRI \
@@ -55,8 +53,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,zxing,\
UnpackedTarball/zxing/core/src/MultiFormatWriter \
UnpackedTarball/zxing/core/src/PerspectiveTransform \
UnpackedTarball/zxing/core/src/ReadBarcode \
UnpackedTarball/zxing/core/src/ReedSolomonDecoder \
UnpackedTarball/zxing/core/src/ReedSolomonEncoder \
UnpackedTarball/zxing/core/src/ResultPoint \
UnpackedTarball/zxing/core/src/TextDecoder \
UnpackedTarball/zxing/core/src/TextEncoder \
@@ -70,7 +66,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,zxing,\
UnpackedTarball/zxing/core/src/maxicode/MCReader \
UnpackedTarball/zxing/core/src/oned/ODCodabarReader \
UnpackedTarball/zxing/core/src/oned/ODCodabarWriter \
UnpackedTarball/zxing/core/src/oned/ODCode128Patterns \
UnpackedTarball/zxing/core/src/oned/ODCode128Reader \
UnpackedTarball/zxing/core/src/oned/ODCode128Writer \
UnpackedTarball/zxing/core/src/oned/ODCode39Reader \
@@ -130,6 +125,7 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,zxing,\
UnpackedTarball/zxing/core/src/libzint/rss \
UnpackedTarball/zxing/core/src/libzint/stubs \
UnpackedTarball/zxing/core/src/libzint/svg \
UnpackedTarball/zxing/core/src/libzint/telepen \
UnpackedTarball/zxing/core/src/libzint/upcean \
UnpackedTarball/zxing/core/src/libzint/vector \
))
-4
View File
@@ -13,10 +13,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,zxing,$(ZXING_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,zxing, \
external/zxing/0001-add-ZXVersion-h.patch \
external/zxing/cassert.patch \
external/zxing/0001-Silence-deprecated-declarations-warnings-on-Windows-.patch \
external/zxing/macOS14.patch \
external/zxing/0001-TextEncoder-add-missing-include-Version.h.patch \
))
# vim: set noet sw=4 ts=4:
-10
View File
@@ -1,10 +0,0 @@
--- a/core/src/Content.cpp 2026-02-27 12:01:25.753592314 +0100
+++ b/core/src/Content.cpp 2026-02-27 12:01:38.773532220 +0100
@@ -18,6 +18,7 @@
#endif
#include <cctype>
+#include <cassert>
namespace ZXing {
-13
View File
@@ -1,13 +0,0 @@
--- a/core/src/CreateBarcode.cpp 2026-03-03 14:41:48.255770172 +0100
+++ b/core/src/CreateBarcode.cpp 2026-03-03 14:42:12.911576522 +0100
@@ -45,6 +45,10 @@
// structured_append (idx, cnt, ID)
mutable unique_zint_symbol zint;
+
+#ifndef __cpp_aggregate_paren_init // make XCode 14.x happy
+ Data(BarcodeFormat format, std::string options) : format(format), options(std::move(options)) {}
+#endif
};
// TODO: check return type