diff options
author | Matt Melling <mattmelling@fastmail.com> | 2022-06-20 22:46:10 +0100 |
---|---|---|
committer | Matt Melling <mattmelling@fastmail.com> | 2022-06-22 23:08:56 +0100 |
commit | 5147a3e4c262bde42c7ded1aeb21fc2cd095e629 (patch) | |
tree | f1353b7f163918a5fbe0c952d3658ad6366ade9f | |
parent | ab4868bf49da1633ed1db14c6df803098cca1290 (diff) |
js8call: init at 2.2.0
-rw-r--r-- | pkgs/applications/radio/js8call/cmake.patch | 69 | ||||
-rw-r--r-- | pkgs/applications/radio/js8call/default.nix | 65 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 136 insertions, 0 deletions
diff --git a/pkgs/applications/radio/js8call/cmake.patch b/pkgs/applications/radio/js8call/cmake.patch new file mode 100644 index 000000000000..04552eac40ec --- /dev/null +++ b/pkgs/applications/radio/js8call/cmake.patch @@ -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> diff --git a/pkgs/applications/radio/js8call/default.nix b/pkgs/applications/radio/js8call/default.nix new file mode 100644 index 000000000000..e89d3445697f --- /dev/null +++ b/pkgs/applications/radio/js8call/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c0a8e10d1fd1..af8c014ef7fc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27640,6 +27640,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 { }; |