pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
(ham/wsjtx) Add missing patches
Module Name: pkgsrc-wip
Committed By: Makoto Fujiwara <makoto%if.t.u-tokyo.ac.jp@localhost>
Pushed By: mef
Date: Tue Jan 2 21:50:16 2024 +0900
Changeset: a0e1403ae6695e50f80b5da5f1d989262d578298
Modified Files:
wsjtx/distinfo
Added Files:
wsjtx/patches/patch-CMakeLists.txt
wsjtx/patches/patch-CMake_Modules_FindUsb.cmake
wsjtx/patches/patch-Radio.cpp
wsjtx/patches/patch-widgets_FrequencyDeltaLineEdit.cpp
wsjtx/patches/patch-widgets_FrequencyLineEdit.cpp
Log Message:
(ham/wsjtx) Add missing patches
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a0e1403ae6695e50f80b5da5f1d989262d578298
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
wsjtx/distinfo | 10 +--
wsjtx/patches/patch-CMakeLists.txt | 51 ++++++++++++++++
wsjtx/patches/patch-CMake_Modules_FindUsb.cmake | 71 ++++++++++++++++++++++
wsjtx/patches/patch-Radio.cpp | 25 ++++++++
.../patch-widgets_FrequencyDeltaLineEdit.cpp | 17 ++++++
wsjtx/patches/patch-widgets_FrequencyLineEdit.cpp | 16 +++++
6 files changed, 185 insertions(+), 5 deletions(-)
diffs:
diff --git a/wsjtx/distinfo b/wsjtx/distinfo
index 6219c4d48d..ecfd1ff9d4 100644
--- a/wsjtx/distinfo
+++ b/wsjtx/distinfo
@@ -3,9 +3,9 @@ $NetBSD$
BLAKE2s (wsjtx-2.5.4.tgz) = 67169293348ef4176ec9a709cde87488df716fd92af0a701b46f76f0216691db
SHA512 (wsjtx-2.5.4.tgz) = c4092d03af3346f0244d942c3db693f5d2c1ed7a2ec9077ded039b7d162e15abdaf09dcb9997d1833d25c366eb03a0dab6114313d423e7e2c9ff37d965261efc
Size (wsjtx-2.5.4.tgz) = 25369854 bytes
-SHA1 (patch-CMakeLists.txt) = ca70c05d38ce8b8a350c6dba1275e9e7b52c59eb
-SHA1 (patch-CMake_Modules_FindUsb.cmake) = 733ea44a5b854ed10aec4ac6df9826c868938eba
-SHA1 (patch-Radio.cpp) = 97cfb0996325cc3462fa436a107eafc2495c23c0
+SHA1 (patch-CMakeLists.txt) = 169df91b79455e7ac6e036210edddd0440822fde
+SHA1 (patch-CMake_Modules_FindUsb.cmake) = 6c9edbce838731a026d682ddd0a1174bbceb4e89
+SHA1 (patch-Radio.cpp) = a798fbf75deb3cd49c6a15cd1e74530bb955ee23
SHA1 (patch-hamlib.patch) = 8d5cec646b0fe317a41da3ed66a299ea1510c87f
-SHA1 (patch-widgets_FrequencyDeltaLineEdit.cpp) = 1fa3841592263c93ca89986ebe07bee46376cfd0
-SHA1 (patch-widgets_FrequencyLineEdit.cpp) = f6b8cccafdabab51057d216972e7184f06e0f685
+SHA1 (patch-widgets_FrequencyDeltaLineEdit.cpp) = 61adc842a3b8fae64d9a4110bed1f8d209d3e5d7
+SHA1 (patch-widgets_FrequencyLineEdit.cpp) = a70cf22461eb6a54fcf052079c7e5de6e4085313
diff --git a/wsjtx/patches/patch-CMakeLists.txt b/wsjtx/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..54257ce060
--- /dev/null
+++ b/wsjtx/patches/patch-CMakeLists.txt
@@ -0,0 +1,51 @@
+$NetBSD$
+
+From FreeBSD ports 2.5.4
+
+--- wsjtx/CMakeLists.txt.orig 2021-11-03 19:53:01.000000000 -0400
++++ CMakeLists.txt 2021-12-31 07:53:05.900792000 -0500
+@@ -41,7 +41,7 @@
+ endif ()
+
+ if (POLICY CMP0075)
+- cmake_policy (SET CMP0075 NEW) # honour CMAKE_REQUIRED_LIBRARIES in config checks
++ cmake_policy (SET CMP0075 NEW) # honour CMAKE_REQUIRED_LIBRARIES in config che,cks
+ endif ()
+
+ project (wsjtx
+@@ -867,7 +867,7 @@
+ # OpenMP
+ #
+ find_package (OpenMP)
+-
++set (OpenMP_C_FLAGS "-fopenmp")
+ #
+ # fftw3 single precision library
+ #
+@@ -884,7 +884,7 @@
+ check_type_size (CACHE_ALL HAMLIB_OLD_CACHING)
+ check_symbol_exists (rig_set_cache_timeout_ms "hamlib/rig.h" HAVE_HAMLIB_CACHING)
+
+-find_package (Usb REQUIRED)
++#find_package (Usb REQUIRED)
+
+ #
+ # Qt5 setup
+@@ -914,7 +914,7 @@
+ #
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
+
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -fexceptions -frtti")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fexceptions -frtti")
+
+ if (NOT APPLE)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas")
+@@ -1160,7 +1160,7 @@
+ target_link_libraries (encode77 wsjt_fort wsjt_cxx)
+
+ add_executable (wsprsim ${wsprsim_CSRCS})
+-target_link_libraries (wsprsim ${LIBM_LIBRARIES})
++target_link_libraries (wsprsim "-lm")
+
+ add_executable (jt4code lib/jt4code.f90)
+ target_link_libraries (jt4code wsjt_fort wsjt_cxx)
diff --git a/wsjtx/patches/patch-CMake_Modules_FindUsb.cmake b/wsjtx/patches/patch-CMake_Modules_FindUsb.cmake
new file mode 100644
index 0000000000..598a97f4fb
--- /dev/null
+++ b/wsjtx/patches/patch-CMake_Modules_FindUsb.cmake
@@ -0,0 +1,71 @@
+$NetBSD$
+
+From FreeBSD ports 2.5.4
+
+--- wsjtx/CMake/Modules/FindUsb.cmake.orig 2021-11-03 19:53:01.000000000 -0400
++++ CMake/Modules/FindUsb.cmake 2021-12-31 07:48:03.412537000 -0500
+@@ -13,25 +13,35 @@
+ # Usb::Usb - The libusb library
+ #
+
++if ( CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
++ message ( Status "FreeBSD libusb is built in")
++ set (Usb_FOUND True)
++ set(Usb_LIBRARY "usb")
++ set(Usb_INCLUDE_DIR "/usr/include")
++ set(Usb_LIBRARIES "")
++ add_library (Usb "usb")
++else()
+ include (LibFindMacros)
+
+-if (WIN32)
+- # Use path suffixes on MS Windows as we probably shouldn't
+- # trust the PATH envvar. PATH will still be searched to find the
+- # library as last resort.
+- if (CMAKE_SIZEOF_VOID_P MATCHES "8")
+- set (_library_options PATH_SUFFIXES MinGW64/dll MinGW64/static)
+- else ()
+- set (_library_options PATH_SUFFIXES MinGW32/dll MinGW32/static)
+- endif ()
+-endif ()
+-libfind_pkg_detect (Usb usb-1.0
+- FIND_PATH libusb.h PATH_SUFFIXES libusb-1.0
+- FIND_LIBRARY usb-1.0 ${_library_options}
+- )
++ if (WIN32)
++ # Use path suffixes on MS Windows as we probably shouldn't
++ # trust the PATH envvar. PATH will still be searched to find the
++ # library as last resort.
++ if (CMAKE_SIZEOF_VOID_P MATCHES "8")
++ set (_library_options PATH_SUFFIXES MinGW64/dll MinGW64/static)
++ else ()
++ set (_library_options PATH_SUFFIXES MinGW32/dll MinGW32/static)
++ endif ()
++ endif ()
+
+-libfind_process (Usb)
++ libfind_pkg_detect (Usb usb-1.0
++ FIND_PATH libusb.h PATH_SUFFIXES libusb-1.0
++ FIND_LIBRARY usb-1.0 ${_library_options}
++ )
+
++ libfind_process (Usb)
++endif()
++
+ if (Usb_FOUND AND NOT TARGET Usb::Usb)
+ add_library (Usb::Usb UNKNOWN IMPORTED)
+ set_target_properties (Usb::Usb PROPERTIES
+@@ -40,10 +50,12 @@
+ INTERFACE_INCLUDE_DIRECTORIES "${Usb_INCLUDE_DIRS}"
+ INTERFACE_LINK_LIBRARIES "${Usb_LIBRARIES}"
+ )
+-endif ()
++endif()
+
++if ( NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
+ mark_as_advanced (
+ Usb_INCLUDE_DIR
+ Usb_LIBRARY
+ Usb_LIBRARIES
+ )
++endif()
diff --git a/wsjtx/patches/patch-Radio.cpp b/wsjtx/patches/patch-Radio.cpp
new file mode 100644
index 0000000000..543daa6948
--- /dev/null
+++ b/wsjtx/patches/patch-Radio.cpp
@@ -0,0 +1,25 @@
+$NetBSD$
+
+From FreeBSD ports 2.5.4
+
+--- wsjtx/Radio.cpp.orig 2021-11-03 19:53:01.000000000 -0400
++++ Radio.cpp 2021-12-31 07:48:03.411318000 -0500
+@@ -54,7 +54,8 @@
+ value *= std::pow (10., scale);
+ if (ok)
+ {
+- if (value < 0. || value > std::numeric_limits<Frequency>::max ())
++#define MAXDOUBLEFREQUENCY 18446744073709551616.0
++ if (value < 0. || value > MAXDOUBLEFREQUENCY)
+ {
+ value = 0.;
+ *ok = false;
+@@ -92,7 +93,7 @@
+ if (ok)
+ {
+ if (value < -std::numeric_limits<Frequency>::max ()
+- || value > std::numeric_limits<Frequency>::max ())
++ || value > MAXDOUBLEFREQUENCY)
+ {
+ value = 0.;
+ *ok = false;
diff --git a/wsjtx/patches/patch-widgets_FrequencyDeltaLineEdit.cpp b/wsjtx/patches/patch-widgets_FrequencyDeltaLineEdit.cpp
new file mode 100644
index 0000000000..dc6d1857b1
--- /dev/null
+++ b/wsjtx/patches/patch-widgets_FrequencyDeltaLineEdit.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+From FreeBSD ports 2.5.4
+
+--- wsjtx/widgets/FrequencyDeltaLineEdit.cpp.orig 2021-11-03 19:53:01.000000000 -0400
++++ widgets/FrequencyDeltaLineEdit.cpp 2021-12-31 07:48:03.412129000 -0500
+@@ -39,8 +39,8 @@
+ FrequencyDeltaLineEdit::FrequencyDeltaLineEdit (QWidget * parent)
+ : QLineEdit (parent)
+ {
+- setValidator (new MHzValidator {-std::numeric_limits<FrequencyDelta>::max () / 10.e6,
+- std::numeric_limits<FrequencyDelta>::max () / 10.e6, this});
++ setValidator (new MHzValidator {(-(std::numeric_limits<FrequencyDelta>::max ())&-0xF) / 10.e6,
++ (std::numeric_limits<FrequencyDelta>::max ()&~0xF) / 10.e6, this});
+ }
+
+ auto FrequencyDeltaLineEdit::frequency_delta () const -> FrequencyDelta
diff --git a/wsjtx/patches/patch-widgets_FrequencyLineEdit.cpp b/wsjtx/patches/patch-widgets_FrequencyLineEdit.cpp
new file mode 100644
index 0000000000..b84113d053
--- /dev/null
+++ b/wsjtx/patches/patch-widgets_FrequencyLineEdit.cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+From FreeBSD ports 2.5.4
+
+--- wsjtx/widgets/FrequencyLineEdit.cpp.orig 2021-11-03 19:53:01.000000000 -0400
++++ widgets/FrequencyLineEdit.cpp 2021-12-31 07:48:03.411740000 -0500
+@@ -39,7 +39,8 @@
+ FrequencyLineEdit::FrequencyLineEdit (QWidget * parent)
+ : QLineEdit (parent)
+ {
+- setValidator (new MHzValidator {0., std::numeric_limits<Radio::Frequency>::max () / 10.e6, this});
++#define MAXDOUBLEFREQUENCY 18446744073709551616.0
++ setValidator (new MHzValidator {0., MAXDOUBLEFREQUENCY / 10.e6, this});
+ }
+
+ auto FrequencyLineEdit::frequency () const -> Frequency
Home |
Main Index |
Thread Index |
Old Index