From 8ce73b1a4d6d8f8b4ec26d3f4366d179ca6de634 Mon Sep 17 00:00:00 2001 From: Thibault Payet Date: Sun, 15 Oct 2023 18:42:07 +0200 Subject: [PATCH] Add widevine option for ungoogled chromium Signed-off-by: Thibault Payet --- www/ungoogled-chromium/Makefile | 9 +++++++-- www/ungoogled-chromium/files/ungoogled-chromium.in | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index 562c27742417..ac26e1579173 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,6 +1,7 @@ PORTNAME= ungoogled-chromium PORTVERSION= 118.0.5993.70 UGVERSION= ${DISTVERSION}-1 +PORTREVISION= 1 CATEGORIES= www wayland MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:external @@ -100,7 +101,8 @@ BINARY_ALIAS= python3=${PYTHON_CMD} \ # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. -GN_ARGS+= fatal_linker_warnings=false \ +GN_ARGS+= enable_widevine=true \ + fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ @@ -151,7 +153,7 @@ GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles SUB_FILES= ungoogled-chromium.desktop ungoogled-chromium SUB_LIST+= COMMENT="${COMMENT}" -OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST +OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST WIDEVINE OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE SNDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO @@ -226,6 +228,9 @@ SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false +WIDEVINE_DESC= Depend on foreign-cdm to enable playback of DRM content +WIDEVINE_RUN_DEPENDS= foreign-cdm>0:www/foreign-cdm + .include "Makefile.tests" TEST_DISTFILES= chromium-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:external diff --git a/www/ungoogled-chromium/files/ungoogled-chromium.in b/www/ungoogled-chromium/files/ungoogled-chromium.in index 95ca2054780a..e149e6960eca 100644 --- a/www/ungoogled-chromium/files/ungoogled-chromium.in +++ b/www/ungoogled-chromium/files/ungoogled-chromium.in @@ -16,4 +16,10 @@ EOMSG exit 1 fi ulimit -c 0 + +# source foreign-cdm environment +if [ -r %%PREFIX%%/share/foreign-cdm/fcdm-setup-env ] ; then + . %%PREFIX%%/share/foreign-cdm/fcdm-setup-env +fi + exec %%PREFIX%%/share/ungoogled-chromium/ungoogled-chromium ${1+"$@"} -- 2.42.0