Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2662
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/62/2662/1
Creating a libmwaw module for library parsing variaous old Mac file-formats
Change-Id: I367dfa309a30a5b55de1d59e632d0dbcf5dc6dbb
---
M RepositoryExternal.mk
M RepositoryModule_host.mk
M config_host.mk.in
M configure.ac
M download.lst
A libmwaw/ExternalPackage_libmwaw.mk
A libmwaw/ExternalProject_libmwaw.mk
A libmwaw/Makefile
A libmwaw/Module_libmwaw.mk
A libmwaw/README
A libmwaw/UnpackedTarball_mwaw.mk
A libmwaw/prj/build.lst
12 files changed, 188 insertions(+), 0 deletions(-)
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2e36e94..decd7b3 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1420,6 +1420,36 @@
endif # SYSTEM_WPS
+ifeq ($(SYSTEM_MWAW),YES)
+
+define gb_LinkTarget__use_mwaw
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(MWAW_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
+
+endef
+
+else # !SYSTEM_MWAW
+
+$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
+ mwaw-0.1 \
+))
+
+define gb_LinkTarget__use_mwaw
+$(call gb_LinkTarget_use_package,$(1),\
+ libmwaw \
+)
+$(call gb_LinkTarget_use_static_libraries,$(1),\
+ mwaw-0.1 \
+)
+
+endef
+
+endif # SYSTEM_MWAW
+
+
ifeq ($(SYSTEM_LCMS2),YES)
define gb_LinkTarget__use_lcms2
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 6cf2e04..e28c9ae 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -113,6 +113,7 @@
$(call gb_Helper_optional,LIBLANGTAG,liblangtag) \
$(call gb_Helper_optional,LIBPNG,libpng) \
$(call gb_Helper_optional,MSPUB,libmspub) \
+ $(call gb_Helper_optional,MWAW,libmwaw) \
$(call gb_Helper_optional,ORCUS,liborcus) \
librelogo \
$(call gb_Helper_optional,VISIO,libvisio) \
diff --git a/config_host.mk.in b/config_host.mk.in
index 273385b..4f58f21 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -403,6 +403,8 @@
export MSVC_DLL_PATH=@MSVC_DLL_PATH@
export MSVC80_DLLS=@MSVC80_DLLS@
export MSVC80_DLL_PATH=@MSVC80_DLL_PATH@
+export MWAW_CFLAGS=$(gb_SPACE)@MWAW_CFLAGS@
+export MWAW_LIBS=$(gb_SPACE)@MWAW_LIBS@
export MYTHES_CFLAGS=$(gb_SPACE)@MYTHES_CFLAGS@
export MYTHES_LIBS=$(gb_SPACE)@MYTHES_LIBS@
export NEON_CFLAGS=$(gb_SPACE)@NEON_CFLAGS@
@@ -537,6 +539,7 @@
export SYSTEM_LIBEXTTEXTCAT_DATA=@SYSTEM_LIBEXTTEXTCAT_DATA@
export SYSTEM_LIBLANGTAG=@SYSTEM_LIBLANGTAG@
export SYSTEM_MSPUB=@SYSTEM_MSPUB@
+export SYSTEM_MWAW=@SYSTEM_MWAW@
export SYSTEM_LIBORCUS=@SYSTEM_LIBORCUS@
export SYSTEM_LIBPNG=@SYSTEM_LIBPNG@
export SYSTEM_VISIO=@SYSTEM_VISIO@
diff --git a/configure.ac b/configure.ac
index 61eb8ac..90fd0b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7067,6 +7067,14 @@
fi
dnl ===================================================================
+dnl Check for system libmwaw
+dnl ===================================================================
+# libmwaw depends on libwpd that is LGPL, publishing empty flags
+if test $_os != iOS; then
+ libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.1])
+fi
+
+dnl ===================================================================
dnl Check for system libvisio
dnl ===================================================================
# libvisio depends on libwpd and libwpg and those are LGPL, publishing empty flags
diff --git a/download.lst b/download.lst
index aaa735f..149caaf 100644
--- a/download.lst
+++ b/download.lst
@@ -2,6 +2,8 @@
export CDR_TARBALL := libcdr-0.0.11.tar.bz2
MSPUB_MD5SUM := 881c4628ec5f54d47f35d5d19e335662
export MSPUB_TARBALL := libmspub-0.0.5.tar.bz2
+MWAW_MD5SUM := be634f72debb6bebbbbba9150d5aa5c9
+export MWAW_TARBALL := libmwaw-0.1.7.tar.bz2
VISIO_MD5SUM := 92bde158f249b9b27f76f48cc65a0242
export VISIO_TARBALL := libvisio-0.0.25.tar.bz2
diff --git a/libmwaw/ExternalPackage_libmwaw.mk b/libmwaw/ExternalPackage_libmwaw.mk
new file mode 100644
index 0000000..b541498
--- /dev/null
+++ b/libmwaw/ExternalPackage_libmwaw.mk
@@ -0,0 +1,27 @@
+# -*- 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_ExternalPackage_ExternalPackage,libmwaw,mwaw))
+
+$(eval $(call gb_ExternalPackage_add_unpacked_files,libmwaw,inc/external/libmwaw,\
+ src/lib/libmwaw.hxx \
+ src/lib/MWAWDocument.hxx \
+ src/lib/MWAWPropertyHandler.hxx \
+))
+
+$(eval $(call gb_ExternalPackage_use_external_project,libmwaw,libmwaw))
+
+ifeq ($(OS)$(COM),WNTMSC)
+$(eval $(call
gb_ExternalPackage_add_file,libmwaw,lib/mwaw-0.1.lib,build/win32/Release/lib/libmwaw-0.1.lib))
+else
+$(eval $(call gb_ExternalPackage_add_file,libmwaw,lib/libmwaw-0.1.a,src/lib/.libs/libmwaw-0.1.a))
+endif
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/libmwaw/ExternalProject_libmwaw.mk b/libmwaw/ExternalProject_libmwaw.mk
new file mode 100644
index 0000000..ddb9c48
--- /dev/null
+++ b/libmwaw/ExternalProject_libmwaw.mk
@@ -0,0 +1,69 @@
+# -*- 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,libmwaw))
+
+$(eval $(call gb_ExternalProject_use_unpacked,libmwaw,mwaw))
+
+$(eval $(call gb_ExternalProject_register_targets,libmwaw,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libmwaw,\
+ boost_headers \
+ wpd \
+))
+
+ifeq ($(OS)$(COM),WNTMSC)
+
+ifeq ($(VCVER),90)
+$(call gb_ExternalProject_get_state_target,libmwaw,build) :
+ $(call gb_ExternalProject_run,build,\
+ export BOOST_INCLUDE_DIR=$(call gb_UnpackedTarball_get_dir,boost) \
+ && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \
+ && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
+ && $(COMPATH)/vcpackages/vcbuild.exe libmwaw.vcproj "Release|Win32" \
+ ,build/win32)
+else ifeq ($(VCVER),100)
+$(call gb_ExternalProject_get_state_target,libmwaw,build) :
+ $(call gb_ExternalProject_run,build,\
+ export BOOST_INCLUDE_DIR=$(call gb_UnpackedTarball_get_dir,boost) \
+ && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \
+ && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
+ && msbuild.exe libmwaw.vcxproj /p:Configuration=Release \
+ ,build/win32)
+else
+$(call gb_ExternalProject_get_state_target,libmwaw,build) :
+ $(call gb_ExternalProject_run,build,\
+ export BOOST_INCLUDE_DIR=$(call gb_UnpackedTarball_get_dir,boost) \
+ && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \
+ && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
+ && msbuild.exe libmwaw.vcxproj /p:PlatformToolset=v110 /p:VisualStudioVersion=11.0
/p:Configuration=Release \
+ ,build/win32)
+endif
+
+else
+
+$(call gb_ExternalProject_get_state_target,libmwaw,build) :
+ $(call gb_ExternalProject_run,build,\
+ export PKG_CONFIG="" \
+ && ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --without-docs \
+ --disable-debug \
+ --disable-werror \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM)
--host=$(HOST_PLATFORM)) \
+ && (cd $(EXTERNAL_WORKDIR)/src/lib && $(MAKE)) \
+ )
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/libmwaw/Makefile b/libmwaw/Makefile
new file mode 100644
index 0000000..ccb1c85
--- /dev/null
+++ b/libmwaw/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/libmwaw/Module_libmwaw.mk b/libmwaw/Module_libmwaw.mk
new file mode 100644
index 0000000..c1a878b
--- /dev/null
+++ b/libmwaw/Module_libmwaw.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_Module_Module,libmwaw))
+
+ifeq ($(SYSTEM_MWAW),NO)
+
+$(eval $(call gb_Module_add_targets,libmwaw,\
+ ExternalPackage_libmwaw \
+ ExternalProject_libmwaw \
+ UnpackedTarball_mwaw \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/libmwaw/README b/libmwaw/README
new file mode 100644
index 0000000..c10d26b
--- /dev/null
+++ b/libmwaw/README
@@ -0,0 +1,3 @@
+Library parsing different document file formats used on old Mac OS.
+
+https://sourceforge.net/projects/libmwaw/
diff --git a/libmwaw/UnpackedTarball_mwaw.mk b/libmwaw/UnpackedTarball_mwaw.mk
new file mode 100644
index 0000000..f2adf66
--- /dev/null
+++ b/libmwaw/UnpackedTarball_mwaw.mk
@@ -0,0 +1,14 @@
+# -*- 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,mwaw))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,mwaw,$(MWAW_TARBALL)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/libmwaw/prj/build.lst b/libmwaw/prj/build.lst
new file mode 100644
index 0000000..dee0ac7
--- /dev/null
+++ b/libmwaw/prj/build.lst
@@ -0,0 +1,2 @@
+mwaw libmwaw : libwpd BOOST:boost ZLIB:zlib soltools NULL
+mwaw libmwaw\prj nmake - all mwaw_libmwaw NULL
--
To view, visit https://gerrit.libreoffice.org/2662
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I367dfa309a30a5b55de1d59e632d0dbcf5dc6dbb
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Fridrich Strba <fridrich@documentfoundation.org>
Context
- [PATCH] Creating a libmwaw module for library parsing variaous old M... · Fridrich Strba (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.