Merge pull request #178374 from mattmelling/js8call

js8call: init at 2.2.0
This commit is contained in:
legendofmiracles 2022-06-24 07:18:34 -06:00 committed by GitHub
commit 71c6522eac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 136 additions and 0 deletions

View file

@ -0,0 +1,69 @@
diff --git a/CMake/Modules/Findhamlib.cmake b/CMake/Modules/Findhamlib.cmake
index 1590f05..e797851 100644
--- a/CMake/Modules/Findhamlib.cmake
+++ b/CMake/Modules/Findhamlib.cmake
@@ -47,7 +47,7 @@ if (NOT PC_HAMLIB_FOUND)
# libusb-1.0 has no pkg-config file on Windows so we have to find it
# ourselves
- find_library (LIBUSB NAMES usb-1.0 PATH_SUFFIXES MinGW32/dll)
+ find_library (LIBUSB NAMES libusb-1.0 usb-1.0 PATH_SUFFIXES MinGW32/dll)
if (LIBUSB)
set (hamlib_EXTRA_LIBRARIES ${LIBUSB} ${hamlib_EXTRA_LIBRARIES})
get_filename_component (hamlib_libusb_path ${LIBUSB} PATH)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75b80b3..7c04265 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -558,7 +558,6 @@ find_package (FFTW3 COMPONENTS double single threads REQUIRED)
#
# libhamlib setup
#
-set (hamlib_STATIC 1)
find_package (hamlib 3 REQUIRED)
find_program (RIGCTL_EXE rigctl)
find_program (RIGCTLD_EXE rigctld)
@@ -576,6 +576,7 @@ message (STATUS "hamlib_LIBRARY_DIRS: ${hamlib_LIBRARY_DIRS}")
find_package (Qt5Widgets 5 REQUIRED)
find_package (Qt5Multimedia 5 REQUIRED)
find_package (Qt5PrintSupport 5 REQUIRED)
+find_package (Qt5SerialPort 5 REQUIRED)
if (WIN32)
add_definitions (-DQT_NEEDS_QTMAIN)
@@ -849,7 +850,7 @@ target_link_libraries (qcp Qt5::Widgets Qt5::PrintSupport)
add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS})
# set wsjtx_udp exports to static variants
target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE)
-target_link_libraries (wsjt_qt qcp Qt5::Widgets Qt5::Network)
+target_link_libraries (wsjt_qt qcp Qt5::Widgets Qt5::Network Qt5::SerialPort)
target_include_directories (wsjt_qt BEFORE PRIVATE ${hamlib_INCLUDE_DIRS})
if (WIN32)
target_link_libraries (wsjt_qt Qt5::AxContainer Qt5::AxBase)
@@ -959,7 +960,6 @@ else ()
)
endif ()
endif ()
-qt5_use_modules (js8call SerialPort) # not sure why the interface link library syntax above doesn't work
# if (UNIX)
# if (NOT WSJT_SKIP_MANPAGES)
@@ -1292,3 +1292,5 @@ configure_file ("${PROJECT_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
set (CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CMakeCPackOptions.cmake")
include (CPack)
+
+add_definitions (-DJS8_USE_HAMLIB_THREE)
diff --git a/Configuration.cpp b/Configuration.cpp
index 8258f97..63a29bb 100644
--- a/Configuration.cpp
+++ b/Configuration.cpp
@@ -160,7 +160,7 @@
#include <QFont>
#include <QFontDialog>
#include <QColorDialog>
-#include <QSerialPortInfo>
+#include <QtSerialPort/QSerialPortInfo>
#include <QScopedPointer>
#include <QDateTimeEdit>
#include <QProcess>

View file

@ -0,0 +1,65 @@
{ lib
, stdenv
, fetchFromBitbucket
, wrapQtAppsHook
, pkg-config
, hamlib
, libusb1
, cmake
, gfortran
, fftw
, fftwFloat
, qtbase
, qtmultimedia
, qtserialport
}:
stdenv.mkDerivation rec {
pname = "js8call";
version = "2.2.0";
src = fetchFromBitbucket {
owner = "widefido";
repo = pname;
rev = "v${version}-ga";
sha256 = "sha256-mFPhiAAibCiAkLrysAmIQalVCGd9ips2lqbAsowYprY=";
};
nativeBuildInputs = [
wrapQtAppsHook
gfortran
pkg-config
cmake
];
buildInputs = [
hamlib
libusb1
fftw
fftwFloat
qtbase
qtmultimedia
qtserialport
];
prePatch = ''
substituteInPlace CMakeLists.txt \
--replace "/usr/share/applications" "$out/share/applications" \
--replace "/usr/share/pixmaps" "$out/share/pixmaps" \
--replace "/usr/bin/" "$out/bin"
'';
patches = [ ./cmake.patch ];
meta = with lib; {
description = "Weak-signal keyboard messaging for amateur radio";
longDescription = ''
JS8Call is software using the JS8 Digital Mode providing weak signal
keyboard to keyboard messaging to Amateur Radio Operators.
'';
homepage = "http://js8call.com/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ melling ];
};
}

View file

@ -27674,6 +27674,8 @@ with pkgs;
josm = callPackage ../applications/misc/josm { };
js8call = qt5.callPackage ../applications/radio/js8call { };
jwm = callPackage ../applications/window-managers/jwm { };
jwm-settings-manager = callPackage ../applications/window-managers/jwm/jwm-settings-manager.nix { };