Files
haikuports/media-gfx/yacreader/patches/yacreader-9.0.0.patchset
2017-10-22 15:34:21 +02:00

165 lines
4.4 KiB
Plaintext

From 724bbecb35651fd6331dfd2fab34f283a8e744da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 22 Oct 2017 15:31:35 +0200
Subject: [PATCH] YACReader: Haiku patches
---
YACReader/YACReader.pro | 11 +++++++++++
YACReader/goto_flow_toolbar.h | 4 ++++
YACReaderLibrary/YACReaderLibrary.pro | 12 ++++++++++++
YACReaderLibrary/server_config_dialog.cpp | 4 ++++
YACReaderLibraryServer/YACReaderLibraryServer.pro | 7 +++++++
compileHAIKU.sh | 22 ++++++++++++++++++++++
compressed_archive/unarr/unarr-wrapper.pri | 14 +++++++++++++-
7 files changed, 73 insertions(+), 1 deletion(-)
create mode 100755 compileHAIKU.sh
diff --git a/YACReader/YACReader.pro b/YACReader/YACReader.pro
index 57a500d..3cbaeca 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/YACReader/goto_flow_toolbar.h b/YACReader/goto_flow_toolbar.h
index 803026c..5bfc99f 100644
--- a/YACReader/goto_flow_toolbar.h
+++ b/YACReader/goto_flow_toolbar.h
@@ -2,7 +2,11 @@
#define GOTO_FLOW_TOOLBAR_H
#include <QWidget>
+#ifndef __HAIKU__
#include <QStackedWidget.h>
+#else
+#include <qstackedwidget.h>
+#endif
class QLineEdit;
class QIntValidator;
diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro
index 53db0a0..1aec71f 100644
--- a/YACReaderLibrary/YACReaderLibrary.pro
+++ b/YACReaderLibrary/YACReaderLibrary.pro
@@ -55,6 +55,18 @@ 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/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/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro
index b6673d2..92c976e 100644
--- a/YACReaderLibraryServer/YACReaderLibraryServer.pro
+++ b/YACReaderLibraryServer/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/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)
--
2.14.2