summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2014-01-13 17:01:32 +0100
committerTor Lillqvist <tml@collabora.com>2014-01-16 19:37:27 +0000
commit5a21b3ee198cefc1f4081ff4f99c1752c4bded8f (patch)
tree5acacd3c585f104fbb4944d5ba77cb9755c50789 /external
parent5bf6064e69f1903f0d7682965b59fb5a0acb0af2 (diff)
AbiWord Import filter
Reviewed-on: https://gerrit.libreoffice.org/7411 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> (cherry picked from commit 10eaaac020e32f0bbb3869cecee94df0955b6a3b) Conflicts: external/Module_external.mk writerperfect/util/wpftwriter.component Change-Id: I90dc115044e5f81fa3a2b105d30d7d39e438b086 Fix a silly with ABW footnotes/endnotes Change-Id: I026f9c664ff7dec51e511ad439ab563d2cc0c201 (cherry picked from commit 766f718ebb4deda1a294cc1cfe137a75dfb0f6f8) Fix ABW list shapes Change-Id: Ibbbfddf10677e8c5b654cee9c5fda1603a298a67 (cherry picked from commit f8bf3e3cd4b55099a1427d611af06a45460034e7) Fix ABW embedded images Change-Id: Ifd33ea9c1f91865d5ae5175eefa9b65107404bf0 (cherry picked from commit 7c3ca696543d0e9d6771d53f386086086d8b8643) Uploading libabw-0.0.1 (support of zabw files too) Change-Id: Ie04cae9b9a362cb43b671fe8986545865822a953 (cherry picked from commit 838c8889491b7e5b08f681b7f85740784c0c1a3b) Reviewed-on: https://gerrit.libreoffice.org/7478 Reviewed-by: David Tardon <dtardon@redhat.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Thorsten Behrens <thb@documentfoundation.org> Tested-by: Thorsten Behrens <thb@documentfoundation.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'external')
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/libabw/ExternalProject_libabw.mk44
-rw-r--r--external/libabw/Makefile7
-rw-r--r--external/libabw/Module_libabw.mk17
-rw-r--r--external/libabw/README3
-rw-r--r--external/libabw/UnpackedTarball_libabw.mk18
-rw-r--r--external/libabw/libabw-0.0.1-inttypes.patch.136
7 files changed, 126 insertions, 0 deletions
diff --git a/external/Module_external.mk b/external/Module_external.mk
index dcd5b0822271..2d64d5297bda 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
accessories \
libxmlsec \
np_sdk \
+ $(call gb_Helper_optional,ABW,libabw) \
$(call gb_Helper_optional,AFMS,afms) \
$(call gb_Helper_optional,APACHE_COMMONS,apache-commons) \
$(call gb_Helper_optional,BOOST,boost) \
diff --git a/external/libabw/ExternalProject_libabw.mk b/external/libabw/ExternalProject_libabw.mk
new file mode 100644
index 000000000000..d3b3b9f97caf
--- /dev/null
+++ b/external/libabw/ExternalProject_libabw.mk
@@ -0,0 +1,44 @@
+# -*- 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,libabw))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libabw,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libabw,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libabw,\
+ boost_headers \
+ libxml2 \
+ wpd \
+ zlib \
+))
+
+$(call gb_ExternalProject_get_state_target,libabw,build) :
+ $(call gb_ExternalProject_run,build,\
+ export PKG_CONFIG="" \
+ && ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --without-docs \
+ --disable-tools \
+ --disable-debug \
+ --disable-werror \
+ CXXFLAGS="$(if $(filter NO,$(SYSTEM_BOOST)),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side),$(BOOST_CPPFLAGS)) \
+ $(if $(filter NO,$(SYSTEM_LIBXML)),-I$(call gb_UnpackedTarball_get_dir,xml2)/include)" \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ && (cd $(EXTERNAL_WORKDIR)/src/lib && \
+ $(if $(VERBOSE)$(verbose),V=1) \
+ $(MAKE)) \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libabw/Makefile b/external/libabw/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libabw/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/libabw/Module_libabw.mk b/external/libabw/Module_libabw.mk
new file mode 100644
index 000000000000..0961506138cd
--- /dev/null
+++ b/external/libabw/Module_libabw.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,libabw))
+
+$(eval $(call gb_Module_add_targets,libabw,\
+ ExternalProject_libabw \
+ UnpackedTarball_libabw \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libabw/README b/external/libabw/README
new file mode 100644
index 000000000000..96432f43e923
--- /dev/null
+++ b/external/libabw/README
@@ -0,0 +1,3 @@
+AbiWord file word processor format import library from
+
+I couldn't find an upstream for this library - although I did only try a primitive Google search.
diff --git a/external/libabw/UnpackedTarball_libabw.mk b/external/libabw/UnpackedTarball_libabw.mk
new file mode 100644
index 000000000000..c61f2d55924b
--- /dev/null
+++ b/external/libabw/UnpackedTarball_libabw.mk
@@ -0,0 +1,18 @@
+# -*- 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,libabw))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libabw,$(ABW_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libabw,\
+ external/libabw/libabw-0.0.1-inttypes.patch.1 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libabw/libabw-0.0.1-inttypes.patch.1 b/external/libabw/libabw-0.0.1-inttypes.patch.1
new file mode 100644
index 000000000000..7c136900a694
--- /dev/null
+++ b/external/libabw/libabw-0.0.1-inttypes.patch.1
@@ -0,0 +1,36 @@
+diff --git a/src/lib/ABWStylesCollector.cpp b/src/lib/ABWStylesCollector.cpp
+index e422b6d..beb4cb9 100644
+--- a/src/lib/ABWStylesCollector.cpp
++++ b/src/lib/ABWStylesCollector.cpp
+@@ -49,10 +49,10 @@ enum ABWListType
+ NOT_A_LIST = 0xff
+ };
+
+-static int abw_unichar_to_utf8(uint32_t c, char *outbuf)
++static int abw_unichar_to_utf8(unsigned c, char *outbuf)
+ {
+- uint8_t len = 1;
+- uint8_t first = 0;
++ unsigned char len = 1;
++ unsigned char first = 0;
+
+ if (c < 0x80)
+ {
+@@ -87,7 +87,7 @@ static int abw_unichar_to_utf8(uint32_t c, char *outbuf)
+
+ if (outbuf)
+ {
+- for (uint8_t i = (uint8_t)(len - 1); i > 0; --i)
++ for (unsigned char i = (unsigned char)(len - 1); i > 0; --i)
+ {
+ outbuf[i] = (char)((c & 0x3f) | 0x80);
+ c >>= 6;
+@@ -98,7 +98,7 @@ static int abw_unichar_to_utf8(uint32_t c, char *outbuf)
+ return len;
+ }
+
+-static void appendUCS4(WPXString &str, uint32_t ucs4)
++static void appendUCS4(WPXString &str, unsigned ucs4)
+ {
+ int charLength = abw_unichar_to_utf8(ucs4, 0);
+ char *utf8 = new char[charLength+1];