Diff kismet-2023.07.2 with a kismet-9999

/usr/portage/net-wireless/kismet/kismet-9999.ebuild 2025-11-06 18:18:08.558167267 +0300
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:= )
......
86 79
"
87 80
DEPEND="${CDEPEND}
88 81
	dev-libs/boost
89
	=dev-libs/libfmt-9*
82
	dev-libs/libfmt
90 83
	sys-libs/libcap
91 84
"
92 85
BDEPEND="virtual/pkgconfig"
......
95 88
	#sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \
96 89
	#	conf/kismet_logging.conf || die
97 90

  
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 91
	#sed -i -e 's#root#kismet#g' packaging/systemd/kismet.service.in
102 92

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

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

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

  
115 108
	default
116 109

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

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

  
120 122
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 123
	econf \
130 124
		$(use_enable libusb libusb) \
131 125
		$(use_enable libusb wifi-coconut) \
126
		$(use_enable mqtt mosquitto) \
132 127
		$(use_enable pcre) \
133 128
		$(use_enable pcre require-pcre2) \
134 129
		$(use_enable lm-sensors lmsensors) \
135 130
		$(use_enable networkmanager libnm) \
131
		$(use_enable protobuf) \
136 132
		$(use_enable ubertooth) \
133
		$(use_enable wext linuxwext) \
137 134
		--sysconfdir=/etc/kismet \
138 135
		--disable-optimization
139 136
}
......
194 191
}
195 192

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