git: 1c1f78885f8b - main - mail/spamprobe: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Mon, 24 Jul 2023 14:46:10 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1c1f78885f8bacfb70e02d7a3cd02991ad79dc32

commit 1c1f78885f8bacfb70e02d7a3cd02991ad79dc32
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-24 13:56:58 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-24 14:46:02 +0000

    mail/spamprobe: Fix build with llvm16
    
    - Utilize USES=localbase
    - Pet portclippy
    
    Sponsored by:   The FreeBSD Foundation
---
 mail/spamprobe/Makefile | 41 ++++++++++++++++++-----------------------
 1 file changed, 18 insertions(+), 23 deletions(-)

diff --git a/mail/spamprobe/Makefile b/mail/spamprobe/Makefile
index b76a2e9c4548..48696bea3b38 100644
--- a/mail/spamprobe/Makefile
+++ b/mail/spamprobe/Makefile
@@ -8,49 +8,44 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Spam detector using Bayesian analysis of word counts
 WWW=		http://spamprobe.sourceforge.net/
 
+USES=	localbase:ldflags
+USE_CXXSTD=	c++14
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-default-8bit
 
 PLIST_FILES=	bin/spamprobe man/man1/spamprobe.1.gz
 
 OPTIONS_DEFINE=	GIF JPEG PNG
+OPTIONS_DEFAULT=PBL GIF JPEG PNG
 OPTIONS_MULTI=	DATABASE
 OPTIONS_MULTI_DATABASE=	PBL BDB
-OPTIONS_DEFAULT=PBL GIF JPEG PNG
-PBL_DESC=		PBL database support (author's recommended data store)
 
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
-
-# PBL support
-PBL_BUILD_DEPENDS=	${LOCALBASE}/lib/libpbl.a:databases/libpbl
-PBL_RUN_DEPENDS+=	${PBL_BUILD_DEPENDS}
-PBL_CONFIGURE_WITH=	pbl
-PBL_LDFLAGS=	-lpbl
+PBL_DESC=		PBL database support (author's recommended data store)
 
 # BerkleyDB support
+BDB_USES=		bdb
 BDB_CONFIGURE_ENABLE=	cdb
 BDB_CONFIGURE_WITH=	db
-BDB_CPPFLAGS=	-DUSE_DB=1
+BDB_CPPFLAGS=	-DUSE_DB=1 -I${BDB_INCLUDE_DIR}
+BDB_LDFLAGS=	-l${BDB_LIB_NAME}
 
 # giflib support
-GIF_CONFIGURE_WITH=	gif
 GIF_LIB_DEPENDS=	libgif.so:graphics/giflib
-
-# PNG support
-PNG_CONFIGURE_WITH=	png
-PNG_LIB_DEPENDS=	libpng.so:graphics/png
+GIF_CONFIGURE_WITH=	gif
 
 # JPEG support
-JPEG_CONFIGURE_WITH=jpeg
 JPEG_USES=		jpeg
+JPEG_CONFIGURE_WITH=jpeg
 
-.include <bsd.port.options.mk>
+# PBL support
+PBL_BUILD_DEPENDS=	${LOCALBASE}/lib/libpbl.a:databases/libpbl
+PBL_RUN_DEPENDS+=	${PBL_BUILD_DEPENDS}
+PBL_CONFIGURE_WITH=	pbl
+PBL_LDFLAGS=	-lpbl
 
-.if ${PORT_OPTIONS:MBDB}
-USES+=		bdb
-CPPFLAGS+=	-I${BDB_INCLUDE_DIR}
-LDFLAGS+=	-l${BDB_LIB_NAME}
-.endif
+# PNG support
+PNG_LIB_DEPENDS=	libpng.so:graphics/png
+PNG_CONFIGURE_WITH=	png
 
 .include <bsd.port.mk>