Skip to content

Commit

Permalink
net-mgmt/kismet: Fix build with llvm16
Browse files Browse the repository at this point in the history
- Utilize USES=localbase
- Utilize OPTIONSNG where possible
- Pet portclippy

Approved by:	portmgr (blanket)
Sponsored by:	The FreeBSD Foundation
  • Loading branch information
5u623l20 committed Aug 2, 2023
1 parent 9585000 commit ddf0ac1
Showing 1 changed file with 21 additions and 36 deletions.
57 changes: 21 additions & 36 deletions net-mgmt/kismet/Makefile
Expand Up @@ -11,55 +11,40 @@ WWW= https://www.kismetwireless.net/

LICENSE= GPLv2

USES= gmake tar:xz
USES= gmake localbase:ldflags tar:xz
USE_CXXSTD= c++14

GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib

WRKSRC= ${WRKDIR}/${DISTNAME:S/a$$//}

PORTDOCS= README
PORTEXAMPLES= *

OPTIONS_DEFINE= PCRE PLUGINS SETUID DOCS EXAMPLES
OPTIONS_DEFAULT= PCRE PLUGINS SETUID
OPTIONS_SUB= yes

SETUID_DESC= Use privilege separation

WRKSRC= ${WRKDIR}/${DISTNAME:S/a$$//}
PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
PCRE_CONFIGURE_ENABLE= pcre
PLUGINS_USES= ssl
PLUGINS_ALL_TARGET= depend all all-plugins
PLUGINS_INSTALL_TARGET= all-plugins-install
SETUID_CONFIGURE_ON=--with-suidgroup=wheel
SETUID_CONFIGURE_OFF=--without-suidgroup
SETUID_INSTALL_TARGET= suidinstall
SETUID_INSTALL_TARGET_OFF= install
SETUID_SUB_FILES= suid_pkg-message
SETUID_PLIST_SUB= SUID="" SUIDGROUP="${GROUPS}"
SETUID_PLIST_SUB_OFF= SUID="@comment " SUIDGROUP=""

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= README
.endif

.if ${PORT_OPTIONS:MEXAMPLES}
PORTEXAMPLES= *
.endif

.if ${PORT_OPTIONS:MPCRE}
CONFIGURE_ARGS+=--enable-pcre
LIB_DEPENDS+= libpcre.so:devel/pcre
.else
CONFIGURE_ARGS+=--disable-pcre
.endif

.if ${PORT_OPTIONS:MSETUID}
GROUPS= kismet
CONFIGURE_ARGS+=--with-suidgroup=wheel
INSTALL_TARGET= suidinstall
PLIST_SUB+= SUID="" SUIDGROUP="${GROUPS}"
PKGMESSAGE= ${WRKDIR}/suid_pkg-message
SUB_FILES+= suid_pkg-message
.else
INSTALL_TARGET= install
CONFIGURE_ARGS+=--without-suidgroup
PLIST_SUB+= SUID="@comment " SUIDGROUP=""
.endif

.if ${PORT_OPTIONS:MPLUGINS}
ALL_TARGET= depend all all-plugins
INSTALL_TARGET+= all-plugins-install
USES+= ssl
PLIST_SUB+= PLUGINS=""
.else
PLIST_SUB+= PLUGINS="@comment "
.endif

.include <bsd.port.pre.mk>
Expand Down

0 comments on commit ddf0ac1

Please sign in to comment.