soapysdr-9999.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. PYTHON_COMPAT=( python3_{10,11} )
  5. inherit cmake python-r1
  6. DESCRIPTION="vendor and platform neutral SDR support library"
  7. HOMEPAGE="https://github.com/pothosware/SoapySDR"
  8. if [ "${PV}" = "9999" ]; then
  9. EGIT_REPO_URI="https://github.com/pothosware/SoapySDR.git"
  10. EGIT_CLONE_TYPE="shallow"
  11. inherit git-r3
  12. else
  13. KEYWORDS="~amd64 ~x86"
  14. SRC_URI="https://github.com/pothosware/SoapySDR/archive/soapy-sdr-${PV}.tar.gz -> ${P}.tar.gz"
  15. S="${WORKDIR}"/SoapySDR-soapy-sdr-"${PV}"
  16. fi
  17. LICENSE="Boost-1.0"
  18. SLOT="0/${PV}"
  19. IUSE="bladerf hackrf python rtlsdr plutosdr uhd"
  20. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
  21. RDEPEND="python? ( ${PYTHON_DEPS} )"
  22. DEPEND="
  23. python? ( dev-lang/swig:0 )
  24. "
  25. PDEPEND="bladerf? ( net-wireless/soapybladerf )
  26. hackrf? ( net-wireless/soapyhackrf )
  27. rtlsdr? ( net-wireless/soapyrtlsdr )
  28. plutosdr? ( net-wireless/soapyplutosdr )
  29. uhd? ( net-wireless/soapyuhd )"
  30. src_configure() {
  31. configuration() {
  32. mycmakeargs+=(
  33. -DENABLE_PYTHON=ON
  34. -DBUILD_PYTHON3=ON
  35. )
  36. }
  37. if use python; then
  38. python_foreach_impl configuration
  39. fi
  40. cmake_src_configure
  41. }
  42. src_install() {
  43. cmake_src_install
  44. if use python; then
  45. python_foreach_impl python_optimize
  46. fi
  47. }