Skip to content
/ gentoo Public
forked from gentoo/gentoo

Commit

Permalink
net-wireless/urh: add 2.9.6_p20240428
Browse files Browse the repository at this point in the history
Bumping a little past the last release because this version actually
passes tests :-)

Signed-off-by: Rick Farina <[email protected]>
  • Loading branch information
ZeroChaos- committed May 20, 2024
1 parent e24d456 commit bd3493c
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 2 deletions.
1 change: 1 addition & 0 deletions net-wireless/urh/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST urh-2.9.4.tar.gz 13415656 BLAKE2B 504cb073540f614eea070a7aaa83ac62f81c6a115a01f935cfc39baec37bc1deb5b56035100700825f41b21ec0937d6014f0d0b73debcbf9ca951e238805d64b SHA512 a888c20a4d2f349960e41defdb5cce6590d4523f8a1a655e21e4caaf7dd98a6f51936fa5a038787cb5935bc42e8863d2940059130dc9982caeea4b80e431aeeb
DIST urh-2.9.5.tar.gz 13414599 BLAKE2B efe075e78dd7b289d21d93675be420e8e5e69293eb1f5e61025a9b0a7db60f4e2cae29d94af03fa9e42a6941edda9667a935b201a8838c0204e61008d2883b56 SHA512 7f04f041963103aab4a67fd5fd8f874339cad04da846236b0ec4584553ae6b4a6469c2505cec7c67f72d848d0eb90a4996753802c65535914e70a943d40e6970
DIST urh-2.9.6_p20240428.gh.tar.gz 13439550 BLAKE2B ad71275f2a3d0c5a680bac361949a70d1eb9a0fe496d720bbc831ef1e34b40ed187106825a295e421bf9e224de5f65cc4ed2791839307bbb75f900ba4f05aa61 SHA512 a278d4b5fcd09cf61cc63341545604882591b6732009ca61b41aa58c71666410175d7b75106c56f43dfd538db287a38f14288cc3d2dbde0260caef370850af03
11 changes: 11 additions & 0 deletions net-wireless/urh/files/urh-2.9.7-no-numpy-setup.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -Naur urh-2.9.4-orig/setup.py urh-2.9.4/setup.py
--- urh-2.9.4-orig/setup.py 2023-08-20 20:31:45.067321480 -0400
+++ urh-2.9.4/setup.py 2023-08-20 20:31:55.088320822 -0400
@@ -50,7 +50,6 @@
print("Finalizing options")
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
- set_builtin("__NUMPY_SETUP__", False)
import numpy

self.include_dirs.append(numpy.get_include())
84 changes: 84 additions & 0 deletions net-wireless/urh/urh-2.9.6_p20240428.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 virtualx

DESCRIPTION="Universal Radio Hacker: investigate wireless protocols like a boss"
HOMEPAGE="https://github.com/jopohl/urh"

if [ "${PV}" = "9999" ]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/jopohl/urh.git"
else
COMMIT="544efd35ac4e0105cb63a31f2dc209c3834bc7bd"
SRC_URI="https://github.com/jopohl/urh/archive/${COMMIT}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"
#SRC_URI="https://github.com/jopohl/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
KEYWORDS="~amd64 ~x86"
fi

LICENSE="Apache-2.0"
SLOT="0"
IUSE="airspy audio bladerf hackrf limesdr plutosdr rtlsdr sdrplay uhd"

DEPEND="${PYTHON_DEPS}
net-wireless/gnuradio[zeromq]
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/psutil[${PYTHON_USEDEP}]
dev-python/pyzmq[${PYTHON_USEDEP}]
dev-python/cython[${PYTHON_USEDEP}]
airspy? ( net-wireless/airspy:= )
audio? ( dev-python/pyaudio[${PYTHON_USEDEP}] )
bladerf? ( net-wireless/bladerf:= )
hackrf? ( net-libs/libhackrf:= )
limesdr? ( net-wireless/limesuite )
plutosdr? ( net-libs/libiio:= )
rtlsdr? ( net-wireless/rtl-sdr )
sdrplay? ( <net-wireless/sdrplay-3.0.0:= )
uhd? ( net-wireless/uhd:= )"
RDEPEND="${DEPEND}
dev-python/PyQt5[${PYTHON_USEDEP},testlib]
net-wireless/gr-osmosdr"

distutils_enable_tests pytest

PATCHES=( "${FILESDIR}/${PN}-2.9.7-no-numpy-setup.patch" )

python_configure_all() {
DISTUTILS_ARGS=(
$(use_with airspy)
$(use_with bladerf)
$(use_with hackrf)
$(use_with limesdr)
$(use_with plutosdr)
$(use_with rtlsdr)
$(use_with sdrplay)
$(use_with uhd usrp)
)
}

src_test() {
virtx distutils-r1_src_test
}

python_test() {
# Why are these disabled?
# import errors AND hangs forever after 'tests/test_spectrogram.py::TestSpectrogram::test_cancel_filtering'
# import errors 'tests/test_continuous_modulator.py::TestContinuousModulator::test_modulate_continuously'
# import errors 'tests/test_send_recv_dialog_gui.py::TestSendRecvDialog::test_continuous_send_dialog'
# import errors 'tests/test_spectrogram.py::TestSpectrogram::test_channel_separation_with_negative_frequency'
local EPYTEST_DESELECT=(
'tests/test_spectrogram.py::TestSpectrogram::test_cancel_filtering'
'tests/test_continuous_modulator.py::TestContinuousModulator::test_modulate_continuously'
'tests/test_send_recv_dialog_gui.py::TestSendRecvDialog::test_continuous_send_dialog'
'tests/test_spectrogram.py::TestSpectrogram::test_channel_separation_with_negative_frequency'

)
cd "${T}" || die
epytest -s --pyargs urh.cythonext "${S}/tests" || die
}
4 changes: 2 additions & 2 deletions net-wireless/urh/urh-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..11} )
PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 virtualx
Expand Down

0 comments on commit bd3493c

Please sign in to comment.