View | Details | Raw Unified | Return to bug 266574
Collapse All | Expand All

(-)b/astro/stellarsolver/Makefile (-1 / +1 lines)
Lines 1-5 Link Here
1
PORTNAME=	stellarsolver
1
PORTNAME=	stellarsolver
2
DISTVERSION=	2.3
2
DISTVERSION=	2.4
3
CATEGORIES=	astro
3
CATEGORIES=	astro
4
4
5
MAINTAINER=	acm@FreeBSD.org
5
MAINTAINER=	acm@FreeBSD.org
(-)b/astro/stellarsolver/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1653202874
1
TIMESTAMP = 1663948663
2
SHA256 (rlancaste-stellarsolver-2.3_GH0.tar.gz) = c2747339af853a1a8147a4b9eba23f0a621912018b30a0b5a9aba9f557d2b9bc
2
SHA256 (rlancaste-stellarsolver-2.4_GH0.tar.gz) = e9cf7e73edb96a959f75dbbba16bd5e270f6e95c0d5c3dfa8727dfaf77d0617f
3
SIZE (rlancaste-stellarsolver-2.3_GH0.tar.gz) = 23403038
3
SIZE (rlancaste-stellarsolver-2.4_GH0.tar.gz) = 23402982
(-)b/astro/stellarsolver/files/patch-CMakeLists.txt (+49 lines)
Added Link Here
1
--- CMakeLists.txt.orig	2022-07-29 16:11:55 UTC
2
+++ CMakeLists.txt
3
@@ -58,29 +58,25 @@ else(WIN32)
4
 
5
 else(WIN32)
6
 
7
-try_run(RUN_RESULT_2 COMPILE_SUCCESS_2 ${CMAKE_CURRENT_BINARY_DIR} ${config_SRCS} COMPILE_DEFINITIONS -DTEST_DECLARE_QSORT_R=ON)
8
-if(COMPILE_SUCCESS_2 AND (RUN_RESULT_2 EQUAL 0))
9
-    SET(VAR_2 0)
10
+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)
11
+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)
12
+if(COMPILE_SUCCESS_GNU_QSORT_R AND (RUN_RESULT_GNU_QSORT_R EQUAL 0))
13
+    SET(WANT_DECLARE_QSORT_R 0)
14
+    SET(WANT_BUNDLED_QSORT_R 0)
15
+    SET(WANT_SWAP_QSORT_R 1)
16
 else()
17
-    SET(VAR_2 1)
18
+    SET(WANT_SWAP_QSORT_R 0)
19
+    if(COMPILE_SUCCESS_BSD_QSORT_R AND (RUN_RESULT_BSD_QSORT_R EQUAL 0))
20
+        SET(WANT_DECLARE_QSORT_R 0)
21
+        SET(WANT_BUNDLED_QSORT_R 0)
22
+    else()
23
+        SET(WANT_DECLARE_QSORT_R 1)
24
+        SET(WANT_BUNDLED_QSORT_R 1)
25
+    endif()
26
 endif()
27
-file(APPEND "${config_FN}" "#define NEED_DECLARE_QSORT_R ${VAR_2}\n")
28
-
29
-try_run(RUN_RESULT_3 COMPILE_SUCCESS_3 ${CMAKE_CURRENT_BINARY_DIR} ${config_SRCS} COMPILE_DEFINITIONS -DTEST_QSORT_R=ON)
30
-if(COMPILE_SUCCESS_3 AND (RUN_RESULT_3 EQUAL 0))
31
-    SET(VAR_3 1)
32
-else()
33
-    SET(VAR_3 0)
34
-endif()
35
-file(APPEND "${config_FN}" "#define NEED_QSORT_R ${VAR_3}\n")
36
-
37
-try_run(RUN_RESULT_4 COMPILE_SUCCESS_4 ${CMAKE_CURRENT_BINARY_DIR} ${config_SRCS} COMPILE_DEFINITIONS -DTEST_SWAP_QSORT_R=ON)
38
-if(COMPILE_SUCCESS_4 AND (RUN_RESULT_4 EQUAL 0))
39
-    SET(VAR_4 1)
40
-else()
41
-    SET(VAR_4 0)
42
-endif()
43
-file(APPEND "${config_FN}" "#define NEED_SWAP_QSORT_R ${VAR_4}\n")
44
+file(APPEND "${config_FN}" "#define NEED_DECLARE_QSORT_R ${WANT_DECLARE_QSORT_R}\n")
45
+file(APPEND "${config_FN}" "#define NEED_SWAP_QSORT_R ${WANT_SWAP_QSORT_R}\n")
46
+file(APPEND "${config_FN}" "#define NEED_QSORT_R ${WANT_BUNDLED_QSORT_R}\n")
47
 
48
 endif(WIN32)
49
 
(-)b/astro/stellarsolver/files/patch-stellarsolver_astrometry_os-features.h (+11 lines)
Added Link Here
1
--- stellarsolver/astrometry/os-features.h.orig	2022-07-29 16:11:55 UTC
2
+++ stellarsolver/astrometry/os-features.h
3
@@ -110,7 +110,7 @@
4
 
5
 #if NEED_DECLARE_QSORT_R
6
 //// NOTE: this declaration must match os-features-test.c .
7
-void qsort_r(void *base, size_t nmemb, size_t sz,
8
+void (qsort_r)(void *base, size_t nmemb, size_t sz,
9
              void *userdata,
10
              int (*compar)(void *, const void *, const void *));
11
 #endif
(-)b/astro/stellarsolver/files/patch-stellarsolver_astrometry_util_os-features-test.c (+75 lines)
Added Link Here
1
--- stellarsolver/astrometry/util/os-features-test.c.orig	2022-07-29 16:11:55 UTC
2
+++ stellarsolver/astrometry/util/os-features-test.c
3
@@ -14,7 +14,11 @@ int main() {
4
 }
5
 #endif
6
 
7
-#ifdef TEST_QSORT_R
8
+#ifdef TEST_BSD_QSORT_R
9
+void (qsort_r)(void *base, size_t nmemb, size_t sz,
10
+             void *userdata,
11
+             int (*compar)(void *, const void *, const void *));
12
+
13
 static int cmp(void* u, const void* a, const void* b) {
14
     return 0;
15
 }
16
@@ -22,51 +26,22 @@ int main() {
17
     int array;
18
     int baton;
19
     qsort_r(&array, 1, sizeof(int), &baton, cmp);
20
-    //printf("#define NEED_QSORT_R 0\n");
21
     return 0;
22
 }
23
 #endif
24
 
25
-#ifdef TEST_DECLARE_QSORT_R
26
-// Test whether just declaring qsort_r as we do causes a compile failure.
27
+#ifdef TEST_GNU_QSORT_R
28
+void (qsort_r)(void *base, size_t nmemb, size_t sz,
29
+             int (*compar)(const void *, const void *, void *),
30
+             void *userdata);
31
 
32
-void qsort_r(void *base, size_t nmemb, size_t sz,
33
-             void *userdata,
34
-             int (*compar)(void *, const void *, const void *));
35
-
36
-int main() {
37
-    //printf("#define NEED_DECLARE_QSORT_R 1\n");
38
+static int cmp(const void* a, const void* b, void* u) {
39
     return 0;
40
 }
41
-#endif
42
-
43
-#ifdef TEST_SWAP_QSORT_R
44
-// Use the result of TEST_DECLARE_QSORT_R and TEST_NEED_QSORT_R, or else
45
-// this test will fail with a warning about undefined qsort_r
46
-// Include .c rather than .h because we test with:
47
-//     gcc -o (exec) os-features-test.c
48
-// and if NEED_QSORT_R, os-features.c includes qsort_reentrant.c
49
-#include "os-features-config.h.tmp"
50
-#define DONT_INCLUDE_OS_FEATURES_CONFIG_H 1
51
-#include "os-features.c"
52
-#undef DONT_INCLUDE_OS_FEATURES_CONFIG_H
53
-// Test whether qsort_r works unswapped. (ie, qsort_r matches the definition of
54
-// QSORT_R defined in the os-features.h documentation.)
55
-static int sortfunc(void* thunk, const void* v1, const void* v2) {
56
-    const int* i1 = v1;
57
-    const int* i2 = v2;
58
-    if (*i1 < *i2)
59
-        return -1;
60
-    if (*i1 > *i2)
61
-        return 1;
62
-    return 0;
63
-}
64
 int main() {
65
-    int array[] = { 4, 17, 88, 34, 12, 12, 17 };
66
-    int N = sizeof(array)/sizeof(int);
67
-    int mythunk = 42;
68
-    qsort_r(array, N, sizeof(int), &mythunk, sortfunc);
69
-    //printf("#define NEED_SWAP_QSORT_R 0\n");
70
+    int array;
71
+    int baton;
72
+    qsort_r(&array, 1, sizeof(int), cmp, &baton);
73
     return 0;
74
 }
75
 #endif
(-)b/astro/stellarsolver/files/patch-stellarsolver_stellarsolver.cpp (-2 / +2 lines)
Lines 1-4 Link Here
1
--- stellarsolver/stellarsolver.cpp.orig	2020-11-15 04:11:58 UTC
1
--- stellarsolver/stellarsolver.cpp.orig	2022-07-29 16:11:55 UTC
2
+++ stellarsolver/stellarsolver.cpp
2
+++ stellarsolver/stellarsolver.cpp
3
@@ -7,6 +7,9 @@
3
@@ -7,6 +7,9 @@
4
 */
4
 */
Lines 10-16 Link Here
10
 #elif defined(_WIN32)
10
 #elif defined(_WIN32)
11
 #include "windows.h"
11
 #include "windows.h"
12
 #else //Linux
12
 #else //Linux
13
@@ -799,8 +802,12 @@ bool StellarSolver::appendStarsRAandDEC(QList<FITSImag
13
@@ -987,8 +990,12 @@ bool StellarSolver::getAvailableRAM(double &availableR
14
 //But from what I read, getting the Available RAM is inconsistent and buggy on many systems.
14
 //But from what I read, getting the Available RAM is inconsistent and buggy on many systems.
15
 bool StellarSolver::getAvailableRAM(double &availableRAM, double &totalRAM)
15
 bool StellarSolver::getAvailableRAM(double &availableRAM, double &totalRAM)
16
 {
16
 {
(-)b/astro/stellarsolver/pkg-plist (-9 / +1 lines)
Lines 72-89 lib/cmake/StellarSolver/StellarSolverConfig.cmake Link Here
72
lib/cmake/StellarSolver/StellarSolverConfigVersion.cmake
72
lib/cmake/StellarSolver/StellarSolverConfigVersion.cmake
73
lib/libstellarsolver.so
73
lib/libstellarsolver.so
74
lib/libstellarsolver.so.2
74
lib/libstellarsolver.so.2
75
lib/libstellarsolver.so.2.3
75
lib/libstellarsolver.so.2.4
76
libdata/pkgconfig/stellarsolver.pc
76
libdata/pkgconfig/stellarsolver.pc
77
share/applications/com.github.rlancaste.stellarbatchsolver.desktop
77
share/applications/com.github.rlancaste.stellarbatchsolver.desktop
78
share/icons/.DS_Store
79
share/icons/hicolor/.DS_Store
80
share/icons/hicolor/128x128/.DS_Store
81
share/icons/hicolor/128x128/apps/StellarBatchSolverIcon.png
78
share/icons/hicolor/128x128/apps/StellarBatchSolverIcon.png
82
share/icons/hicolor/16x16/.DS_Store
83
share/icons/hicolor/16x16/apps/StellarBatchSolverIcon.png
79
share/icons/hicolor/16x16/apps/StellarBatchSolverIcon.png
84
share/icons/hicolor/32x32/.DS_Store
85
share/icons/hicolor/32x32/apps/StellarBatchSolverIcon.png
80
share/icons/hicolor/32x32/apps/StellarBatchSolverIcon.png
86
share/icons/hicolor/48x48/.DS_Store
87
share/icons/hicolor/48x48/apps/StellarBatchSolverIcon.png
81
share/icons/hicolor/48x48/apps/StellarBatchSolverIcon.png
88
share/icons/hicolor/64x64/.DS_Store
89
share/icons/hicolor/64x64/apps/StellarBatchSolverIcon.png
82
share/icons/hicolor/64x64/apps/StellarBatchSolverIcon.png
90
- 

Return to bug 266574