[Libreoffice-commits] core.git: external/libqxp

Miklos Vajna vmiklos at collabora.co.uk
Mon Aug 28 08:29:48 UTC 2017


 external/libqxp/UnpackedTarball_libqxp.mk  |    1 
 external/libqxp/android-workaround.patch.1 |   49 +++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)

New commits:
commit c6c6a7091f9f3fe18eb7deaff00d47ba27c295af
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Aug 28 10:24:47 2017 +0200

    libqxp: work around Android build
    
    Till we can't switch to a proper standard C++ library there.
    
    Change-Id: Ida62af07d9f843426d875f93c6795dc6cdecc303

diff --git a/external/libqxp/UnpackedTarball_libqxp.mk b/external/libqxp/UnpackedTarball_libqxp.mk
index 340fc9397964..028ae73a0e1b 100644
--- a/external/libqxp/UnpackedTarball_libqxp.mk
+++ b/external/libqxp/UnpackedTarball_libqxp.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libqxp, \
 	external/libqxp/0001-don-t-use-RVNGStringStream-in-the-main-lib.patch.1 \
 	external/libqxp/0001-add-missing-includes.patch.1 \
 	external/libqxp/0001-WaE-narrowing-conversion.patch.1 \
+	external/libqxp/android-workaround.patch.1 \
 ))
 
 # 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 000000000000..5c7529c20b79
--- /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


More information about the Libreoffice-commits mailing list