git: 35db13a201c4 - main - audio/pulseaudio-module-sndio: Fix build with poudriere

From: Nicola Vitale <nivit_at_FreeBSD.org>
Date: Thu, 29 Aug 2024 20:17:22 UTC
The branch main has been updated by nivit:

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

commit 35db13a201c4e9314accbf051083265e45dee758
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2024-08-29 20:07:37 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2024-08-29 20:07:37 +0000

    audio/pulseaudio-module-sndio: Fix build with poudriere
    
    As pointed out by arrowd@, the previous patch doesn't work in poudriere
    "because the pkg-config executable isn't there at the time the variable
    value is evaluated". So put the variables in the standard position in
    the Makefile and fix the regular expression of sed(1).
    
    Reported by:    arrowd
---
 audio/pulseaudio-module-sndio/Makefile | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/audio/pulseaudio-module-sndio/Makefile b/audio/pulseaudio-module-sndio/Makefile
index a904bfa5a2a3..6c2cb3d3a3bc 100644
--- a/audio/pulseaudio-module-sndio/Makefile
+++ b/audio/pulseaudio-module-sndio/Makefile
@@ -19,14 +19,12 @@ USES=		pkgconfig
 SUB_FILES=	pkg-message
 PLIST_FILES=	${PULSE_MODDIR}/module-sndio.so
 
+PULSE_MODDIR=	`${LOCALBASE}/bin/pkg-config --variable=modlibexecdir libpulse`
+PULSE_VERSION=	`${LOCALBASE}/bin/pkg-config --modversion libpulse`
+
 post-patch:
 	${REINPLACE_CMD} \
-		-e '/^PA_MODULE_VERSION/s/0.0/${PULSE_VERSION}/1' \
+		-e "/^PA_MODULE_VERSION/s/0.0/${PULSE_VERSION}/1" \
 		${WRKSRC}/module-sndio.c
 
-.include <bsd.port.pre.mk>
-
-PULSE_MODDIR!=	${LOCALBASE}/bin/pkg-config --variable=modlibexecdir libpulse
-PULSE_VERSION!=	${LOCALBASE}/bin/pkg-config --modversion libpulse
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>