mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
Stellarium: bump version, switch to Qt6
This commit is contained in:
@@ -1,112 +0,0 @@
|
||||
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
|
||||
|
||||
70
sci-astronomy/stellarium/patches/stellarium-1.0.patchset
Normal file
70
sci-astronomy/stellarium/patches/stellarium-1.0.patchset
Normal file
@@ -0,0 +1,70 @@
|
||||
From 9efc735bb708cd6f9a6e867f4db265602d548ccb Mon Sep 17 00:00:00 2001
|
||||
From: Georg Zotti <Georg.Zotti@univie.ac.at>
|
||||
Date: Tue, 2 Oct 2022 23:33:49 +1000
|
||||
Subject: Use QString instead of QByteArray (Fix #2709)
|
||||
|
||||
|
||||
diff --git a/plugins/Satellites/src/Satellite.cpp b/plugins/Satellites/src/Satellite.cpp
|
||||
index ff97eb2..589fd5f 100644
|
||||
--- a/plugins/Satellites/src/Satellite.cpp
|
||||
+++ b/plugins/Satellites/src/Satellite.cpp
|
||||
@@ -251,8 +251,8 @@ QVariantMap Satellite::getMap(void)
|
||||
map["stdMag"] = stdMag;
|
||||
map["rcs"] = RCS;
|
||||
map["status"] = status;
|
||||
- map["tle1"] = tleElements.first.data();
|
||||
- map["tle2"] = tleElements.second.data();
|
||||
+ map["tle1"] = tleElements.first;
|
||||
+ map["tle2"] = tleElements.second;
|
||||
|
||||
if (!description.isEmpty())
|
||||
map["description"] = description;
|
||||
@@ -544,8 +544,8 @@ QVariantMap Satellite::getInfoMap(const StelCore *core) const
|
||||
|
||||
map.insert("description", QString(description).replace("\n", " - "));
|
||||
map.insert("catalog", id);
|
||||
- map.insert("tle1", tleElements.first.data());
|
||||
- map.insert("tle2", tleElements.second.data());
|
||||
+ map.insert("tle1", tleElements.first);
|
||||
+ map.insert("tle2", tleElements.second);
|
||||
map.insert("tle-epoch", tleEpoch);
|
||||
|
||||
if (!internationalDesignator.isEmpty())
|
||||
@@ -788,8 +788,8 @@ void Satellite::setNewTleElements(const QString& tle1, const QString& tle2)
|
||||
delete old;
|
||||
}
|
||||
|
||||
- tleElements.first = tle1.toUtf8();
|
||||
- tleElements.second = tle2.toUtf8();
|
||||
+ tleElements.first = tle1;
|
||||
+ tleElements.second = tle2;
|
||||
|
||||
pSatWrapper = new gSatWrapper(id, tle1, tle2);
|
||||
orbitPoints.clear();
|
||||
@@ -802,8 +802,8 @@ void Satellite::setNewTleElements(const QString& tle1, const QString& tle2)
|
||||
|
||||
void Satellite::recomputeSatData()
|
||||
{
|
||||
- calculateEpochFromLine1(tleElements.first.data());
|
||||
- calculateSatDataFromLine2(tleElements.second.data());
|
||||
+ calculateEpochFromLine1(tleElements.first);
|
||||
+ calculateSatDataFromLine2(tleElements.second);
|
||||
}
|
||||
|
||||
void Satellite::update(double)
|
||||
diff --git a/plugins/Satellites/src/Satellite.hpp b/plugins/Satellites/src/Satellite.hpp
|
||||
index f612099..af7aed6 100644
|
||||
--- a/plugins/Satellites/src/Satellite.hpp
|
||||
+++ b/plugins/Satellites/src/Satellite.hpp
|
||||
@@ -313,7 +313,7 @@ private:
|
||||
int status;
|
||||
//! Contains the J2000 position.
|
||||
Vec3d XYZ;
|
||||
- QPair< QByteArray, QByteArray > tleElements;
|
||||
+ QPair< QString, QString > tleElements;
|
||||
double height, range, rangeRate;
|
||||
QList<CommLink> comms;
|
||||
Vec3f hintColor;
|
||||
--
|
||||
2.36.1
|
||||
|
||||
Reference in New Issue
Block a user