From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- external/libmspub/ExternalProject_libmspub.mk | 47 ++++++++++++++++++++++++++ external/libmspub/Makefile | 7 ++++ external/libmspub/Module_libmspub.mk | 17 ++++++++++ external/libmspub/README | 3 ++ external/libmspub/UnpackedTarball_libmspub.mk | 31 +++++++++++++++++ external/libmspub/libmspub_android_arm.patch.1 | 12 +++++++ external/libmspub/stdint.patch | 10 ++++++ external/libmspub/ubsan.patch | 12 +++++++ 8 files changed, 139 insertions(+) create mode 100644 external/libmspub/ExternalProject_libmspub.mk create mode 100644 external/libmspub/Makefile create mode 100644 external/libmspub/Module_libmspub.mk create mode 100644 external/libmspub/README create mode 100644 external/libmspub/UnpackedTarball_libmspub.mk create mode 100644 external/libmspub/libmspub_android_arm.patch.1 create mode 100644 external/libmspub/stdint.patch create mode 100644 external/libmspub/ubsan.patch (limited to 'external/libmspub') diff --git a/external/libmspub/ExternalProject_libmspub.mk b/external/libmspub/ExternalProject_libmspub.mk new file mode 100644 index 000000000..f84e5c9b2 --- /dev/null +++ b/external/libmspub/ExternalProject_libmspub.mk @@ -0,0 +1,47 @@ +# -*- 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_ExternalProject_ExternalProject,libmspub)) + +$(eval $(call gb_ExternalProject_use_autoconf,libmspub,build)) + +$(eval $(call gb_ExternalProject_register_targets,libmspub,\ + build \ +)) + +$(eval $(call gb_ExternalProject_use_externals,libmspub,\ + boost_headers \ + icu \ + revenge \ + zlib \ +)) + +$(call gb_ExternalProject_get_state_target,libmspub,build) : + $(call gb_Trace_StartRange,libmspub,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + export PKG_CONFIG="" \ + && MAKE=$(MAKE) $(gb_RUN_CONFIGURE) ./configure \ + --with-pic \ + --enable-static \ + --disable-shared \ + --without-docs \ + --disable-tools \ + $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \ + --disable-werror \ + --disable-weffc \ + $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(gb_CXXFLAGS) $(call gb_ExternalProject_get_build_flags,libmspub)" \ + CPPFLAGS="$(CPPFLAGS) $(ICU_UCHAR_TYPE) $(BOOST_CPPFLAGS)" \ + LDFLAGS="$(call gb_ExternalProject_get_link_flags,libmspub)" \ + $(gb_CONFIGURE_PLATFORMS) \ + && $(MAKE) \ + ) + $(call gb_Trace_EndRange,libmspub,EXTERNAL) + +# vim: set noet sw=4 ts=4: diff --git a/external/libmspub/Makefile b/external/libmspub/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/libmspub/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/libmspub/Module_libmspub.mk b/external/libmspub/Module_libmspub.mk new file mode 100644 index 000000000..81ea7e91d --- /dev/null +++ b/external/libmspub/Module_libmspub.mk @@ -0,0 +1,17 @@ +# -*- 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,libmspub)) + +$(eval $(call gb_Module_add_targets,libmspub,\ + ExternalProject_libmspub \ + UnpackedTarball_libmspub \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libmspub/README b/external/libmspub/README new file mode 100644 index 000000000..5a6625fff --- /dev/null +++ b/external/libmspub/README @@ -0,0 +1,3 @@ +Library parsing the Microsoft Publisher documents. + +[https://wiki.documentfoundation.org/DLP/Libraries/libmspub] diff --git a/external/libmspub/UnpackedTarball_libmspub.mk b/external/libmspub/UnpackedTarball_libmspub.mk new file mode 100644 index 000000000..287be540d --- /dev/null +++ b/external/libmspub/UnpackedTarball_libmspub.mk @@ -0,0 +1,31 @@ +# -*- 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,libmspub)) + +$(eval $(call gb_UnpackedTarball_set_tarball,libmspub,$(MSPUB_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,libmspub,0)) + +# * external/libmspub/stdint.patch is upstream at +# "missing include": +$(eval $(call gb_UnpackedTarball_add_patches,libmspub,\ + external/libmspub/ubsan.patch \ + external/libmspub/stdint.patch \ +)) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libmspub)) + +ifeq ($(ANDROID_APP_ABI),armeabi-v7a) +$(eval $(call gb_UnpackedTarball_add_patches,libmspub, \ + external/libmspub/libmspub_android_arm.patch.1 \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/libmspub/libmspub_android_arm.patch.1 b/external/libmspub/libmspub_android_arm.patch.1 new file mode 100644 index 000000000..2d7d0e12c --- /dev/null +++ b/external/libmspub/libmspub_android_arm.patch.1 @@ -0,0 +1,12 @@ +diff -ur libmspub.org/src/lib/libmspub_utils.cpp libmspub/src/lib/libmspub_utils.cpp +--- libmspub.org/src/lib/libmspub_utils.cpp 2018-04-07 15:13:32.041792236 +0200 ++++ libmspub/src/lib/libmspub_utils.cpp 2018-04-07 15:14:08.547790739 +0200 +@@ -29,7 +29,7 @@ + { + va_list args; + va_start(args, format); +- std::vfprintf(stderr, format, args); ++ vfprintf(stderr, format, args); + va_end(args); + } + diff --git a/external/libmspub/stdint.patch b/external/libmspub/stdint.patch new file mode 100644 index 000000000..61f1dd122 --- /dev/null +++ b/external/libmspub/stdint.patch @@ -0,0 +1,10 @@ +--- src/lib/MSPUBMetaData.h ++++ src/lib/MSPUBMetaData.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include + diff --git a/external/libmspub/ubsan.patch b/external/libmspub/ubsan.patch new file mode 100644 index 000000000..b58249e18 --- /dev/null +++ b/external/libmspub/ubsan.patch @@ -0,0 +1,12 @@ +--- src/lib/MSPUBContentChunkType.h ++++ src/lib/MSPUBContentChunkType.h +@@ -27,7 +27,8 @@ + CELLS = 0x63, + FONT = 0x6C, + IMAGE_2K, //these don't exist in Pub 2k3 so their value in the enum is not used. +- IMAGE_2K_DATA ++ IMAGE_2K_DATA, ++ MSPUBContentChunkType_dummy=0xFF // MSPUBParser.cpp:2359:9: runtime error: load of value 138, which is not a valid value for type 'libmspub::MSPUBContentChunkType' + }; + } // namespace libmspub + -- cgit v1.2.3