git: a36a14a79809 - main - net/dhcpcd: Use HAS_CONFIGURE over GNU_CONFIGURE

From: Dries Michiels <driesm_at_FreeBSD.org>
Date: Sat, 13 Nov 2021 15:33:04 UTC
The branch main has been updated by driesm:

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

commit a36a14a79809eea30710ffb36bdfc6268855b4f6
Author:     Dries Michiels <driesm@FreeBSD.org>
AuthorDate: 2021-11-01 09:52:02 +0000
Commit:     Dries Michiels <driesm@FreeBSD.org>
CommitDate: 2021-11-13 15:32:26 +0000

    net/dhcpcd: Use HAS_CONFIGURE over GNU_CONFIGURE
    
    Historically the port used GNU_CONFIGURE but this is not needed.
    Switch to HAS_CONFIGURE and adjust the needed configure args.
    While here install the sample config file under etc/.
    
    Reported by:            diizzy
    Approved by:            0mp (mentor)
    Differential Revision:  https://reviews.freebsd.org/D32907
---
 net/dhcpcd/Makefile  | 8 ++++----
 net/dhcpcd/pkg-plist | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/net/dhcpcd/Makefile b/net/dhcpcd/Makefile
index 7afc86f15b6c..cf13b33cc4ad 100644
--- a/net/dhcpcd/Makefile
+++ b/net/dhcpcd/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	dhcpcd
 DISTVERSION=	9.4.1
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	https://roy.marples.name/downloads/dhcpcd/
 
@@ -15,15 +16,14 @@ USES=		compiler:c11 cpe tar:xz
 CPE_VENDOR=	dhcpcd_project
 USE_RC_SUBR=	dhcpcd
 
-GNU_CONFIGURE=	yes
+HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	--datadir=${PREFIX}/share/examples \
+		--prefix=${PREFIX} \
 		--privsepuser="_dhcp" \
 		--without-udev
 
 post-install:
-	${MV} ${STAGEDIR}${PREFIX}/etc/dhcpcd.conf \
-		${STAGEDIR}${PREFIX}/share/examples/dhcpcd
+	${MV} ${STAGEDIR}${PREFIX}/etc/dhcpcd.conf ${STAGEDIR}${PREFIX}/etc/dhcpcd.conf.sample
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/dhcpcd
-	${MKDIR} ${STAGEDIR}/var/db/dhcpcd
 
 .include <bsd.port.mk>
diff --git a/net/dhcpcd/pkg-plist b/net/dhcpcd/pkg-plist
index 891ce7fabc99..4a2505f079f2 100644
--- a/net/dhcpcd/pkg-plist
+++ b/net/dhcpcd/pkg-plist
@@ -3,13 +3,13 @@ libexec/dhcpcd-hooks/20-resolv.conf
 libexec/dhcpcd-hooks/30-hostname
 libexec/dhcpcd-hooks/50-ntp.conf
 libexec/dhcpcd-run-hooks
-man/man5/dhcpcd.conf.5.gz
-man/man8/dhcpcd-run-hooks.8.gz
-man/man8/dhcpcd.8.gz
 sbin/dhcpcd
 %%EXAMPLESDIR%%/hooks/10-wpa_supplicant
 %%EXAMPLESDIR%%/hooks/15-timezone
 %%EXAMPLESDIR%%/hooks/29-lookup-hostname
 %%EXAMPLESDIR%%/hooks/50-ypbind
-@sample %%EXAMPLESDIR%%/dhcpcd.conf etc/dhcpcd.conf
+share/man/man5/dhcpcd.conf.5.gz
+share/man/man8/dhcpcd-run-hooks.8.gz
+share/man/man8/dhcpcd.8.gz
+@sample etc/dhcpcd.conf.sample
 @dir(_dhcp,_dhcp,) /var/db/dhcpcd