From 03cd3275857a0d452d03b93c6db9700166b487a7 Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 14 Jun 2022 13:53:26 +0100 Subject: net-wireless/rtl-sdr: fix libdir in .pc Bug: https://bugs.gentoo.org/831403 Signed-off-by: Sam James --- .../rtl-sdr/rtl-sdr-0.6.0_p2020802-r1.ebuild | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 net-wireless/rtl-sdr/rtl-sdr-0.6.0_p2020802-r1.ebuild (limited to 'net-wireless/rtl-sdr/rtl-sdr-0.6.0_p2020802-r1.ebuild') diff --git a/net-wireless/rtl-sdr/rtl-sdr-0.6.0_p2020802-r1.ebuild b/net-wireless/rtl-sdr/rtl-sdr-0.6.0_p2020802-r1.ebuild new file mode 100644 index 000000000000..e6d44a620d49 --- /dev/null +++ b/net-wireless/rtl-sdr/rtl-sdr-0.6.0_p2020802-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Turns your Realtek RTL2832 based DVB dongle into a SDR receiver" +HOMEPAGE="https://sdr.osmocom.org/trac/wiki/rtl-sdr" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + SRC_URI="" + EGIT_REPO_URI="https://git.osmocom.org/${PN}" +else + #git clone https://git.osmocom.org/rtl-sdr + #cd rtl-sdr + #git archive --format=tar --prefix=rtl-sdr-${PV}/ master | xz > ../rtl-sdr-${PV}.tar.xz + #SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz" + + COMMIT="ed0317e6a58c098874ac58b769cf2e609c18d9a5" + SRC_URI="https://github.com/osmocom/rtl-sdr/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${COMMIT}" + KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+zerocopy" + +DEPEND="virtual/libusb:1" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/rtl-sdl-0.6.0_p2020802-fix-pkgconfig-libdir.patch +) + +src_prepare() { + sed -i 's#VERSION_INFO_PATCH_VERSION git#VERSION_INFO_PATCH_VERSION 0_p20200802#' CMakeLists.txt + cmake_src_prepare +} + +src_configure() { + #the udev rules are 666, we don't want that + mycmakeargs=( + -DINSTALL_UDEV_RULES=OFF + -DDETACH_KERNEL_DRIVER=ON + -DENABLE_ZEROCOPY="$(usex zerocopy)" + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + newinitd "${FILESDIR}"/rtl_tcp.initd rtl_tcp + newconfd "${FILESDIR}"/rtl_tcp.confd rtl_tcp +} + +pkg_postinst() { + elog "Only users in the usb group can capture." + elog "Just run 'gpasswd -a usb', then have re-login." +} -- cgit v1.2.3-65-gdbad