summaryrefslogtreecommitdiff
path: root/libmwaw
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-03-11 12:38:12 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-03-13 09:16:06 +0000
commit790a36d299f8470e07fc0af59960fccd637b31a6 (patch)
tree35464ddb0622eaced0364e6290da1fc461b4ebd4 /libmwaw
parent3ed31af5bbfdbd248d2c8fc483b8cacdf1da5251 (diff)
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@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'libmwaw')
-rw-r--r--libmwaw/ExternalPackage_libmwaw.mk27
-rw-r--r--libmwaw/ExternalProject_libmwaw.mk69
-rw-r--r--libmwaw/Makefile7
-rw-r--r--libmwaw/Module_libmwaw.mk22
-rw-r--r--libmwaw/README3
-rw-r--r--libmwaw/UnpackedTarball_mwaw.mk14
-rw-r--r--libmwaw/prj/build.lst2
7 files changed, 144 insertions, 0 deletions
diff --git a/libmwaw/ExternalPackage_libmwaw.mk b/libmwaw/ExternalPackage_libmwaw.mk
new file mode 100644
index 000000000000..b541498966b1
--- /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 000000000000..ddb9c4819677
--- /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 000000000000..ccb1c85a04da
--- /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 000000000000..c1a878b3dcdc
--- /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 000000000000..c10d26bb5b79
--- /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 000000000000..f2adf6614c47
--- /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 000000000000..dee0ac741449
--- /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