mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 22:27:17 -08:00
net-wireless/dump1090: add 9.0
Bug: https://bugs.gentoo.org/845270 Bug: https://bugs.gentoo.org/906381 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST dump1090-4.0.tar.gz 6663754 BLAKE2B bf0a6c8dfd8b2da5ed0e7ae5f7b862c57a54e5d48bc24b29e42ebffec4e0606604fbe4b8502e85df60a3a618568bf9e2eba88e5ad2fdec7fb93043b823435362 SHA512 97dc872e4d0ac8df2f46e17b590e970a62a78baf81e18a9beeb23d37a4401a2e52591ca96cc01e1465b22aa234cf9e88f84a7b0f27d0144b3afeac62f6252c95
|
||||
DIST dump1090-5.0.tar.gz 10124422 BLAKE2B d6b26a444f73cccd002558b6863431537078e1fe9f61e4e240d4a5f06181b9ff713387aad623c2ee8257c2568bd4dd373746606c356ac3ff0f27f411d4949997 SHA512 1104982308db788993bf5dc130a5ca369c8bfaaae56cd5a435bbd22ed99b0633594789334d7f256bad2b288c4906923baf8bc73e2f7b7f9f52f7068b9b519142
|
||||
DIST dump1090-6.1.tar.gz 9879362 BLAKE2B 716c1abe6df7958fb5ec94c35ed6af75fdb6180a56cdfba72443a7b34d1614cede6ec29aaac22a1e15f31d05bf1d1971eebccdff21cf9442ae69617e7c535ae6 SHA512 5f20d52f1fda754e33774faab852252d802ae5da8694e768cbf92df56f7693cd2da788df9e0a422f1801603e62498fb0af0143f5ea3292e9d607296cd5983dc2
|
||||
DIST dump1090-9.0.tar.gz 5743616 BLAKE2B 3276075d441f7d410b63fc08b702102637b3c95b0ec5ed3dbd1ea93ecd6af1e322929842db398a23e9e2bca690e601e8bb1916b9998fce1cc80194ca83484dbf SHA512 07408c5680e626eccd3f74d35a6e8a7538dfffd31675f036580003dbba2a78f2487e1980d72d3ec7e44d3f94880e3f231ab1c97bd99ba1ca6cdcfa0ebf198aff
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit tmpfiles toolchain-funcs
|
||||
|
||||
DESCRIPTION="Simple Mode S decoder for RTLSDR devices"
|
||||
HOMEPAGE="https://github.com/flightaware/dump1090"
|
||||
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/flightaware/${PN}.git"
|
||||
else
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SRC_URI="https://github.com/flightaware/dump1090/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
fi
|
||||
|
||||
LICENSE="BSD GPL-2+"
|
||||
SLOT="0"
|
||||
IUSE="bladerf hackrf minimal +rtlsdr"
|
||||
|
||||
DEPEND="
|
||||
sys-libs/ncurses:=[tinfo]
|
||||
bladerf? (
|
||||
net-wireless/bladerf:=
|
||||
virtual/libusb:1
|
||||
)
|
||||
hackrf? (
|
||||
net-libs/libhackrf:=
|
||||
virtual/libusb:1
|
||||
)
|
||||
rtlsdr? (
|
||||
net-wireless/rtl-sdr:=
|
||||
virtual/libusb:1
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-6.1-libdir.patch
|
||||
"${FILESDIR}"/${PN}-9.0-gcc14.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed \
|
||||
-e '/CFLAGS/s# -O3 -g -Wall -Wmissing-declarations -Werror -W # #' \
|
||||
-e "/LIBS_CURSES/s#-lncurses#$($(tc-getPKG_CONFIG) --libs ncurses)#" \
|
||||
-i Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
myemakeargs=(
|
||||
BLADERF="$(usex bladerf)"
|
||||
CC="$(tc-getCC)"
|
||||
CPUFEATURES="yes"
|
||||
HACKRF="$(usex hackrf)"
|
||||
LIMESDR="no"
|
||||
RTLSDR="$(usex rtlsdr)"
|
||||
)
|
||||
|
||||
emake "${myemakeargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin dump1090 view1090
|
||||
|
||||
# DSP config files for bladeRF
|
||||
if use bladerf; then
|
||||
insinto usr/share/dump1090/bladerf
|
||||
doins bladerf/*
|
||||
fi
|
||||
|
||||
newtmpfiles "${FILESDIR}"/tmpfilesd-dump1090-5.0.conf dump1090.conf
|
||||
newconfd "${FILESDIR}"/dump1090-5.0.confd dump1090
|
||||
newinitd "${FILESDIR}"/dump1090-5.0.initd dump1090
|
||||
|
||||
einstalldocs
|
||||
|
||||
if use !minimal; then
|
||||
# Install tools
|
||||
insinto /usr/share/dump1090
|
||||
doins -r tools
|
||||
|
||||
# Install lighthttps example files
|
||||
insinto /usr/share/dump1090/lighttpd
|
||||
doins debian/lighttpd/{88-dump1090-fa-statcache.conf,89-skyaware.conf}
|
||||
|
||||
# Some tooling expects the -fa variant directory to contain the files
|
||||
dosym ../../usr/share/dump1090 /usr/share/dump1090-fa
|
||||
|
||||
# Install html docs
|
||||
docinto html
|
||||
doins -r public_html/*
|
||||
|
||||
# See README.md for how to use custom wisdom files
|
||||
exeinto /usr/share/dump1090/wisdom
|
||||
doexe debian/generate-wisdom
|
||||
insinto /usr/share/dump1090/wisdom
|
||||
doins wisdom.*
|
||||
doins wisdom/wisdom.*
|
||||
|
||||
# For /etc/dump1090-fa/wisdom.local
|
||||
keepdir /etc/dump1090-fa/
|
||||
|
||||
# Tooling to generate custom wisdom:
|
||||
exeinto /usr/libexec/dump1090
|
||||
doexe starch-benchmark
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process dump1090.conf
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
Fix -Werror=calloc-transposed-args error with gcc 14.
|
||||
|
||||
--- dump1090-9.0-origin/adaptive.c
|
||||
+++ dump1090-9.0/adaptive.c
|
||||
@@ -195,7 +195,7 @@
|
||||
adaptive_burst_window_remaining = adaptive_samples_per_window;
|
||||
adaptive_burst_window_counter = 0;
|
||||
|
||||
- adaptive_range_radix = calloc(sizeof(unsigned), 65536);
|
||||
+ adaptive_range_radix = calloc(65536, sizeof(unsigned));
|
||||
adaptive_range_state = RANGE_RESCAN_UP;
|
||||
|
||||
// select and enforce gain limits
|
||||
--- dump1090-9.0-origin/net_io.c
|
||||
+++ dump1090-9.0/net_io.c
|
||||
@@ -104,7 +104,7 @@
|
||||
{
|
||||
struct net_service *service;
|
||||
|
||||
- if (!(service = calloc(sizeof(*service), 1))) {
|
||||
+ if (!(service = calloc(1, sizeof(*service)))) {
|
||||
fprintf(stderr, "Out of memory allocating service %s\n", descr);
|
||||
exit(1);
|
||||
}
|
||||
Reference in New Issue
Block a user