Diff kismet-2023.07.2 with a kismet-9999

/usr/portage/net-wireless/kismet/kismet-9999.ebuild 2026-06-15 19:17:06.465509375 +0300
1
# Copyright 1999-2025 Gentoo Authors
1
# Copyright 1999-2026 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
PYTHON_COMPAT=( python3_{11..13} )
6
PYTHON_COMPAT=( python3_{11..14} )
7 7

  
8
inherit autotools eapi9-ver flag-o-matic python-single-r1 udev systemd
8
inherit autotools eapi9-ver python-single-r1 udev systemd
9 9

  
10 10
if [[ ${PV} == "9999" ]] ; then
11 11
	EGIT_REPO_URI="https://www.kismetwireless.net/git/${PN}.git"
12 12
	inherit git-r3
13
	RESTRICT="strip"
14 13
else
15 14
	MY_P=${P/\./-}
16 15
	MY_P=${MY_P/_beta/-BETA}
......
18 17
	S=${WORKDIR}/${MY_P/BETA/beta}
19 18

  
20 19
	#normally we want an official release
21
	SRC_URI="https://www.kismetwireless.net/code/${MY_P}.tar.xz
22
		https://dev.gentoo.org/~zerochaos/distfiles/${PN}-2023.07.1-stdint-fix.patch"
20
	SRC_URI="https://www.kismetwireless.net/code/${MY_P}.tar.xz"
23 21

  
24 22
	#but sometimes we want a git commit
25 23
	#COMMIT="9ca7e469cf115469f392db7436816151867e1654"
26 24
	#SRC_URI="https://github.com/kismetwireless/kismet/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
27 25
	#S="${WORKDIR}/${PN}-${COMMIT}"
28 26

  
29
	PATCHES=(
30
		"${DISTDIR}/${PN}-2023.07.1-stdint-fix.patch"
31
		# https://github.com/kismetwireless/kismet/pull/517
32
		"${FILESDIR}"/0001-configure.ac-bashism-fix-critical-existence-failure-.patch
33
	)
34

  
35
	KEYWORDS="amd64 arm ~arm64 ~ppc x86"
27
	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
36 28
fi
37 29

  
38 30
DESCRIPTION="IEEE 802.11 wireless LAN sniffer"
......
40 32

  
41 33
LICENSE="GPL-2"
42 34
SLOT="0/${PV}"
43
IUSE="libusb lm-sensors networkmanager +pcre rtlsdr selinux +suid ubertooth udev"
35
IUSE="libusb lm-sensors mqtt networkmanager +pcre protobuf rtlsdr selinux +suid ubertooth udev +wext"
44 36
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
45 37

  
46 38
# upstream said protobuf-26.1 breaks everything
47 39
# details are unclear at this time but adding restriction for safety
48 40
CDEPEND="
49 41
	${PYTHON_DEPS}
42
	mqtt? ( app-misc/mosquitto )
50 43
	networkmanager? ( net-misc/networkmanager )
51 44
	dev-libs/glib:2
52 45
	dev-libs/elfutils
......
59 52
			net-libs/libpcap
60 53
			)
61 54
	libusb? ( virtual/libusb:1 )
62
	dev-libs/protobuf-c:=
63
	<dev-libs/protobuf-26:=
55
	protobuf? ( dev-libs/protobuf-c:=
56
		<dev-libs/protobuf-26:= )
64 57
	$(python_gen_cond_dep '
65
		dev-python/protobuf[${PYTHON_USEDEP}]
58
	protobuf? ( dev-python/protobuf[${PYTHON_USEDEP}] )
66 59
		dev-python/websockets[${PYTHON_USEDEP}]
67 60
	')
68 61
	lm-sensors? ( sys-apps/lm-sensors:= )
69 62
	pcre? ( dev-libs/libpcre2:= )
63
	rtlsdr? ( net-wireless/rtl-sdr:= )
70 64
	suid? ( sys-libs/libcap )
71 65
	ubertooth? ( net-wireless/ubertooth )
72 66
	"
......
80 74
		$(python_gen_cond_dep '
81 75
			dev-python/numpy[${PYTHON_USEDEP}]
82 76
		')
83
		net-wireless/rtl-sdr:=
77
		net-wireless/rtl_433
84 78
	)
85 79
	selinux? ( sec-policy/selinux-kismet )
86 80
"
87 81
DEPEND="${CDEPEND}
88 82
	dev-libs/boost
89
	=dev-libs/libfmt-9*
83
	dev-libs/libfmt
90 84
	sys-libs/libcap
91 85
"
92 86
BDEPEND="virtual/pkgconfig"
......
95 89
	#sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \
96 90
	#	conf/kismet_logging.conf || die
97 91

  
98
	#this was added to quiet macosx builds but it makes gcc builds noisier
99
	sed -i -e 's#-Wno-unknown-warning-option ##g' Makefile.inc.in || die
100

  
101 92
	#sed -i -e 's#root#kismet#g' packaging/systemd/kismet.service.in
102 93

  
103 94
	rm -r boost || die
104 95
	rm -r fmt || die
105 96

  
97
	# bundles mpack but I failed to successfully unbundle
98
	# rm -r mpack || die
99

  
106 100
	#dev-libs/jsoncpp
107 101
	#rm -r json || die
108 102
	#sed -i 's#"json/json.h"#<json/json.h>#' jsoncpp.cc kis_net_beast_httpd.h \
......
114 108

  
115 109
	default
116 110

  
117
	eautoreconf
111
	if [ "${PV}" = "9999" ]; then
112
		sed -i -e 's#-Wno-dangling-reference##g' configure.ac || die
113
		eautoreconf
114
	# Untested by should fix same in non-live
115
	#else
116
	#	sed -i -e 's#-Wno-unknown-warning-option ##g' configure || die
117
	fi
118

  
119
	#this was added to quiet macosx builds but it makes gcc builds noisier
120
	sed -i -e 's#-Wno-unknown-warning-option ##g' Makefile.inc.in || die
118 121
}
119 122

  
120 123
src_configure() {
121
	# -Werror=strict-aliasing
122
	# https://bugs.gentoo.org/877761
123
	# https://github.com/kismetwireless/kismet/issues/518
124
	#
125
	# Do not trust with LTO either.
126
	append-flags -fno-strict-aliasing
127
	filter-lto
128

  
129 124
	econf \
130 125
		$(use_enable libusb libusb) \
131 126
		$(use_enable libusb wifi-coconut) \
127
		$(use_enable mqtt mosquitto) \
132 128
		$(use_enable pcre) \
133 129
		$(use_enable pcre require-pcre2) \
134 130
		$(use_enable lm-sensors lmsensors) \
135 131
		$(use_enable networkmanager libnm) \
132
		$(use_enable protobuf) \
133
		$(use_enable rtlsdr librtlsdr) \
136 134
		$(use_enable ubertooth) \
135
		$(use_enable wext linuxwext) \
137 136
		--sysconfdir=/etc/kismet \
138 137
		--disable-optimization
139 138
}
......
194 193
}
195 194

  
196 195
pkg_postinst() {
197
	if ver_replacing -lt 2019.07.2 || ver_replacing -eq 9999 ; then
196
	if ver_replacing -lt 2019.07.2 || ver_replacing -eq 9999; then
198 197
		migrate_config
199 198
	fi
200 199
	udev_reload
Thank you!