git: a26eec01a598 - main - devel/objfw: Improve Makefile

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Sun, 18 Aug 2024 15:04:40 UTC
The branch main has been updated by vvd:

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

commit a26eec01a598c88de2c1ec39ea7b2c011d78dc5f
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-08-18 14:55:43 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-08-18 14:55:43 +0000

    devel/objfw: Improve Makefile
    
    - Sort options to pet portclippy.
    - Rename option SSL to TLS: TLS used in PLIST_SUB and in name of the so
      library installed with this option - libobjfwtls.so.1.
    - Add strip libobjfwtls.so.1 to TLS option MBEDTLS too.
    
    PR:             280876
    Approved by:    Jonathan Schleifer <js@nil.im> (maintainer)
---
 devel/objfw/Makefile | 41 ++++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 21 deletions(-)

diff --git a/devel/objfw/Makefile b/devel/objfw/Makefile
index 6d31fb006cf3..ac030937496a 100644
--- a/devel/objfw/Makefile
+++ b/devel/objfw/Makefile
@@ -18,32 +18,32 @@ GNU_CONFIGURE=	yes
 TEST_TARGET=	check
 
 OPTIONS_DEFINE=		DOCS
-OPTIONS_SINGLE=		SSL
-OPTIONS_SINGLE_SSL=	OPENSSL GNUTLS MBEDTLS NOSSL
 OPTIONS_DEFAULT=	OPENSSL
-NOSSL_DESC=		no SSL/TLS support
+OPTIONS_SINGLE=		TLS
+OPTIONS_SINGLE_TLS=	OPENSSL GNUTLS MBEDTLS NOTLS
+NOTLS_DESC=		no SSL/TLS support
 
 DOCS_BUILD_DEPENDS=	doxygen:devel/doxygen
 
-OPENSSL_CONFIGURE_ON=	--with-tls=openssl
-OPENSSL_PLIST_SUB=	TLS=""
-OPENSSL_CPPFLAGS=	-I${OPENSSLINC}
-OPENSSL_LDFLAGS=	-L${OPENSSLLIB}
-OPENSSL_USES=		ssl
-
-GNUTLS_CONFIGURE_ON=	--with-tls=gnutls
-GNUTLS_PLIST_SUB=	TLS=""
 GNUTLS_LIB_DEPENDS=	libgnutls.so:security/gnutls
 GNUTLS_USES=		pkgconfig
+GNUTLS_CONFIGURE_ON=	--with-tls=gnutls
+GNUTLS_PLIST_SUB=	TLS=""
 
-MBEDTLS_CONFIGURE_ON=	--with-tls=mbedtls
-MBEDTLS_PLIST_SUB=	TLS=""
 MBEDTLS_LIB_DEPENDS=	libmbedtls.so:security/mbedtls
+MBEDTLS_CONFIGURE_ON=	--with-tls=mbedtls
 MBEDTLS_CPPFLAGS=	-I${PREFIX}/include
 MBEDTLS_LDFLAGS=	-L${PREFIX}/lib
+MBEDTLS_PLIST_SUB=	TLS=""
 
-NOSSL_CONFIGURE_ON=	--without-tls
-NOSSL_PLIST_SUB=	TLS="@comment "
+NOTLS_CONFIGURE_ON=	--without-tls
+NOTLS_PLIST_SUB=	TLS="@comment "
+
+OPENSSL_USES=		ssl
+OPENSSL_CONFIGURE_ON=	--with-tls=openssl
+OPENSSL_CPPFLAGS=	-I${OPENSSLINC}
+OPENSSL_LDFLAGS=	-L${OPENSSLLIB}
+OPENSSL_PLIST_SUB=	TLS=""
 
 do-build-DOCS-on:
 	cd ${WRKSRC} && ${DO_MAKE_BUILD} docs
@@ -54,16 +54,15 @@ do-install-DOCS-on:
 
 post-install:
 .for i in objfw-new ofarc ofdns ofhash ofhttp
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/$i
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${i}
 .endfor
 .for i in libobjfw.so.1 libobjfwrt.so.1
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/$i
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${i}
 .endfor
 
-post-install-OPENSSL-on:
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libobjfwtls.so.1
-
-post-install-GNUTLS-on:
+.for tls in GNUTLS MBEDTLS OPENSSL
+post-install-${tls}-on:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libobjfwtls.so.1
+.endfor
 
 .include <bsd.port.mk>