summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2020-09-16 12:46:42 -0400
committerRick Farina <zerochaos@gentoo.org>2020-09-16 13:01:23 -0400
commitb6e383143d1c1b34e7c10fa59fec675bd6470b11 (patch)
tree9fccc4d3c370254c48de8beb044667c66d05396b /net-wireless/uhd
parentgnustep-apps/terminal: fix build with -fno-common (diff)
downloadgentoo-b6e383143d1c1b34e7c10fa59fec675bd6470b11.tar.gz
gentoo-b6e383143d1c1b34e7c10fa59fec675bd6470b11.tar.bz2
gentoo-b6e383143d1c1b34e7c10fa59fec675bd6470b11.zip
net-wireless/uhd: bump
Package-Manager: Portage-3.0.7, Repoman-3.0.1 Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'net-wireless/uhd')
-rw-r--r--net-wireless/uhd/Manifest2
-rw-r--r--net-wireless/uhd/files/uhd-4.0.0.0-tinfo.patch42
-rw-r--r--net-wireless/uhd/uhd-4.0.0.0.ebuild149
3 files changed, 193 insertions, 0 deletions
diff --git a/net-wireless/uhd/Manifest b/net-wireless/uhd/Manifest
index 56c287e9d84c..122ca7ff41e2 100644
--- a/net-wireless/uhd/Manifest
+++ b/net-wireless/uhd/Manifest
@@ -1,2 +1,4 @@
DIST EttusResearch-UHD-3.15.0.0.tar.gz 12895934 BLAKE2B 75bf474120a09ffe1268684659c8bbc8e781060db96b82e42a4d3463265e2a3df5e60da77d835587e6650795ae50bcab8bdecccf0f2bdd32fe77bbd6ce1ec5c8 SHA512 ef62639d956adb5b4815b8e57bf4d6e62519bcaf509ce87af4f6091b79b4bb78c2bc079ec6f678777c24a146d5d5e1c8f225ad7ac5dba46bec6f8e1cc20309b0
+DIST EttusResearch-UHD-4.0.0.0.tar.gz 33942895 BLAKE2B 632e701420c3a1165f2e1f0e2766b457595326141cb42c5701b247857e699dbfd6f8dbbcc668184d87bf0764516213044f79a5acde5db3d3c1c387335474f5fc SHA512 1f897397467111e634428e807c2c6748e9fc33e5b09083372139cd6e4445fbd71c48f43e18d0c3faef483d448879e40bc9a5a63df4e908b1bec65454ed67a6dd
DIST uhd-images_3.15.0.0.tar.xz 110161052 BLAKE2B 681b5ab0d79bbd2e5661bbfe5c975fdda83e7749f1c3b8a5ac2ba4088009a69c58f9b6a4e4c697c5ac90bdb809bc859937b3b63c9daf0984636bafaeee10e977 SHA512 ec7aa9740e0eda90bbee3751f5c65d5998e67d2bf74d36aa912041be8818e3ad03e5dfbf26ad340261f72fc98048ab5a90c56f6dff8efdd38cf0501585554033
+DIST uhd-images_4.0.0.0.tar.xz 111748176 BLAKE2B 2924cf1b3f150c0afd3c31a03c44f509047fb7122e55faec07860ffa56b95e1ad84d4768a0608ee32403a8b31ae5efd16abdc3469779674faedaf13778335a4d SHA512 32bc47ad48b2c9228df452c90d9cd4625fafd0c5d202f5fdfc49d2d9b14154ef7101035f403de56c369956df4f5901f6c653a3ae92c64797dd5e005f954a2a1f
diff --git a/net-wireless/uhd/files/uhd-4.0.0.0-tinfo.patch b/net-wireless/uhd/files/uhd-4.0.0.0-tinfo.patch
new file mode 100644
index 000000000000..484aa1f9c2f5
--- /dev/null
+++ b/net-wireless/uhd/files/uhd-4.0.0.0-tinfo.patch
@@ -0,0 +1,42 @@
+diff -Naur host/CMakeLists.txt uhd-4.0.0.0-patched/host/CMakeLists.txt
+--- host/CMakeLists.txt 2020-09-13 15:14:04.000000000 -0400
++++ host/CMakeLists.txt 2020-09-16 10:11:52.266933094 -0400
+@@ -506,6 +506,9 @@
+ if(ENABLE_USB)
+ list(APPEND UHD_LINK_LIST_STATIC "usb-1.0")
+ endif(ENABLE_USB)
++
++LIST(APPEND UHD_LINK_LIST_STATIC "tinfo")
++
+ set(UHD_RFNOC_FOUND "TRUE")
+
+ configure_file(
+diff -Naur host/examples/CMakeLists.txt uhd-4.0.0.0-patched/host/examples/CMakeLists.txt
+--- host/examples/CMakeLists.txt 2020-09-13 15:14:04.000000000 -0400
++++ host/examples/CMakeLists.txt 2020-09-16 10:12:49.082935381 -0400
+@@ -55,11 +55,11 @@
+ if(CURSES_FOUND)
+ include_directories(${CURSES_INCLUDE_DIR})
+ add_executable(rx_ascii_art_dft rx_ascii_art_dft.cpp)
+- target_link_libraries(rx_ascii_art_dft uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES})
++ target_link_libraries(rx_ascii_art_dft uhd ${CURSES_LIBRARIES} tinfo ${Boost_LIBRARIES})
+ UHD_INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
+
+ add_executable(twinrx_freq_hopping twinrx_freq_hopping.cpp)
+- target_link_libraries(twinrx_freq_hopping uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES})
++ target_link_libraries(twinrx_freq_hopping uhd ${CURSES_LIBRARIES} tinfo ${Boost_LIBRARIES})
+ UHD_INSTALL(TARGETS twinrx_freq_hopping RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
+ endif(CURSES_FOUND)
+
+diff -Naur host/utils/latency/CMakeLists.txt uhd-4.0.0.0-patched/host/utils/latency/CMakeLists.txt
+--- host/utils/latency/CMakeLists.txt 2020-09-13 15:14:04.000000000 -0400
++++ host/utils/latency/CMakeLists.txt 2020-09-16 10:13:55.994938074 -0400
+@@ -25,7 +25,7 @@
+ get_filename_component(name ${source} NAME_WE)
+ add_executable(${name} ${source} ${latency_lib_path})
+ LIBUHD_APPEND_SOURCES(${name})
+- target_link_libraries(${name} uhd ${Boost_LIBRARIES} ${CURSES_LIBRARIES})
++ target_link_libraries(${name} uhd ${Boost_LIBRARIES} tinfo ${CURSES_LIBRARIES})
+ UHD_INSTALL(TARGETS ${name} RUNTIME DESTINATION ${latency_comp_dest} COMPONENT ${latency_comp_name})
+ endforeach(source)
+
diff --git a/net-wireless/uhd/uhd-4.0.0.0.ebuild b/net-wireless/uhd/uhd-4.0.0.0.ebuild
new file mode 100644
index 000000000000..72e82395ade9
--- /dev/null
+++ b/net-wireless/uhd/uhd-4.0.0.0.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+#not sure why, but eapi 7 fails
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit eapi7-ver python-single-r1 gnome2-utils cmake-utils multilib
+
+DESCRIPTION="Universal Software Radio Peripheral (USRP) Hardware Driver"
+HOMEPAGE="https://kb.ettus.com"
+
+SRC_URI="https://github.com/EttusResearch/uhd/archive/v${PV}.tar.gz -> EttusResearch-UHD-${PV}.tar.gz \
+ https://github.com/EttusResearch/uhd/releases/download/v${PV}/uhd-images_${PV}.tar.xz"
+#https://github.com/EttusResearch/UHD-Mirror/tags
+#http://files.ettus.com/binaries/images/
+
+LICENSE="GPL-3"
+SLOT="0/$(ver_cut 1-3)"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+b100 +b200 doc e300 examples +mpmd octoclock +n230 test +usb +usrp1 +usrp2 +utils +x300"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ b100? ( usb )
+ b200? ( usb )
+ usrp1? ( usb )
+ usrp2? ( usb )
+ || ( b100 b200 e300 mpmd n230 usrp1 usrp2 x300 )"
+
+RDEPEND="${PYTHON_DEPS}
+ e300? ( virtual/udev )
+ usb? ( virtual/libusb:1 )
+ dev-libs/boost:=
+ sys-libs/ncurses:0[tinfo]
+ $(python_gen_cond_dep '
+ || (
+ dev-python/numpy-python2[${PYTHON_MULTI_USEDEP}]
+ dev-python/numpy[${PYTHON_MULTI_USEDEP}]
+ )
+ dev-python/requests[${PYTHON_MULTI_USEDEP}]
+ ')
+"
+
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ $(python_gen_cond_dep '
+ dev-python/mako[${PYTHON_MULTI_USEDEP}]
+ ')
+ app-arch/unzip
+ app-arch/gzip
+"
+
+PATCHES=( "${FILESDIR}/${PN}-4.0.0.0-tinfo.patch" )
+
+S="${WORKDIR}/${P}/host"
+
+src_unpack() {
+ default
+ mv "uhd-images_${PV}" images || die
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ gnome2_environment_reset #534582
+
+ #rpath is set for apple and no one else, just remove the conditional
+ sed -i -e '/if(APPLE)/d' -e '/endif(APPLE)/d' CMakeLists.txt || die
+}
+
+src_configure() {
+ mycmakeargs=(
+ -DENABLE_LIBUHD=ON
+ -DENABLE_C_API=ON
+ -DENABLE_LIBERIO=OFF
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_MAN_PAGE_COMPRESSION=OFF
+ -DENABLE_EXAMPLES="$(usex examples)"
+ -DENABLE_TESTS="$(usex test)"
+ -DENABLE_USB="$(usex usb)"
+ -DENABLE_UTILS="$(usex utils)"
+ -DENABLE_MANUAL="$(usex doc)"
+ -DENABLE_DOXYGEN="$(usex doc)"
+ -DENABLE_B100="$(usex b100)"
+ -DENABLE_B200="$(usex b200)"
+ -DENABLE_E300="$(usex e300)"
+ -DENABLE_USRP1="$(usex usrp1)"
+ -DENABLE_USRP2="$(usex usrp2)"
+ -DENABLE_X300="$(usex x300)"
+ -DENABLE_N230="$(usex n230)"
+ -DENABLE_MPMD="$(usex mpmd)"
+ -DENABLE_OCTOCLOCK="$(usex octoclock)"
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DPKG_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
+ )
+ cmake-utils_src_configure
+}
+src_install() {
+ cmake-utils_src_install
+ python_optimize
+ use utils && python_fix_shebang "${ED}"/usr/$(get_libdir)/${PN}/utils/
+ if [ "${PV}" != "9999" ]; then
+ rm -rf "${ED}/usr/bin/uhd_images_downloader"
+ rm -rf "${ED}/usr/share/man/man1/uhd_images_downloader.1"
+ fi
+
+ insinto /lib/udev/rules.d/
+ doins "${S}/utils/uhd-usrp.rules"
+
+ rm -rf "${WORKDIR}/images/winusb_driver"
+ if ! use b100; then
+ rm "${WORKDIR}"/images/usrp_b100* || die
+ fi
+ if ! use b200; then
+ rm "${WORKDIR}"/images/usrp_b2[01]* || die
+ fi
+ if ! use e300; then
+ rm "${WORKDIR}"/images/usrp_e3* || die
+ fi
+ if ! use mpmd; then
+ rm "${WORKDIR}"/images/usrp_n310* || die
+ fi
+ if ! use n230; then
+ rm "${WORKDIR}"/images/usrp_n230* || die
+ fi
+ if ! use octoclock; then
+ rm "${WORKDIR}"/images/octoclock* || die
+ fi
+ if ! use usrp1; then
+ rm "${WORKDIR}"/images/usrp1* || die
+ fi
+ if ! use usrp2; then
+ rm "${WORKDIR}"/images/usrp2* || die
+ rm "${WORKDIR}"/images/usrp_n2[01]* || die
+ rm -r "${WORKDIR}"/images/bit || die
+ fi
+ if ! use x300; then
+ rm "${WORKDIR}/"images/usrp_x3* || die
+ fi
+ insinto /usr/share/${PN}
+ doins -r "${WORKDIR}/images"
+}
+
+src_test() {
+ #we can disable the python tests
+ #ctest -E 'py*'
+ PYTHON_PATH=python/ cmake-utils_src_test
+}