0
0
Fork 0
haikuports/app-office/scribus/patches/scribus-1.5.7.patchset

168 lines
5.3 KiB
Plaintext

From 77e723de9ed4ada3df11e6e7eea4964bb844b630 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 16 Nov 2020 21:51:24 +1000
Subject: Fix build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a536a3..327ae32 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -408,7 +408,7 @@ include(CMakeLists_Dependencies.cmake)
##############################################################################################################
########## Include Setup ##########
-TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
+#TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
if(HAVE_DLFCN_H)
diff --git a/scribus/scpaths.cpp b/scribus/scpaths.cpp
index 25369fa..289fe68 100644
--- a/scribus/scpaths.cpp
+++ b/scribus/scpaths.cpp
@@ -322,6 +322,15 @@ QStringList ScPaths::spellDirs() const
d.setPath(linuxLocalPath);
if (d.exists())
spellDirs.append(linuxLocalPath);
+#elif defined(Q_OS_HAIKU)
+ QString haikuSystemHunspellPath("/system/data/hunspell/");
+ QString haikuUserHunspellPath("/boot/home/config/non-packaged/data/hunspell/");
+ d.setPath(haikuSystemHunspellPath);
+ if (d.exists())
+ spellDirs.append(haikuSystemHunspellPath);
+ d.setPath(haikuUserHunspellPath);
+ if (d.exists())
+ spellDirs.append(haikuUserHunspellPath);
#endif
return spellDirs;
}
@@ -388,6 +397,19 @@ QStringList ScPaths::hyphDirs() const
d.setPath(linuxLocalPath);
if (d.exists())
hyphDirs.append(linuxLocalPath);
+#elif defined(Q_OS_HAIKU)
+ QString haikuSystemHyphenPath("/system/data/hyphen/");
+ QString haikuSystemHunspellPath("/system/data/hunspell/");
+ QString haikuUserHunspellPath("/boot/home/config/non-packaged/data/hunspell/");
+ d.setPath(haikuSystemHyphenPath);
+ if (d.exists())
+ hyphDirs.append(haikuSystemHyphenPath);
+ d.setPath(haikuSystemHunspellPath);
+ if (d.exists())
+ hyphDirs.append(haikuSystemHunspellPath);
+ d.setPath(haikuUserHunspellPath);
+ if (d.exists())
+ hyphDirs.append(haikuUserHunspellPath);
#endif
return hyphDirs;
}
@@ -411,6 +433,9 @@ QStringList ScPaths::systemFontDirs()
if (d.exists())
fontDirs.append(roamingFontDir);
fontDirs.append(windowsSpecialDir(CSIDL_FONTS));
+#elif defined(Q_OS_HAIKU)
+ fontDirs.append("/system/data/fonts/ttfonts");
+ fontDirs.append("/boot/home/config/non-packaged/data/fonts");
#endif
return fontDirs;
}
diff --git a/scribus/third_party/pgf/PGFplatform.h b/scribus/third_party/pgf/PGFplatform.h
index 55a5828..f421582 100644
--- a/scribus/third_party/pgf/PGFplatform.h
+++ b/scribus/third_party/pgf/PGFplatform.h
@@ -529,7 +529,7 @@ __inline OSError FileWrite(HANDLE hFile, int *count, void *buffPtr) {
}
__inline OSError GetFPos(HANDLE hFile, UINT64 *pos) {
- #ifdef __APPLE__
+ #if defined(__APPLE__) || defined(__HAIKU__)
off_t ret;
if ((ret = lseek(hFile, 0, SEEK_CUR)) == -1) {
return errno;
@@ -549,7 +549,7 @@ __inline OSError GetFPos(HANDLE hFile, UINT64 *pos) {
}
__inline OSError SetFPos(HANDLE hFile, int posMode, INT64 posOff) {
- #ifdef __APPLE__
+ #if defined(__APPLE__) || defined(__HAIKU__)
if ((lseek(hFile, (off_t)posOff, posMode)) == -1) {
return errno;
} else {
diff --git a/scribus/util_debug.cpp b/scribus/util_debug.cpp
index 5adfab7..ebf0bdb 100644
--- a/scribus/util_debug.cpp
+++ b/scribus/util_debug.cpp
@@ -54,7 +54,7 @@ void tDebug(const QString& message)
*/
void printBacktrace ( int nFrames )
{
-#if !defined(_WIN32) && !defined(Q_OS_MAC) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_FREEBSD)
+#if !defined(_WIN32) && !defined(Q_OS_MAC) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_HAIKU)
void ** trace = new void*[nFrames + 1];
char **messages = ( char ** ) nullptr;
int i, trace_size = 0;
--
2.30.2
From f3e7d20b9428a20afadbcb324419b15858dcfbcb Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 8 Jan 2021 22:00:46 +1000
Subject: Fix for app font
diff --git a/scribus/main_nix.cpp b/scribus/main_nix.cpp
index e50217e..a20ab3c 100644
--- a/scribus/main_nix.cpp
+++ b/scribus/main_nix.cpp
@@ -64,8 +64,9 @@ int main(int argc, char *argv[])
int mainApp(int argc, char **argv)
{
emergencyActivated = false;
-
+#ifndef Q_OS_HAIKU
ScribusQApp::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
ScribusQApp app(argc, argv);
initCrashHandler();
app.parseCommandLine();
diff --git a/scribus/prefsmanager.cpp b/scribus/prefsmanager.cpp
index 6821fed..1fa5936 100644
--- a/scribus/prefsmanager.cpp
+++ b/scribus/prefsmanager.cpp
@@ -2776,9 +2776,11 @@ bool PrefsManager::readPref(const QString& filePath)
else
appPrefs.uiPrefs.style.clear();
}
+#ifndef Q_OS_HAIKU
QFont apf = qApp->font();
apf.setPointSize(appPrefs.uiPrefs.applicationFontSize);
qApp->setFont(apf);
+#endif
return true;
}
diff --git a/scribus/scribus.cpp b/scribus/scribus.cpp
index 7deca71..e6e16a6 100644
--- a/scribus/scribus.cpp
+++ b/scribus/scribus.cpp
@@ -6460,12 +6460,14 @@ void ScribusMainWindow::slotPrefsOrg()
ScQApp->changeIconSet(newIconSet);
int newUIFontSize = m_prefsManager.guiFontSize();
+#ifndef Q_OS_HAIKU
if (oldPrefs.uiPrefs.applicationFontSize != newUIFontSize)
{
QFont apf = qApp->font();
apf.setPointSize(newUIFontSize);
qApp->setFont(apf);
}
+#endif
emit UpdateRequest(reqDefFontListUpdate);
if (m_prefsManager.appPrefs.uiPrefs.useTabs)
{
--
2.30.2