commit 7c35e55db5fc930e236aef0e23e49e3a2f4fd5c3 Author: System user; root Date: Thu Apr 4 18:59:07 2024 +0200 make support for glib/gio, pango/cairo, gtk and atk/atspi configurable - enabling screencast leads to -DWEBRTC_USE_GIO which leads to compile errors if use_gio=false - use_atk requires use_glib - x11-libs/(cairo,gdk-pixbuf,pango) is required for gtk build, maybe make it selectable with a use flag pango diff --git a/www-client/chromium/chromium-124.0.6367.29.ebuild b/www-client/chromium/chromium-124.0.6367.29.ebuild index a9f11a2..c32fbf2 100644 --- a/www-client/chromium/chromium-124.0.6367.29.ebuild +++ b/www-client/chromium/chromium-124.0.6367.29.ebuild @@ -90,14 +90,15 @@ LICENSE="BSD" SLOT="0/beta" KEYWORDS="~amd64 ~arm64" IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd" -IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos libcxx +lto +official pax-kernel pgo +proprietary-codecs pulseaudio" +IUSE="+X ${IUSE_SYSTEM_LIBS} accessibility bindist cups debug ffmpeg-chromium glib gtk gtk4 +hangouts headless kerberos libcxx +lto +official pax-kernel pgo +proprietary-codecs pulseaudio" IUSE+=" qt5 qt6 +screencast selinux +system-toolchain +vaapi +wayland +widevine" RESTRICT="!bindist? ( bindist )" REQUIRED_USE=" + accessibility? ( glib ) !headless? ( || ( X wayland ) ) pgo? ( X !wayland ) - screencast? ( wayland ) + screencast? ( glib wayland ) !system-toolchain? ( libcxx ) ffmpeg-chromium? ( bindist proprietary-codecs ) " @@ -132,7 +133,7 @@ COMMON_SNAPSHOT_DEPEND=" sys-libs/zlib:= x11-libs/libdrm:= !headless? ( - dev-libs/glib:2 + glib? ( dev-libs/glib:2 ) >=media-libs/alsa-lib-1.0.19:= pulseaudio? ( media-libs/libpulse:= ) sys-apps/pciutils:= @@ -162,13 +163,20 @@ COMMON_DEPEND=" sys-libs/zlib:=[minizip] !headless? ( X? ( ${COMMON_X_DEPEND} ) - >=app-accessibility/at-spi2-core-2.46.0:2 + accessibility? ( >=app-accessibility/at-spi2-core-2.46.0:2 ) media-libs/mesa:=[X?,wayland?] cups? ( >=net-print/cups-1.3.11:= ) virtual/udev - x11-libs/cairo:= - x11-libs/gdk-pixbuf:2 - x11-libs/pango:= + gtk? ( + x11-libs/cairo:= + x11-libs/gdk-pixbuf:2 + x11-libs/pango:= + ) + gtk4? ( + x11-libs/cairo:= + x11-libs/gdk-pixbuf:2 + x11-libs/pango:= + ) qt5? ( dev-qt/qtcore:5 dev-qt/qtwidgets:5 @@ -178,10 +186,8 @@ COMMON_DEPEND=" " RDEPEND="${COMMON_DEPEND} !headless? ( - || ( - x11-libs/gtk+:3[X?,wayland?] - gui-libs/gtk:4[X?,wayland?] - ) + gtk? ( x11-libs/gtk+:3[X?,wayland?] ) + gtk4? ( gui-libs/gtk:4[X?,wayland?] ) qt5? ( dev-qt/qtgui:5[X?,wayland?] ) qt6? ( dev-qt/qtbase:6[gui,X?,wayland?] ) ) @@ -194,10 +200,10 @@ RDEPEND="${COMMON_DEPEND} " DEPEND="${COMMON_DEPEND} !headless? ( + gtk? ( x11-libs/gtk+:3[X?,wayland?] ) gtk4? ( gui-libs/gtk:4[X?,wayland?] ) qt5? ( dev-qt/qtgui:5[X?,wayland?] ) qt6? ( dev-qt/qtbase:6[gui,X?,wayland?] ) - !gtk4? ( x11-libs/gtk+:3[X?,wayland?] ) ) " @@ -363,7 +369,7 @@ pkg_pretend() { fi if use headless; then - local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt5" "qt6" "vaapi" "wayland") + local headless_unused_flags=("cups" "kerberos" "pulseaudio" "glib" "gtk" "gtk4" "qt5" "qt6" "vaapi" "wayland") for myiuse in ${headless_unused_flags[@]}; do use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set." done @@ -430,6 +436,7 @@ src_prepare() { "${FILESDIR}/chromium-117-system-zstd.patch" "${FILESDIR}/chromium-124-libwebp-shim-sharpyuv.patch" "${FILESDIR}/chromium-124-separate-qt56.patch" + "${FILESDIR}/chromium-124-optional-glib_gio_gtk_atk.patch" ) if use system-toolchain; then @@ -941,7 +948,6 @@ chromium_configure() { myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" myconf_gn+=" use_vaapi=$(usex vaapi true false)" myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)" - myconf_gn+=" gtk_version=$(usex gtk4 4 3)" fi # Allows distributions to link pulseaudio directly (DT_NEEDED) instead of @@ -1087,7 +1093,7 @@ chromium_configure() { if use headless; then myconf_gn+=" ozone_platform=\"headless\"" myconf_gn+=" use_xkbcommon=false use_gtk=false use_qt=false" - myconf_gn+=" use_glib=false use_gio=false" + myconf_gn+=" use_glib=false use_gio=false use_atk=false" myconf_gn+=" use_pangocairo=false use_alsa=false" myconf_gn+=" use_libpci=false use_udev=false" myconf_gn+=" enable_print_preview=false" @@ -1096,6 +1102,16 @@ chromium_configure() { myconf_gn+=" use_system_libdrm=true" myconf_gn+=" use_system_minigbm=true" myconf_gn+=" use_xkbcommon=true" + myconf_gn+=" use_glib=$(usex glib true false)" + myconf_gn+=" use_gio=$(usex glib true false)" + myconf_gn+=" use_atk=$(usex accessibility true false)" + if use gtk || use gtk4; then + myconf_gn+=" use_gtk=true" + myconf_gn+=" gtk_version=$(usex gtk4 4 3)" + else + myconf_gn+=" use_gtk=false" + myconf_gn+=" use_pangocairo=false" + fi if use qt5 || use qt6; then local cbuild_libdir=$(get_libdir) if tc-is-cross-compiler; then diff --git a/www-client/chromium/files/chromium-124-optional-glib_gio_gtk_atk.patch b/www-client/chromium/files/chromium-124-optional-glib_gio_gtk_atk.patch new file mode 100644 index 0000000..428ec24 --- /dev/null +++ b/www-client/chromium/files/chromium-124-optional-glib_gio_gtk_atk.patch @@ -0,0 +1,15 @@ +diff -Naur a/build/config/ui.gni b/build/config/ui.gni +--- a/build/config/ui.gni 2024-03-06 22:40:09.078377700 +0100 ++++ b/build/config/ui.gni 2024-03-11 22:19:38.723101211 +0100 +@@ -41,7 +41,10 @@ + + assert(!use_glib || (is_linux && !is_castos)) + +-use_atk = use_glib && current_toolchain == default_toolchain ++declare_args() { ++ # True means accessibility via atk/atspi is enabled ++ use_atk = use_glib && current_toolchain == default_toolchain ++} + + # Whether using Xvfb to provide a display server for a test might be + # necessary.