public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/dump1090/, net-wireless/dump1090/files/
@ 2021-08-12 22:53 Robin H. Johnson
  0 siblings, 0 replies; 2+ messages in thread
From: Robin H. Johnson @ 2021-08-12 22:53 UTC (permalink / raw
  To: gentoo-commits

commit:     056518c71263b8f17826f68e15d969526c1301ee
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 10 16:54:11 2021 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Aug 12 22:53:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=056518c7

net-wireless/dump1090: bump w/ improvements

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 net-wireless/dump1090/Manifest                     |  1 +
 net-wireless/dump1090/dump1090-4.0.ebuild          |  4 +-
 net-wireless/dump1090/dump1090-5.0.ebuild          | 95 ++++++++++++++++++++++
 net-wireless/dump1090/dump1090-9999.ebuild         | 69 ++++++++++++----
 net-wireless/dump1090/files/dump1090-5.0.confd     | 20 +++++
 net-wireless/dump1090/files/dump1090-5.0.initd     | 15 ++++
 .../dump1090/files/tmpfilesd-dump1090-5.0.conf     |  4 +
 net-wireless/dump1090/metadata.xml                 |  2 +
 8 files changed, 193 insertions(+), 17 deletions(-)

diff --git a/net-wireless/dump1090/Manifest b/net-wireless/dump1090/Manifest
index 2e1c6203b23..c9f99e8b0b2 100644
--- a/net-wireless/dump1090/Manifest
+++ b/net-wireless/dump1090/Manifest
@@ -1 +1,2 @@
 DIST dump1090-4.0.tar.gz 6663754 BLAKE2B bf0a6c8dfd8b2da5ed0e7ae5f7b862c57a54e5d48bc24b29e42ebffec4e0606604fbe4b8502e85df60a3a618568bf9e2eba88e5ad2fdec7fb93043b823435362 SHA512 97dc872e4d0ac8df2f46e17b590e970a62a78baf81e18a9beeb23d37a4401a2e52591ca96cc01e1465b22aa234cf9e88f84a7b0f27d0144b3afeac62f6252c95
+DIST dump1090-5.0.tar.gz 10124422 BLAKE2B d6b26a444f73cccd002558b6863431537078e1fe9f61e4e240d4a5f06181b9ff713387aad623c2ee8257c2568bd4dd373746606c356ac3ff0f27f411d4949997 SHA512 1104982308db788993bf5dc130a5ca369c8bfaaae56cd5a435bbd22ed99b0633594789334d7f256bad2b288c4906923baf8bc73e2f7b7f9f52f7068b9b519142

diff --git a/net-wireless/dump1090/dump1090-4.0.ebuild b/net-wireless/dump1090/dump1090-4.0.ebuild
index acbbbb80575..c49bf27909f 100644
--- a/net-wireless/dump1090/dump1090-4.0.ebuild
+++ b/net-wireless/dump1090/dump1090-4.0.ebuild
@@ -30,8 +30,8 @@ BDEPEND="virtual/pkgconfig"
 
 src_prepare() {
 	default
-	sed -i -e 's#-O3 -g -Wall -Wmissing-declarations -Werror -W##' Makefile || die
-	sed -i -e "s#-lncurses#$($(tc-getPKG_CONFIG) --libs ncurses)#" Makefile || die
+	sed -i -e '/CFLAGS/s# -O3 -g -Wall -Wmissing-declarations -Werror -W # #' Makefile || die
+	sed -i -e "/LIBS_CURSES/s#-lncurses#$($(tc-getPKG_CONFIG) --libs ncurses)#" Makefile || die
 }
 
 src_compile() {

diff --git a/net-wireless/dump1090/dump1090-5.0.ebuild b/net-wireless/dump1090/dump1090-5.0.ebuild
new file mode 100644
index 00000000000..dc9893bd0a7
--- /dev/null
+++ b/net-wireless/dump1090/dump1090-5.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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"
+SLOT="0"
+IUSE="bladerf hackrf +rtlsdr minimal"
+
+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"
+
+src_prepare() {
+	default
+	sed -i -e '/CFLAGS/s# -O3 -g -Wall -Wmissing-declarations -Werror -W # #' Makefile || die
+	sed -i -e "/LIBS_CURSES/s#-lncurses#$($(tc-getPKG_CONFIG) --libs ncurses)#" Makefile || die
+}
+
+src_compile() {
+	emake CC="$(tc-getCC)" \
+		BLADERF=$(usex bladerf) \
+		RTLSDR=$(usex rtlsdr) \
+		HACKRF=$(usex hackrf) \
+		CPUFEATURES=yes \
+		LIMESDR=no
+}
+
+src_install() {
+	dobin ${PN}
+	dobin view1090
+	dodoc README.md README-json.md
+	# DSP config for bladerf
+	if use bladerf; then
+		insinto usr/share/${PN}/bladerf
+		doins bladerf/*
+	fi
+
+	newtmpfiles "${FILESDIR}"/tmpfilesd-dump1090-5.0.conf ${PN}.conf
+	newconfd "${FILESDIR}"/dump1090-5.0.confd ${PN}
+	newinitd "${FILESDIR}"/dump1090-5.0.initd ${PN}
+
+	if use !minimal; then
+		insinto /usr/share/${PN}
+		doins -r tools
+
+		# Some tooling expects the -fa variant directory to contain the files
+		dosym ../../usr/share/${PN} /usr/share/dump1090-fa
+
+		# Older HTML
+		insinto /usr/share/${PN}/html
+		doins -r public_html/*
+		# Newer HTML
+		insinto /usr/share/skyaware/html
+		doins -r public_html_merged/*
+
+		# One of these this should be included into other lighttpd configs
+		insinto /usr/share/${PN}/lighttpd
+		# Old style:
+		doins debian/lighttpd/89-dump1090-fa.conf
+		doins debian/lighttpd/88-dump1090-fa-statcache.conf
+		# New style:
+		doins debian/lighttpd/89-skyaware.conf
+
+		# See README.md for how to use custom wisdom files
+		exeinto /usr/share/${PN}/wisdom
+		doexe debian/generate-wisdom
+		insinto /usr/share/${PN}/wisdom
+		doins wisdom.*
+		doins wisdom/wisdom.*
+		# For /etc/dump1090-fa/wisdom.local
+		keepdir /etc/dump1090-fa/
+
+		# Tooling to generate custom wisdom:
+		exeinto /usr/libexec/${PN}
+		doexe starch-benchmark
+	fi
+}

diff --git a/net-wireless/dump1090/dump1090-9999.ebuild b/net-wireless/dump1090/dump1090-9999.ebuild
index b6d89bd1d31..dc9893bd0a7 100644
--- a/net-wireless/dump1090/dump1090-9999.ebuild
+++ b/net-wireless/dump1090/dump1090-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit toolchain-funcs
+inherit tmpfiles toolchain-funcs
 
 DESCRIPTION="simple Mode S decoder for RTLSDR devices"
 HOMEPAGE="https://github.com/flightaware/dump1090"
@@ -18,39 +18,78 @@ fi
 
 LICENSE="BSD"
 SLOT="0"
-IUSE="bladerf +rtlsdr"
+IUSE="bladerf hackrf +rtlsdr minimal"
 
 DEPEND="
 	sys-libs/ncurses:=[tinfo]
-	virtual/libusb:1
-	bladerf? ( net-wireless/bladerf:= )
-	rtlsdr? ( net-wireless/rtl-sdr:= )"
+	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"
 
 src_prepare() {
 	default
-	sed -i -e 's#-O2 -g -Wall -Werror -W##' Makefile || die
-	sed -i -e "s#-lncurses#$($(tc-getPKG_CONFIG) --libs ncurses)#" Makefile || die
+	sed -i -e '/CFLAGS/s# -O3 -g -Wall -Wmissing-declarations -Werror -W # #' Makefile || die
+	sed -i -e "/LIBS_CURSES/s#-lncurses#$($(tc-getPKG_CONFIG) --libs ncurses)#" Makefile || die
 }
 
 src_compile() {
 	emake CC="$(tc-getCC)" \
 		BLADERF=$(usex bladerf) \
-		RTLSDR=$(usex rtlsdr)
+		RTLSDR=$(usex rtlsdr) \
+		HACKRF=$(usex hackrf) \
+		CPUFEATURES=yes \
+		LIMESDR=no
 }
 
 src_install() {
 	dobin ${PN}
 	dobin view1090
-	dodoc README.md
+	dodoc README.md README-json.md
+	# DSP config for bladerf
+	if use bladerf; then
+		insinto usr/share/${PN}/bladerf
+		doins bladerf/*
+	fi
 
-	insinto /usr/share/${PN}/html
-	doins -r public_html/*
+	newtmpfiles "${FILESDIR}"/tmpfilesd-dump1090-5.0.conf ${PN}.conf
+	newconfd "${FILESDIR}"/dump1090-5.0.confd ${PN}
+	newinitd "${FILESDIR}"/dump1090-5.0.initd ${PN}
 
-	insinto /usr/share/${PN}
-	doins -r tools
+	if use !minimal; then
+		insinto /usr/share/${PN}
+		doins -r tools
 
-	insinto /usr/share/${PN}
-	newins debian/lighttpd/89-dump1090-fa.conf lighttpd.conf
+		# Some tooling expects the -fa variant directory to contain the files
+		dosym ../../usr/share/${PN} /usr/share/dump1090-fa
+
+		# Older HTML
+		insinto /usr/share/${PN}/html
+		doins -r public_html/*
+		# Newer HTML
+		insinto /usr/share/skyaware/html
+		doins -r public_html_merged/*
+
+		# One of these this should be included into other lighttpd configs
+		insinto /usr/share/${PN}/lighttpd
+		# Old style:
+		doins debian/lighttpd/89-dump1090-fa.conf
+		doins debian/lighttpd/88-dump1090-fa-statcache.conf
+		# New style:
+		doins debian/lighttpd/89-skyaware.conf
+
+		# See README.md for how to use custom wisdom files
+		exeinto /usr/share/${PN}/wisdom
+		doexe debian/generate-wisdom
+		insinto /usr/share/${PN}/wisdom
+		doins wisdom.*
+		doins wisdom/wisdom.*
+		# For /etc/dump1090-fa/wisdom.local
+		keepdir /etc/dump1090-fa/
+
+		# Tooling to generate custom wisdom:
+		exeinto /usr/libexec/${PN}
+		doexe starch-benchmark
+	fi
 }

diff --git a/net-wireless/dump1090/files/dump1090-5.0.confd b/net-wireless/dump1090/files/dump1090-5.0.confd
new file mode 100644
index 00000000000..3350294ae8c
--- /dev/null
+++ b/net-wireless/dump1090/files/dump1090-5.0.confd
@@ -0,0 +1,20 @@
+# These variable names are chose to be as close as possible to the upstream & Debian options.
+RECEIVER_OPTIONS="--device-index 0 --gain -10 --ppm 0"
+DECODER_OPTIONS="--max-range 360 --fix"
+NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1300 --net-ro-interval 0.2 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005"
+JSON_OPTIONS="--json-location-accuracy 1 --write-json /run/dump1090/"
+
+# See README.md for custom wisdom, or use one of the bundled wisdom files
+WISDOM_FILE=
+[ -f /etc/dump1090-fa/wisdom.local ] && WISDOM_FILE=/etc/dump1090-fa/wisdom.local
+
+# Optional, populate these with your location
+#PIAWARE_LAT=
+#PIAWARE_LON=
+# Or populate file /var/cache/piaware/location.env
+[ -f /var/cache/piaware/location.env ] && source /var/cache/piaware/location.env
+
+if [ -n "$PIAWARE_LAT" -a -n "$PIAWARE_LON" ]
+then
+    POSITION="--lat $PIAWARE_LAT --lon $PIAWARE_LON"
+fi

diff --git a/net-wireless/dump1090/files/dump1090-5.0.initd b/net-wireless/dump1090/files/dump1090-5.0.initd
new file mode 100644
index 00000000000..47c2d240bb5
--- /dev/null
+++ b/net-wireless/dump1090/files/dump1090-5.0.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="dump1090"
+description=""
+command=/usr/bin/dump1090
+command_args="$RECEIVER_OPTIONS $DECODER_OPTIONS $NET_OPTIONS $JSON_OPTIONS $POSITION ${WISDOM_FILE:+--wisdom} ${WISDOM_FILE}"
+
+depend() {
+  use rtl_tcp
+}
+pre_start() {
+	mkdir -p /run/dump1090/
+}

diff --git a/net-wireless/dump1090/files/tmpfilesd-dump1090-5.0.conf b/net-wireless/dump1090/files/tmpfilesd-dump1090-5.0.conf
new file mode 100644
index 00000000000..67341178bfe
--- /dev/null
+++ b/net-wireless/dump1090/files/tmpfilesd-dump1090-5.0.conf
@@ -0,0 +1,4 @@
+# The daemon will write out JSON files for the webserver here
+d /run/dump1090/ 755 root root -
+# The some upstream configs expect it to be in /run/dump1090-fa/
+L /run/dump1090-fa -    -    -     - /run/dump1090/

diff --git a/net-wireless/dump1090/metadata.xml b/net-wireless/dump1090/metadata.xml
index da238ebeece..f515f087980 100644
--- a/net-wireless/dump1090/metadata.xml
+++ b/net-wireless/dump1090/metadata.xml
@@ -7,7 +7,9 @@
 	</maintainer>
 	<use>
 		<flag name="bladerf">Build with Nuand BladeRF support</flag>
+		<flag name="hackrf">Build with Great Scott Gadgets HackRF support</flag>
 		<flag name="rtlsdr">Build with Realtek RTL2832U (rtlsdr) support</flag>
+		<flag name="minimal">Exclude all HTML/webserver extras for a tiny build, e.g. to export data only</flag>
 	</use>
 	<upstream>
 		<remote-id type="github">flightaware/dump1090</remote-id>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/dump1090/, net-wireless/dump1090/files/
@ 2021-10-14 10:00 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-10-14 10:00 UTC (permalink / raw
  To: gentoo-commits

commit:     ef8b7a9110e6842c9533b1d8e074ae1a88e976ce
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 14 09:59:51 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 14 09:59:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef8b7a91

net-wireless/dump1090: backport x86 patch to 5.0

Closes: https://bugs.gentoo.org/818130
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-wireless/dump1090/dump1090-5.0.ebuild          |  1 +
 .../files/dump1090-5.0-further-32bit-fix.patch     | 52 ++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/net-wireless/dump1090/dump1090-5.0.ebuild b/net-wireless/dump1090/dump1090-5.0.ebuild
index 93b19b8ac79..0f692187b67 100644
--- a/net-wireless/dump1090/dump1090-5.0.ebuild
+++ b/net-wireless/dump1090/dump1090-5.0.ebuild
@@ -30,6 +30,7 @@ BDEPEND="virtual/pkgconfig"
 
 PATCHES=(
 	"${FILESDIR}/${P}-32bit-fix.patch"
+	"${FILESDIR}/${P}-further-32bit-fix.patch"
 )
 
 src_prepare() {

diff --git a/net-wireless/dump1090/files/dump1090-5.0-further-32bit-fix.patch b/net-wireless/dump1090/files/dump1090-5.0-further-32bit-fix.patch
new file mode 100644
index 00000000000..bfcea2e4f88
--- /dev/null
+++ b/net-wireless/dump1090/files/dump1090-5.0-further-32bit-fix.patch
@@ -0,0 +1,52 @@
+https://github.com/flightaware/dump1090/commit/462dee56f3a339bc4d83fea264fe89a1ced5bd22.patch
+https://github.com/flightaware/dump1090/commit/455896e86db84d10a197f5a3f88d13c0539ad470.patch
+https://bugs.gentoo.org/818130
+
+From 462dee56f3a339bc4d83fea264fe89a1ced5bd22 Mon Sep 17 00:00:00 2001
+From: Oliver Jowett <oliver.jowett@flightaware.com>
+Date: Sat, 13 Mar 2021 12:49:40 +0800
+Subject: [PATCH] Fix builds on 32-bit x86
+
+---
+ Makefile.cpufeatures | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.cpufeatures b/Makefile.cpufeatures
+index 099714e08..12377ad81 100644
+--- a/Makefile.cpufeatures
++++ b/Makefile.cpufeatures
+@@ -17,7 +17,11 @@ ifeq ($(CPUFEATURES_UNAME),Darwin)
+   CPUFEATURES_CFLAGS += -DHAVE_SYSCTLBYNAME
+ endif
+ 
+-ifeq ($(CPUFEATURES_ARCH), x86_64)
++ifeq ($(CPUFEATURES_ARCH),x86_64)
++  CPUFEATURES_OBJS += cpu_features/src/cpuinfo_x86.o
++endif
++
++ifneq ($(filter-out $(CPUFEATURES_ARCH),i%86),)
+   CPUFEATURES_OBJS += cpu_features/src/cpuinfo_x86.o
+ endif
+ 
+From 455896e86db84d10a197f5a3f88d13c0539ad470 Mon Sep 17 00:00:00 2001
+From: Oliver Jowett <oliver.jowett@flightaware.com>
+Date: Wed, 17 Mar 2021 02:21:18 +0800
+Subject: [PATCH] Fix broken 32-bit x86 test that broke builds on non-x86
+
+---
+ Makefile.cpufeatures | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.cpufeatures b/Makefile.cpufeatures
+index 12377ad81..8c3b8418d 100644
+--- a/Makefile.cpufeatures
++++ b/Makefile.cpufeatures
+@@ -21,7 +21,7 @@ ifeq ($(CPUFEATURES_ARCH),x86_64)
+   CPUFEATURES_OBJS += cpu_features/src/cpuinfo_x86.o
+ endif
+ 
+-ifneq ($(filter-out $(CPUFEATURES_ARCH),i%86),)
++ifneq (,$(filter i%86,$(CPUFEATURES_ARCH)))
+   CPUFEATURES_OBJS += cpu_features/src/cpuinfo_x86.o
+ endif
+ 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-14 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-12 22:53 [gentoo-commits] repo/gentoo:master commit in: net-wireless/dump1090/, net-wireless/dump1090/files/ Robin H. Johnson
  -- strict thread matches above, loose matches on Subject: below --
2021-10-14 10:00 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox