Re: git: 81a047b386e5 - main - www/*chromium: drop pulseaudio build dependency by using an internal copy

From: Vladimir Druzenko <vvd_at_freebsd.org>
Date: Mon, 27 May 2024 15:55:53 UTC
27.05.2024 09:12, Robert Nagy пишет:
> The branch main has been updated by rnagy:
>
> URL: https://cgit.FreeBSD.org/ports/commit/?id=81a047b386e5a71cbcf32fb4a72788a33bc17b09
>
> commit 81a047b386e5a71cbcf32fb4a72788a33bc17b09
> Author:     Robert Nagy <rnagy@FreeBSD.org>
> AuthorDate: 2024-05-27 06:11:16 +0000
> Commit:     Robert Nagy <rnagy@FreeBSD.org>
> CommitDate: 2024-05-27 06:11:16 +0000
>
>      www/*chromium: drop pulseaudio build dependency by using an internal copy
>      
>      we only need pulseaudio headers to be able to compile pulseaudio support
>      in, because a shim library is used by chromium so that pulseaudio can be
>      dlopened later on if available
> ---
>   www/chromium/Makefile           | 15 ++++++++++-----
>   www/chromium/distinfo           |  4 +++-
>   www/ungoogled-chromium/Makefile | 16 ++++++++++------
>   www/ungoogled-chromium/distinfo |  4 +++-
>   4 files changed, 26 insertions(+), 13 deletions(-)
>
>
> diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile
> index 5a2a83410f2e..b744aee2f6c6 100644
> --- a/www/ungoogled-chromium/Makefile
> +++ b/www/ungoogled-chromium/Makefile
> @@ -1,12 +1,16 @@
>   PORTNAME=	ungoogled-chromium
>   PORTVERSION=	125.0.6422.76
>   UGVERSION=	${DISTVERSION}-1
> -PORTREVISION=	1
> +PULSEMV=	16
> +PULSEV=		${PULSEMV}.1
> +PORTREVISION=	2
>   CATEGORIES=	www wayland
>   MASTER_SITES=	https://commondatastorage.googleapis.com/chromium-browser-official/ \
> -		https://nerd.hu/distfiles/:external
> +		https://nerd.hu/distfiles/:external \
> +		https://freedesktop.org/software/pulseaudio/releases/:pulseaudio
>   DISTFILES=	chromium-${DISTVERSION}${EXTRACT_SUFX} \
> -		ungoogled-chromium-${UGVERSION}.tar.gz:external
> +		ungoogled-chromium-${UGVERSION}.tar.gz:external \
> +		pulseaudio-${PULSEV}.tar.gz:pulseaudio
>   
>   MAINTAINER=	chromium@FreeBSD.org
>   COMMENT=	Google web browser based on WebKit sans integration with Google
> @@ -20,8 +24,7 @@ ONLY_FOR_ARCHS=	aarch64 amd64 i386
>   PATCH_DEPENDS=	gpatch:devel/patch \
>   		${PYTHON_VERSION}:lang/python${PYTHON_SUFFIX}
>   
> -BUILD_DEPENDS=	${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio \
> -		bash:shells/bash \
> +BUILD_DEPENDS=	bash:shells/bash \
>   		${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \
>   		${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \
>   		gperf:devel/gperf \
> @@ -123,7 +126,7 @@ GN_ARGS+=	enable_widevine=true \
>   		use_system_libffi=true \
>   		use_system_libjpeg=true \
>   		use_udev=false \
> -		extra_cxxflags="${CXXFLAGS}" \
> +		extra_cxxflags="${CXXFLAGS} -I${WRKDIR}/pulseaudio-${PULSEV}/src -DPA_MAJOR=${PULSEMV}" \
>   		extra_ldflags="${LDFLAGS}" \
>   		ffmpeg_branding="${FFMPEG_BRAND}"
>   
> @@ -318,6 +321,7 @@ pre-configure:
>   .for _e in config.h config.asm config_components.h libavcodec libavformat libavutil
>   	-${CP} -pR ${FFMPEG_BDIR}/${_e} ${FFMPEG_CDIR}
>   .endfor
> +	touch ${WRKDIR}/pulseaudio-${PULSEV}/src/pulse/version.h
>   
>   do-configure:
>   	# GN generator bootstrapping and generating ninja files

Just return all options.

As I wrote:

> One of my installation of this port is on headless VM for export 
> Draw.io diagrams to PDF. I don't need any sound on this VM.
>
> Instead of leaving options in the port (what could be simpler?), each 
> time the port is updated, I will have to manually remove unnecessary 
> dependencies, add "GN_ARGS+=use_pulseaudio=false use_sndio=false" and 
> add option ALSA (for desktop ON, but for VM OFF). 

-- 
Best regards,
Vladimir Druzenko