[Libreoffice-commits] core.git: config_host.mk.in configure.ac download.lst libmwaw/ExternalPackage_libmwaw.mk libmwaw/ExternalProject_libmwaw.mk libmwaw/Makefile libmwaw/Module_libmwaw.mk libmwaw/prj libmwaw/README libmwaw/UnpackedTarball_mwaw.mk Makefile.fetch RepositoryExternal.mk RepositoryModule_host.mk
Fridrich Å trba
fridrich.strba at bluewin.ch
Wed Mar 13 02:16:28 PDT 2013
Makefile.fetch | 1
RepositoryExternal.mk | 30 ++++++++++++++++
RepositoryModule_host.mk | 1
config_host.mk.in | 3 +
configure.ac | 8 ++++
download.lst | 2 +
libmwaw/ExternalPackage_libmwaw.mk | 27 ++++++++++++++
libmwaw/ExternalProject_libmwaw.mk | 69 +++++++++++++++++++++++++++++++++++++
libmwaw/Makefile | 7 +++
libmwaw/Module_libmwaw.mk | 22 +++++++++++
libmwaw/README | 3 +
libmwaw/UnpackedTarball_mwaw.mk | 14 +++++++
libmwaw/prj/build.lst | 2 +
13 files changed, 189 insertions(+)
New commits:
commit 790a36d299f8470e07fc0af59960fccd637b31a6
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Mar 11 12:38:12 2013 +0100
Creating a libmwaw module for library parsing various old Mac file-formats
Change-Id: I367dfa309a30a5b55de1d59e632d0dbcf5dc6dbb
Reviewed-on: https://gerrit.libreoffice.org/2662
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/Makefile.fetch b/Makefile.fetch
index edcad4a..bfc882d 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -76,6 +76,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(foreach item, \
$(call fetch_Optional,CDR,CDR_TARBALL) \
$(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
+ $(call fetch_Optional,MWAW,MWAW_TARBALL) \
$(call fetch_Optional,VISIO,VISIO_TARBALL) \
,$(call fetch_Download_item_special,http://dev-www.libreoffice.org/src,$(item)))
$(foreach item, \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 06edb7d..68d4679 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1420,6 +1420,36 @@ endef
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 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
$(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 d73d380..496097c 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -398,6 +398,8 @@ export MSVC_DLLS=@MSVC_DLLS@
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@
@@ -530,6 +532,7 @@ export SYSTEM_LIBEXTTEXTCAT=@SYSTEM_LIBEXTTEXTCAT@
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 5a201f5..a081bf9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7047,6 +7047,14 @@ if test $_os != iOS; then
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 75d1123..19e12c1 100644
--- a/download.lst
+++ b/download.lst
@@ -2,6 +2,8 @@ CDR_MD5SUM := 107a3d18f637b342684b3c21eb0fcd7d
export CDR_TARBALL := libcdr-0.0.11.tar.bz2
MSPUB_MD5SUM := 881c4628ec5f54d47f35d5d19e335662
export MSPUB_TARBALL := libmspub-0.0.5.tar.bz2
+MWAW_MD5SUM := 7c08542921466eee797e0be23e9535b3
+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
More information about the Libreoffice-commits
mailing list