Friday, September 24, 2021

Re: [sparc64] fix pulseaudio 15.0 build

On Fri, Sep 24, 2021 at 10:41:17AM +0100, Stuart Henderson wrote:
> Conditional setting of PATCH_FILES, or use a sed -i instead of a patch.

I wanted to add to an existing patch, so the first option won't work, I
guess.

We could also use "meson.get_compiler('c').get_id() != 'gcc'" instead
of my initial suggestion of "host_machine.system() != 'openbsd'" if
that is preferred.

Hopefully the sed line below is somewhat understandable, I couldn't come
up with anything more readable.

Again, the line I change is not reached if ${PROPERTIES:Mclang}, so I'm
really not sure this is better than patching.

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/pulseaudio/Makefile,v
retrieving revision 1.118
diff -u -p -r1.118 Makefile
--- Makefile 15 Aug 2021 16:36:56 -0000 1.118
+++ Makefile 24 Sep 2021 10:12:57 -0000
@@ -99,9 +99,14 @@ CONFIGURE_ARGS += -Dstream-restore-clear
post-extract:
cp ${FILESDIR}/module-sndio*.{c,h} ${WRKSRC}/src/modules/

+.include <bsd.port.arch.mk>
pre-configure:
sed -i 's,/bin/bash,/usr/bin/env bash,' \
${WRKSRC}/shell-completion/bash/pulseaudio
+.if !${PROPERTIES:Mclang}
+ sed -i "/libintl_dep = \[\]/ s/\[\]/cc.find_library('intl')/" \
+ ${WRKSRC}/meson.build
+.endif

post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pulseaudio

No comments:

Post a Comment