mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
Stellarium: add recipe
This commit is contained in:
112
sci-astronomy/stellarium/patches/stellarium-0.22.1.patchset
Normal file
112
sci-astronomy/stellarium/patches/stellarium-0.22.1.patchset
Normal file
@@ -0,0 +1,112 @@
|
||||
From 762634cd74d856d461957f84dce6c961628f096e Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 1 Apr 2022 19:35:18 +1000
|
||||
Subject: Fixes for Haiku
|
||||
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index bf8a219..da4b590 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -484,6 +484,10 @@ IF(ENABLE_LIBGPS)
|
||||
SET(STELMAIN_DEPS ${STELMAIN_DEPS} ${GPS_LIBRARY})
|
||||
ENDIF()
|
||||
|
||||
+IF(HAIKU)
|
||||
+ SET(STELMAIN_DEPS ${STELMAIN_DEPS} network)
|
||||
+ENDIF()
|
||||
+
|
||||
# Main executable/library setup
|
||||
IF(GENERATE_STELMAINLIB)
|
||||
ADD_LIBRARY(stelMain SHARED ${stellarium_lib_SRCS} ${stellarium_RES_CXX})
|
||||
diff --git a/src/external/libindi/libs/indibase/baseclient.cpp b/src/external/libindi/libs/indibase/baseclient.cpp
|
||||
index 7b98e97..f85b5c8 100644
|
||||
--- a/src/external/libindi/libs/indibase/baseclient.cpp
|
||||
+++ b/src/external/libindi/libs/indibase/baseclient.cpp
|
||||
@@ -50,6 +50,10 @@
|
||||
#define net_close close
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <sys/select.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef _MSC_VER
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
diff --git a/src/external/libindi/libs/indicom.c b/src/external/libindi/libs/indicom.c
|
||||
index deecba2..6ae24b8 100644
|
||||
--- a/src/external/libindi/libs/indicom.c
|
||||
+++ b/src/external/libindi/libs/indicom.c
|
||||
@@ -976,6 +976,7 @@ int tty_connect(const char *device, int bit_rate, int word_size, int parity, int
|
||||
if (t_fd == -1)
|
||||
return TTY_PORT_BUSY;
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
// Set port in exclusive mode to prevent other non-root processes from opening it.
|
||||
// JM 2019-08-12: Do not set it for bluetooth
|
||||
if (bt == 0 && ioctl(t_fd, TIOCEXCL) == -1)
|
||||
@@ -984,7 +985,7 @@ int tty_connect(const char *device, int bit_rate, int word_size, int parity, int
|
||||
close(t_fd);
|
||||
return TTY_PORT_FAILURE;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
// Get the current options and save them so we can restore the default settings later.
|
||||
if (tcgetattr(t_fd, &tty_setting) == -1)
|
||||
{
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From f1e7782cefcf935691c2ce5776524ac0b5218830 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 25 Apr 2022 20:53:22 +1000
|
||||
Subject: Use system settings dir
|
||||
|
||||
|
||||
diff --git a/src/core/StelFileMgr.cpp b/src/core/StelFileMgr.cpp
|
||||
index 9d8cbc6..b1b1561 100644
|
||||
--- a/src/core/StelFileMgr.cpp
|
||||
+++ b/src/core/StelFileMgr.cpp
|
||||
@@ -58,6 +58,8 @@ void StelFileMgr::init()
|
||||
}
|
||||
#elif defined(Q_OS_MAC)
|
||||
userDir = QDir::homePath() + "/Library/Application Support/Stellarium";
|
||||
+#elif defined(Q_OS_HAIKU)
|
||||
+ userDir = QDir::homePath() + "/config/settings/Stellarium";
|
||||
#else
|
||||
userDir = QDir::homePath() + "/.stellarium";
|
||||
#endif
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From a9f2ff7df7cde85b2a5f7d572b1284e7f69d0898 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 25 Apr 2022 21:18:00 +1000
|
||||
Subject: Fix data dir
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2657326..8121b27 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -201,8 +201,12 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# share data location:
|
||||
SET(SDATALOC "Resources")
|
||||
ELSE()
|
||||
- # share data location:
|
||||
- SET(SDATALOC "share/${PACKAGE}")
|
||||
+ IF(HAIKU)
|
||||
+ SET(SDATALOC "data/${PACKAGE}")
|
||||
+ ELSE()
|
||||
+ # share data location:
|
||||
+ SET(SDATALOC "share/${PACKAGE}")
|
||||
+ ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user