Skip to content

Commit

Permalink
astro/kstars: Update to 3.6.6
Browse files Browse the repository at this point in the history
KStars can only build with devel/indi >= 2.0.0 since version 3.6.3, but
we currently have INDI 1.9.6 in the ports tree, so there is no point
keeping it as a dependency until it is updated.
  • Loading branch information
BSDKaffee committed Aug 11, 2023
1 parent b2037a2 commit 15f93ab
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 301 deletions.
11 changes: 8 additions & 3 deletions astro/kstars/Makefile
@@ -1,5 +1,5 @@
PORTNAME= kstars
DISTVERSION= 3.6.5
DISTVERSION= 3.6.6
PORTEPOCH= 1
CATEGORIES= astro kde
MASTER_SITES= KDE/stable/${PORTNAME}
Expand All @@ -10,8 +10,8 @@ WWW= https://edu.kde.org/kstars

LICENSE= GPLv2

LIB_DEPENDS= libcfitsio.so:astro/cfitsio \
libindidriver.so:devel/indi \
LIB_DEPENDS= libXISF.so:graphics/libxisf \
libcfitsio.so:astro/cfitsio \
libqt5keychain.so:security/qtkeychain@qt5 \
libraw.so:graphics/libraw \
libgsl.so:math/gsl \
Expand All @@ -37,4 +37,9 @@ USE_QT= concurrent core datavis3d dbus declarative gui multimedia \
buildtools:build qmake:build
USE_XORG= x11

# Requires devel/indi >= 2.0.0 which is not in the ports tree yet. KStars builds
# fine with INDI 2.0.3, but support for the INDI 2.0 API in astro/phd2 and
# astro/stellarium as of 2023-08-10 appear to be works in progress.
CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_INDI

.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions astro/kstars/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1685647969
SHA256 (kstars-3.6.5.tar.xz) = 1c2a4510f0029e05e0cf3e76d83fabb6cf620165f142f95aad744f89fbaf2eb6
SIZE (kstars-3.6.5.tar.xz) = 114135376
TIMESTAMP = 1690902260
SHA256 (kstars-3.6.6.tar.xz) = 6783dab51bed2090687910c9258924053381fd1f91ee719d0d3dfc6df0128494
SIZE (kstars-3.6.6.tar.xz) = 135870036
54 changes: 12 additions & 42 deletions astro/kstars/files/patch-kstars_CMakeLists.txt
@@ -1,56 +1,26 @@
Patch by Heiko Becker upstream:
Fix linking without INDI

Without INDI present I get the following error:
ld: error: undefined symbol: pthread_create
>>> referenced by __threading_support:378 (/usr/include/c++/v1/__threading_support:378)
>>> supernovaecomponent.cpp.o:(std::__1::thread::thread<io::detail::AsynchronousReader::init(std::__1::unique_ptr<io::ByteSourceBase,
std::__1::default_delete<io::ByteSourceBase>>)::'lambda'(), void>(io::detail::AsynchronousReader::init(std::__1::unique_ptr<io::ByteSourceBase,
std::__1::default_delete<io::ByteSourceBase>>)::'lambda'()&&)) in archive lib/libKStarsLib.a

"x86_64-pc-linux-gnu-ld: ../lib/libKStarsLib.a(robuststatistics.cpp.o):
in function `Mathematics::GSLHelpers::gslMedianFromSortedData(
double const*, unsigned long, unsigned long)':
.../work/kstars-3.6.5/kstars/auxiliary/gslhelpers.h:306: undefined
reference to `gsl_stats_median_from_sorted_data'"

That is the case because Mathematics::RobustStatistics is used
unconditionally, which pulls in gslhelpers and the need to link with
GSL.

Also drop the duplicate linking of KF5::Notifications, KStarsLib already
links to it in the NOT ANDROID case.


--- kstars/CMakeLists.txt.orig 2023-05-31 08:23:38 UTC
--- kstars/CMakeLists.txt.orig 2023-08-01 06:19:45 UTC
+++ kstars/CMakeLists.txt
@@ -1169,6 +1169,8 @@ set(kstars_SRCS ${kstars_SRCS} ${fits2_SRCS} ${sep_SRC
set(kstarslite_SRCS ${kstarslite_SRCS} ${fits_klite_SRCS} ${sep_SRCS} ${hough_SRCS} ${fits2_klite_SRCS} ${kstarslite_libtess_SRC})

IF (NOT ANDROID)
+ # GSL
+ find_package(GSL REQUIRED)
qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.xml kstars.h KStars)
qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.SimClock.xml simclock.h SimClock)
qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.FOV.xml fov.h FOV)
@@ -1213,6 +1215,7 @@ IF (NOT ANDROID)
)

add_library(KStarsLib STATIC ${kstars_SRCS})
+ target_link_options(KStarsLib PUBLIC ${CMAKE_THREAD_LIBS_INIT})

if (BUILD_PYKSTARS)
set_target_properties(KStarsLib PROPERTIES POSITION_INDEPENDENT_CODE ON)
@@ -1243,6 +1246,7 @@ IF (NOT ANDROID)
Qt5::WebSockets
@@ -1250,6 +1250,7 @@ IF (NOT ANDROID)
${ZLIB_LIBRARIES}
Eigen3::Eigen
+ GSL::gsl
GSL::gsl
+ Threads::Threads
)

if (Qt5Keychain_FOUND)
@@ -1313,10 +1317,6 @@ if(INDI_FOUND)
@@ -1320,7 +1321,6 @@ if(INDI_FOUND)
## Linux + MacOS Lite: Requires INDI Qt5 Client
## Android: Requires INDI Qt5 Client built for Android
if (NOT ANDROID)
- # GSL
- find_package(GSL REQUIRED)
- include_directories(${GSL_INCLUDE_DIRS})
- target_link_libraries(KStarsLib ${GSL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} KF5::Notifications)
- target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT})
# StellarSolver
target_link_libraries(KStarsLib StellarSolver::stellarsolver)
endif ()

0 comments on commit 15f93ab

Please sign in to comment.