diff --git a/astro/stellarsolver/Makefile b/astro/stellarsolver/Makefile index 147ed6ac8470..6344f56d261e 100644 --- a/astro/stellarsolver/Makefile +++ b/astro/stellarsolver/Makefile @@ -1,25 +1,28 @@ PORTNAME= stellarsolver -DISTVERSION= 2.5 -PORTREVISION= 2 +DISTVERSION= 2.8 CATEGORIES= astro MAINTAINER= acm@FreeBSD.org COMMENT= Astrometric Plate Solver built on Astrometry.net and SEP WWW= https://github.com/rlancaste/stellarsolver LICENSE= GPLv3 LIB_DEPENDS= libcfitsio.so:astro/cfitsio \ libgsl.so:math/gsl \ libwcs.so:astro/wcslib -USES= cmake desktop-file-utils iconv ninja qt:5 pkgconfig -USE_QT= buildtools concurrent core gui qmake:build network widgets +USES= cmake desktop-file-utils iconv ninja qt:6 pkgconfig +USE_QT= base tools:build USE_GITHUB= yes GH_ACCOUNT= rlancaste USE_LDCONFIG= yes -CMAKE_ARGS+= -DBUILD_BATCH_SOLVER=on +CMAKE_ARGS+= -DBUILD_BATCH_SOLVER=on \ + -DUSE_QT5=off + +post-patch: + @${RM} ${WRKSRC}/stellarsolver/astrometry/include/astrometry/os-features.h.orig .include diff --git a/astro/stellarsolver/distinfo b/astro/stellarsolver/distinfo index f3f55a557bc2..10b2af5300c3 100644 --- a/astro/stellarsolver/distinfo +++ b/astro/stellarsolver/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1695257494 -SHA256 (rlancaste-stellarsolver-2.5_GH0.tar.gz) = 539f3c312a3095afc117ae2c3111630f974a1c99dde7b0b7bebf16ee7a862a07 -SIZE (rlancaste-stellarsolver-2.5_GH0.tar.gz) = 23402988 +TIMESTAMP = 1785954869 +SHA256 (rlancaste-stellarsolver-2.8_GH0.tar.gz) = 1456cac5cd67353e19e1c6e57546af052a9302b7fbe2deaa649a44eec45fbec8 +SIZE (rlancaste-stellarsolver-2.8_GH0.tar.gz) = 26576524 diff --git a/astro/stellarsolver/files/patch-CMakeLists.txt b/astro/stellarsolver/files/patch-CMakeLists.txt index cc35eb8cca54..7bd9c662787f 100644 --- a/astro/stellarsolver/files/patch-CMakeLists.txt +++ b/astro/stellarsolver/files/patch-CMakeLists.txt @@ -1,49 +1,49 @@ ---- CMakeLists.txt.orig 2022-07-29 16:11:55 UTC +--- CMakeLists.txt.orig 2026-06-24 17:39:22 UTC +++ CMakeLists.txt -@@ -58,29 +58,25 @@ else(WIN32) +@@ -69,29 +69,25 @@ else(WIN32) else(WIN32) -try_run(RUN_RESULT_2 COMPILE_SUCCESS_2 ${CMAKE_CURRENT_BINARY_DIR} ${config_SRCS} COMPILE_DEFINITIONS -DTEST_DECLARE_QSORT_R=ON) -if(COMPILE_SUCCESS_2 AND (RUN_RESULT_2 EQUAL 0)) - SET(VAR_2 0) +try_run(RUN_RESULT_BSD_QSORT_R COMPILE_SUCCESS_BSD_QSORT_R ${CMAKE_CURRENT_BINARY_DIR} ${config_SRCS} COMPILE_DEFINITIONS -DTEST_BSD_QSORT_R=ON) +try_run(RUN_RESULT_GNU_QSORT_R COMPILE_SUCCESS_GNU_QSORT_R ${CMAKE_CURRENT_BINARY_DIR} ${config_SRCS} COMPILE_DEFINITIONS -DTEST_GNU_QSORT_R=ON) +if(COMPILE_SUCCESS_GNU_QSORT_R AND (RUN_RESULT_GNU_QSORT_R EQUAL 0)) + SET(WANT_DECLARE_QSORT_R 0) + SET(WANT_BUNDLED_QSORT_R 0) + SET(WANT_SWAP_QSORT_R 1) else() - SET(VAR_2 1) + SET(WANT_SWAP_QSORT_R 0) + if(COMPILE_SUCCESS_BSD_QSORT_R AND (RUN_RESULT_BSD_QSORT_R EQUAL 0)) + SET(WANT_DECLARE_QSORT_R 0) + SET(WANT_BUNDLED_QSORT_R 0) + else() + SET(WANT_DECLARE_QSORT_R 1) + SET(WANT_BUNDLED_QSORT_R 1) + endif() endif() -file(APPEND "${config_FN}" "#define NEED_DECLARE_QSORT_R ${VAR_2}\n") - -try_run(RUN_RESULT_3 COMPILE_SUCCESS_3 ${CMAKE_CURRENT_BINARY_DIR} ${config_SRCS} COMPILE_DEFINITIONS -DTEST_QSORT_R=ON) -if(COMPILE_SUCCESS_3 AND (RUN_RESULT_3 EQUAL 0)) - SET(VAR_3 1) -else() - SET(VAR_3 0) -endif() -file(APPEND "${config_FN}" "#define NEED_QSORT_R ${VAR_3}\n") - -try_run(RUN_RESULT_4 COMPILE_SUCCESS_4 ${CMAKE_CURRENT_BINARY_DIR} ${config_SRCS} COMPILE_DEFINITIONS -DTEST_SWAP_QSORT_R=ON) -if(COMPILE_SUCCESS_4 AND (RUN_RESULT_4 EQUAL 0)) - SET(VAR_4 1) -else() - SET(VAR_4 0) -endif() -file(APPEND "${config_FN}" "#define NEED_SWAP_QSORT_R ${VAR_4}\n") +file(APPEND "${config_FN}" "#define NEED_DECLARE_QSORT_R ${WANT_DECLARE_QSORT_R}\n") +file(APPEND "${config_FN}" "#define NEED_SWAP_QSORT_R ${WANT_SWAP_QSORT_R}\n") +file(APPEND "${config_FN}" "#define NEED_QSORT_R ${WANT_BUNDLED_QSORT_R}\n") endif(WIN32) diff --git a/astro/stellarsolver/files/patch-stellarsolver_astrometry_include_astrometry_os-features.h b/astro/stellarsolver/files/patch-stellarsolver_astrometry_include_astrometry_os-features.h new file mode 100644 index 000000000000..cc889e9bd0ff --- /dev/null +++ b/astro/stellarsolver/files/patch-stellarsolver_astrometry_include_astrometry_os-features.h @@ -0,0 +1,26 @@ +--- stellarsolver/astrometry/include/astrometry/os-features.h.orig 2026-06-24 17:39:22 UTC ++++ stellarsolver/astrometry/include/astrometry/os-features.h +@@ -108,23 +108,6 @@ + -Ubuntu 8.10 + */ + +-#if NEED_DECLARE_QSORT_R +-//// NOTE: this declaration must match os-features-test.c . +-void qsort_r(void *base, size_t nmemb, size_t sz, +- void *userdata, +- int (*compar)(void *, const void *, const void *)); +-#endif +- +-#if NEED_SWAP_QSORT_R +-#define QSORT_R(a,b,c,d,e) qsort_r(a,b,c,e,d) +-#define QSORT_COMPARISON_FUNCTION(func, thunk, v1, v2) func(v1, v2, thunk) +- +-#else +-#define QSORT_R qsort_r +-#define QSORT_COMPARISON_FUNCTION(func, thunk, v1, v2) func(thunk, v1, v2) +- +-#endif +- + //# Modified for the StellarSolver Internal Library for thread safety + // Portable reentrant wrappers for platform-specific APIs. + // Each wraps the platform's reentrant variant behind a uniform interface. diff --git a/astro/stellarsolver/files/patch-stellarsolver_astrometry_os-features.h b/astro/stellarsolver/files/patch-stellarsolver_astrometry_os-features.h deleted file mode 100644 index 14f21b96aa81..000000000000 --- a/astro/stellarsolver/files/patch-stellarsolver_astrometry_os-features.h +++ /dev/null @@ -1,11 +0,0 @@ ---- stellarsolver/astrometry/os-features.h.orig 2022-07-29 16:11:55 UTC -+++ stellarsolver/astrometry/os-features.h -@@ -110,7 +110,7 @@ - - #if NEED_DECLARE_QSORT_R - //// NOTE: this declaration must match os-features-test.c . --void qsort_r(void *base, size_t nmemb, size_t sz, -+void (qsort_r)(void *base, size_t nmemb, size_t sz, - void *userdata, - int (*compar)(void *, const void *, const void *)); - #endif diff --git a/astro/stellarsolver/files/patch-stellarsolver_astrometry_util_os-features-test.c b/astro/stellarsolver/files/patch-stellarsolver_astrometry_util_os-features-test.c deleted file mode 100644 index de338b4fc2a9..000000000000 --- a/astro/stellarsolver/files/patch-stellarsolver_astrometry_util_os-features-test.c +++ /dev/null @@ -1,75 +0,0 @@ ---- stellarsolver/astrometry/util/os-features-test.c.orig 2022-07-29 16:11:55 UTC -+++ stellarsolver/astrometry/util/os-features-test.c -@@ -14,7 +14,11 @@ int main() { - } - #endif - --#ifdef TEST_QSORT_R -+#ifdef TEST_BSD_QSORT_R -+void (qsort_r)(void *base, size_t nmemb, size_t sz, -+ void *userdata, -+ int (*compar)(void *, const void *, const void *)); -+ - static int cmp(void* u, const void* a, const void* b) { - return 0; - } -@@ -22,51 +26,22 @@ int main() { - int array; - int baton; - qsort_r(&array, 1, sizeof(int), &baton, cmp); -- //printf("#define NEED_QSORT_R 0\n"); - return 0; - } - #endif - --#ifdef TEST_DECLARE_QSORT_R --// Test whether just declaring qsort_r as we do causes a compile failure. -+#ifdef TEST_GNU_QSORT_R -+void (qsort_r)(void *base, size_t nmemb, size_t sz, -+ int (*compar)(const void *, const void *, void *), -+ void *userdata); - --void qsort_r(void *base, size_t nmemb, size_t sz, -- void *userdata, -- int (*compar)(void *, const void *, const void *)); -- --int main() { -- //printf("#define NEED_DECLARE_QSORT_R 1\n"); -+static int cmp(const void* a, const void* b, void* u) { - return 0; - } --#endif -- --#ifdef TEST_SWAP_QSORT_R --// Use the result of TEST_DECLARE_QSORT_R and TEST_NEED_QSORT_R, or else --// this test will fail with a warning about undefined qsort_r --// Include .c rather than .h because we test with: --// gcc -o (exec) os-features-test.c --// and if NEED_QSORT_R, os-features.c includes qsort_reentrant.c --#include "os-features-config.h.tmp" --#define DONT_INCLUDE_OS_FEATURES_CONFIG_H 1 --#include "os-features.c" --#undef DONT_INCLUDE_OS_FEATURES_CONFIG_H --// Test whether qsort_r works unswapped. (ie, qsort_r matches the definition of --// QSORT_R defined in the os-features.h documentation.) --static int sortfunc(void* thunk, const void* v1, const void* v2) { -- const int* i1 = v1; -- const int* i2 = v2; -- if (*i1 < *i2) -- return -1; -- if (*i1 > *i2) -- return 1; -- return 0; --} - int main() { -- int array[] = { 4, 17, 88, 34, 12, 12, 17 }; -- int N = sizeof(array)/sizeof(int); -- int mythunk = 42; -- qsort_r(array, N, sizeof(int), &mythunk, sortfunc); -- //printf("#define NEED_SWAP_QSORT_R 0\n"); -+ int array; -+ int baton; -+ qsort_r(&array, 1, sizeof(int), cmp, &baton); - return 0; - } - #endif diff --git a/astro/stellarsolver/files/patch-stellarsolver_externalextractorsolver.cpp b/astro/stellarsolver/files/patch-stellarsolver_externalextractorsolver.cpp new file mode 100644 index 000000000000..b928942e7523 --- /dev/null +++ b/astro/stellarsolver/files/patch-stellarsolver_externalextractorsolver.cpp @@ -0,0 +1,30 @@ +--- stellarsolver/externalextractorsolver.cpp.orig 2026-06-24 17:39:22 UTC ++++ stellarsolver/externalextractorsolver.cpp +@@ -81,6 +81,18 @@ ExternalProgramPaths ExternalExtractorSolver::getDefau + paths.watneyBinaryPath = "/opt/watney/watney-solve"; + paths.wcsPath = "/usr/bin/wcsinfo"; + break; ++ case FREEBSD_DEFAULT: ++ paths.confPath = "%%LOCALBASE%%/etc/astrometry.cfg"; ++ paths.sextractorBinaryPath = "%%LOCALBASE%%/bin/sextractor"; ++ paths.solverPath = "%%LOCALBASE%%/bin/solve-field"; ++ (QFile("/bin/astap").exists()) ? ++ paths.astapBinaryPath = "/bin/astap" : ++ paths.astapBinaryPath = "/opt/astap/astap"; ++ if(QFile("%%LOCALBASE%%/bin/astap").exists()) ++ paths.astapBinaryPath = "%%LOCALBASE%%/bin/astap"; ++ paths.watneyBinaryPath = "/%%LOCALBASE%%/bin/watney-solve"; ++ paths.wcsPath = "%%LOCALBASE%%/bin/wcsinfo"; ++ break; + case MAC_HOMEBREW: + paths.confPath = "/usr/local/etc/astrometry.cfg"; + paths.sextractorBinaryPath = "/usr/local/bin/sex"; +@@ -114,6 +126,8 @@ ExternalProgramPaths ExternalExtractorSolver::getDefau + return getDefaultExternalPaths(MAC_HOMEBREW); + #elif defined(Q_OS_LINUX) + return getDefaultExternalPaths(LINUX_DEFAULT); ++#elif defined(Q_OS_FREEBSD) ++ return getDefaultExternalPaths(FREEBSD_DEFAULT); + #else //Windows + return getDefaultExternalPaths(WIN_ANSVR); + #endif diff --git a/astro/stellarsolver/files/patch-stellarsolver_parameters.h b/astro/stellarsolver/files/patch-stellarsolver_parameters.h new file mode 100644 index 000000000000..513f08d7b0ba --- /dev/null +++ b/astro/stellarsolver/files/patch-stellarsolver_parameters.h @@ -0,0 +1,10 @@ +--- stellarsolver/parameters.h.orig 2026-06-24 17:39:22 UTC ++++ stellarsolver/parameters.h +@@ -33,6 +33,7 @@ typedef enum + { + LINUX_DEFAULT, + LINUX_INTERNAL, ++ FREEBSD_DEFAULT, + MAC_HOMEBREW, + WIN_ANSVR, + WIN_CYGWIN diff --git a/astro/stellarsolver/files/patch-stellarsolver_stellarsolver.cpp b/astro/stellarsolver/files/patch-stellarsolver_stellarsolver.cpp index ea540aa0169f..fc9292425123 100644 --- a/astro/stellarsolver/files/patch-stellarsolver_stellarsolver.cpp +++ b/astro/stellarsolver/files/patch-stellarsolver_stellarsolver.cpp @@ -1,26 +1,38 @@ ---- stellarsolver/stellarsolver.cpp.orig 2022-07-29 16:11:55 UTC +--- stellarsolver/stellarsolver.cpp.orig 2026-06-24 17:39:22 UTC +++ stellarsolver/stellarsolver.cpp -@@ -7,6 +7,9 @@ - */ +@@ -9,6 +9,9 @@ + #include #if defined(__APPLE__) #include +#elif defined(__FreeBSD__) +#include +#include #elif defined(_WIN32) #include "windows.h" #else //Linux -@@ -987,8 +990,12 @@ bool StellarSolver::getAvailableRAM(double &availableR +@@ -1020,6 +1023,11 @@ QStringList StellarSolver::getDefaultIndexFolderPaths( + addPathToListIfExists(&indexFilePaths, QDir::homePath() + "/Library/Application Support/Astrometry"); + //Homebrew location + addPathToListIfExists(&indexFilePaths, "/usr/local/share/astrometry"); ++#elif defined(Q_OS_FREEBSD) ++ //FreeBSD Default Location ++ addPathToListIfExists(&indexFilePaths, "/usr/local/share/astrometry/"); ++ //FreeBSD Local KStars Location ++ addPathToListIfExists(&indexFilePaths, QDir::homePath() + "/.local/share/kstars/astrometry/"); + #elif defined(Q_OS_LINUX) + //Linux Default Location + addPathToListIfExists(&indexFilePaths, "/usr/share/astrometry/"); +@@ -1044,8 +1052,12 @@ bool StellarSolver::getAvailableRAM(double &availableR //But from what I read, getting the Available RAM is inconsistent and buggy on many systems. bool StellarSolver::getAvailableRAM(double &availableRAM, double &totalRAM) { --#if defined(Q_OS_OSX) -+#if defined(Q_OS_OSX) || defined(Q_OS_FREEBSD) +-#if defined(Q_OS_MACOS) ++#if defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD) +#if defined(Q_OS_FREEBSD) + int mib [] = { CTL_HW, HW_REALMEM }; +#else int mib [] = { CTL_HW, HW_MEMSIZE }; +#endif size_t length; length = sizeof(int64_t); int64_t RAMcheck; diff --git a/astro/stellarsolver/pkg-plist b/astro/stellarsolver/pkg-plist index 7d2e5230cd2f..743e9e6f26d7 100644 --- a/astro/stellarsolver/pkg-plist +++ b/astro/stellarsolver/pkg-plist @@ -1,82 +1,83 @@ bin/StellarBatchSolver include/libstellarsolver/astrometry/an-bool.h include/libstellarsolver/astrometry/anqfits.h include/libstellarsolver/astrometry/bl-nl.h include/libstellarsolver/astrometry/bl-nl.inc include/libstellarsolver/astrometry/bl-nl.ph include/libstellarsolver/astrometry/bl-sort.h include/libstellarsolver/astrometry/bl.h include/libstellarsolver/astrometry/bl.inc include/libstellarsolver/astrometry/bl.ph include/libstellarsolver/astrometry/blind.h include/libstellarsolver/astrometry/codefile.h include/libstellarsolver/astrometry/codekd.h include/libstellarsolver/astrometry/datalog.h include/libstellarsolver/astrometry/engine.h include/libstellarsolver/astrometry/errors.h include/libstellarsolver/astrometry/fit-wcs.h include/libstellarsolver/astrometry/fitsbin.h include/libstellarsolver/astrometry/fitsfile.h include/libstellarsolver/astrometry/fitsioutils.h include/libstellarsolver/astrometry/fitstable.h include/libstellarsolver/astrometry/gslutils.h include/libstellarsolver/astrometry/healpix.h include/libstellarsolver/astrometry/index.h include/libstellarsolver/astrometry/ioutils.h include/libstellarsolver/astrometry/kdtree.h include/libstellarsolver/astrometry/kdtree_fits_io.h include/libstellarsolver/astrometry/keywords.h include/libstellarsolver/astrometry/log.h include/libstellarsolver/astrometry/matchobj.h include/libstellarsolver/astrometry/mathutil.h include/libstellarsolver/astrometry/mathutil.inc include/libstellarsolver/astrometry/os-features-config.h include/libstellarsolver/astrometry/os-features.h include/libstellarsolver/astrometry/permutedsort.h include/libstellarsolver/astrometry/qfits_byteswap.h include/libstellarsolver/astrometry/qfits_card.h include/libstellarsolver/astrometry/qfits_config.h include/libstellarsolver/astrometry/qfits_convert.h include/libstellarsolver/astrometry/qfits_error.h include/libstellarsolver/astrometry/qfits_float.h include/libstellarsolver/astrometry/qfits_header.h include/libstellarsolver/astrometry/qfits_image.h include/libstellarsolver/astrometry/qfits_keywords.h include/libstellarsolver/astrometry/qfits_md5.h include/libstellarsolver/astrometry/qfits_memory.h include/libstellarsolver/astrometry/qfits_rw.h include/libstellarsolver/astrometry/qfits_std.h include/libstellarsolver/astrometry/qfits_table.h include/libstellarsolver/astrometry/qfits_time.h include/libstellarsolver/astrometry/qfits_tools.h include/libstellarsolver/astrometry/quad-utils.h include/libstellarsolver/astrometry/quadfile.h include/libstellarsolver/astrometry/sip-utils.h include/libstellarsolver/astrometry/sip.h include/libstellarsolver/astrometry/solver.h include/libstellarsolver/astrometry/starkd.h include/libstellarsolver/astrometry/starutil.h include/libstellarsolver/astrometry/starutil.inc include/libstellarsolver/astrometry/starxy.h include/libstellarsolver/astrometry/tic.h include/libstellarsolver/astrometry/tweak2.h include/libstellarsolver/astrometry/verify.h include/libstellarsolver/extractorsolver.h include/libstellarsolver/parameters.h include/libstellarsolver/stellarsolver.h +include/libstellarsolver/stellarsolver_export.h include/libstellarsolver/structuredefinitions.h include/libstellarsolver/version.h include/libstellarsolver/wcsdata.h lib/cmake/StellarSolver/StellarSolverConfig-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/StellarSolver/StellarSolverConfig.cmake lib/cmake/StellarSolver/StellarSolverConfigVersion.cmake -lib/libstellarsolver.so -lib/libstellarsolver.so.2 -lib/libstellarsolver.so.2.5 +lib/libstellarsolver6.so +lib/libstellarsolver6.so.2 +lib/libstellarsolver6.so.2.8 libdata/pkgconfig/stellarsolver.pc share/applications/com.github.rlancaste.stellarbatchsolver.desktop share/icons/hicolor/128x128/apps/StellarBatchSolverIcon.png share/icons/hicolor/16x16/apps/StellarBatchSolverIcon.png share/icons/hicolor/32x32/apps/StellarBatchSolverIcon.png share/icons/hicolor/48x48/apps/StellarBatchSolverIcon.png share/icons/hicolor/64x64/apps/StellarBatchSolverIcon.png