Diff dump1090-4.0 with a dump1090-5.0

/usr/portage/net-wireless/dump1090/dump1090-5.0.ebuild 2023-10-09 14:52:34.776368483 +0300
3 3

  
4 4
EAPI=7
5 5

  
6
inherit toolchain-funcs
6
inherit tmpfiles toolchain-funcs
7 7

  
8 8
DESCRIPTION="simple Mode S decoder for RTLSDR devices"
9 9
HOMEPAGE="https://github.com/flightaware/dump1090"
......
18 18

  
19 19
LICENSE="BSD"
20 20
SLOT="0"
21
IUSE="bladerf +rtlsdr"
21
IUSE="bladerf hackrf +rtlsdr minimal"
22 22

  
23 23
DEPEND="
24 24
	sys-libs/ncurses:=[tinfo]
25
	virtual/libusb:1
26
	bladerf? ( net-wireless/bladerf:= )
27
	rtlsdr? ( net-wireless/rtl-sdr:= )"
25
	bladerf? ( net-wireless/bladerf:= virtual/libusb:1 )
26
	hackrf? ( net-libs/libhackrf:= virtual/libusb:1 )
27
	rtlsdr? ( net-wireless/rtl-sdr:= virtual/libusb:1 )"
28 28
RDEPEND="${DEPEND}"
29 29
BDEPEND="virtual/pkgconfig"
30 30

  
31
PATCHES=(
32
	"${FILESDIR}/${P}-32bit-fix.patch"
33
	"${FILESDIR}/${P}-further-32bit-fix.patch"
34
)
35

  
31 36
src_prepare() {
32 37
	default
33 38
	sed -i -e '/CFLAGS/s# -O3 -g -Wall -Wmissing-declarations -Werror -W # #' Makefile || die
......
37 42
src_compile() {
38 43
	emake CC="$(tc-getCC)" \
39 44
		BLADERF=$(usex bladerf) \
40
		RTLSDR=$(usex rtlsdr)
45
		RTLSDR=$(usex rtlsdr) \
46
		HACKRF=$(usex hackrf) \
47
		CPUFEATURES=yes \
48
		LIMESDR=no
41 49
}
42 50

  
43 51
src_install() {
44 52
	dobin ${PN}
45 53
	dobin view1090
46
	dodoc README.md
47

  
48
	insinto /usr/share/${PN}/html
49
	doins -r public_html/*
50

  
51
	insinto /usr/share/${PN}
52
	doins -r tools
54
	dodoc README.md README-json.md
55
	# DSP config for bladerf
56
	if use bladerf; then
57
		insinto usr/share/${PN}/bladerf
58
		doins bladerf/*
59
	fi
60

  
61
	newtmpfiles "${FILESDIR}"/tmpfilesd-dump1090-5.0.conf ${PN}.conf
62
	newconfd "${FILESDIR}"/dump1090-5.0.confd ${PN}
63
	newinitd "${FILESDIR}"/dump1090-5.0.initd ${PN}
64

  
65
	if use !minimal; then
66
		insinto /usr/share/${PN}
67
		doins -r tools
68

  
69
		# Some tooling expects the -fa variant directory to contain the files
70
		dosym ../../usr/share/${PN} /usr/share/dump1090-fa
71

  
72
		# Older HTML
73
		insinto /usr/share/${PN}/html
74
		doins -r public_html/*
75
		# Newer HTML
76
		insinto /usr/share/skyaware/html
77
		doins -r public_html_merged/*
78

  
79
		# One of these this should be included into other lighttpd configs
80
		insinto /usr/share/${PN}/lighttpd
81
		# Old style:
82
		doins debian/lighttpd/89-dump1090-fa.conf
83
		doins debian/lighttpd/88-dump1090-fa-statcache.conf
84
		# New style:
85
		doins debian/lighttpd/89-skyaware.conf
86

  
87
		# See README.md for how to use custom wisdom files
88
		exeinto /usr/share/${PN}/wisdom
89
		doexe debian/generate-wisdom
90
		insinto /usr/share/${PN}/wisdom
91
		doins wisdom.*
92
		doins wisdom/wisdom.*
93
		# For /etc/dump1090-fa/wisdom.local
94
		keepdir /etc/dump1090-fa/
95

  
96
		# Tooling to generate custom wisdom:
97
		exeinto /usr/libexec/${PN}
98
		doexe starch-benchmark
99
	fi
100
}
53 101

  
54
	insinto /usr/share/${PN}
55
	newins debian/lighttpd/89-dump1090-fa.conf lighttpd.conf
102
pkg_postinst() {
103
	tmpfiles_process ${PN}.conf
56 104
}
Thank you!