diff options
Diffstat (limited to 'external/libqxp')
-rw-r--r-- | external/libqxp/ExternalProject_libqxp.mk | 48 | ||||
-rw-r--r-- | external/libqxp/Makefile | 7 | ||||
-rw-r--r-- | external/libqxp/Module_libqxp.mk | 17 | ||||
-rw-r--r-- | external/libqxp/README | 4 | ||||
-rw-r--r-- | external/libqxp/UnpackedTarball_libqxp.mk | 23 | ||||
-rw-r--r-- | external/libqxp/android-workaround.patch.1 | 49 | ||||
-rw-r--r-- | external/libqxp/ax_gcc_func_attribute.m4.patch | 11 |
7 files changed, 159 insertions, 0 deletions
diff --git a/external/libqxp/ExternalProject_libqxp.mk b/external/libqxp/ExternalProject_libqxp.mk new file mode 100644 index 0000000000..fea48ffc4b --- /dev/null +++ b/external/libqxp/ExternalProject_libqxp.mk @@ -0,0 +1,48 @@ +# -*- 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,libqxp)) + +$(eval $(call gb_ExternalProject_use_autoconf,libqxp,build)) + +$(eval $(call gb_ExternalProject_register_targets,libqxp,\ + build \ +)) + +$(eval $(call gb_ExternalProject_use_externals,libqxp,\ + boost_headers \ + icu \ + revenge \ +)) + +$(call gb_ExternalProject_get_state_target,libqxp,build) : + $(call gb_Trace_StartRange,libqxp,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + export PKG_CONFIG="" \ + && MAKE=$(MAKE) $(gb_RUN_CONFIGURE) ./configure \ + --with-pic \ + --enable-static \ + --disable-shared \ + --without-docs \ + --disable-tests \ + --disable-tools \ + --disable-debug \ + --disable-werror \ + --disable-weffc \ + $(if $(gb_FULLDEPS),,--disable-dependency-tracking) \ + $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(gb_CXXFLAGS) $(call gb_ExternalProject_get_build_flags,libqxp)" \ + CPPFLAGS="$(CPPFLAGS) $(BOOST_CPPFLAGS)" \ + LDFLAGS="$(call gb_ExternalProject_get_link_flags,libqxp)" \ + $(gb_CONFIGURE_PLATFORMS) \ + && $(MAKE) \ + ) + $(call gb_Trace_EndRange,libqxp,EXTERNAL) + +# vim: set noet sw=4 ts=4: diff --git a/external/libqxp/Makefile b/external/libqxp/Makefile new file mode 100644 index 0000000000..e4968cf85f --- /dev/null +++ b/external/libqxp/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/libqxp/Module_libqxp.mk b/external/libqxp/Module_libqxp.mk new file mode 100644 index 0000000000..8359683da2 --- /dev/null +++ b/external/libqxp/Module_libqxp.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,libqxp)) + +$(eval $(call gb_Module_add_targets,libqxp,\ + ExternalProject_libqxp \ + UnpackedTarball_libqxp \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libqxp/README b/external/libqxp/README new file mode 100644 index 0000000000..6f13b86fed --- /dev/null +++ b/external/libqxp/README @@ -0,0 +1,4 @@ +libqxp is a library and a set of tools for reading and converting +QuarkXPress file format. It supports versions 3.1-4.1 currently. + +[https://wiki.documentfoundation.org/DLP/Libraries/libqxp] diff --git a/external/libqxp/UnpackedTarball_libqxp.mk b/external/libqxp/UnpackedTarball_libqxp.mk new file mode 100644 index 0000000000..9f111bcb2b --- /dev/null +++ b/external/libqxp/UnpackedTarball_libqxp.mk @@ -0,0 +1,23 @@ +# -*- 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,libqxp)) + +$(eval $(call gb_UnpackedTarball_set_tarball,libqxp,$(QXP_TARBALL))) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libqxp)) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,libqxp,0)) + +$(eval $(call gb_UnpackedTarball_add_patches,libqxp, \ + external/libqxp/android-workaround.patch.1 \ + external/libcdr/ax_gcc_func_attribute.m4.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libqxp/android-workaround.patch.1 b/external/libqxp/android-workaround.patch.1 new file mode 100644 index 0000000000..5c7529c20b --- /dev/null +++ b/external/libqxp/android-workaround.patch.1 @@ -0,0 +1,49 @@ +--- libqxp.orig/src/lib/QXP4Parser.cpp 2017-08-28 10:12:26.009868397 +0200 ++++ libqxp/src/lib/QXP4Parser.cpp 2017-08-28 10:12:39.577681705 +0200 +@@ -16,6 +16,7 @@ + #include "QXP4Header.h" + #include "QXPCollector.h" + #include "QXPMemoryStream.h" ++#include "android-compat.h" + + namespace libqxp + { +--- libqxp.orig/src/lib/QXPParser.cpp 2017-08-28 10:11:14.074858068 +0200 ++++ libqxp/src/lib/QXPParser.cpp 2017-08-28 10:18:04.849203430 +0200 +@@ -14,6 +14,7 @@ + + #include <cmath> + #include <memory> ++#include "android-compat.h" + + namespace libqxp + { +--- libqxp.orig/src/lib/QXPTypes.cpp 2017-08-26 08:38:40.000000000 +0200 ++++ libqxp/src/lib/QXPTypes.cpp 2017-08-28 10:18:37.784749714 +0200 +@@ -11,6 +11,7 @@ + + #include <boost/math/constants/constants.hpp> + #include <cmath> ++#include "android-compat.h" + + namespace libqxp + { +--- libqxp.orig/src/lib/android-compat.h 1970-01-01 01:00:00.000000000 +0100 ++++ libqxp/src/lib/android-compat.h 2017-08-28 10:21:36.766283262 +0200 +@@ -0,0 +1,16 @@ ++#if defined(__ANDROID__) ++namespace std ++{ ++template<typename T> ++T round(T x) ++{ ++ return ::round(x); ++} ++ ++template<typename T> ++T hypot(T x, T y) ++{ ++ return ::hypot(x, y); ++} ++} ++#endif diff --git a/external/libqxp/ax_gcc_func_attribute.m4.patch b/external/libqxp/ax_gcc_func_attribute.m4.patch new file mode 100644 index 0000000000..8f7457816e --- /dev/null +++ b/external/libqxp/ax_gcc_func_attribute.m4.patch @@ -0,0 +1,11 @@ +--- configure ++++ configure +@@ -18136,7 +18136,7 @@ + + _ACEOF + if ac_fn_cxx_try_link "$LINENO"; then : +- if test -s conftest.err; then : ++ if grep -- -Wattributes conftest.err; then : + ax_cv_have_func_attribute_visibility=no + else + ax_cv_have_func_attribute_visibility=yes |