* [gentoo-commits] repo/gentoo:master commit in: net-wireless/rtl-sdr/files/, net-wireless/rtl-sdr/
@ 2017-02-04 1:49 Mike Frysinger
0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2017-02-04 1:49 UTC (permalink / raw
To: gentoo-commits
commit: 3d64639800770244b29767889e2e21a24c39dd91
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 4 01:48:47 2017 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Feb 4 01:49:18 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d646398
net-wireless/rtl-sdr: fix builds w/newer compiler standards
.../files/rtl-sdr-0.5.3-static-inline.patch | 66 ++++++++++++++++++++++
.../rtl-sdr/rtl-sdr-0.5.3_p20150730.ebuild | 4 ++
2 files changed, 70 insertions(+)
diff --git a/net-wireless/rtl-sdr/files/rtl-sdr-0.5.3-static-inline.patch b/net-wireless/rtl-sdr/files/rtl-sdr-0.5.3-static-inline.patch
new file mode 100644
index 00000000..0f0e829
--- /dev/null
+++ b/net-wireless/rtl-sdr/files/rtl-sdr-0.5.3-static-inline.patch
@@ -0,0 +1,66 @@
+https://github.com/steve-m/librtlsdr/pull/38
+
+From ea6a86d8e792430faa3a8161ee99f2bc392875d1 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Fri, 3 Feb 2017 15:44:18 -1000
+Subject: [PATCH] fix builds with newer compilers & C standards
+
+The meaning of "inline" has changed when "static" is not used.
+Since none of these functions are used outside of their respective
+files, mark them as static to avoid build errors where funcs are
+not inlined (based on compiler flags too).
+---
+ src/rtl_adsb.c | 8 ++++----
+ src/rtl_power.c | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/rtl_adsb.c b/src/rtl_adsb.c
+index e611e78f3dad..a3bfa7f36b5e 100644
+--- a/src/rtl_adsb.c
++++ b/src/rtl_adsb.c
+@@ -182,7 +182,7 @@ int magnitute(uint8_t *buf, int len)
+ return len/2;
+ }
+
+-inline uint16_t single_manchester(uint16_t a, uint16_t b, uint16_t c, uint16_t d)
++static inline uint16_t single_manchester(uint16_t a, uint16_t b, uint16_t c, uint16_t d)
+ /* takes 4 consecutive real samples, return 0 or 1, BADSAMPLE on error */
+ {
+ int bit, bit_p;
+@@ -223,17 +223,17 @@ inline uint16_t single_manchester(uint16_t a, uint16_t b, uint16_t c, uint16_t d
+ return BADSAMPLE;
+ }
+
+-inline uint16_t min16(uint16_t a, uint16_t b)
++static inline uint16_t min16(uint16_t a, uint16_t b)
+ {
+ return a<b ? a : b;
+ }
+
+-inline uint16_t max16(uint16_t a, uint16_t b)
++static inline uint16_t max16(uint16_t a, uint16_t b)
+ {
+ return a>b ? a : b;
+ }
+
+-inline int preamble(uint16_t *buf, int i)
++static inline int preamble(uint16_t *buf, int i)
+ /* returns 0/1 for preamble at index i */
+ {
+ int i2;
+diff --git a/src/rtl_power.c b/src/rtl_power.c
+index aa7a138a8cd3..a7a43bbd2507 100644
+--- a/src/rtl_power.c
++++ b/src/rtl_power.c
+@@ -249,7 +249,7 @@ void sine_table(int size)
+ }
+ }
+
+-inline int16_t FIX_MPY(int16_t a, int16_t b)
++static inline int16_t FIX_MPY(int16_t a, int16_t b)
+ /* fixed point multiply and scale */
+ {
+ int c = ((int)a * (int)b) >> 14;
+--
+2.11.0
+
diff --git a/net-wireless/rtl-sdr/rtl-sdr-0.5.3_p20150730.ebuild b/net-wireless/rtl-sdr/rtl-sdr-0.5.3_p20150730.ebuild
index b33b615..8f1c5e6 100644
--- a/net-wireless/rtl-sdr/rtl-sdr-0.5.3_p20150730.ebuild
+++ b/net-wireless/rtl-sdr/rtl-sdr-0.5.3_p20150730.ebuild
@@ -26,6 +26,10 @@ IUSE=""
DEPEND="virtual/libusb:1"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.5.3-static-inline.patch
+)
+
src_unpack() {
if [[ ${PV} == 9999* ]]; then
git-r3_src_unpack
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/rtl-sdr/files/, net-wireless/rtl-sdr/
@ 2019-07-22 1:46 Rick Farina
0 siblings, 0 replies; 2+ messages in thread
From: Rick Farina @ 2019-07-22 1:46 UTC (permalink / raw
To: gentoo-commits
commit: eadff1810e2702d0b99c91f74c91b81b483dc560
Author: Rick Farina <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 22 01:41:03 2019 +0000
Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon Jul 22 01:41:03 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eadff181
net-wireless/rtl-sdr: add rtl_tcp openrc support
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>
net-wireless/rtl-sdr/files/rtl_tcp.confd | 4 ++++
net-wireless/rtl-sdr/files/rtl_tcp.initd | 18 ++++++++++++++++++
.../{rtl-sdr-0.6.0.ebuild => rtl-sdr-0.6.0-r1.ebuild} | 6 ++++++
net-wireless/rtl-sdr/rtl-sdr-9999.ebuild | 10 ++++++++--
4 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/net-wireless/rtl-sdr/files/rtl_tcp.confd b/net-wireless/rtl-sdr/files/rtl_tcp.confd
new file mode 100644
index 00000000000..530e89fc940
--- /dev/null
+++ b/net-wireless/rtl-sdr/files/rtl_tcp.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/rtl_tcp - configuration file for /etc/init.d/rtl_tcp
+
+# Options to pass to rtl_tcp, see `rtl_tcp -h`
+#RTL_TCP_OPTIONS="-d0"
diff --git a/net-wireless/rtl-sdr/files/rtl_tcp.initd b/net-wireless/rtl-sdr/files/rtl_tcp.initd
new file mode 100644
index 00000000000..2e4d07b8c28
--- /dev/null
+++ b/net-wireless/rtl-sdr/files/rtl_tcp.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ ebegin "Starting rtl_tcp"
+ start-stop-daemon --start --quiet --pidfile /run/rtl_tcp.pid \
+ --background --make-pidfile --exec /usr/bin/rtl_tcp \
+ -1 /var/log/rtl_tcp.log -2 /var/log/rtl_tcp.log \
+ -- ${RTL_TCP_OPTIONS}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping rtl_tcp"
+ start-stop-daemon --stop --quiet --pidfile /run/rtl_tcp.pid
+ eend ${?}
+}
diff --git a/net-wireless/rtl-sdr/rtl-sdr-0.6.0.ebuild b/net-wireless/rtl-sdr/rtl-sdr-0.6.0-r1.ebuild
similarity index 88%
rename from net-wireless/rtl-sdr/rtl-sdr-0.6.0.ebuild
rename to net-wireless/rtl-sdr/rtl-sdr-0.6.0-r1.ebuild
index a6d38d237ac..59c56f84f78 100644
--- a/net-wireless/rtl-sdr/rtl-sdr-0.6.0.ebuild
+++ b/net-wireless/rtl-sdr/rtl-sdr-0.6.0-r1.ebuild
@@ -44,6 +44,12 @@ src_configure() {
cmake-utils_src_configure
}
+src_install() {
+ cmake-utils_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 cb32ad203bb..5b9fb0899d3 100644
--- a/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild
+++ b/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -41,11 +41,17 @@ src_configure() {
mycmakeargs=(
-DINSTALL_UDEV_RULES=OFF
-DDETACH_KERNEL_DRIVER=ON
- -DLIB_INSTALL_DIR=/usr/$(get_libdir)
+ -DLIB_INSTALL_DIR=$(get_libdir)
)
cmake-utils_src_configure
}
+src_install() {
+ cmake-utils_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."
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-22 1:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-22 1:46 [gentoo-commits] repo/gentoo:master commit in: net-wireless/rtl-sdr/files/, net-wireless/rtl-sdr/ Rick Farina
-- strict thread matches above, loose matches on Subject: below --
2017-02-04 1:49 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox