From d57c4b22df0826e6b318370175a0e97e4268fc7c Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 23 Jul 2022 04:08:18 -0400 Subject: [PATCH 1/2] New package: airspyhf-1.6.8 closes #38198 --- common/shlibs | 1 + .../airspyhf/patches/fix-libm-linking.patch | 28 ++++++++++++++ srcpkgs/airspyhf/template | 37 +++++++++++++++++++ srcpkgs/libairspyhf | 1 + srcpkgs/libairspyhf-devel | 1 + 5 files changed, 68 insertions(+) create mode 100644 srcpkgs/airspyhf/patches/fix-libm-linking.patch create mode 100644 srcpkgs/airspyhf/template create mode 120000 srcpkgs/libairspyhf create mode 120000 srcpkgs/libairspyhf-devel diff --git a/common/shlibs b/common/shlibs index 6acbb4097f0b..61f21bc3b94e 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4201,3 +4201,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1 +libairspyhf.so.0 libairspyhf-1.6.8_1 diff --git a/srcpkgs/airspyhf/patches/fix-libm-linking.patch b/srcpkgs/airspyhf/patches/fix-libm-linking.patch new file mode 100644 index 000000000000..73f888ffd4be --- /dev/null +++ b/srcpkgs/airspyhf/patches/fix-libm-linking.patch @@ -0,0 +1,28 @@ +https://github.com/airspy/airspyhf/pull/35 +https://build.opensuse.org/package/view_file/openSUSE:Factory/airspyhf/airspyhf-fix-libm-linking.patch + +diff --git a/libairspyhf/src/CMakeLists.txt b/libairspyhf/src/CMakeLists.txt +index 9d8d483..da1f966 100644 +--- a/libairspyhf/src/CMakeLists.txt ++++ b/libairspyhf/src/CMakeLists.txt +@@ -58,7 +58,7 @@ set_target_properties(airspyhf PROPERTIES CLEAN_DIRECT_OUTPUT 1) + set_target_properties(airspyhf-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + + # Dependencies +-target_link_libraries(airspyhf ${LIBUSB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) ++target_link_libraries(airspyhf ${LIBUSB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} m) + + # For cygwin just force UNIX OFF and WIN32 ON + if( ${CYGWIN} ) + +diff --git a/libairspyhf/libairspyhf.pc.in b/libairspyhf/libairspyhf.pc.in +index fcf040b..ca5214f 100644 +--- a/libairspyhf/libairspyhf.pc.in ++++ b/libairspyhf/libairspyhf.pc.in +@@ -7,5 +7,5 @@ Name: AirSpy HF+ Library + Description: C Utility Library + Version: @VERSION@ + Cflags: -I${includedir}/libairspyhf/ @AIRSPYHF_PC_CFLAGS@ +-Libs: -L${libdir} -lairspyhf ++Libs: -L${libdir} -lairspyhf -lm + Libs.private: @AIRSPYHF_PC_LIBS@ diff --git a/srcpkgs/airspyhf/template b/srcpkgs/airspyhf/template new file mode 100644 index 000000000000..dc306e6d3333 --- /dev/null +++ b/srcpkgs/airspyhf/template @@ -0,0 +1,37 @@ +# Template file for 'airspyhf' +pkgname=airspyhf +version=1.6.8 +revision=1 +build_style=cmake +hostmakedepends="pkg-config" +makedepends="libusb-devel" +short_desc="Usermode driver and tools for Airspy HF+" +maintainer="classabbyamp " +license="BSD-3-Clause" +homepage="https://github.com/airspy/airspyhf" +distfiles="https://github.com/airspy/airspyhf/archive/refs/tags/${version}.tar.gz" +checksum=cd1e5ae89e09b813b096ae4a328e352c9432a582e03fd7da86760ba60efa77ab + +post_install() { + vlicense LICENSE +} + +libairspyhf_package() { + short_desc+=" - library" + pkg_install() { + vmove usr/lib/*.so.* + vsed -e 's/GROUP="plugdev"/\0, TAG+="uaccess"/' -i tools/52-airspyhf.rules + vinstall tools/52-airspyhf.rules 644 usr/lib/udev/rules.d/ + } +} + +libairspyhf-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +} diff --git a/srcpkgs/libairspyhf b/srcpkgs/libairspyhf new file mode 120000 index 000000000000..9a1c1cdae341 --- /dev/null +++ b/srcpkgs/libairspyhf @@ -0,0 +1 @@ +airspyhf \ No newline at end of file diff --git a/srcpkgs/libairspyhf-devel b/srcpkgs/libairspyhf-devel new file mode 120000 index 000000000000..9a1c1cdae341 --- /dev/null +++ b/srcpkgs/libairspyhf-devel @@ -0,0 +1 @@ +airspyhf \ No newline at end of file From f51213b429561764284a64e2d29dffe881de719f Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 23 Jul 2022 04:22:58 -0400 Subject: [PATCH 2/2] New package: SDRPlusPlus-1.0.4 closes #38200 --- srcpkgs/SDRPlusPlus/template | 16 ++++++++++++++++ srcpkgs/airspyhf/template | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/SDRPlusPlus/template diff --git a/srcpkgs/SDRPlusPlus/template b/srcpkgs/SDRPlusPlus/template new file mode 100644 index 000000000000..9651aeca246f --- /dev/null +++ b/srcpkgs/SDRPlusPlus/template @@ -0,0 +1,16 @@ +# Template file for 'SDRPlusPlus' +pkgname=SDRPlusPlus +version=1.0.4 +revision=1 +build_style=cmake +configure_args="-DOPT_BUILD_PLUTOSDR_SOURCE=0" +hostmakedepends="pkg-config" +makedepends="fftw-devel glfw-devel volk-devel libzstd-devel glew-devel libusb-devel + librtlsdr-devel SoapySDR-devel libairspy-devel libairspyhf-devel libhackrf-devel + rtaudio-devel alsa-lib-devel pulseaudio-devel jack-devel" +short_desc="Open source SDR software" +maintainer="classabbyamp " +license="GPL-3.0-only" +homepage="https://github.com/AlexandreRouma/SDRPlusPlus" +distfiles="https://github.com/AlexandreRouma/SDRPlusPlus/archive/refs/tags/${version}.tar.gz" +checksum=251256de6725ceb4f9fb2823c7ad825068ad16cf9b5fb894259b173aae5a69ea diff --git a/srcpkgs/airspyhf/template b/srcpkgs/airspyhf/template index dc306e6d3333..e5be006613cd 100644 --- a/srcpkgs/airspyhf/template +++ b/srcpkgs/airspyhf/template @@ -14,13 +14,13 @@ checksum=cd1e5ae89e09b813b096ae4a328e352c9432a582e03fd7da86760ba60efa77ab post_install() { vlicense LICENSE + vsed -e 's/GROUP="plugdev"/\0, TAG+="uaccess"/' -i tools/52-airspyhf.rules } libairspyhf_package() { short_desc+=" - library" pkg_install() { vmove usr/lib/*.so.* - vsed -e 's/GROUP="plugdev"/\0, TAG+="uaccess"/' -i tools/52-airspyhf.rules vinstall tools/52-airspyhf.rules 644 usr/lib/udev/rules.d/ } }