diff options
author | Sam James <sam@gentoo.org> | 2022-06-14 13:53:26 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-06-14 13:54:06 +0100 |
commit | 03cd3275857a0d452d03b93c6db9700166b487a7 (patch) | |
tree | 544115f193af3e00321a7aa6b6eeb4eb450ed296 /net-wireless/rtl-sdr | |
parent | x11-wm/wmii: fix build w/ lld; fix VariableScope (diff) | |
download | gentoo-03cd3275857a0d452d03b93c6db9700166b487a7.tar.gz gentoo-03cd3275857a0d452d03b93c6db9700166b487a7.tar.bz2 gentoo-03cd3275857a0d452d03b93c6db9700166b487a7.zip |
net-wireless/rtl-sdr: fix libdir in .pc
Bug: https://bugs.gentoo.org/831403
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-wireless/rtl-sdr')
3 files changed, 82 insertions, 11 deletions
diff --git a/net-wireless/rtl-sdr/files/rtl-sdl-0.6.0_p2020802-fix-pkgconfig-libdir.patch b/net-wireless/rtl-sdr/files/rtl-sdl-0.6.0_p2020802-fix-pkgconfig-libdir.patch new file mode 100644 index 000000000000..b71454b87828 --- /dev/null +++ b/net-wireless/rtl-sdr/files/rtl-sdl-0.6.0_p2020802-fix-pkgconfig-libdir.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cc39bc3..4833602 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -160,7 +160,7 @@ ENDIF(CMAKE_CROSSCOMPILING) + set(prefix "${CMAKE_INSTALL_PREFIX}") + set(exec_prefix \${prefix}) + set(includedir \${prefix}/include) +-set(libdir \${exec_prefix}/lib) ++set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) + + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/librtlsdr.pc.in 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 <USER> usb', then have <USER> re-login." +} diff --git a/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild b/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild index 4f87f3a82cdd..b00901863baa 100644 --- a/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild +++ b/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit cmake multilib +inherit cmake -DESCRIPTION="turns your Realtek RTL2832 based DVB dongle into a SDR receiver" +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 @@ -31,13 +31,9 @@ IUSE="+zerocopy" DEPEND="virtual/libusb:1" RDEPEND="${DEPEND}" -src_unpack() { - if [[ ${PV} == 9999* ]]; then - git-r3_src_unpack - else - default - fi -} +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 |