0001-Fixed-building-Stellarium-without-scripting.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 710d1c5acd9e962260ce395474819ded2eb6ce12 Mon Sep 17 00:00:00 2001
  2. From: "Alexander V. Wolf" <alex.v.wolf@gmail.com>
  3. Date: Tue, 29 Mar 2022 18:57:06 +0700
  4. Subject: [PATCH] Fixed building Stellarium without scripting
  5. Downloaded from upstream commit:
  6. https://github.com/Stellarium/stellarium/commit/710d1c5acd9e962260ce395474819ded2eb6ce12
  7. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  8. ---
  9. plugins/Calendars/src/Calendars.cpp | 2 ++
  10. plugins/Calendars/src/Calendars.hpp | 2 ++
  11. 2 files changed, 4 insertions(+)
  12. diff --git a/plugins/Calendars/src/Calendars.cpp b/plugins/Calendars/src/Calendars.cpp
  13. index e5d89a4c063..4df6caee42e 100644
  14. --- a/plugins/Calendars/src/Calendars.cpp
  15. +++ b/plugins/Calendars/src/Calendars.cpp
  16. @@ -251,6 +251,7 @@ void Calendars::init()
  17. }
  18. }
  19. +#ifdef ENABLE_SCRIPTING
  20. // Add calendar as scriptable object! Some scripting functions won't work though, as they use object types unknown to the scripting engine.
  21. void Calendars::makeCalendarsScriptable(StelScriptMgr *ssm)
  22. {
  23. @@ -260,6 +261,7 @@ void Calendars::makeCalendarsScriptable(StelScriptMgr *ssm)
  24. ssm->addObject(cal);
  25. }
  26. }
  27. +#endif
  28. void Calendars::loadSettings()
  29. {
  30. diff --git a/plugins/Calendars/src/Calendars.hpp b/plugins/Calendars/src/Calendars.hpp
  31. index 461ae1bd9ba..4696183d9d2 100644
  32. --- a/plugins/Calendars/src/Calendars.hpp
  33. +++ b/plugins/Calendars/src/Calendars.hpp
  34. @@ -145,8 +145,10 @@ class Calendars : public StelModule
  35. //! TODO: ADD HERE: Chinese, NewHinduSolar, NewHinduLunar, ...
  36. Calendar* getCal(QString name);
  37. + #ifdef ENABLE_SCRIPTING
  38. //! to be called after program startup, when StelScriptMgr has been set up.
  39. void makeCalendarsScriptable(StelScriptMgr *ssm);
  40. + #endif
  41. signals:
  42. //void jdChanged(double jd);