mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
120 lines
3.7 KiB
Plaintext
120 lines
3.7 KiB
Plaintext
From 40e4649597397ad28be08e2aaed55e0823dbebe4 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
|
Date: Fri, 8 Jan 2021 19:59:20 +0100
|
|
Subject: [PATCH] Haiku platform support, dynamic opencv support
|
|
|
|
|
|
diff --git a/IPL/IPL.pro b/IPL/IPL.pro
|
|
index e38c58b..9a18f3c 100644
|
|
--- a/IPL/IPL.pro
|
|
+++ b/IPL/IPL.pro
|
|
@@ -26,7 +26,8 @@ else: DESTDIR = ../ImagePlay/release
|
|
#define platform variable for folder name
|
|
win32 {contains(QMAKE_TARGET.arch, x86_64) {PLATFORM = x64} else {PLATFORM = Win32}}
|
|
macx {PLATFORM = macx}
|
|
-unix:!macx:!android {PLATFORM = linux}
|
|
+unix:!macx:!android:!haiku {PLATFORM = linux}
|
|
+haiku {PLATFORM = haiku}
|
|
|
|
#define configuration variable for folder name
|
|
CONFIG(debug, debug|release) {CONFIGURATION = Debug} else {CONFIGURATION = Release}
|
|
@@ -117,7 +118,7 @@ macx {
|
|
|
|
}
|
|
|
|
-linux {
|
|
+linux | haiku {
|
|
CONFIG += staticlib
|
|
|
|
LIBS += -lfreeimage
|
|
@@ -163,4 +164,11 @@ INCLUDEPATH += $$PWD/include/
|
|
INCLUDEPATH += $$PWD/include/processes/
|
|
|
|
# OpenCV
|
|
+!haiku {
|
|
INCLUDEPATH += $$PWD/include/opencv/
|
|
+}
|
|
+haiku {
|
|
+ QT_CONFIG -= no-pkg-config
|
|
+ CONFIG += link_pkgconfig
|
|
+ PKGCONFIG += opencv4
|
|
+}
|
|
diff --git a/IPL/include/IPL_global.h b/IPL/include/IPL_global.h
|
|
index 3378527..b075472 100644
|
|
--- a/IPL/include/IPL_global.h
|
|
+++ b/IPL/include/IPL_global.h
|
|
@@ -34,7 +34,7 @@
|
|
#include <algorithm>
|
|
#include <math.h>
|
|
|
|
-#if defined(__linux__) || defined(__APPLE__)
|
|
+#if defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__)
|
|
#define EXTERNC extern "C"
|
|
#define IPLSHARED_EXPORT __attribute__((visibility("default")))
|
|
#define IPLSHARED_IMPORT __attribute__((visibility("default")))
|
|
diff --git a/IPL/include/processes/IPLLoadImageSequence.h b/IPL/include/processes/IPLLoadImageSequence.h
|
|
index 41b1d55..5128994 100644
|
|
--- a/IPL/include/processes/IPLLoadImageSequence.h
|
|
+++ b/IPL/include/processes/IPLLoadImageSequence.h
|
|
@@ -26,7 +26,7 @@
|
|
|
|
#include <string>
|
|
#include <stdio.h>
|
|
-#if defined(__linux__) || defined(__APPLE__)
|
|
+#if defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__)
|
|
#include <sys/uio.h>
|
|
#include <dirent.h>
|
|
#else
|
|
diff --git a/ImagePlay/ImagePlay.pro b/ImagePlay/ImagePlay.pro
|
|
index 944b9ea..3ddad09 100644
|
|
--- a/ImagePlay/ImagePlay.pro
|
|
+++ b/ImagePlay/ImagePlay.pro
|
|
@@ -62,7 +62,8 @@ DEFINES += IMAGEPLAY_APPCAST_URL=\\\"http://cpvrlab.github.io/ImagePlay/Appcast.
|
|
#define platform variable for folder name
|
|
win32 {contains(QMAKE_TARGET.arch, x86_64) {PLATFORM = x64} else {PLATFORM = Win32}}
|
|
macx {PLATFORM = macx}
|
|
-unix:!macx:!android {PLATFORM = linux}
|
|
+unix:!macx:!android:!haiku {PLATFORM = linux}
|
|
+haiku {PLATFORM = haiku}
|
|
|
|
#define configuration variable for folder name
|
|
CONFIG(debug, debug|release) {CONFIGURATION = Debug} else {CONFIGURATION = Release}
|
|
@@ -160,7 +161,7 @@ macx: {
|
|
USE_FERVOR_UPDATER = true
|
|
}
|
|
|
|
-linux: {
|
|
+linux | haiku: {
|
|
LIBS += -L../_bin/$$CONFIGURATION/$$PLATFORM/ -lIPL
|
|
|
|
LIBS += -lfreeimage
|
|
@@ -174,7 +175,9 @@ linux: {
|
|
LIBS += -lopencv_xfeatures2d
|
|
LIBS += -lopencv_photo
|
|
LIBS += -lopencv_xphoto
|
|
+ !haiku{
|
|
LIBS += -ldl
|
|
+ }
|
|
|
|
QMAKE_POST_LINK += $${QMAKE_COPY_DIR} media/process_icons/ ../_bin/$$CONFIGURATION/$$PLATFORM/ && \
|
|
$${QMAKE_COPY_DIR} media/examples/ ../_bin/$$CONFIGURATION/$$PLATFORM/ &&\
|
|
@@ -232,7 +235,14 @@ gcc:!clang {
|
|
INCLUDEPATH += $$PWD/include/
|
|
INCLUDEPATH += $$PWD/../IPL/include/
|
|
INCLUDEPATH += $$PWD/../IPL/include/processes/
|
|
-INCLUDEPATH += $$PWD/../IPL/include/opencv/
|
|
+!haiku {
|
|
+ INCLUDEPATH += $$PWD/../IPL/include/opencv/
|
|
+}
|
|
+haiku {
|
|
+ QT_CONFIG -= no-pkg-config
|
|
+ CONFIG += link_pkgconfig
|
|
+ PKGCONFIG += opencv4
|
|
+}
|
|
DEPENDPATH += $$PWD/../IPL/include/
|
|
|
|
# Fervor autoupdater
|
|
--
|
|
2.37.3
|
|
|