Files
haikuports/media-gfx/yacreader/patches/yacreader-8.5.0.patchset
2017-07-25 07:52:07 +02:00

156 lines
4.3 KiB
Plaintext

From 57c610116ae488f012ffa8d535ecdb272bf58fd1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Mon, 24 Jul 2017 18:34:40 +0200
Subject: [PATCH] Haiku patchset
---
YACReader/YACReader.pro | 11 +++++++++++
YACReaderLibrary/YACReaderLibrary.pro | 13 +++++++++++++
YACReaderLibrary/YACReaderLibraryServer.pro | 7 +++++++
YACReaderLibrary/server_config_dialog.cpp | 4 ++++
compileHAIKU.sh | 22 ++++++++++++++++++++++
compressed_archive/unarr/unarr-wrapper.pri | 14 +++++++++++++-
6 files changed, 70 insertions(+), 1 deletion(-)
create mode 100755 compileHAIKU.sh
diff --git a/YACReader/YACReader.pro b/YACReader/YACReader.pro
index 57a500d..955e62a 100644
--- a/YACReader/YACReader.pro
+++ b/YACReader/YACReader.pro
@@ -68,6 +68,17 @@ LIBS += -L/usr/lib -lpoppler-qt5
}
+unix:haiku{
+
+CONFIG+=link_pkgconfig
+PKGCONFIG+=poppler poppler-qt5 Qt5Xml
+
+!CONFIG(no_opengl) {
+ LIBS += -lGLU
+}
+
+}
+
macx{
#INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include"
#isEqual(QT_MAJOR_VERSION, 5) {
diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro
index 15d78d9..0a3d00c 100644
--- a/YACReaderLibrary/YACReaderLibrary.pro
+++ b/YACReaderLibrary/YACReaderLibrary.pro
@@ -55,6 +55,19 @@ LIBS += -L/usr/lib -lpoppler-qt5
}
}
+unix:haiku{
+
+DEFINES += _BSD_SOURCE
+LIBS += -lnetwork -lbsd
+CONFIG+=link_pkgconfig
+PKGCONFIG+= poppler-qt5
+
+!CONFIG(no_opengl) {
+ LIBS += -lGLU
+}
+
+}
+
macx{
#INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include"
#isEqual(QT_MAJOR_VERSION, 5) {
diff --git a/YACReaderLibrary/YACReaderLibraryServer.pro b/YACReaderLibrary/YACReaderLibraryServer.pro
index d377d56..5751332 100644
--- a/YACReaderLibrary/YACReaderLibraryServer.pro
+++ b/YACReaderLibrary/YACReaderLibraryServer.pro
@@ -32,6 +32,13 @@ INCLUDEPATH += /usr/include/poppler/qt5
LIBS += -L/usr/lib -lpoppler-qt5
}
+unix:haiku{
+DEFINES += _BSD_SOURCE
+LIBS += -lbsd
+CONFIG+=link_pkgconfig
+PKGCONFIG+= poppler-qt5
+}
+
macx{
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
diff --git a/YACReaderLibrary/server_config_dialog.cpp b/YACReaderLibrary/server_config_dialog.cpp
index 5ce706d..44c99d9 100644
--- a/YACReaderLibrary/server_config_dialog.cpp
+++ b/YACReaderLibrary/server_config_dialog.cpp
@@ -41,6 +41,10 @@ bool ipComparator(const QString & ip1, const QString & ip2)
#include <string.h>
#include <arpa/inet.h>
+#ifdef Q_OS_HAIKU
+#include <ifaddrs.h>
+#endif
+
QList<QString> addresses()
{
struct ifaddrs * ifAddrStruct=NULL;
diff --git a/compileHAIKU.sh b/compileHAIKU.sh
new file mode 100755
index 0000000..468ed5b
--- /dev/null
+++ b/compileHAIKU.sh
@@ -0,0 +1,22 @@
+#! /bin/bash
+
+echo "Compiling YACReader"
+cd ./YACReader
+qmake YACReader.pro "CONFIG+=release"
+make -j 4
+cd ..
+
+echo "Compiling YACReaderLibrary"
+cd ./YACReaderLibrary
+qmake YACReaderLibrary.pro "CONFIG+=release"
+make -j 4
+cd ..
+
+echo "Compiling YACReaderLibraryServer"
+cd ./YACReaderLibrary
+make clean
+qmake YACReaderLibraryServer.pro "CONFIG+=release"
+make -j 4
+cd ..
+
+echo "Done!"
diff --git a/compressed_archive/unarr/unarr-wrapper.pri b/compressed_archive/unarr/unarr-wrapper.pri
index 2ba188c..31e3ef0 100644
--- a/compressed_archive/unarr/unarr-wrapper.pri
+++ b/compressed_archive/unarr/unarr-wrapper.pri
@@ -21,6 +21,18 @@ else:win32:exists (../../dependencies/unarr/unarr.dll) {
DEFINES+=use_unarr
}
+else:haiku:exists (/system/develop/headers/x86/unarr.h) {
+ message(Using system provided unarr installation)
+ LIBS+=-lunarr
+ DEFINES+=use_unarr
+ }
+
+else:haiku:exists (/system/develop/headers/unarr.h) {
+ message(Using system provided unarr installation)
+ LIBS+=-lunarr
+ DEFINES+=use_unarr
+ }
+
else:exists ($$PWD/unarr-master) {
message(Found unarr source-code)
message(Unarr will be build as a part of YACReader)
@@ -33,4 +45,4 @@ else:exists ($$PWD/unarr-master) {
else {
error(Missing dependency: unarr decrompression backend. Please install libunarr on your system\
or provide a copy of the unarr source code in compressed_archive/unarr/unarr-master)
- }
\ No newline at end of file
+ }
--
2.13.1