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

From: Robert Nagy <rnagy_at_FreeBSD.org>
Date: Mon, 27 May 2024 06:12:33 UTC
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/chromium/Makefile b/www/chromium/Makefile
index 6d73652c6270..05d778959d4e 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -1,10 +1,15 @@
 PORTNAME=	chromium
 PORTVERSION=	125.0.6422.76
+PULSEMV=	16
+PULSEV=		${PULSEMV}.1
+PORTREVISION=	1
 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=	${DISTNAME}${EXTRACT_SUFX} \
-		chrome-linux-${PORTVERSION}-llvm17.profdata${EXTRACT_SUFX}:external
+		chrome-linux-${PORTVERSION}-llvm17.profdata${EXTRACT_SUFX}:external \
+		pulseaudio-${PULSEV}.tar.gz:pulseaudio
 
 MAINTAINER=	chromium@FreeBSD.org
 COMMENT=	Google web browser based on WebKit
@@ -15,8 +20,7 @@ LICENSE_COMB=	multi
 
 ONLY_FOR_ARCHS=	aarch64 amd64 i386
 
-BUILD_DEPENDS=	${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio \
-		bash:shells/bash \
+BUIDL_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 \
@@ -125,7 +129,7 @@ GN_ARGS+=	clang_use_chrome_plugins=false \
 		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}"
 
@@ -292,6 +296,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
diff --git a/www/chromium/distinfo b/www/chromium/distinfo
index 1a483074b652..f8d2452ffb67 100644
--- a/www/chromium/distinfo
+++ b/www/chromium/distinfo
@@ -1,8 +1,10 @@
-TIMESTAMP = 1716384244
+TIMESTAMP = 1716790210
 SHA256 (chromium-125.0.6422.76.tar.xz) = 4167218463d2848f4a0fe35f60d062a8e7e5c7ce5bc8c8c2260a80186b1deccf
 SIZE (chromium-125.0.6422.76.tar.xz) = 3460108576
 SHA256 (chrome-linux-125.0.6422.76-llvm17.profdata.tar.xz) = 1deb7a9fe593b338629a97630e96716d968882d272998aa87f39f3f1a81df0e9
 SIZE (chrome-linux-125.0.6422.76-llvm17.profdata.tar.xz) = 30245500
+SHA256 (pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92
+SIZE (pulseaudio-16.1.tar.gz) = 2763111
 SHA256 (chromium-125.0.6422.76-testdata.tar.xz) = ec7a7743180fd986c37913032074bd2a14b3bb40fb79927db94fab97aba26a77
 SIZE (chromium-125.0.6422.76-testdata.tar.xz) = 277440240
 SHA256 (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = a2ca2962daf482a8f943163541e1c73ba4b2694fabcd2510981f2db4eda493c8
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
diff --git a/www/ungoogled-chromium/distinfo b/www/ungoogled-chromium/distinfo
index 5fab9bae8298..c1fd66f542b4 100644
--- a/www/ungoogled-chromium/distinfo
+++ b/www/ungoogled-chromium/distinfo
@@ -1,8 +1,10 @@
-TIMESTAMP = 1716495542
+TIMESTAMP = 1716551124
 SHA256 (chromium-125.0.6422.76.tar.xz) = 4167218463d2848f4a0fe35f60d062a8e7e5c7ce5bc8c8c2260a80186b1deccf
 SIZE (chromium-125.0.6422.76.tar.xz) = 3460108576
 SHA256 (ungoogled-chromium-125.0.6422.76-1.tar.gz) = bd9fe13200b13a1bedcf74533b8c285be39e1ea278b8562f3ee3da9883f6ae2e
 SIZE (ungoogled-chromium-125.0.6422.76-1.tar.gz) = 668994
+SHA256 (pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92
+SIZE (pulseaudio-16.1.tar.gz) = 2763111
 SHA256 (chromium-125.0.6422.76-testdata.tar.xz) = ec7a7743180fd986c37913032074bd2a14b3bb40fb79927db94fab97aba26a77
 SIZE (chromium-125.0.6422.76-testdata.tar.xz) = 277440240
 SHA256 (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = a2ca2962daf482a8f943163541e1c73ba4b2694fabcd2510981f2db4eda493c8