Diff kismet-2023.07.2 with a kismet-9999

/usr/portage/net-wireless/kismet/kismet-9999.ebuild 2025-07-29 16:22:17.304467627 +0300
5 5

  
6 6
PYTHON_COMPAT=( python3_{10..13} )
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"
......
18 18
	S=${WORKDIR}/${MY_P/BETA/beta}
19 19

  
20 20
	#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"
21
	SRC_URI="https://www.kismetwireless.net/code/${MY_P}.tar.xz"
23 22

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

  
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"
28
	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
36 29
fi
37 30

  
38 31
DESCRIPTION="IEEE 802.11 wireless LAN sniffer"
......
40 33

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

  
46 39
# upstream said protobuf-26.1 breaks everything
47 40
# details are unclear at this time but adding restriction for safety
48 41
CDEPEND="
49 42
	${PYTHON_DEPS}
43
	mqtt? ( app-misc/mosquitto )
50 44
	networkmanager? ( net-misc/networkmanager )
51 45
	dev-libs/glib:2
52 46
	dev-libs/elfutils
......
59 53
			net-libs/libpcap
60 54
			)
61 55
	libusb? ( virtual/libusb:1 )
62
	dev-libs/protobuf-c:=
63
	<dev-libs/protobuf-26:=
56
	protobuf? ( dev-libs/protobuf-c:=
57
		<dev-libs/protobuf-26:= )
64 58
	$(python_gen_cond_dep '
65
		dev-python/protobuf[${PYTHON_USEDEP}]
59
	protobuf? ( dev-python/protobuf[${PYTHON_USEDEP}] )
66 60
		dev-python/websockets[${PYTHON_USEDEP}]
67 61
	')
68 62
	lm-sensors? ( sys-apps/lm-sensors:= )
......
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) \
136 133
		$(use_enable ubertooth) \
134
		$(use_enable wext linuxwext) \
137 135
		--sysconfdir=/etc/kismet \
138 136
		--disable-optimization
139 137
}
......
194 192
}
195 193

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