mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Stellarium: add recipe
This commit is contained in:
67
sci-astronomy/stellarium/additional-files/stellarium.rdef.in
Normal file
67
sci-astronomy/stellarium/additional-files/stellarium.rdef.in
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "Stellarium",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource vector_icon {
|
||||
$"6E63696605020006023E1A413876B8B8AE5F3E49BF495B8A455DA300887AAEFF"
|
||||
$"4F417805F90200040200535353FF092B0105000400650A020CBD14BD10BD14BD"
|
||||
$"10BCE6BD22BC87BD3BBCB6BD2DBCA7BD66BCE7BDBFBCCCBD8FBCEABDF2BCDFBE"
|
||||
$"59BCE3BE26BD11BE4BBD73BE2CBD41BE38BDA6BE36BE07BE5EBDD6BE4DBE05BE"
|
||||
$"29BE04BDBFBE00BDF4BE20BD91BE58BD34BE4ABD6ABE2ABD29BDD2BD0DBDFCBD"
|
||||
$"21BDAFBCE4BD74BC89BD93BCB5BD55BCB5BD14BD10BD3FBCECBD14BD10BD14BD"
|
||||
$"10BD14BD10BD14BD10000BBF5CBACABF5CBACABF2DBADDBECBBAF6BEFCBAE8BE"
|
||||
$"EBBB23BF2ABB7EBF10BB4DBF2DBBB1BF22BC18BF25BBE5BF54BC08BFB9BBE9BF"
|
||||
$"85BBF3BFECBBF4C04DBC19C01CBC09C04ABBE6C045BB7FC043BBB2C061BB4FC0"
|
||||
$"A634C086BB25C076BAEAC016BACCC044BADFBFF2BAA2BFB9BA44BFD7BA71BF9B"
|
||||
$"BA71BF5CBACABF81BAA1BF5CBACA000BBA63BAC9BA63BAC9BA34BADCB9D1BAF6"
|
||||
$"BA02BAE8B9F0BB21BA2EBB77BA12BB4ABA35BBADBA2BBC19BA2DBBE3BA5CBC08"
|
||||
$"BABFBBE8BA8CBBF3BAF1BBF4BB51BC1ABB21BC09BB4FBBE6BB4DBB7FBB4ABBB3"
|
||||
$"BB68BB4FBBACBAF9BB8CBB25BB7CBAEABB1BBACBBB4ABADEBAF7BAA2BAC1BA44"
|
||||
$"BADEBA71BAA2BA71BA63BAC9BA87BAA1BA63BAC90008C2AAB969C2AAB969C2DC"
|
||||
$"B9A5C342BA1AC314B9DBC3EBBB04C3C8BD52C423BC3EC37DBE4BC1D7BF8DC2C4"
|
||||
$"BF20C130BFDFBFB9BFDCC071BFEEC071C060C237C09BC152C0B0C3F142C594BD"
|
||||
$"58C571BF0EC5CCBB8AC2AAB969C476B9B7C2AAB9690009BDBFB582BDBFB582C0"
|
||||
$"18B50EC4B2B694C299B56DC6D8B7BFC971BBF9C890B9B0CA48BE20C9B1C2C3CA"
|
||||
$"5AC08EC99EC2EFC978C34BC99DC32BC791C3A4C3B6C362C59FC39FBEC6C2C1B5"
|
||||
$"53BFB8BA2EC0B3B54FBD5FB79DB935B622BB08B923B74DBDBFB582BB59B5F5BD"
|
||||
$"BFB5820609FFFF01C2AAB969C2AAB969C476B9B7C594BD58C5CCBB8AC571BF0E"
|
||||
$"C237C09BC3F142C152C0B0BFB9BFDCC071C060C071BFEEC1D7BF8DC130BFDFC2"
|
||||
$"C4BF20C3C8BD52C37DBE4BC423BC3EC342BA1AC3EBBB04C314B9DBC2AAB969C2"
|
||||
$"DCB9A5C2AAB969B969020CBA63BAC9BA63BAC9BA87BAA1BAC1BA44BAA2BA71BA"
|
||||
$"DEBA71BB1BBACBBAF7BAA2BB4ABADEBBACBAF9BB7CBAEABB8CBB25BB4DBB7FBB"
|
||||
$"68BB4FBB4ABBB3BB51BC1ABB4FBBE6BB21BC09BABFBBE8BAF1BBF4BA8CBBF3BA"
|
||||
$"2BBC19BA5CBC08BA2DBBE3BA2EBB77BA35BBADBA12BB4AB9D1BAF6B9F0BB21BA"
|
||||
$"02BAE8BA63BAC9BA34BADCBA63BAC9BA63BAC9BA63BAC9BA63BAC9020CBF5CBA"
|
||||
$"CABF5CBACABF81BAA1BFB9BA44BF9BBA71BFD7BA71C016BACCBFF2BAA2C044BA"
|
||||
$"DFC0A634C076BAEAC086BB25C045BB7FC061BB4FC043BBB2C04DBC19C04ABBE6"
|
||||
$"C01CBC09BFB9BBE9BFECBBF4BF85BBF3BF22BC18BF54BC08BF25BBE5BF2ABB7E"
|
||||
$"BF2DBBB1BF10BB4DBECBBAF6BEEBBB23BEFCBAE8BF5CBACABF2DBADDBF5CBACA"
|
||||
$"BF5CBACABF5CBACABF5CBACA020CBD14BD10BD14BD10BD3FBCECBD74BC89BD55"
|
||||
$"BCB5BD93BCB5BDD2BD0DBDAFBCE4BDFCBD21BE58BD34BE2ABD29BE4ABD6ABE04"
|
||||
$"BDBFBE20BD91BE00BDF4BE07BE5EBE05BE29BDD6BE4DBD73BE2CBDA6BE36BD41"
|
||||
$"BE38BCDFBE59BD11BE4BBCE3BE26BCE7BDBFBCEABDF2BCCCBD8FBC87BD3BBCA7"
|
||||
$"BD66BCB6BD2DBD14BD10BCE6BD22BD14BD10BD14BD10BD14BD10BD14BD100609"
|
||||
$"FFFF01B553BFB8B553BFB8BA2EC0B3C3B6C362BEC6C2C1C59FC39FC978C34BC7"
|
||||
$"91C3A4C96FC36EC95BC3B3C967C391C866C607C44EC916C691C7FCC21DCA2DBD"
|
||||
$"2AC9D2BF88CA6BBAF2C943B787C621B8EEC7F0B619C452B553BFB8B54EC206B5"
|
||||
$"53BFB8BFB8080A04020904024000000000000000003CA4554480004A8EBB0A03"
|
||||
$"02040912401233000000000000401234C222B6C222D001178400040A00050001"
|
||||
$"02030402401233000000000000401234C222B6C222D00A010105024012330000"
|
||||
$"00000000401234C222B6C222D00A01010602401233000000000000401234C222"
|
||||
$"B6C222D00A01010702401233000000000000401234C222B6C222D00A01010802"
|
||||
$"401233000000000000401234C222B6C222D00A02010902401233000000000000"
|
||||
$"401234C222B6C222D0"
|
||||
};
|
||||
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
|
||||
|
||||
92
sci-astronomy/stellarium/stellarium-0.22.1.recipe
Normal file
92
sci-astronomy/stellarium/stellarium-0.22.1.recipe
Normal file
@@ -0,0 +1,92 @@
|
||||
SUMMARY="3D photo-realistic skies in real time"
|
||||
DESCRIPTION="Stellarium is a free open source planetarium for your computer. \
|
||||
It shows a realistic sky in 3D, just like what you see with the naked eye, \
|
||||
binoculars or a telescope."
|
||||
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="61a595ecc345dcc7517359573d0dc772e67ecaf6d52fefab142a77c92cf3fa24"
|
||||
PATCHES="stellarium-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="stellarium.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
stellarium$secondaryArchSuffix = $portVersion
|
||||
app:Stellarium = $portVersion
|
||||
"
|
||||
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:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5OpenGL$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:lrelease$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:perl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
mkdir -p $appsDir
|
||||
mv $prefix/bin/stellarium $appsDir/Stellarium
|
||||
rm -rf $prefix/{bin,share}
|
||||
|
||||
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 LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/stellarium.rdef.in > stellarium.rdef
|
||||
|
||||
addResourcesToBinaries stellarium.rdef $appsDir/Stellarium
|
||||
addAppDeskbarSymlink $appsDir/Stellarium
|
||||
}
|
||||
Reference in New Issue
Block a user