Skip to content

Commit dc6846a

Browse files
committed
new package: libreoffice-still
1 parent 7b2f66c commit dc6846a

9 files changed

+792
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
From 8f05899b0b9ee8817ceec610589341a8b9cb3a4d Mon Sep 17 00:00:00 2001
2+
From: Ronald Y <[email protected]>
3+
Date: Sun, 22 Sep 2024 09:21:18 +0800
4+
Subject: [PATCH 1/8] configure-error-and-disable-isystem
5+
6+
Change-Id: I70125356c9306f442fd5c2ec8343b55019cd118b
7+
---
8+
configure.ac | 27 ++++-----------------------
9+
1 file changed, 4 insertions(+), 23 deletions(-)
10+
11+
diff --git a/configure.ac b/configure.ac
12+
index d31963fce..5bda2889d 100644
13+
--- a/configure.ac
14+
+++ b/configure.ac
15+
@@ -4058,26 +4058,7 @@ AC_SUBST(ENABLE_WASM_STRIP)
16+
AC_SUBST(ENABLE_WASM_STRIP_WRITER)
17+
AC_SUBST(ENABLE_WASM_STRIP_CALC)
18+
19+
-# Use -isystem (gcc) if possible, to avoid warnings in 3rd party headers.
20+
-# NOTE: must _not_ be used for bundled external libraries!
21+
-ISYSTEM=
22+
-if test "$GCC" = "yes"; then
23+
- AC_MSG_CHECKING( for -isystem )
24+
- save_CFLAGS=$CFLAGS
25+
- CFLAGS="$CFLAGS -isystem /usr/include -Werror"
26+
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ ISYSTEM="-isystem " ],[])
27+
- CFLAGS=$save_CFLAGS
28+
- if test -n "$ISYSTEM"; then
29+
- AC_MSG_RESULT(yes)
30+
- else
31+
- AC_MSG_RESULT(no)
32+
- fi
33+
-fi
34+
-if test -z "$ISYSTEM"; then
35+
- # fall back to using -I
36+
- ISYSTEM=-I
37+
-fi
38+
-AC_SUBST(ISYSTEM)
39+
+ISYSTEM=-I
40+
41+
dnl ===================================================================
42+
dnl Check which Visual Studio compiler is used
43+
@@ -11304,7 +11285,7 @@ else
44+
save_CXXFLAGS=$CXXFLAGS
45+
save_IFS=$IFS
46+
IFS=$P_SEP
47+
- for i in $CPLUS_INCLUDE_PATH /usr/include; do
48+
+ for i in $CPLUS_INCLUDE_PATH /data/data/com.termux/files/usr/include; do
49+
dnl Reset IFS as soon as possible, to avoid unexpected side effects (and the
50+
dnl "/usr/include" fallback makes sure we get here at least once; resetting rather than
51+
dnl unsetting follows the advice at <https://git.savannah.gnu.org/gitweb/?p=autoconf.git;
52+
@@ -12735,7 +12716,7 @@ elif test \( \( "$_os" = "Linux" -o "$_os" = "Darwin" \) -a "$ENABLE_NSS" = TRUE
53+
SYSTEM_GPGMEPP=TRUE
54+
55+
# C++ library doesn't come with fancy gpgmepp-config, check for headers the old-fashioned way
56+
- AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ],
57+
+ AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/data/data/com.termux/files/usr/include/gpgme++ ],
58+
[AC_MSG_ERROR([gpgmepp headers not found, install gpgmepp >= 1.14 development package])], [])
59+
AC_CHECK_HEADER(gpgme.h, [],
60+
[AC_MSG_ERROR([gpgme headers not found, install gpgme development package])], [])
61+
@@ -15065,7 +15046,7 @@ AC_SUBST(PERL)
62+
if test -n "$TMPDIR"; then
63+
TEMP_DIRECTORY="$TMPDIR"
64+
else
65+
- TEMP_DIRECTORY="/tmp"
66+
+ TEMP_DIRECTORY="/data/data/com.termux/files/usr/tmp"
67+
fi
68+
CYGWIN_BASH="C:/cygwin64/bin/bash.exe"
69+
if test "$build_os" = "cygwin"; then
70+
--
71+
2.46.1
72+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
From 72e2caaba9acf182f6e7807d06b3344a03c39845 Mon Sep 17 00:00:00 2001
2+
From: Ronald Y <[email protected]>
3+
Date: Sun, 22 Sep 2024 09:24:40 +0800
4+
Subject: [PATCH 2/8] fix-shebang-for-ondevice
5+
6+
Change-Id: I272c11cb236cfa7cac305b449cd64b82d7e8f0f2
7+
---
8+
solenv/bin/install-gdb-printers | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/solenv/bin/install-gdb-printers b/solenv/bin/install-gdb-printers
12+
index 3eae4d9ef..2db5b9953 100755
13+
--- a/solenv/bin/install-gdb-printers
14+
+++ b/solenv/bin/install-gdb-printers
15+
@@ -1,4 +1,4 @@
16+
-#!/usr/bin/env bash
17+
+#!/data/data/com.termux/files/usr/bin/env bash
18+
#
19+
# This file is part of the LibreOffice project.
20+
#
21+
--
22+
2.46.1
23+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 2166ab3cc0c5c0f9130b440bef3c0b7e75a64f49 Mon Sep 17 00:00:00 2001
2+
From: Ronald Y <[email protected]>
3+
Date: Sun, 22 Sep 2024 09:25:14 +0800
4+
Subject: [PATCH 3/8] no-static_cast-__fsword_t
5+
6+
Change-Id: I61efb86c0aeda762acd7d32d9a5bd770a682ab5a
7+
---
8+
sal/osl/unx/file.cxx | 6 +++---
9+
1 file changed, 3 insertions(+), 3 deletions(-)
10+
11+
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
12+
index ee7412dd1..0ca882201 100644
13+
--- a/sal/osl/unx/file.cxx
14+
+++ b/sal/osl/unx/file.cxx
15+
@@ -67,9 +67,9 @@
16+
#ifdef LINUX
17+
#include <sys/vfs.h>
18+
// As documented by the kernel
19+
-#define SMB_SUPER_MAGIC static_cast<__fsword_t>(0x517B)
20+
-#define CIFS_SUPER_MAGIC static_cast<__fsword_t>(0xFF534D42)
21+
-#define SMB2_SUPER_MAGIC static_cast<__fsword_t>(0xFE534D42)
22+
+#define SMB_SUPER_MAGIC 0x517B
23+
+#define CIFS_SUPER_MAGIC 0xFF534D42
24+
+#define SMB2_SUPER_MAGIC 0xFE534D42
25+
#endif
26+
27+
namespace {
28+
--
29+
2.46.1
30+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 99384fd9126b6408bd9ef30f8fbe524e13c85d13 Mon Sep 17 00:00:00 2001
2+
From: Ronald Y <[email protected]>
3+
Date: Sun, 22 Sep 2024 09:25:48 +0800
4+
Subject: [PATCH 4/8] no-lcpaper
5+
6+
Change-Id: I23f35718a2fe6e1d2f27b552149a3eaca78b5e57
7+
---
8+
i18nutil/source/utility/paper.cxx | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
12+
index 399b3295e..745c22a3a 100644
13+
--- a/i18nutil/source/utility/paper.cxx
14+
+++ b/i18nutil/source/utility/paper.cxx
15+
@@ -310,7 +310,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
16+
#endif
17+
18+
// _NL_PAPER_WIDTH / HEIGHT not available with android unified headers
19+
-#if defined(LC_PAPER) && defined(_GNU_SOURCE) && !defined(ANDROID)
20+
+#if defined(LC_PAPER) && defined(_GNU_SOURCE) && !defined(__ANDROID__)
21+
// try LC_PAPER
22+
locale_t loc = newlocale(LC_PAPER_MASK, "", static_cast<locale_t>(0));
23+
if (loc != static_cast<locale_t>(0))
24+
--
25+
2.46.1
26+
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
From 62c87df518bb297c44a9fc66ad26a81a7b85057c Mon Sep 17 00:00:00 2001
2+
From: Ronald Y <[email protected]>
3+
Date: Sun, 22 Sep 2024 09:27:21 +0800
4+
Subject: [PATCH 5/8] apply some android-specific patch
5+
6+
Change-Id: I4be7216701e300369a2ccde7b57fe0966d0645b5
7+
---
8+
.../cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx | 2 +-
9+
bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx | 2 +-
10+
bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx | 4 ++--
11+
bridges/source/cpp_uno/gcc3_linux_arm/except.cxx | 10 +++++-----
12+
bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx | 8 ++++----
13+
desktop/source/app/app.cxx | 6 +++---
14+
6 files changed, 16 insertions(+), 16 deletions(-)
15+
16+
diff --git a/bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx b/bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx
17+
index b944f31cf..84cf10fa4 100644
18+
--- a/bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx
19+
+++ b/bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx
20+
@@ -55,7 +55,7 @@ void callVirtualFunction(
21+
"m" (stackargs) // dummy input to prevent optimizing the alloca away
22+
: "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
23+
"r11", "r12", "r13", "r14", "r15", "r16", "r17",
24+
-#if !defined ANDROID && !defined MACOSX
25+
+#if !defined __ANDROID__ && !defined MACOSX
26+
"r18"/*TODO?*/,
27+
#endif
28+
"v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", "v10", "v11",
29+
diff --git a/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
30+
index 669c4443c..bb3c2fcbd 100644
31+
--- a/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
32+
+++ b/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
33+
@@ -583,7 +583,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
34+
void bridges::cpp_uno::shared::VtableFactory::flushCode(
35+
unsigned char const * begin, unsigned char const * end)
36+
{
37+
-#if !defined ANDROID && !defined MACOSX
38+
+#if !defined __ANDROID__ && !defined MACOSX
39+
static void (*clear_cache)(unsigned char const *, unsigned char const *)
40+
= (void (*)(unsigned char const *, unsigned char const *)) dlsym(
41+
RTLD_DEFAULT, "__clear_cache");
42+
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
43+
index f476cf7df..37636b0d2 100644
44+
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
45+
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
46+
@@ -38,7 +38,7 @@
47+
48+
#include <dlfcn.h>
49+
50+
-#ifdef ANDROID
51+
+#ifdef __ANDROID__
52+
#include <unistd.h>
53+
#endif
54+
55+
@@ -580,7 +580,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
56+
void bridges::cpp_uno::shared::VtableFactory::flushCode(
57+
unsigned char const *beg, unsigned char const *end)
58+
{
59+
-#ifndef ANDROID
60+
+#ifndef __ANDROID__
61+
static void (*clear_cache)(unsigned char const*, unsigned char const*)
62+
= reinterpret_cast<void (*)(unsigned char const*, unsigned char const*)>
63+
(dlsym(RTLD_DEFAULT, "__clear_cache"));
64+
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
65+
index 14bffa75a..8a6dfe6d5 100644
66+
--- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
67+
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
68+
@@ -94,7 +94,7 @@ namespace {
69+
t_rtti_map m_rttis;
70+
t_rtti_map m_generatedRttis;
71+
72+
-#ifndef ANDROID
73+
+#ifndef __ANDROID__
74+
void * m_hApp;
75+
#endif
76+
77+
@@ -107,7 +107,7 @@ namespace {
78+
}
79+
80+
RTTI::RTTI()
81+
-#ifndef ANDROID
82+
+#ifndef __ANDROID__
83+
: m_hApp( dlopen( nullptr, RTLD_LAZY ) )
84+
#endif
85+
{
86+
@@ -115,7 +115,7 @@ namespace {
87+
88+
RTTI::~RTTI()
89+
{
90+
-#ifndef ANDROID
91+
+#ifndef __ANDROID__
92+
dlclose( m_hApp );
93+
#endif
94+
}
95+
@@ -146,7 +146,7 @@ namespace {
96+
buf.append( 'E' );
97+
98+
OString symName( buf.makeStringAndClear() );
99+
-#ifndef ANDROID
100+
+#ifndef __ANDROID__
101+
rtti = static_cast<type_info *>(dlsym( m_hApp, symName.getStr() ));
102+
#else
103+
rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
104+
@@ -170,7 +170,7 @@ namespace {
105+
// symbol and rtti-name is nearly identical,
106+
// the symbol is prefixed with _ZTI
107+
108+
-#ifdef ANDROID
109+
+#ifdef __ANDROID__
110+
// This code is supposed to be used only used for
111+
// inter-process UNO, says sberg. Thus it should
112+
// be unnecessary and never reached for
113+
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
114+
index 9bce77bc8..a5bfc5b0e 100644
115+
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
116+
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
117+
@@ -78,7 +78,7 @@ class RTTI
118+
std::vector<OString> m_rttiNames;
119+
std::unordered_map<OUString, std::unique_ptr<Generated>> m_generatedRttis;
120+
121+
-#if !defined ANDROID
122+
+#if !defined __ANDROID__
123+
void * m_hApp;
124+
#endif
125+
126+
@@ -90,7 +90,7 @@ public:
127+
};
128+
129+
RTTI::RTTI()
130+
-#if !defined ANDROID
131+
+#if !defined __ANDROID__
132+
: m_hApp( dlopen( nullptr, RTLD_LAZY ) )
133+
#endif
134+
{
135+
@@ -98,7 +98,7 @@ RTTI::RTTI()
136+
137+
RTTI::~RTTI()
138+
{
139+
-#if !defined ANDROID
140+
+#if !defined __ANDROID__
141+
dlclose( m_hApp );
142+
#endif
143+
}
144+
@@ -128,7 +128,7 @@ std::type_info * RTTI::getRTTI(typelib_TypeDescription const & pTypeDescr)
145+
buf.append( 'E' );
146+
147+
OString symName( buf.makeStringAndClear() );
148+
-#if !defined ANDROID
149+
+#if !defined __ANDROID__
150+
rtti = static_cast<std::type_info *>(dlsym( m_hApp, symName.getStr() ));
151+
#else
152+
rtti = static_cast<std::type_info *>(dlsym( RTLD_DEFAULT, symName.getStr() ));
153+
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
154+
index 0d66a48da..82160e1a7 100644
155+
--- a/desktop/source/app/app.cxx
156+
+++ b/desktop/source/app/app.cxx
157+
@@ -505,7 +505,7 @@ void Desktop::Init()
158+
RequestHandler::Status aStatus = RequestHandler::Enable(true);
159+
if ( aStatus == RequestHandler::IPC_STATUS_PIPE_ERROR )
160+
{
161+
-#if defined(ANDROID) || defined(EMSCRIPTEN)
162+
+#if defined(__ANDROID__) || defined(EMSCRIPTEN)
163+
// Ignore crack pipe errors on Android
164+
#else
165+
// Keep using this oddly named BE_PATHINFO_MISSING value
166+
@@ -917,7 +917,7 @@ void handleCrashReport()
167+
}
168+
#endif
169+
170+
-#if !defined ANDROID
171+
+#if !defined __ANDROID__
172+
void handleSafeMode()
173+
{
174+
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
175+
@@ -1973,7 +1973,7 @@ void Desktop::OpenClients()
176+
// need some time, where the user won't see any results and wait for finishing the office startup...
177+
bool bAllowRecoveryAndSessionManagement = ( !rArgs.IsNoRestore() ) && ( !rArgs.IsHeadless() );
178+
179+
-#if !defined ANDROID
180+
+#if !defined __ANDROID__
181+
// Enter safe mode if requested
182+
if (Application::IsSafeModeEnabled()) {
183+
handleSafeMode();
184+
--
185+
2.46.1
186+

0 commit comments

Comments
 (0)