Files
haikuports/app-office/scribus/patches/scribus-1.5.5.patchset
Gerasim Troeglazov 393d18132f Scribus: bump version
2019-08-12 21:33:49 +10:00

196 lines
6.5 KiB
Plaintext

From 49059e8426b4b0576124cbc766222b55afeb436a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 11 Aug 2019 16:50:51 +1000
Subject: Fix build for Haiku
Disable python and scriptplugin
Add paths for Haiku
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0cfa1d5..246087e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -472,7 +472,7 @@ else()
endif()
#PLUGINS
-if(WIN32)
+if(WIN32 OR HAIKU)
set(PLUGINDIR "plugins")
elseif (APPLEBUNDLE)
set(PLUGINDIR "${LIBDIR}")
@@ -848,7 +848,7 @@ endif()
#<< PYTHON
#set(PythonLibs_FIND_VERSION 2)
find_package(PythonInterp 2)
-find_package(PythonLibs 2 REQUIRED)
+find_package(PythonLibs 2)
if (PYTHON_LIBRARY)
message("Python Library Found OK")
set(HAVE_PYTHON ON)
@@ -1027,7 +1027,7 @@ pkg_check_modules(ICU REQUIRED icu-uc)
##############################################################################################################
########## 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/CMakeLists.txt b/scribus/CMakeLists.txt
index 2f1d39c..5a63364 100644
--- a/scribus/CMakeLists.txt
+++ b/scribus/CMakeLists.txt
@@ -1286,7 +1286,7 @@ target_link_libraries(${EXE_NAME}
${ICU_LIBRARIES}
${FONTCONFIG_LIBRARIES}
${LIBXML2_LIBRARIES}
- ${PYTHON_LIBRARIES}
+# ${PYTHON_LIBRARIES}
${TIFF_LIBRARIES}
${JPEG_LIBRARIES}
${ZLIB_LIBRARIES}
diff --git a/scribus/plugins/CMakeLists.txt b/scribus/plugins/CMakeLists.txt
index 4debb04..9026eb1 100644
--- a/scribus/plugins/CMakeLists.txt
+++ b/scribus/plugins/CMakeLists.txt
@@ -11,12 +11,12 @@ if(NOT WANT_SCRIPTER2)
#scripter1
if(NOT WIN32)
message(STATUS "Building with Scripter 1")
- add_subdirectory(scriptplugin)
+# add_subdirectory(scriptplugin)
endif()
else()
#scripter2
message(STATUS "Building with Scripter 2")
- add_subdirectory(scripter)
+# add_subdirectory(scripter)
endif()
add_subdirectory(short-words)
add_subdirectory(tools)
diff --git a/scribus/scpaths.cpp b/scribus/scpaths.cpp
index acdc9af..87bd192 100644
--- a/scribus/scpaths.cpp
+++ b/scribus/scpaths.cpp
@@ -324,6 +324,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;
}
@@ -390,6 +399,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;
}
@@ -413,6 +435,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 c3e3ed0..5184be9 100644
--- a/scribus/third_party/pgf/PGFplatform.h
+++ b/scribus/third_party/pgf/PGFplatform.h
@@ -528,7 +528,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;
@@ -548,7 +548,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.21.0
From 334b3a98fd51f80fe2000b68de49ee8e072c73a7 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 12 Aug 2019 21:10:23 +1000
Subject: Disable pkg-config for cairo and fontconfig
diff --git a/cmake/modules/CAIROConfig.cmake b/cmake/modules/CAIROConfig.cmake
index 14abfde..187b742 100644
--- a/cmake/modules/CAIROConfig.cmake
+++ b/cmake/modules/CAIROConfig.cmake
@@ -25,7 +25,7 @@ else(PREFIX_CAIRO)
set(PKG_CAIRO_LIBRARIES ${_libCairoLinkDir})
else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
include(FindPkgConfig)
- pkg_search_module(CAIRO REQUIRED libcairo>=1.14.0 cairo>=1.14.0)
+# pkg_search_module(CAIRO REQUIRED libcairo>=1.14.0 cairo>=1.14.0)
endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
endif(PREFIX_CAIRO)
diff --git a/cmake/modules/FONTCONFIGConfig.cmake b/cmake/modules/FONTCONFIGConfig.cmake
index 1a74069..225658c 100644
--- a/cmake/modules/FONTCONFIGConfig.cmake
+++ b/cmake/modules/FONTCONFIGConfig.cmake
@@ -15,7 +15,7 @@ if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
set(FONTCONFIG_LIBS ${_fontconfigCflags})
else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
include(FindPkgConfig)
- pkg_search_module(FONTCONFIG REQUIRED fontconfig)
+# pkg_search_module(FONTCONFIG REQUIRED fontconfig)
endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
#include(UsePkgConfig)
--
2.21.0