mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +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
|
||||
|
||||
@@ -6,8 +6,8 @@ HOMEPAGE="https://stellarium.org"
|
||||
COPYRIGHT="2001-2022 Fabien Chéreau"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/Stellarium/stellarium/releases/download/v$portVersion/stellarium-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="31e965d32cafc0fbad212c7ef4efbeac988f909206013554e1fe35123ebb9376"
|
||||
SOURCE_URI="https://github.com/Stellarium/stellarium/archive/refs/tags/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="841dfbd27fa6ea97c4ce22424b12a9e73ad70d61af892734ce2f67d7681ec76d"
|
||||
PATCHES="stellarium-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="stellarium.rdef.in"
|
||||
|
||||
@@ -21,34 +21,42 @@ PROVIDES="
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libQt5Charts$secondaryArchSuffix
|
||||
lib:libQt5Concurrent$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5MultimediaWidgets$secondaryArchSuffix
|
||||
lib:libQt5Multimedia$secondaryArchSuffix
|
||||
lib:libQt5Network$secondaryArchSuffix
|
||||
lib:libQt5OpenGL$secondaryArchSuffix
|
||||
lib:libQt5PrintSupport$secondaryArchSuffix
|
||||
lib:libQt5Positioning$secondaryArchSuffix
|
||||
lib:libQt5Script$secondaryArchSuffix
|
||||
lib:libQt5SerialPort$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
lib:libopenal$secondaryArchSuffix
|
||||
lib:libQt6Charts$secondaryArchSuffix
|
||||
lib:libQt6Concurrent$secondaryArchSuffix
|
||||
lib:libQt6Core$secondaryArchSuffix
|
||||
lib:libQt6Gui$secondaryArchSuffix
|
||||
lib:libQt6Multimedia$secondaryArchSuffix
|
||||
lib:libQt6MultimediaWidgets$secondaryArchSuffix
|
||||
lib:libQt6Network$secondaryArchSuffix
|
||||
lib:libQt6OpenGL$secondaryArchSuffix
|
||||
lib:libQt6OpenGLWidgets$secondaryArchSuffix
|
||||
lib:libQt6Positioning$secondaryArchSuffix
|
||||
lib:libQt6Qml$secondaryArchSuffix
|
||||
lib:libQt6SerialPort$secondaryArchSuffix
|
||||
lib:libQt6Widgets$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
qt6_tools${secondaryArchSuffix}_devel
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5OpenGL$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
devel:libopenal$secondaryArchSuffix
|
||||
devel:libQt6Charts$secondaryArchSuffix
|
||||
devel:libQt6Core$secondaryArchSuffix
|
||||
devel:libQt6Gui$secondaryArchSuffix
|
||||
devel:libQt6Multimedia$secondaryArchSuffix
|
||||
devel:libQt6OpenGL$secondaryArchSuffix
|
||||
devel:libQt6Positioning$secondaryArchSuffix
|
||||
devel:libQt6Qml$secondaryArchSuffix
|
||||
devel:libQt6SerialPort$secondaryArchSuffix
|
||||
devel:libQt6Widgets$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:lrelease$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:perl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
@@ -61,7 +69,12 @@ BUILD()
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DENABLE_SHOWMYSKY=OFF
|
||||
|
||||
sed -e '/#include <algorithm>/a #include <sys/select.h>' -i _deps/indiclient-src/libs/indibase/baseclient.cpp
|
||||
sed -e '/if (bt == 0 && ioctl(t_fd, TIOCEXCL) == -1)/c if (0)' -i _deps/indiclient-src/libs/indicom.c
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
@@ -77,7 +90,7 @@ INSTALL()
|
||||
local APP_SIGNATURE="application/x-vnd.stellarium"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local MINOR="0"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
Reference in New Issue
Block a user