mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 11:10:07 +02:00
311 lines
10 KiB
Plaintext
311 lines
10 KiB
Plaintext
From e2462a46a5e48734b1cc062a2b87abce19b74ac0 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 bdd66a3..1632620 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -443,7 +443,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 c0fe919..47a3003 100644
|
|
--- a/scribus/scpaths.cpp
|
|
+++ b/scribus/scpaths.cpp
|
|
@@ -347,6 +347,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;
|
|
}
|
|
@@ -413,6 +422,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;
|
|
}
|
|
@@ -436,6 +458,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 3c5b241..780c590 100644
|
|
--- a/scribus/util_debug.cpp
|
|
+++ b/scribus/util_debug.cpp
|
|
@@ -53,7 +53,7 @@ void tDebug(const QString& message)
|
|
*/
|
|
void printBacktrace ( int nFrames )
|
|
{
|
|
-#if !defined(_WIN32) && !defined(Q_OS_MACOS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_FREEBSD)
|
|
+#if !defined(_WIN32) && !defined(Q_OS_MACOS) && !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.48.1
|
|
|
|
|
|
From daaced09b34e4c6af6d7ddc54f4feacb18e20629 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/scribus.cpp b/scribus/scribus.cpp
|
|
index d0f818c..369b778 100644
|
|
--- a/scribus/scribus.cpp
|
|
+++ b/scribus/scribus.cpp
|
|
@@ -6480,12 +6480,14 @@ void ScribusMainWindow::slotPrefsOrg()
|
|
ScQApp->changeIconSet(newIconSet);
|
|
|
|
int newUIFontSize = m_prefsManager.guiFontSize();
|
|
+#ifndef Q_OS_HAIKU
|
|
if (oldPrefs.uiPrefs.applicationFontSize != newUIFontSize)
|
|
{
|
|
QFont apf = QApplication::font();
|
|
apf.setPointSize(newUIFontSize);
|
|
QApplication::setFont(apf);
|
|
}
|
|
+#endif
|
|
emit UpdateRequest(reqDefFontListUpdate);
|
|
if (m_prefsManager.appPrefs.uiPrefs.useTabs)
|
|
{
|
|
diff --git a/scribus/scribuscore.cpp b/scribus/scribuscore.cpp
|
|
index 231e32c..550d3e9 100644
|
|
--- a/scribus/scribuscore.cpp
|
|
+++ b/scribus/scribuscore.cpp
|
|
@@ -186,9 +186,11 @@ int ScribusCore::initScribusCore(bool showSplash, bool showFontInfo, bool showPr
|
|
else
|
|
m_prefsManager.appPrefs.uiPrefs.style.clear();
|
|
}
|
|
+#ifndef Q_OS_HAIKU
|
|
QFont apf = QApplication::font();
|
|
apf.setPointSize(m_prefsManager.appPrefs.uiPrefs.applicationFontSize);
|
|
QApplication::setFont(apf);
|
|
+#endif
|
|
|
|
LocaleManager::instance().setUserPreferredLocale(m_prefsManager.appPrefs.uiPrefs.userPreferredLocale);
|
|
m_prefsManager.appPrefs.uiPrefs.showSplashOnStartup = showSplash;
|
|
--
|
|
2.48.1
|
|
|
|
|
|
From 678f20b7081f0ea2833ca43fe10d7468182ce80c Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Mon, 22 Nov 2021 20:40:09 +0100
|
|
Subject: Prefer the shared libpython3
|
|
|
|
|
|
diff --git a/CMakeLists_Dependencies.cmake b/CMakeLists_Dependencies.cmake
|
|
index 8e609b1..1dcef14 100644
|
|
--- a/CMakeLists_Dependencies.cmake
|
|
+++ b/CMakeLists_Dependencies.cmake
|
|
@@ -207,6 +207,7 @@ endif()
|
|
#<< PYTHON
|
|
if (NOT WANT_PYTHON_2X)
|
|
message("Python 3.x Selected")
|
|
+ set (Python3_USE_STATIC_LIBS FALSE)
|
|
find_package (Python3 REQUIRED COMPONENTS Interpreter Development)
|
|
if (Python3_Development_FOUND)
|
|
message("Python 3.x Library Found OK (Version ${Python3_VERSION})")
|
|
--
|
|
2.48.1
|
|
|
|
|
|
From 0a47da88d20154d6a2ede9ebfa163d78318b12a5 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Fri, 25 Feb 2022 20:42:38 +0100
|
|
Subject: fix uint32_t type for x86
|
|
|
|
|
|
diff --git a/scribus/imagedataloaders/scimgdataloader_tiff.cpp b/scribus/imagedataloaders/scimgdataloader_tiff.cpp
|
|
index a73ca7a..260d837 100644
|
|
--- a/scribus/imagedataloaders/scimgdataloader_tiff.cpp
|
|
+++ b/scribus/imagedataloaders/scimgdataloader_tiff.cpp
|
|
@@ -49,7 +49,7 @@ void ScImgDataLoader_TIFF::loadEmbeddedProfile(const QString& fn, int /*page*/)
|
|
if (!tif)
|
|
return;
|
|
|
|
- uint32_t EmbedLen = 0;
|
|
+ uint32 EmbedLen = 0;
|
|
void* EmbedBuffer;
|
|
if (TIFFGetField(tif, TIFFTAG_ICCPROFILE, &EmbedLen, &EmbedBuffer))
|
|
{
|
|
@@ -302,19 +302,19 @@ bool ScImgDataLoader_TIFF::getImageData(TIFF* tif, RawImage *image, uint widtht,
|
|
|
|
if (TIFFIsTiled(tif))
|
|
{
|
|
- uint32_t columns, rows;
|
|
- uint32_t *tile_buf;
|
|
+ uint32 columns, rows;
|
|
+ uint32 *tile_buf;
|
|
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &columns);
|
|
TIFFGetField(tif, TIFFTAG_TILELENGTH, &rows);
|
|
- tile_buf = (uint32_t*) _TIFFmalloc(columns * rows * sizeof(uint32_t));
|
|
+ tile_buf = (uint32*) _TIFFmalloc(columns * rows * sizeof(uint32));
|
|
if (tile_buf == nullptr)
|
|
{
|
|
TIFFClose(tif);
|
|
return false;
|
|
}
|
|
- uint32_t tileW = columns;
|
|
- uint32_t tileH = rows;
|
|
- for (uint32_t yt = 0; yt < (uint32_t) image->height(); yt += rows)
|
|
+ uint32 tileW = columns;
|
|
+ uint32 tileH = rows;
|
|
+ for (uint32 yt = 0; yt < (uint32) image->height(); yt += rows)
|
|
{
|
|
if (yt > (uint) image->height())
|
|
break;
|
|
@@ -322,10 +322,10 @@ bool ScImgDataLoader_TIFF::getImageData(TIFF* tif, RawImage *image, uint widtht,
|
|
tileH = image->height() - yt;
|
|
tileW = columns;
|
|
int chans = image->channels();
|
|
- for (uint32_t xt = 0; xt < (uint) image->width(); xt += columns)
|
|
+ for (uint32 xt = 0; xt < (uint) image->width(); xt += columns)
|
|
{
|
|
TIFFReadTile(tif, tile_buf, xt, yt, 0, 0);
|
|
- for (uint32_t yi = 0; yi < tileH; yi++)
|
|
+ for (uint32 yi = 0; yi < tileH; yi++)
|
|
{
|
|
_TIFFmemcpy(image->scanLine(yt + (tileH - 1 - yi)) + xt, tile_buf + tileW * yi, tileW * chans);
|
|
}
|
|
@@ -337,7 +337,7 @@ bool ScImgDataLoader_TIFF::getImageData(TIFF* tif, RawImage *image, uint widtht,
|
|
{
|
|
int chans = image->channels();
|
|
tsize_t bytesperrow = TIFFScanlineSize(tif);
|
|
- uint32_t *bits = (uint32_t *) _TIFFmalloc(bytesperrow);
|
|
+ uint32 *bits = (uint32 *) _TIFFmalloc(bytesperrow);
|
|
if (bits)
|
|
{
|
|
for (unsigned int y = 0; y < heightt; y++)
|
|
@@ -363,7 +363,7 @@ bool ScImgDataLoader_TIFF::getImageData(TIFF* tif, RawImage *image, uint widtht,
|
|
|
|
bool ScImgDataLoader_TIFF::getImageData_RGBA(TIFF* tif, RawImage *image, uint widtht, uint heightt, uint size, const SampleFormatInfo& sampleInfo)
|
|
{
|
|
- uint32_t* bits = (uint32_t *) _TIFFmalloc(size * sizeof(uint32_t));
|
|
+ uint32* bits = (uint32 *) _TIFFmalloc(size * sizeof(uint32));
|
|
if (!bits)
|
|
return false;
|
|
|
|
@@ -755,7 +755,7 @@ bool ScImgDataLoader_TIFF::loadPicture(const QString& fn, int page, int res, boo
|
|
m_imageInfoRecord.profileName.clear();
|
|
m_imageInfoRecord.embeddedProfileName.clear();
|
|
|
|
- uint32_t EmbedLen = 0;
|
|
+ uint32 EmbedLen = 0;
|
|
void* EmbedBuffer;
|
|
if (TIFFGetField(tif, TIFFTAG_ICCPROFILE, &EmbedLen, &EmbedBuffer))
|
|
{
|
|
--
|
|
2.48.1
|
|
|
|
|
|
From 2a54e2547a0396f624d0c4d02d4b802bd65384d7 Mon Sep 17 00:00:00 2001
|
|
From: Begasus <begasus@gmail.com>
|
|
Date: Wed, 7 Feb 2024 14:39:53 +0100
|
|
Subject: Silence deprecated warnings
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 1632620..06ab25a 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -417,6 +417,9 @@ if(WIN32)
|
|
)
|
|
set(DLL_USE_NATIVE_API ON)
|
|
endif()
|
|
+if(HAIKU)
|
|
+ add_definitions(-Wno-deprecated-declarations)
|
|
+endif()
|
|
|
|
#C++11 Support
|
|
#as of 1.5.5.svn, require C++11
|
|
--
|
|
2.48.1
|
|
|
|
|
|
From 87a92341cd6c67cc363b35fbba2825535eb59761 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Wed, 29 May 2024 18:48:34 +0200
|
|
Subject: Haiku: don't set platform plugin
|
|
|
|
|
|
diff --git a/scribus/main_nix.cpp b/scribus/main_nix.cpp
|
|
index 626be05..4fa712b 100644
|
|
--- a/scribus/main_nix.cpp
|
|
+++ b/scribus/main_nix.cpp
|
|
@@ -65,7 +65,7 @@ int mainApp(int argc, char **argv)
|
|
{
|
|
emergencyActivated = false;
|
|
|
|
-#if !defined(Q_OS_MACOS)
|
|
+#if !defined(Q_OS_MACOS) && !defined(Q_OS_HAIKU)
|
|
qputenv("QT_QPA_PLATFORM", "xcb");
|
|
#endif
|
|
|
|
--
|
|
2.48.1
|
|
|