-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
792 additions
and
0 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
tur-on-device/libreoffice-still/0001-configure-error-and-disable-isystem.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
From 8f05899b0b9ee8817ceec610589341a8b9cb3a4d Mon Sep 17 00:00:00 2001 | ||
From: Ronald Y <[email protected]> | ||
Date: Sun, 22 Sep 2024 09:21:18 +0800 | ||
Subject: [PATCH 1/8] configure-error-and-disable-isystem | ||
|
||
Change-Id: I70125356c9306f442fd5c2ec8343b55019cd118b | ||
--- | ||
configure.ac | 27 ++++----------------------- | ||
1 file changed, 4 insertions(+), 23 deletions(-) | ||
|
||
diff --git a/configure.ac b/configure.ac | ||
index d31963fce..5bda2889d 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -4058,26 +4058,7 @@ AC_SUBST(ENABLE_WASM_STRIP) | ||
AC_SUBST(ENABLE_WASM_STRIP_WRITER) | ||
AC_SUBST(ENABLE_WASM_STRIP_CALC) | ||
|
||
-# Use -isystem (gcc) if possible, to avoid warnings in 3rd party headers. | ||
-# NOTE: must _not_ be used for bundled external libraries! | ||
-ISYSTEM= | ||
-if test "$GCC" = "yes"; then | ||
- AC_MSG_CHECKING( for -isystem ) | ||
- save_CFLAGS=$CFLAGS | ||
- CFLAGS="$CFLAGS -isystem /usr/include -Werror" | ||
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ ISYSTEM="-isystem " ],[]) | ||
- CFLAGS=$save_CFLAGS | ||
- if test -n "$ISYSTEM"; then | ||
- AC_MSG_RESULT(yes) | ||
- else | ||
- AC_MSG_RESULT(no) | ||
- fi | ||
-fi | ||
-if test -z "$ISYSTEM"; then | ||
- # fall back to using -I | ||
- ISYSTEM=-I | ||
-fi | ||
-AC_SUBST(ISYSTEM) | ||
+ISYSTEM=-I | ||
|
||
dnl =================================================================== | ||
dnl Check which Visual Studio compiler is used | ||
@@ -11304,7 +11285,7 @@ else | ||
save_CXXFLAGS=$CXXFLAGS | ||
save_IFS=$IFS | ||
IFS=$P_SEP | ||
- for i in $CPLUS_INCLUDE_PATH /usr/include; do | ||
+ for i in $CPLUS_INCLUDE_PATH /data/data/com.termux/files/usr/include; do | ||
dnl Reset IFS as soon as possible, to avoid unexpected side effects (and the | ||
dnl "/usr/include" fallback makes sure we get here at least once; resetting rather than | ||
dnl unsetting follows the advice at <https://git.savannah.gnu.org/gitweb/?p=autoconf.git; | ||
@@ -12735,7 +12716,7 @@ elif test \( \( "$_os" = "Linux" -o "$_os" = "Darwin" \) -a "$ENABLE_NSS" = TRUE | ||
SYSTEM_GPGMEPP=TRUE | ||
|
||
# C++ library doesn't come with fancy gpgmepp-config, check for headers the old-fashioned way | ||
- AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ], | ||
+ AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/data/data/com.termux/files/usr/include/gpgme++ ], | ||
[AC_MSG_ERROR([gpgmepp headers not found, install gpgmepp >= 1.14 development package])], []) | ||
AC_CHECK_HEADER(gpgme.h, [], | ||
[AC_MSG_ERROR([gpgme headers not found, install gpgme development package])], []) | ||
@@ -15065,7 +15046,7 @@ AC_SUBST(PERL) | ||
if test -n "$TMPDIR"; then | ||
TEMP_DIRECTORY="$TMPDIR" | ||
else | ||
- TEMP_DIRECTORY="/tmp" | ||
+ TEMP_DIRECTORY="/data/data/com.termux/files/usr/tmp" | ||
fi | ||
CYGWIN_BASH="C:/cygwin64/bin/bash.exe" | ||
if test "$build_os" = "cygwin"; then | ||
-- | ||
2.46.1 | ||
|
23 changes: 23 additions & 0 deletions
23
tur-on-device/libreoffice-still/0002-fix-shebang-for-ondevice.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
From 72e2caaba9acf182f6e7807d06b3344a03c39845 Mon Sep 17 00:00:00 2001 | ||
From: Ronald Y <[email protected]> | ||
Date: Sun, 22 Sep 2024 09:24:40 +0800 | ||
Subject: [PATCH 2/8] fix-shebang-for-ondevice | ||
|
||
Change-Id: I272c11cb236cfa7cac305b449cd64b82d7e8f0f2 | ||
--- | ||
solenv/bin/install-gdb-printers | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/solenv/bin/install-gdb-printers b/solenv/bin/install-gdb-printers | ||
index 3eae4d9ef..2db5b9953 100755 | ||
--- a/solenv/bin/install-gdb-printers | ||
+++ b/solenv/bin/install-gdb-printers | ||
@@ -1,4 +1,4 @@ | ||
-#!/usr/bin/env bash | ||
+#!/data/data/com.termux/files/usr/bin/env bash | ||
# | ||
# This file is part of the LibreOffice project. | ||
# | ||
-- | ||
2.46.1 | ||
|
30 changes: 30 additions & 0 deletions
30
tur-on-device/libreoffice-still/0003-no-static_cast-__fsword_t.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 2166ab3cc0c5c0f9130b440bef3c0b7e75a64f49 Mon Sep 17 00:00:00 2001 | ||
From: Ronald Y <[email protected]> | ||
Date: Sun, 22 Sep 2024 09:25:14 +0800 | ||
Subject: [PATCH 3/8] no-static_cast-__fsword_t | ||
|
||
Change-Id: I61efb86c0aeda762acd7d32d9a5bd770a682ab5a | ||
--- | ||
sal/osl/unx/file.cxx | 6 +++--- | ||
1 file changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx | ||
index ee7412dd1..0ca882201 100644 | ||
--- a/sal/osl/unx/file.cxx | ||
+++ b/sal/osl/unx/file.cxx | ||
@@ -67,9 +67,9 @@ | ||
#ifdef LINUX | ||
#include <sys/vfs.h> | ||
// As documented by the kernel | ||
-#define SMB_SUPER_MAGIC static_cast<__fsword_t>(0x517B) | ||
-#define CIFS_SUPER_MAGIC static_cast<__fsword_t>(0xFF534D42) | ||
-#define SMB2_SUPER_MAGIC static_cast<__fsword_t>(0xFE534D42) | ||
+#define SMB_SUPER_MAGIC 0x517B | ||
+#define CIFS_SUPER_MAGIC 0xFF534D42 | ||
+#define SMB2_SUPER_MAGIC 0xFE534D42 | ||
#endif | ||
|
||
namespace { | ||
-- | ||
2.46.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 99384fd9126b6408bd9ef30f8fbe524e13c85d13 Mon Sep 17 00:00:00 2001 | ||
From: Ronald Y <[email protected]> | ||
Date: Sun, 22 Sep 2024 09:25:48 +0800 | ||
Subject: [PATCH 4/8] no-lcpaper | ||
|
||
Change-Id: I23f35718a2fe6e1d2f27b552149a3eaca78b5e57 | ||
--- | ||
i18nutil/source/utility/paper.cxx | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx | ||
index 399b3295e..745c22a3a 100644 | ||
--- a/i18nutil/source/utility/paper.cxx | ||
+++ b/i18nutil/source/utility/paper.cxx | ||
@@ -310,7 +310,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper() | ||
#endif | ||
|
||
// _NL_PAPER_WIDTH / HEIGHT not available with android unified headers | ||
-#if defined(LC_PAPER) && defined(_GNU_SOURCE) && !defined(ANDROID) | ||
+#if defined(LC_PAPER) && defined(_GNU_SOURCE) && !defined(__ANDROID__) | ||
// try LC_PAPER | ||
locale_t loc = newlocale(LC_PAPER_MASK, "", static_cast<locale_t>(0)); | ||
if (loc != static_cast<locale_t>(0)) | ||
-- | ||
2.46.1 | ||
|
186 changes: 186 additions & 0 deletions
186
tur-on-device/libreoffice-still/0005-apply-some-android-specific-patch.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
From 62c87df518bb297c44a9fc66ad26a81a7b85057c Mon Sep 17 00:00:00 2001 | ||
From: Ronald Y <[email protected]> | ||
Date: Sun, 22 Sep 2024 09:27:21 +0800 | ||
Subject: [PATCH 5/8] apply some android-specific patch | ||
|
||
Change-Id: I4be7216701e300369a2ccde7b57fe0966d0645b5 | ||
--- | ||
.../cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx | 2 +- | ||
bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx | 2 +- | ||
bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx | 4 ++-- | ||
bridges/source/cpp_uno/gcc3_linux_arm/except.cxx | 10 +++++----- | ||
bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx | 8 ++++---- | ||
desktop/source/app/app.cxx | 6 +++--- | ||
6 files changed, 16 insertions(+), 16 deletions(-) | ||
|
||
diff --git a/bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx b/bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx | ||
index b944f31cf..84cf10fa4 100644 | ||
--- a/bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx | ||
+++ b/bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx | ||
@@ -55,7 +55,7 @@ void callVirtualFunction( | ||
"m" (stackargs) // dummy input to prevent optimizing the alloca away | ||
: "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", | ||
"r11", "r12", "r13", "r14", "r15", "r16", "r17", | ||
-#if !defined ANDROID && !defined MACOSX | ||
+#if !defined __ANDROID__ && !defined MACOSX | ||
"r18"/*TODO?*/, | ||
#endif | ||
"v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", "v10", "v11", | ||
diff --git a/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx | ||
index 669c4443c..bb3c2fcbd 100644 | ||
--- a/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx | ||
+++ b/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx | ||
@@ -583,7 +583,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( | ||
void bridges::cpp_uno::shared::VtableFactory::flushCode( | ||
unsigned char const * begin, unsigned char const * end) | ||
{ | ||
-#if !defined ANDROID && !defined MACOSX | ||
+#if !defined __ANDROID__ && !defined MACOSX | ||
static void (*clear_cache)(unsigned char const *, unsigned char const *) | ||
= (void (*)(unsigned char const *, unsigned char const *)) dlsym( | ||
RTLD_DEFAULT, "__clear_cache"); | ||
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx | ||
index f476cf7df..37636b0d2 100644 | ||
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx | ||
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx | ||
@@ -38,7 +38,7 @@ | ||
|
||
#include <dlfcn.h> | ||
|
||
-#ifdef ANDROID | ||
+#ifdef __ANDROID__ | ||
#include <unistd.h> | ||
#endif | ||
|
||
@@ -580,7 +580,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( | ||
void bridges::cpp_uno::shared::VtableFactory::flushCode( | ||
unsigned char const *beg, unsigned char const *end) | ||
{ | ||
-#ifndef ANDROID | ||
+#ifndef __ANDROID__ | ||
static void (*clear_cache)(unsigned char const*, unsigned char const*) | ||
= reinterpret_cast<void (*)(unsigned char const*, unsigned char const*)> | ||
(dlsym(RTLD_DEFAULT, "__clear_cache")); | ||
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx | ||
index 14bffa75a..8a6dfe6d5 100644 | ||
--- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx | ||
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx | ||
@@ -94,7 +94,7 @@ namespace { | ||
t_rtti_map m_rttis; | ||
t_rtti_map m_generatedRttis; | ||
|
||
-#ifndef ANDROID | ||
+#ifndef __ANDROID__ | ||
void * m_hApp; | ||
#endif | ||
|
||
@@ -107,7 +107,7 @@ namespace { | ||
} | ||
|
||
RTTI::RTTI() | ||
-#ifndef ANDROID | ||
+#ifndef __ANDROID__ | ||
: m_hApp( dlopen( nullptr, RTLD_LAZY ) ) | ||
#endif | ||
{ | ||
@@ -115,7 +115,7 @@ namespace { | ||
|
||
RTTI::~RTTI() | ||
{ | ||
-#ifndef ANDROID | ||
+#ifndef __ANDROID__ | ||
dlclose( m_hApp ); | ||
#endif | ||
} | ||
@@ -146,7 +146,7 @@ namespace { | ||
buf.append( 'E' ); | ||
|
||
OString symName( buf.makeStringAndClear() ); | ||
-#ifndef ANDROID | ||
+#ifndef __ANDROID__ | ||
rtti = static_cast<type_info *>(dlsym( m_hApp, symName.getStr() )); | ||
#else | ||
rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() ); | ||
@@ -170,7 +170,7 @@ namespace { | ||
// symbol and rtti-name is nearly identical, | ||
// the symbol is prefixed with _ZTI | ||
|
||
-#ifdef ANDROID | ||
+#ifdef __ANDROID__ | ||
// This code is supposed to be used only used for | ||
// inter-process UNO, says sberg. Thus it should | ||
// be unnecessary and never reached for | ||
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx | ||
index 9bce77bc8..a5bfc5b0e 100644 | ||
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx | ||
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx | ||
@@ -78,7 +78,7 @@ class RTTI | ||
std::vector<OString> m_rttiNames; | ||
std::unordered_map<OUString, std::unique_ptr<Generated>> m_generatedRttis; | ||
|
||
-#if !defined ANDROID | ||
+#if !defined __ANDROID__ | ||
void * m_hApp; | ||
#endif | ||
|
||
@@ -90,7 +90,7 @@ public: | ||
}; | ||
|
||
RTTI::RTTI() | ||
-#if !defined ANDROID | ||
+#if !defined __ANDROID__ | ||
: m_hApp( dlopen( nullptr, RTLD_LAZY ) ) | ||
#endif | ||
{ | ||
@@ -98,7 +98,7 @@ RTTI::RTTI() | ||
|
||
RTTI::~RTTI() | ||
{ | ||
-#if !defined ANDROID | ||
+#if !defined __ANDROID__ | ||
dlclose( m_hApp ); | ||
#endif | ||
} | ||
@@ -128,7 +128,7 @@ std::type_info * RTTI::getRTTI(typelib_TypeDescription const & pTypeDescr) | ||
buf.append( 'E' ); | ||
|
||
OString symName( buf.makeStringAndClear() ); | ||
-#if !defined ANDROID | ||
+#if !defined __ANDROID__ | ||
rtti = static_cast<std::type_info *>(dlsym( m_hApp, symName.getStr() )); | ||
#else | ||
rtti = static_cast<std::type_info *>(dlsym( RTLD_DEFAULT, symName.getStr() )); | ||
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx | ||
index 0d66a48da..82160e1a7 100644 | ||
--- a/desktop/source/app/app.cxx | ||
+++ b/desktop/source/app/app.cxx | ||
@@ -505,7 +505,7 @@ void Desktop::Init() | ||
RequestHandler::Status aStatus = RequestHandler::Enable(true); | ||
if ( aStatus == RequestHandler::IPC_STATUS_PIPE_ERROR ) | ||
{ | ||
-#if defined(ANDROID) || defined(EMSCRIPTEN) | ||
+#if defined(__ANDROID__) || defined(EMSCRIPTEN) | ||
// Ignore crack pipe errors on Android | ||
#else | ||
// Keep using this oddly named BE_PATHINFO_MISSING value | ||
@@ -917,7 +917,7 @@ void handleCrashReport() | ||
} | ||
#endif | ||
|
||
-#if !defined ANDROID | ||
+#if !defined __ANDROID__ | ||
void handleSafeMode() | ||
{ | ||
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); | ||
@@ -1973,7 +1973,7 @@ void Desktop::OpenClients() | ||
// need some time, where the user won't see any results and wait for finishing the office startup... | ||
bool bAllowRecoveryAndSessionManagement = ( !rArgs.IsNoRestore() ) && ( !rArgs.IsHeadless() ); | ||
|
||
-#if !defined ANDROID | ||
+#if !defined __ANDROID__ | ||
// Enter safe mode if requested | ||
if (Application::IsSafeModeEnabled()) { | ||
handleSafeMode(); | ||
-- | ||
2.46.1 | ||
|
Oops, something went wrong.