diff options
Diffstat (limited to '')
-rw-r--r-- | external/zxing/0001-android-Fix-build-with-NDK-26.patch | 64 | ||||
-rw-r--r-- | external/zxing/Makefile | 7 | ||||
-rw-r--r-- | external/zxing/Module_zxing.mk | 20 | ||||
-rw-r--r-- | external/zxing/README | 3 | ||||
-rw-r--r-- | external/zxing/StaticLibrary_zxing.mk | 136 | ||||
-rw-r--r-- | external/zxing/UnpackedTarball_zxing.mk | 22 | ||||
-rw-r--r-- | external/zxing/inc/pch/precompiled_zxing.cxx | 12 | ||||
-rw-r--r-- | external/zxing/inc/pch/precompiled_zxing.hxx | 82 |
8 files changed, 346 insertions, 0 deletions
diff --git a/external/zxing/0001-android-Fix-build-with-NDK-26.patch b/external/zxing/0001-android-Fix-build-with-NDK-26.patch new file mode 100644 index 0000000000..ad1269b416 --- /dev/null +++ b/external/zxing/0001-android-Fix-build-with-NDK-26.patch @@ -0,0 +1,64 @@ +From 295b193b0105e68bb24747aefbff2653df892b4c Mon Sep 17 00:00:00 2001 +From: Michael Weghorn <m.weghorn@posteo.de> +Date: Mon, 27 Nov 2023 14:28:34 +0100 +Subject: [PATCH] android: Fix build with NDK 26 + +While the workarounds added in + + commit df0b9213017a136bf7253ea1d4aba5677c52d45c + Author: axxel <awagger@gmail.com> + Date: Thu Dec 15 20:43:48 2022 +0100 + + android: work around limitations of c++-20 support in NDK + +may be necessary for NDK 25, they are no longer for NDK 26, +and even break the build with NDK 26: + + C/C++: .../zxing-cpp/core/src/Generator.h:103:7: error: reference to 'default_sentinel_t' is ambiguous + C/C++: std::default_sentinel_t end() { return {}; } + C/C++: ^ + C/C++: .../Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__iterator/default_sentinel.h:23:8: note: candidate found by name lookup is 'std::__ndk1::default_sentinel_t' + C/C++: struct default_sentinel_t { }; + C/C++: ^ + C/C++: .../zxing-cpp/core/src/Generator.h:15:9: note: candidate found by name lookup is 'std::default_sentinel_t' + C/C++: struct default_sentinel_t {}; + C/C++: ^ + C/C++: 2 errors generated. + +Restrict the workaround to NDK version < 26 to fix this. + +Fixes: #673 +--- + core/src/Generator.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/core/src/Generator.h b/core/src/Generator.h +index 7a1fd179..a5083e9d 100644 +--- a/core/src/Generator.h ++++ b/core/src/Generator.h +@@ -5,8 +5,12 @@ + + #pragma once + +-#ifdef __cpp_impl_coroutine + #ifdef __ANDROID__ ++#include <android/ndk-version.h> ++#endif ++ ++#ifdef __cpp_impl_coroutine ++#if defined __ANDROID__ && __NDK_MAJOR__ < 26 + // NDK 25.1.8937393 can compile this code with c++20 but needs a few tweaks: + #include <experimental/coroutine> + namespace std { +@@ -25,7 +29,7 @@ namespace std { + // this code is based on https://en.cppreference.com/w/cpp/coroutine/coroutine_handle#Example + // but modified trying to prevent accidental copying of generated objects + +-#ifdef __ANDROID__ ++#if defined __ANDROID__ && __NDK_MAJOR__ < 26 + template <class T> + #else + template <std::movable T> +-- +2.42.0 + diff --git a/external/zxing/Makefile b/external/zxing/Makefile new file mode 100644 index 0000000000..e4968cf85f --- /dev/null +++ b/external/zxing/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/zxing/Module_zxing.mk b/external/zxing/Module_zxing.mk new file mode 100644 index 0000000000..ee53696c57 --- /dev/null +++ b/external/zxing/Module_zxing.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,zxing)) + +$(eval $(call gb_Module_add_targets,zxing,\ + UnpackedTarball_zxing \ +)) + +$(eval $(call gb_Module_add_targets,zxing,\ + StaticLibrary_zxing \ +)) + +# vim: set noet sw=4 ts=4:
\ No newline at end of file diff --git a/external/zxing/README b/external/zxing/README new file mode 100644 index 0000000000..1ca49cbc00 --- /dev/null +++ b/external/zxing/README @@ -0,0 +1,3 @@ +Qr code generation library availaible from [https://github.com/nu-book/zxing-cpp] + +Qr code generator to make a QR code out of a provided link or text in LibreOffice.
\ No newline at end of file diff --git a/external/zxing/StaticLibrary_zxing.mk b/external/zxing/StaticLibrary_zxing.mk new file mode 100644 index 0000000000..f9d031e355 --- /dev/null +++ b/external/zxing/StaticLibrary_zxing.mk @@ -0,0 +1,136 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_StaticLibrary_StaticLibrary,zxing)) + +$(eval $(call gb_StaticLibrary_use_unpacked,zxing,zxing)) + +$(eval $(call gb_StaticLibrary_set_precompiled_header,zxing,external/zxing/inc/pch/precompiled_zxing)) + +$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,zxing,cpp)) + +$(eval $(call gb_StaticLibrary_use_external,zxing,icu_headers)) + +$(eval $(call gb_StaticLibrary_set_warnings_disabled,zxing)) + +$(eval $(call gb_StaticLibrary_set_include,zxing,\ + -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/) \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,zxing,\ + UnpackedTarball/zxing/core/src/aztec/AZDecoder \ + UnpackedTarball/zxing/core/src/aztec/AZDetector \ + UnpackedTarball/zxing/core/src/aztec/AZEncoder \ + UnpackedTarball/zxing/core/src/aztec/AZHighLevelEncoder \ + UnpackedTarball/zxing/core/src/aztec/AZReader \ + UnpackedTarball/zxing/core/src/aztec/AZToken \ + UnpackedTarball/zxing/core/src/aztec/AZWriter \ + UnpackedTarball/zxing/core/src/BarcodeFormat \ + UnpackedTarball/zxing/core/src/BinaryBitmap \ + UnpackedTarball/zxing/core/src/BitArray \ + UnpackedTarball/zxing/core/src/BitMatrix \ + UnpackedTarball/zxing/core/src/BitMatrixIO \ + UnpackedTarball/zxing/core/src/BitSource \ + UnpackedTarball/zxing/core/src/CharacterSet \ + UnpackedTarball/zxing/core/src/ConcentricFinder \ + UnpackedTarball/zxing/core/src/Content \ + UnpackedTarball/zxing/core/src/DecodeHints \ + UnpackedTarball/zxing/core/src/datamatrix/DMBitLayout \ + UnpackedTarball/zxing/core/src/datamatrix/DMDataBlock \ + UnpackedTarball/zxing/core/src/datamatrix/DMDecoder \ + UnpackedTarball/zxing/core/src/datamatrix/DMDetector \ + UnpackedTarball/zxing/core/src/datamatrix/DMECEncoder \ + UnpackedTarball/zxing/core/src/datamatrix/DMHighLevelEncoder \ + UnpackedTarball/zxing/core/src/datamatrix/DMReader \ + UnpackedTarball/zxing/core/src/datamatrix/DMSymbolInfo \ + UnpackedTarball/zxing/core/src/datamatrix/DMVersion \ + UnpackedTarball/zxing/core/src/datamatrix/DMWriter \ + UnpackedTarball/zxing/core/src/ECI \ + UnpackedTarball/zxing/core/src/GenericGF \ + UnpackedTarball/zxing/core/src/GenericGFPoly \ + UnpackedTarball/zxing/core/src/GlobalHistogramBinarizer \ + UnpackedTarball/zxing/core/src/GridSampler \ + UnpackedTarball/zxing/core/src/GTIN \ + UnpackedTarball/zxing/core/src/HybridBinarizer \ + UnpackedTarball/zxing/core/src/maxicode/MCBitMatrixParser \ + UnpackedTarball/zxing/core/src/maxicode/MCDecoder \ + UnpackedTarball/zxing/core/src/maxicode/MCReader \ + UnpackedTarball/zxing/core/src/MultiFormatReader \ + UnpackedTarball/zxing/core/src/MultiFormatWriter \ + UnpackedTarball/zxing/core/src/oned/ODCodabarReader \ + UnpackedTarball/zxing/core/src/oned/ODCodabarWriter \ + UnpackedTarball/zxing/core/src/oned/ODCode39Reader \ + UnpackedTarball/zxing/core/src/oned/ODCode39Writer \ + UnpackedTarball/zxing/core/src/oned/ODCode93Reader \ + UnpackedTarball/zxing/core/src/oned/ODCode93Writer \ + UnpackedTarball/zxing/core/src/oned/ODCode128Patterns \ + UnpackedTarball/zxing/core/src/oned/ODCode128Reader \ + UnpackedTarball/zxing/core/src/oned/ODCode128Writer \ + UnpackedTarball/zxing/core/src/oned/ODDataBarCommon \ + UnpackedTarball/zxing/core/src/oned/ODDataBarExpandedBitDecoder \ + UnpackedTarball/zxing/core/src/oned/ODDataBarExpandedReader \ + UnpackedTarball/zxing/core/src/oned/ODDataBarReader \ + UnpackedTarball/zxing/core/src/oned/ODEAN8Writer \ + UnpackedTarball/zxing/core/src/oned/ODEAN13Writer \ + UnpackedTarball/zxing/core/src/oned/ODITFReader \ + UnpackedTarball/zxing/core/src/oned/ODITFWriter \ + UnpackedTarball/zxing/core/src/oned/ODMultiUPCEANReader \ + UnpackedTarball/zxing/core/src/oned/ODUPCEANCommon \ + UnpackedTarball/zxing/core/src/oned/ODUPCAWriter \ + UnpackedTarball/zxing/core/src/oned/ODUPCEWriter \ + UnpackedTarball/zxing/core/src/oned/ODRowReader \ + UnpackedTarball/zxing/core/src/oned/ODReader \ + UnpackedTarball/zxing/core/src/oned/ODWriterHelper \ + UnpackedTarball/zxing/core/src/pdf417/PDFBarcodeValue \ + UnpackedTarball/zxing/core/src/pdf417/PDFBoundingBox \ + UnpackedTarball/zxing/core/src/pdf417/PDFCodewordDecoder \ + UnpackedTarball/zxing/core/src/pdf417/PDFDecoder \ + UnpackedTarball/zxing/core/src/pdf417/PDFDetector \ + UnpackedTarball/zxing/core/src/pdf417/PDFDetectionResult \ + UnpackedTarball/zxing/core/src/pdf417/PDFDetectionResultColumn \ + UnpackedTarball/zxing/core/src/pdf417/PDFEncoder \ + UnpackedTarball/zxing/core/src/pdf417/PDFHighLevelEncoder \ + UnpackedTarball/zxing/core/src/pdf417/PDFModulusGF \ + UnpackedTarball/zxing/core/src/pdf417/PDFModulusPoly \ + UnpackedTarball/zxing/core/src/pdf417/PDFReader \ + UnpackedTarball/zxing/core/src/pdf417/PDFScanningDecoder \ + UnpackedTarball/zxing/core/src/pdf417/PDFWriter \ + UnpackedTarball/zxing/core/src/PerspectiveTransform \ + UnpackedTarball/zxing/core/src/qrcode/QRBitMatrixParser \ + UnpackedTarball/zxing/core/src/qrcode/QRCodecMode \ + UnpackedTarball/zxing/core/src/qrcode/QRDataBlock \ + UnpackedTarball/zxing/core/src/qrcode/QRDecoder \ + UnpackedTarball/zxing/core/src/qrcode/QRDetector \ + UnpackedTarball/zxing/core/src/qrcode/QREncoder \ + UnpackedTarball/zxing/core/src/qrcode/QRErrorCorrectionLevel \ + UnpackedTarball/zxing/core/src/qrcode/QRFormatInformation \ + UnpackedTarball/zxing/core/src/qrcode/QRMaskUtil \ + UnpackedTarball/zxing/core/src/qrcode/QRMatrixUtil \ + UnpackedTarball/zxing/core/src/qrcode/QRReader \ + UnpackedTarball/zxing/core/src/qrcode/QRWriter \ + UnpackedTarball/zxing/core/src/qrcode/QRVersion \ + UnpackedTarball/zxing/core/src/ReadBarcode \ + UnpackedTarball/zxing/core/src/Result \ + UnpackedTarball/zxing/core/src/ResultPoint \ + UnpackedTarball/zxing/core/src/ReedSolomonDecoder \ + UnpackedTarball/zxing/core/src/ReedSolomonEncoder \ + UnpackedTarball/zxing/core/src/TextDecoder \ + UnpackedTarball/zxing/core/src/TextEncoder \ + UnpackedTarball/zxing/core/src/TextUtfEncoding \ + UnpackedTarball/zxing/core/src/Utf \ + UnpackedTarball/zxing/core/src/WhiteRectDetector \ + UnpackedTarball/zxing/core/src/ZXBigInteger \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,zxing,\ + UnpackedTarball/zxing/core/src/libzueci/zueci \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/zxing/UnpackedTarball_zxing.mk b/external/zxing/UnpackedTarball_zxing.mk new file mode 100644 index 0000000000..0a81505463 --- /dev/null +++ b/external/zxing/UnpackedTarball_zxing.mk @@ -0,0 +1,22 @@ +#-*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,zxing)) + +$(eval $(call gb_UnpackedTarball_set_tarball,zxing,$(ZXING_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,zxing,1)) + +# patch 0001-android-Fix-build-with-NDK-26.patch is backport of +# upstream commit https://github.com/zxing-cpp/zxing-cpp/commit/295b193b0105e68bb24747aefbff2653df892b4c +$(eval $(call gb_UnpackedTarball_add_patches,zxing, \ + external/zxing/0001-android-Fix-build-with-NDK-26.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/zxing/inc/pch/precompiled_zxing.cxx b/external/zxing/inc/pch/precompiled_zxing.cxx new file mode 100644 index 0000000000..0f24650d92 --- /dev/null +++ b/external/zxing/inc/pch/precompiled_zxing.cxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "precompiled_zxing.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/zxing/inc/pch/precompiled_zxing.hxx b/external/zxing/inc/pch/precompiled_zxing.hxx new file mode 100644 index 0000000000..a414646f11 --- /dev/null +++ b/external/zxing/inc/pch/precompiled_zxing.hxx @@ -0,0 +1,82 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such + manual changes will be rewritten by the next run of update_pch.sh (which presumably + also fixes all possible problems, so it's usually better to use it). + + Generated on 2023-07-09 00:00:16 using: + ./bin/update_pch external/zxing zxing --cutoff=1 --exclude:system --include:module --include:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./external/zxing/inc/pch/precompiled_zxing.hxx "make external/zxing.build" --find-conflicts +*/ + +#include <sal/config.h> +#if PCH_LEVEL >= 1 +#include <algorithm> +#include <array> +#include <cassert> +#include <cctype> +#include <climits> +#include <cmath> +#include <cstddef> +#include <cstdint> +#include <cstdlib> +#include <cstring> +#include <fstream> +#include <functional> +#include <initializer_list> +#include <iomanip> +#include <iterator> +#include <limits> +#include <list> +#include <map> +#include <memory> +#include <mutex> +#include <numeric> +#include <optional> +#include <sstream> +#include <stdexcept> +#include <string> +#include <unordered_set> +#include <utility> +#include <vector> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include <aztec/AZReader.h> +#include <aztec/AZWriter.h> +#include <datamatrix/DMReader.h> +#include <datamatrix/DMWriter.h> +#include <libzueci/zueci.h> +#include <maxicode/MCReader.h> +#include <oned/ODCodabarWriter.h> +#include <oned/ODCode128Writer.h> +#include <oned/ODCode39Writer.h> +#include <oned/ODCode93Writer.h> +#include <oned/ODEAN13Writer.h> +#include <oned/ODEAN8Writer.h> +#include <oned/ODITFWriter.h> +#include <oned/ODReader.h> +#include <oned/ODUPCAWriter.h> +#include <oned/ODUPCEWriter.h> +#include <pdf417/PDFReader.h> +#include <pdf417/PDFWriter.h> +#include <qrcode/QRErrorCorrectionLevel.h> +#include <qrcode/QRReader.h> +#include <qrcode/QRWriter.h> +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |