pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/misc/stellarium



Module Name:    pkgsrc
Committed By:   adam
Date:           Fri Dec 27 18:19:27 UTC 2024

Modified Files:
        pkgsrc/misc/stellarium: Makefile PLIST distinfo
        pkgsrc/misc/stellarium/patches: patch-CMakeLists.txt
            patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp
            patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp
Added Files:
        pkgsrc/misc/stellarium/patches:
            patch-plugins_TelescopeControl_src_INDI_TelescopeClientINDI.cpp

Log Message:
stellarium: updated to 24.4

24.4 [2024-12-22]
The Stellarium Team has released final version in this year - 24.4.

The major changes of this version:
- Changed in DSO rendering
- Improvements in Core
- Improvements in Telescope Control plugin
- Updates in sky cultures

Behind the scenes, many more minor issues were fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 pkgsrc/misc/stellarium/Makefile
cvs rdiff -u -r1.56 -r1.57 pkgsrc/misc/stellarium/PLIST
cvs rdiff -u -r1.69 -r1.70 pkgsrc/misc/stellarium/distinfo
cvs rdiff -u -r1.13 -r1.14 \
    pkgsrc/misc/stellarium/patches/patch-CMakeLists.txt
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_TelescopeClientINDI.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/misc/stellarium/Makefile
diff -u pkgsrc/misc/stellarium/Makefile:1.167 pkgsrc/misc/stellarium/Makefile:1.168
--- pkgsrc/misc/stellarium/Makefile:1.167       Thu Nov 14 22:20:53 2024
+++ pkgsrc/misc/stellarium/Makefile     Fri Dec 27 18:19:27 2024
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.167 2024/11/14 22:20:53 wiz Exp $
+# $NetBSD: Makefile,v 1.168 2024/12/27 18:19:27 adam Exp $
 
-DISTNAME=      stellarium-24.3
-PKGREVISION=   3
+DISTNAME=      stellarium-24.4
 CATEGORIES=    misc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=Stellarium/}
 GITHUB_RELEASE=        v${PKGVERSION_NOREV}

Index: pkgsrc/misc/stellarium/PLIST
diff -u pkgsrc/misc/stellarium/PLIST:1.56 pkgsrc/misc/stellarium/PLIST:1.57
--- pkgsrc/misc/stellarium/PLIST:1.56   Mon Oct 21 07:15:32 2024
+++ pkgsrc/misc/stellarium/PLIST        Fri Dec 27 18:19:27 2024
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.56 2024/10/21 07:15:32 adam Exp $
+@comment $NetBSD: PLIST,v 1.57 2024/12/27 18:19:27 adam Exp $
 bin/stellarium
 man/man1/stellarium.1
 ${PLIST.desktop}share/applications/org.stellarium.Stellarium.desktop
@@ -956,7 +956,6 @@ share/stellarium/nebulae/default/m97dumo
 share/stellarium/nebulae/default/m98.png
 share/stellarium/nebulae/default/m99.png
 share/stellarium/nebulae/default/n1023.png
-share/stellarium/nebulae/default/n104.png
 share/stellarium/nebulae/default/n1042.png
 share/stellarium/nebulae/default/n1055.png
 share/stellarium/nebulae/default/n1097.png
@@ -3983,7 +3982,7 @@ share/stellarium/webroot/js/api/updatequ
 share/stellarium/webroot/js/api/viewcontrol.js
 share/stellarium/webroot/js/api/viewoptions.js
 share/stellarium/webroot/js/globalize.js
-share/stellarium/webroot/js/jquery-3.6.0.js
+share/stellarium/webroot/js/jquery-3.7.1.js
 share/stellarium/webroot/js/jquery-ui.js
 share/stellarium/webroot/js/jquery.ui.touch-punch.js
 share/stellarium/webroot/js/main.js

Index: pkgsrc/misc/stellarium/distinfo
diff -u pkgsrc/misc/stellarium/distinfo:1.69 pkgsrc/misc/stellarium/distinfo:1.70
--- pkgsrc/misc/stellarium/distinfo:1.69        Mon Oct 21 07:15:32 2024
+++ pkgsrc/misc/stellarium/distinfo     Fri Dec 27 18:19:27 2024
@@ -1,12 +1,13 @@
-$NetBSD: distinfo,v 1.69 2024/10/21 07:15:32 adam Exp $
+$NetBSD: distinfo,v 1.70 2024/12/27 18:19:27 adam Exp $
 
-BLAKE2s (stellarium-24.3.tar.xz) = 77c00601c8f0c443ac2c868e3ebc250f3eb0b419d73e60aad833a0d5e5eff0c4
-SHA512 (stellarium-24.3.tar.xz) = 8bb8ebdfdf57accf6d200f6c17d39edcda15c7ecdbfcd280f2a21e682fa62d62fc6523965d16b2033cee8f84da3dbb24db837c594a75144f5822d3576067000e
-Size (stellarium-24.3.tar.xz) = 328039964 bytes
-SHA1 (patch-CMakeLists.txt) = f8bac7e88be127af99a4d9de129e8fd80bf79bf6
+BLAKE2s (stellarium-24.4.tar.xz) = 58883611bbdc14217711186fc81ea12eab08e999478249816d59bd6d8fb07dcf
+SHA512 (stellarium-24.4.tar.xz) = 07a24fa9fc1f4e1c862925751d37169e391cf161decc764baa470406a3ce4e5fa15cf224f1affd7aab1cb224f66a49db1bd65bdd70dbdb43cc2e3c7b9ae92b9a
+Size (stellarium-24.4.tar.xz) = 328675340 bytes
+SHA1 (patch-CMakeLists.txt) = b29faddbe28f127c2bb7895217633627caf04f1a
 SHA1 (patch-data_CMakeLists.txt) = 29a5c1c8eb64baff1ef7bf64e3c0ea6bcdc7704f
 SHA1 (patch-doc_CMakeLists.txt) = fa9d28bced331e36bb0b19db2b67d54134a23e91
-SHA1 (patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp) = 153a3677ca8758a71bcb08b4b380fb2dffba26c5
-SHA1 (patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp) = ab3a0b572a194333823ecfb681a0df4e8cced0fd
+SHA1 (patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp) = b23f74699d936590dd3504d738fe97d9f8e92c81
+SHA1 (patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp) = 43a5fdb76c81ce1ffa302edd80f980388d3346b1
+SHA1 (patch-plugins_TelescopeControl_src_INDI_TelescopeClientINDI.cpp) = 835236947a6003db4c098c1b7f013caf753822fc
 SHA1 (patch-src_CMakeLists.txt) = aebac5163a125a26ef04008e8ef30d7a07e04991
 SHA1 (patch-src_core_StelFileMgr.cpp) = fa54c05eddbb8db25a3aaa056f838e9e3a361596

Index: pkgsrc/misc/stellarium/patches/patch-CMakeLists.txt
diff -u pkgsrc/misc/stellarium/patches/patch-CMakeLists.txt:1.13 pkgsrc/misc/stellarium/patches/patch-CMakeLists.txt:1.14
--- pkgsrc/misc/stellarium/patches/patch-CMakeLists.txt:1.13    Mon Oct 21 07:15:32 2024
+++ pkgsrc/misc/stellarium/patches/patch-CMakeLists.txt Fri Dec 27 18:19:27 2024
@@ -1,10 +1,10 @@
-$NetBSD: patch-CMakeLists.txt,v 1.13 2024/10/21 07:15:32 adam Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.14 2024/12/27 18:19:27 adam Exp $
 
 Do not use ccache.
 Do not use application bundle on Darwin.
 Do not fetch fast_float.
 
---- CMakeLists.txt.orig        2024-09-22 13:35:50.000000000 +0000
+--- CMakeLists.txt.orig        2024-12-22 10:38:06.000000000 +0000
 +++ CMakeLists.txt
 @@ -198,7 +198,7 @@ IF(OPENGL_DEBUG_LOGGING)
  ENDIF()
@@ -19,12 +19,12 @@ Do not fetch fast_float.
       ENDIF()
  ENDIF()
  
--IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+-IF(APPLE)
 +IF(FALSE)
-      SET(APPLE 1)
       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
       # share data location:
-@@ -362,7 +362,7 @@ IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "C
+      SET(SDATALOC "Resources")
+@@ -361,7 +361,7 @@ IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "C
            SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-string-plus-int")
          SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-string-plus-int")
       ENDIF()
@@ -33,7 +33,7 @@ Do not fetch fast_float.
          SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common -Wall -Wextra -Wno-unused-parameter -Wno-string-plus-int")
          SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Wall -Wextra -Wno-unknown-warning-option -Wno-string-plus-int")
       ENDIF()
-@@ -841,7 +841,7 @@ ENDIF()
+@@ -851,7 +851,7 @@ ENDIF()
  
  ########### Set some global variables ###########
  IF(UNIX AND NOT WIN32)
@@ -42,7 +42,7 @@ Do not fetch fast_float.
            SET(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/Stellarium.app/Contents")
       ELSE()
            ADD_DEFINITIONS(-DINSTALL_DATADIR="${CMAKE_INSTALL_PREFIX}/${SDATALOC}")          
-@@ -996,7 +996,7 @@ IF(GENERATE_PACKAGE_TARGET)
+@@ -1007,7 +1007,7 @@ IF(GENERATE_PACKAGE_TARGET)
  ENDIF()
  
  ########### macOS Bundling ###############
@@ -51,15 +51,15 @@ Do not fetch fast_float.
       MESSAGE(STATUS "macOS deployment target: ${CMAKE_OSX_DEPLOYMENT_TARGET} (${CMAKE_OSX_ARCHITECTURES})")
       SET(PACKAGE_OSX_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
       ADD_DEFINITIONS(-DPACKAGE_OSX_TARGET)
-@@ -1053,10 +1053,7 @@ ENDIF()
+@@ -1064,10 +1064,7 @@ ENDIF()
  
  include("cmake/Check-from_chars.cmake")
  IF(NOT FROM_CHARS_WORKS)
--    CPMFindPackage(NAME fast_float
+-    CPMFindPackage(NAME FastFloat
 -                   GIT_REPOSITORY https://github.com/fastfloat/fast_float
 -                   VERSION 6.1.0
 -                   EXCLUDE_FROM_ALL yes)
 +    find_package(FastFloat REQUIRED)
-     GET_TARGET_PROPERTY(fast_float_INCLUDE_DIRECTORIES
+     GET_TARGET_PROPERTY(FastFloat_INCLUDE_DIRECTORIES
                          FastFloat::fast_float INTERFACE_INCLUDE_DIRECTORIES)
-     INCLUDE_DIRECTORIES(${fast_float_INCLUDE_DIRECTORIES})
+     INCLUDE_DIRECTORIES(${FastFloat_INCLUDE_DIRECTORIES})

Index: pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp
diff -u pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp:1.1 pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp:1.2
--- pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp:1.1       Fri May  3 12:07:41 2024
+++ pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp   Fri Dec 27 18:19:27 2024
@@ -1,468 +1,19 @@
-$NetBSD: patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp,v 1.1 2024/05/03 12:07:41 wiz Exp $
+$NetBSD: patch-plugins_TelescopeControl_src_INDI_INDIConnection.cpp,v 1.2 2024/12/27 18:19:27 adam Exp $
 
-Port code to INDI 2.0.2
-https://github.com/Stellarium/stellarium/pull/3269/files
+Fix includes.
 
---- plugins/TelescopeControl/src/INDI/INDIConnection.cpp.orig  2024-02-04 13:27:52.000000000 +0000
+--- plugins/TelescopeControl/src/INDI/INDIConnection.cpp.orig  2024-12-18 11:01:07.000000000 +0000
 +++ plugins/TelescopeControl/src/INDI/INDIConnection.cpp
-@@ -44,98 +44,96 @@ INDIConnection::Coordinates INDIConnecti
- void INDIConnection::setPosition(INDIConnection::Coordinates coords)
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (!mTelescope)
-+      if (!mTelescope.isValid())
-               return;
+@@ -25,9 +25,9 @@
+ #include <limits>
+ #include <cmath>
+ 
+-#include <libs/indiclient/baseclient.h>
+-#include <libs/indidevice/basedevice.h>
+-#include <libs/indibase/inditelescope.h>
++#include <libindi/baseclient.h>
++#include <libindi/basedevice.h>
++#include <libindi/inditelescope.h>
  
--      if (!mTelescope->isConnected())
-+      if (!mTelescope.isConnected())
-       {
-               qDebug() << "Error: Telescope not connected";
-               return;
-       }
+ const int INDIConnection::SLEW_STOP = INDI::Telescope::SLEW_GUIDE - 1;
  
-       // Make sure the TRACK member of switch ON_COORD_SET is set
--      ISwitchVectorProperty *switchVector = mTelescope->getSwitch("ON_COORD_SET");
--      if (!switchVector)
-+      auto switchVector = mTelescope.getSwitch("ON_COORD_SET");
-+      if (!switchVector.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or ON_COORD_SET switch...";
-               return;
-       }
-       // Note that confusingly there is a SLEW switch member as well that will move but not track.
-       // TODO: Figure out if there is to be support for it
--      ISwitch *track = IUFindSwitch(switchVector, "TRACK");
-+      auto track = switchVector.findWidgetByName("TRACK");
-       if (track->s == ISS_OFF)
-       {
--              track->s = ISS_ON;
-+              track->setState(ISS_ON);
-               sendNewSwitch(switchVector);
-       }
- 
--      INumberVectorProperty *property = nullptr;
--      property = mTelescope->getNumber("EQUATORIAL_EOD_COORD");
--      if (!property)
-+      auto property = mTelescope.getNumber("EQUATORIAL_EOD_COORD");
-+      if (!property.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or EQUATORIAL_EOD_COORD property...";
-               return;
-       }
- 
--      property->np[0].value = coords.RA;
--      property->np[1].value = coords.DEC;
-+      property[0].setValue(coords.RA);
-+      property[1].setValue(coords.DEC);
-       sendNewNumber(property);
- }
- 
- void INDIConnection::syncPosition(INDIConnection::Coordinates coords)
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (!mTelescope)
-+      if (!mTelescope.isValid())
-               return;
- 
--      if (!mTelescope->isConnected())
-+      if (!mTelescope.isConnected())
-       {
-               qDebug() << "Error: Telescope not connected";
-               return;
-       }
- 
-       // Make sure the SYNC member of switch ON_COORD_SET is set
--      ISwitchVectorProperty *switchVector = mTelescope->getSwitch("ON_COORD_SET");
--      if (!switchVector)
-+      auto switchVector = mTelescope.getSwitch("ON_COORD_SET");
-+      if (!switchVector.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or ON_COORD_SET switch...";
-               return;
-       }
- 
--      ISwitch *track = IUFindSwitch(switchVector, "TRACK");
--      ISwitch *slew = IUFindSwitch(switchVector, "SLEW");
--      ISwitch *sync = IUFindSwitch(switchVector, "SYNC");
--      track->s = ISS_OFF;
--      slew->s = ISS_OFF;
--      sync->s = ISS_ON;
-+      auto track = switchVector.findWidgetByName("TRACK");
-+      auto slew = switchVector.findWidgetByName("SLEW");
-+      auto sync = switchVector.findWidgetByName("SYNC");
-+      track->setState(ISS_OFF);
-+      slew->setState(ISS_OFF);
-+      sync->setState(ISS_ON);
-       sendNewSwitch(switchVector);
- 
--      INumberVectorProperty *property = nullptr;
--      property = mTelescope->getNumber("EQUATORIAL_EOD_COORD");
--      if (!property)
-+      auto property = mTelescope.getNumber("EQUATORIAL_EOD_COORD");
-+      if (!property.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or EQUATORIAL_EOD_COORD property...";
-               return;
-       }
- 
--      property->np[0].value = coords.RA;
--      property->np[1].value = coords.DEC;
-+      property[0].setValue(coords.RA);
-+      property[1].setValue(coords.DEC);
-       sendNewNumber(property);
- 
-       // And now unset SYNC switch member to revert to default state/behavior
--      track->s = ISS_ON;
--      slew->s = ISS_OFF;
--      sync->s = ISS_OFF;
-+      track->setState(ISS_ON);
-+      slew->setState(ISS_OFF);
-+      sync->setState(ISS_OFF);
-       sendNewSwitch(switchVector);
- }
- 
- bool INDIConnection::isDeviceConnected() const
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (!mTelescope)
-+      if (!mTelescope.isValid())
-               return false;
- 
--      return mTelescope->isConnected();
-+      return mTelescope.isConnected();
- }
- 
- const QStringList INDIConnection::devices() const
-@@ -147,28 +145,28 @@ const QStringList INDIConnection::device
- void INDIConnection::unParkTelescope()
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (!mTelescope || !mTelescope->isConnected())
-+      if (!mTelescope.isValid() || !mTelescope.isConnected())
-               return;
- 
--      ISwitchVectorProperty *switchVector = mTelescope->getSwitch("TELESCOPE_PARK");
--      if (!switchVector)
-+      auto switchVector = mTelescope.getSwitch("TELESCOPE_PARK");
-+      if (!switchVector.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or TELESCOPE_PARK switch...";
-               return;
-       }
- 
--      ISwitch *park = IUFindSwitch(switchVector, "PARK");
-+      auto park = switchVector.findWidgetByName("PARK");
-       if (park->s == ISS_ON)
-       {
--              park->s = ISS_OFF;
-+              park->setState(ISS_OFF);
-               sendNewSwitch(switchVector);
-       }
- 
-       // The telescope will work without running command below, but I use it to avoid undefined state for parking property.
--      ISwitch *unpark = IUFindSwitch(switchVector, "UNPARK");
-+      auto unpark = switchVector.findWidgetByName("UNPARK");
-       if (unpark->s == ISS_OFF)
-       {
--              unpark->s = ISS_ON;
-+              unpark->setState(ISS_ON);
-               sendNewSwitch(switchVector);
-       }
- }
-@@ -179,27 +177,27 @@ void INDIConnection::unParkTelescope()
- void INDIConnection::parkTelescope()
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (!mTelescope || !mTelescope->isConnected())
-+      if (!mTelescope.isValid() || !mTelescope.isConnected())
-               return;
- 
--      ISwitchVectorProperty *switchVector = mTelescope->getSwitch("TELESCOPE_PARK");
--      if (!switchVector)
-+      auto switchVector = mTelescope.getSwitch("TELESCOPE_PARK");
-+      if (!switchVector.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or TELESCOPE_PARK switch...";
-               return;
-       }
- 
--      ISwitch *park = IUFindSwitch(switchVector, "PARK");
-+      auto park = switchVector.findWidgetByName("PARK");
-       if (park->s == ISS_OFF)
-       {
--              park->s = ISS_ON;
-+              park->setState(ISS_ON);
-               sendNewSwitch(switchVector);
-       }
- 
--      ISwitch *unpark = IUFindSwitch(switchVector, "UNPARK");
-+      auto unpark = switchVector.findWidgetByName("UNPARK");
-       if (unpark->s == ISS_ON)
-       {
--              unpark->s = ISS_OFF;
-+              unpark->setState(ISS_OFF);
-               sendNewSwitch(switchVector);
-       }
- }
-@@ -208,24 +206,24 @@ void INDIConnection::parkTelescope()
- void INDIConnection::moveNorth(int speed)
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (!mTelescope || !mTelescope->isConnected())
-+      if (!mTelescope.isValid() || !mTelescope.isConnected())
-               return;
- 
--      ISwitchVectorProperty *switchVector = mTelescope->getSwitch("TELESCOPE_MOTION_NS");
--      if (!switchVector)
-+      auto switchVector = mTelescope.getSwitch("TELESCOPE_MOTION_NS");
-+      if (!switchVector.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or TELESCOPE_MOTION_NS switch...";
-               return;
-       }
- 
--      ISwitch *motion = IUFindSwitch(switchVector, "MOTION_NORTH");
-+      auto motion = switchVector.findWidgetByName("MOTION_NORTH");
- 
-       if (speed == SLEW_STOP)
--              motion->s = ISS_OFF;
-+              motion->setState(ISS_OFF);
-       else
-       {
-               setSpeed(speed);
--              motion->s = ISS_ON;
-+              motion->setState(ISS_ON);
-       }
- 
-       sendNewSwitch(switchVector);
-@@ -234,24 +232,24 @@ void INDIConnection::moveNorth(int speed
- void INDIConnection::moveEast(int speed)
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (!mTelescope || !mTelescope->isConnected())
-+      if (!mTelescope.isValid() || !mTelescope.isConnected())
-               return;
- 
--      ISwitchVectorProperty *switchVector = mTelescope->getSwitch("TELESCOPE_MOTION_WE");
--      if (!switchVector)
-+      auto switchVector = mTelescope.getSwitch("TELESCOPE_MOTION_WE");
-+      if (!switchVector.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or TELESCOPE_MOTION_WE switch...";
-               return;
-       }
- 
--      ISwitch *motion = IUFindSwitch(switchVector, "MOTION_EAST");
-+      auto motion = switchVector.findWidgetByName("MOTION_EAST");
- 
-       if (speed == SLEW_STOP)
--              motion->s = ISS_OFF;
-+              motion->setState(ISS_OFF);
-       else
-       {
-               setSpeed(speed);
--              motion->s = ISS_ON;
-+              motion->setState(ISS_ON);
-       }
- 
-       sendNewSwitch(switchVector);
-@@ -260,24 +258,24 @@ void INDIConnection::moveEast(int speed)
- void INDIConnection::moveSouth(int speed)
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (!mTelescope || !mTelescope->isConnected())
-+      if (!mTelescope.isValid() || !mTelescope.isConnected())
-               return;
- 
--      ISwitchVectorProperty *switchVector = mTelescope->getSwitch("TELESCOPE_MOTION_NS");
--      if (!switchVector)
-+      auto switchVector = mTelescope.getSwitch("TELESCOPE_MOTION_NS");
-+      if (!switchVector.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or TELESCOPE_MOTION_NS switch...";
-               return;
-       }
- 
--      ISwitch *motion = IUFindSwitch(switchVector, "MOTION_SOUTH");
-+      auto motion = switchVector.findWidgetByName("MOTION_SOUTH");
- 
-       if (speed == SLEW_STOP)
--              motion->s = ISS_OFF;
-+              motion->setState(ISS_OFF);
-       else
-       {
-               setSpeed(speed);
--              motion->s = ISS_ON;
-+              motion->setState(ISS_ON);
-       }
- 
-       sendNewSwitch(switchVector);
-@@ -286,24 +284,24 @@ void INDIConnection::moveSouth(int speed
- void INDIConnection::moveWest(int speed)
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (!mTelescope || !mTelescope->isConnected())
-+      if (!mTelescope.isValid() || !mTelescope.isConnected())
-               return;
- 
--      ISwitchVectorProperty *switchVector = mTelescope->getSwitch("TELESCOPE_MOTION_WE");
--      if (!switchVector)
-+      auto switchVector = mTelescope.getSwitch("TELESCOPE_MOTION_WE");
-+      if (!switchVector.isValid())
-       {
-               qDebug() << "Error: unable to find Telescope or TELESCOPE_MOTION_WE switch...";
-               return;
-       }
- 
--      ISwitch *motion = IUFindSwitch(switchVector, "MOTION_WEST");
-+      auto motion = switchVector.findWidgetByName("MOTION_WEST");
- 
-       if (speed == SLEW_STOP)
--              motion->s = ISS_OFF;
-+              motion->setState(ISS_OFF);
-       else
-       {
-               setSpeed(speed);
--              motion->s = ISS_ON;
-+              motion->setState(ISS_ON);
-       }
- 
-       sendNewSwitch(switchVector);
-@@ -311,23 +309,24 @@ void INDIConnection::moveWest(int speed)
- 
- void INDIConnection::setSpeed(int speed)
- {
--      ISwitchVectorProperty *slewRateSP = mTelescope->getSwitch("TELESCOPE_SLEW_RATE");
-+      auto slewRateSP = mTelescope.getSwitch("TELESCOPE_SLEW_RATE");
- 
--      if (!slewRateSP || speed < 0 || speed > slewRateSP->nsp)
-+      if (!slewRateSP.isValid() || speed < 0 ||
-+                      static_cast<std::size_t>(speed) > slewRateSP.count())
-               return;
- 
--      IUResetSwitch(slewRateSP);
--      slewRateSP->sp[speed].s = ISS_ON;
-+      slewRateSP.reset();
-+      slewRateSP[speed].setState(ISS_ON);
-       sendNewSwitch(slewRateSP);
- }
- 
--void INDIConnection::newDevice(INDI::BaseDevice *dp)
-+void INDIConnection::newDevice(INDI::BaseDevice dp)
- {
-       std::lock_guard<std::mutex> lock(mMutex);
-       if (!dp)
-               return;
- 
--      QString name(dp->getDeviceName());
-+      QString name(dp.getDeviceName());
- 
-       qDebug() << "INDIConnection::newDevice| New Device... " << name;
- 
-@@ -337,91 +336,54 @@ void INDIConnection::newDevice(INDI::Bas
-       emit newDeviceReceived(name);
- }
- 
--void INDIConnection::removeDevice(INDI::BaseDevice *dp)
-+void INDIConnection::removeDevice(INDI::BaseDevice dp)
- {
-       std::lock_guard<std::mutex> lock(mMutex);
-       if (!dp)
-               return;
- 
--      QString name(dp->getDeviceName());
-+      QString name(dp.getDeviceName());
-       int index = mDevices.indexOf(name);
-       if (index != -1)
-               mDevices.removeAt(index);
- 
--      if (mTelescope == dp)
--              mTelescope = nullptr;
-+      if (mTelescope.isDeviceNameMatch(dp.getDeviceName()))
-+              mTelescope.detach();
- 
-       emit removeDeviceReceived(name);
- }
- 
--void INDIConnection::newProperty(INDI::Property *property)
-+void INDIConnection::newProperty(INDI::Property property)
- {
-       std::lock_guard<std::mutex> lock(mMutex);
--      if (mTelescope != property->getBaseDevice())
-+      if (!mTelescope.isDeviceNameMatch(
-+                              property.getBaseDevice().getDeviceName()))
-               return;
- 
--      QString name(property->getName());
-+      QString name(property.getName());
- 
-       qDebug() << "INDIConnection::newProperty| " << name;
- 
-       if (name == "EQUATORIAL_EOD_COORD")
-       {
--              mCoordinates.RA = property->getNumber()->np[0].value;
--              mCoordinates.DEC = property->getNumber()->np[1].value;
-+              mCoordinates.RA = property.getNumber()->np[0].value;
-+              mCoordinates.DEC = property.getNumber()->np[1].value;
-       }
- 
--      if (!mTelescope->isConnected())
-+      if (!mTelescope.isConnected())
-       {
--              connectDevice(mTelescope->getDeviceName());
--              if (mTelescope->isConnected())
-+              connectDevice(mTelescope.getDeviceName());
-+              if (mTelescope.isConnected())
-                       qDebug() << "connected\n";
-       }
- }
- 
--void INDIConnection::removeProperty(INDI::Property *property)
-+void INDIConnection::removeProperty(INDI::Property property)
- {
-       Q_UNUSED(property)
- }
- 
--void INDIConnection::newBLOB(IBLOB *bp)
--{
--      Q_UNUSED(bp)
--}
--
--void INDIConnection::newSwitch(ISwitchVectorProperty *svp)
--{
--      std::lock_guard<std::mutex> lock(mMutex);
--      QString name(svp->name);
--      if (name == "TELESCOPE_SLEW_RATE")
--      {
--              int speed = IUFindOnSwitchIndex(svp);
--              emit speedChanged(speed);
--      }
--}
--
--void INDIConnection::newNumber(INumberVectorProperty *nvp)
--{
--      std::lock_guard<std::mutex> lock(mMutex);
--
--      QString name(nvp->name);
--      if (name == "EQUATORIAL_EOD_COORD")
--      {
--              mCoordinates.RA = nvp->np[0].value;
--              mCoordinates.DEC = nvp->np[1].value;
--      }
--}
--
--void INDIConnection::newText(ITextVectorProperty *tvp)
--{
--      Q_UNUSED(tvp)
--}
--
--void INDIConnection::newLight(ILightVectorProperty *lvp)
--{
--      Q_UNUSED(lvp)
--}
--
--void INDIConnection::newMessage(INDI::BaseDevice *dp, int messageID)
-+void INDIConnection::newMessage(INDI::BaseDevice dp, int messageID)
- {
-       Q_UNUSED(dp)
-       Q_UNUSED(messageID)

Index: pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp
diff -u pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp:1.2 pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp:1.3
--- pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp:1.2       Fri May  3 12:07:41 2024
+++ pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp   Fri Dec 27 18:19:27 2024
@@ -1,43 +1,17 @@
-$NetBSD: patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp,v 1.2 2024/05/03 12:07:41 wiz Exp $
+$NetBSD: patch-plugins_TelescopeControl_src_INDI_INDIConnection.hpp,v 1.3 2024/12/27 18:19:27 adam Exp $
 
-Port code to INDI 2.0.2
-https://github.com/Stellarium/stellarium/pull/3269/files
+Fix includes.
 
---- plugins/TelescopeControl/src/INDI/INDIConnection.hpp.orig  2024-02-04 13:27:52.000000000 +0000
+--- plugins/TelescopeControl/src/INDI/INDIConnection.hpp.orig  2024-12-18 11:01:07.000000000 +0000
 +++ plugins/TelescopeControl/src/INDI/INDIConnection.hpp
-@@ -21,6 +21,7 @@
+@@ -20,8 +20,8 @@
+ #define INDICONNECTION_HPP
  
  #include <QObject>
- #include "libindi/baseclient.h"
+-#include <libs/indiclient/baseclient.h>
+-#include <libs/indidevice/basedevice.h>
++#include <libindi/baseclient.h>
 +#include <libindi/basedevice.h>
  
  #include <mutex>
  #include <QStringList>
-@@ -64,21 +65,16 @@ private:
-       void setSpeed(int speed);
- 
-       mutable std::mutex mMutex;
--      INDI::BaseDevice* mTelescope = nullptr;
-+      INDI::BaseDevice mTelescope;
-       Coordinates mCoordinates;
-       QStringList mDevices;
- 
- public: // from INDI::BaseClient
--      void newDevice(INDI::BaseDevice *dp) override;
--      void removeDevice(INDI::BaseDevice *dp) override;
--      void newProperty(INDI::Property *property) override;
--      void removeProperty(INDI::Property *property) override;
--      void newBLOB(IBLOB *bp) override;
--      void newSwitch(ISwitchVectorProperty *svp) override;
--      void newNumber(INumberVectorProperty *nvp) override;
--      void newText(ITextVectorProperty *tvp) override;
--      void newLight(ILightVectorProperty *lvp) override;
--      void newMessage(INDI::BaseDevice *dp, int messageID) override;
-+      void newDevice(INDI::BaseDevice dp) override;
-+      void removeDevice(INDI::BaseDevice dp) override;
-+      void newProperty(INDI::Property property) override;
-+      void removeProperty(INDI::Property property) override;
-+      void newMessage(INDI::BaseDevice dp, int messageID) override;
-       void serverConnected() override;
-       void serverDisconnected(int exit_code) override;
-       void unParkTelescope();

Added files:

Index: pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_TelescopeClientINDI.cpp
diff -u /dev/null pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_TelescopeClientINDI.cpp:1.1
--- /dev/null   Fri Dec 27 18:19:28 2024
+++ pkgsrc/misc/stellarium/patches/patch-plugins_TelescopeControl_src_INDI_TelescopeClientINDI.cpp      Fri Dec 27 18:19:27 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-plugins_TelescopeControl_src_INDI_TelescopeClientINDI.cpp,v 1.1 2024/12/27 18:19:27 adam Exp $
+
+Fix includes.
+
+--- plugins/TelescopeControl/src/INDI/TelescopeClientINDI.cpp.orig     2024-12-27 17:32:15.315769380 +0000
++++ plugins/TelescopeControl/src/INDI/TelescopeClientINDI.cpp
+@@ -25,7 +25,7 @@
+ 
+ #include "StelCore.hpp"
+ #include "StelUtils.hpp"
+-#include <libs/indibase/inditelescope.h>
++#include <libindi/inditelescope.h>
+ #include "INDIControlWidget.hpp"
+ 
+ TelescopeClientINDI::TelescopeClientINDI(const QString &name, const QString &params):



Home | Main Index | Thread Index | Old Index