From 93c071107f9b8c90687e2e89f4e96a99e427fa31 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 16 May 2022 02:28:19 -0400 Subject: [PATCH] New package: direwolf-1.6 --- srcpkgs/direwolf/patches/fix_desktop.patch | 20 +++++++++ srcpkgs/direwolf/patches/fix_musl.patch | 44 +++++++++++++++++++ .../patches/fix_scripts_install.patch | 36 +++++++++++++++ .../direwolf/patches/fix_udev_install.patch | 13 ++++++ srcpkgs/direwolf/template | 15 +++++++ 5 files changed, 128 insertions(+) create mode 100644 srcpkgs/direwolf/patches/fix_desktop.patch create mode 100644 srcpkgs/direwolf/patches/fix_musl.patch create mode 100644 srcpkgs/direwolf/patches/fix_scripts_install.patch create mode 100644 srcpkgs/direwolf/patches/fix_udev_install.patch create mode 100644 srcpkgs/direwolf/template diff --git a/srcpkgs/direwolf/patches/fix_desktop.patch b/srcpkgs/direwolf/patches/fix_desktop.patch new file mode 100644 index 000000000000..3f851c4c44f1 --- /dev/null +++ b/srcpkgs/direwolf/patches/fix_desktop.patch @@ -0,0 +1,20 @@ +fix issues in the desktop file (no icon, hardcodes xterm) + +upstreamed in wb2osz/direwolf#393 + +--- a/cmake/cpack/direwolf.desktop.in ++++ b/cmake/cpack/direwolf.desktop.in +@@ -2,9 +2,9 @@ + Name=@APPLICATION_NAME@ + Comment=APRS Soundcard TNC +-Exec=@APPLICATION_DESKTOP_EXEC@ ++Exec=@CMAKE_PROJECT_NAME@ +-Icon=@CMAKE_PROJECT_NAME@_icon.png ++Icon=@CMAKE_PROJECT_NAME@_icon + StartupNotify=true +-Terminal=false ++Terminal=true + Type=Application + Categories=HamRadio + Keywords=Ham Radio;APRS;Soundcard TNC;KISS;AGWPE;AX.25 + diff --git a/srcpkgs/direwolf/patches/fix_musl.patch b/srcpkgs/direwolf/patches/fix_musl.patch new file mode 100644 index 000000000000..0b755ea53da7 --- /dev/null +++ b/srcpkgs/direwolf/patches/fix_musl.patch @@ -0,0 +1,44 @@ +upstreamed in wb2osz/direwolf#394 + +From 81f2f53675b3a965baa4dad13ee913eec26ce9d1 Mon Sep 17 00:00:00 2001 +From: classabbyamp +Date: Mon, 16 May 2022 02:23:26 -0400 +Subject: [PATCH] fix compilation on musl + +this should allow for compilation on musl libc + +possibly fixes #150 +--- + src/decode_aprs.c | 4 ---- + src/direwolf.h | 2 +- + 2 files changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/direwolf.h b/src/direwolf.h +index efc329b..ca12266 100644 +--- a/src/direwolf.h ++++ b/src/direwolf.h +@@ -282,7 +282,7 @@ char *strtok_r(char *str, const char *delim, char **saveptr); + char *strcasestr(const char *S, const char *FIND); + + +-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__APPLE__) ++#if ! defined(__GLIBC__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__APPLE__) + + // strlcpy and strlcat should be in string.h and the C library. + +-- +2.36.1 +--- a/src/decode_aprs.c ++++ b/src/decode_aprs.c +@@ -3930,11 +3930,7 @@ + * models before getting to the more generic APY. + */ + +-#if defined(__WIN32__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__APPLE__) + qsort (tocalls, num_tocalls, sizeof(struct tocalls_s), tocall_cmp); +-#else +- qsort (tocalls, num_tocalls, sizeof(struct tocalls_s), (__compar_fn_t)tocall_cmp); +-#endif + } + else { + if ( ! A->g_quiet) { diff --git a/srcpkgs/direwolf/patches/fix_scripts_install.patch b/srcpkgs/direwolf/patches/fix_scripts_install.patch new file mode 100644 index 000000000000..21bd7d699064 --- /dev/null +++ b/srcpkgs/direwolf/patches/fix_scripts_install.patch @@ -0,0 +1,36 @@ +these scripts should probably not be put in /usr/bin, but instead with the rest of the scripts + +--- a/scripts/CMakeLists.txt ++++ b/scripts/CMakeLists.txt +@@ -1,6 +1,6 @@ + + if(NOT (WIN32 OR CYGWIN)) +- install(PROGRAMS "${CUSTOM_SCRIPTS_DIR}/dwespeak.sh" DESTINATION ${INSTALL_BIN_DIR}) ++ install(PROGRAMS "${CUSTOM_SCRIPTS_DIR}/dwespeak.sh" DESTINATION ${INSTALL_SCRIPTS_DIR}) + install(PROGRAMS "${CUSTOM_SCRIPTS_DIR}/dw-start.sh" DESTINATION ${INSTALL_SCRIPTS_DIR}) + add_subdirectory(telemetry-toolkit) + endif() +--- a/scripts/telemetry-toolkit/CMakeLists.txt ++++ b/scripts/telemetry-toolkit/CMakeLists.txt +@@ -1,12 +1,12 @@ +-install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-balloon.pl" DESTINATION ${INSTALL_BIN_DIR}) +-install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-bits.pl" DESTINATION ${INSTALL_BIN_DIR}) +-install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-data.pl" DESTINATION ${INSTALL_BIN_DIR}) +-install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-data91.pl" DESTINATION ${INSTALL_BIN_DIR}) +-install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-eqns.pl" DESTINATION ${INSTALL_BIN_DIR}) +-install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-parm.pl" DESTINATION ${INSTALL_BIN_DIR}) +-install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-seq.sh" DESTINATION ${INSTALL_BIN_DIR}) +-install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-unit.pl" DESTINATION ${INSTALL_BIN_DIR}) +-install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-volts.py" DESTINATION ${INSTALL_BIN_DIR}) ++install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-balloon.pl" DESTINATION ${INSTALL_SCRIPTS_DIR}) ++install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-bits.pl" DESTINATION ${INSTALL_SCRIPTS_DIR}) ++install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-data.pl" DESTINATION ${INSTALL_SCRIPTS_DIR}) ++install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-data91.pl" DESTINATION ${INSTALL_SCRIPTS_DIR}) ++install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-eqns.pl" DESTINATION ${INSTALL_SCRIPTS_DIR}) ++install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-parm.pl" DESTINATION ${INSTALL_SCRIPTS_DIR}) ++install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-seq.sh" DESTINATION ${INSTALL_SCRIPTS_DIR}) ++install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-unit.pl" DESTINATION ${INSTALL_SCRIPTS_DIR}) ++install(PROGRAMS "${CUSTOM_TELEMETRY_DIR}/telem-volts.py" DESTINATION ${INSTALL_SCRIPTS_DIR}) + + install(FILES "${CUSTOM_TELEMETRY_DIR}/telem-m0xer-3.txt" DESTINATION ${INSTALL_CONF_DIR}) + install(FILES "${CUSTOM_TELEMETRY_DIR}/telem-balloon.conf" DESTINATION ${INSTALL_CONF_DIR}) diff --git a/srcpkgs/direwolf/patches/fix_udev_install.patch b/srcpkgs/direwolf/patches/fix_udev_install.patch new file mode 100644 index 000000000000..e4285a414b20 --- /dev/null +++ b/srcpkgs/direwolf/patches/fix_udev_install.patch @@ -0,0 +1,13 @@ +install udev rules in the proper place + +--- a/conf/CMakeLists.txt ++++ b/conf/CMakeLists.txt +@@ -26,7 +26,7 @@ + + # install udev rules for CM108 + if(LINUX) +- install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/) ++ install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /usr/lib/udev/rules.d/) + endif() + + install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR}) diff --git a/srcpkgs/direwolf/template b/srcpkgs/direwolf/template new file mode 100644 index 000000000000..c3e8b206b7b7 --- /dev/null +++ b/srcpkgs/direwolf/template @@ -0,0 +1,15 @@ +# Template file for 'direwolf' +pkgname=direwolf +version=1.6 +revision=1 +build_style=cmake +configure_args="-DFORCE_SSE=1 -DRUN_NEON=advanced" +makedepends="alsa-lib-devel hamlib-devel eudev-libudev-devel" +short_desc="AX.25 packet modem/TNC and APRS encoder/decoder" +maintainer="classabbyamp " +license="GPL-2.0-or-later" +homepage="https://github.com/wb2osz/direwolf" +changelog="https://raw.githubusercontent.com/wb2osz/direwolf/master/CHANGES.md" +distfiles="https://github.com/wb2osz/direwolf/archive/refs/tags/${version}.tar.gz" +checksum=208b0563c9b339cbeb0e1feb52dc18ae38295c40c0009d6381fc4acb68fdf660 +python_version=3