From 17c7b11543f3b97eabc485c8bfe829673129eeab Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Fri, 4 Nov 2022 20:33:44 -0400 Subject: chromium: add flag for qt --- www-client/chromium/chromium-109.0.5396.2.ebuild | 56 ++++++++++++++---------- 1 file changed, 34 insertions(+), 22 deletions(-) (limited to 'www-client/chromium/chromium-109.0.5396.2.ebuild') diff --git a/www-client/chromium/chromium-109.0.5396.2.ebuild b/www-client/chromium/chromium-109.0.5396.2.ebuild index e04afe4..bff25c5 100644 --- a/www-client/chromium/chromium-109.0.5396.2.ebuild +++ b/www-client/chromium/chromium-109.0.5396.2.ebuild @@ -9,7 +9,7 @@ CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv sw ta te th tr uk ur vi zh-CN zh-TW" -inherit check-reqs chromium-2 desktop flag-o-matic ninja-utils pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils +inherit check-reqs chromium-2 desktop flag-o-matic ninja-utils pax-utils python-any-r1 qmake-utils readme.gentoo-r1 toolchain-funcs xdg-utils DESCRIPTION="Open-source version of Google Chrome web browser" HOMEPAGE="https://chromium.org/" @@ -18,7 +18,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P} LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="component-build cups cpu_flags_arm_neon debug gtk4 +hangouts headless +js-type-check kerberos libcxx +official pic +proprietary-codecs pulseaudio screencast selinux +suid +system-ffmpeg +system-harfbuzz +system-icu +system-png vaapi wayland widevine" +IUSE="component-build cups cpu_flags_arm_neon debug gtk4 qt5 +hangouts headless +js-type-check kerberos libcxx +official pic +proprietary-codecs pulseaudio screencast selinux +suid +system-ffmpeg +system-harfbuzz +system-icu +system-png vaapi wayland widevine" REQUIRED_USE=" component-build? ( !suid !libcxx ) screencast? ( wayland ) @@ -98,6 +98,10 @@ COMMON_DEPEND=" virtual/udev x11-libs/cairo:= x11-libs/pango:= + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtwidgets:5 + ) ) " RDEPEND="${COMMON_DEPEND} @@ -106,8 +110,9 @@ RDEPEND="${COMMON_DEPEND} x11-libs/gtk+:3[X,wayland?] gui-libs/gtk:4[X,wayland?] ) + qt5? ( dev-qt/qtgui:5[X?,wayland?] ) + x11-misc/xdg-utils ) - x11-misc/xdg-utils virtual/ttf-fonts selinux? ( sec-policy/selinux-chromium ) " @@ -214,7 +219,7 @@ pkg_pretend() { pre_build_checks if use headless; then - local headless_unused_flags=("cups" "kerberos" "pulseaudio" "vaapi" "wayland") + local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt5" "vaapi" "wayland") for myiuse in ${headless_unused_flags[@]}; do use ${myiuse} && ewarn "Ignoring USE=${myiuse} since USE=headless is set." done @@ -805,25 +810,32 @@ src_configure() { # Enable ozone wayland and/or headless support myconf_gn+=" use_ozone=true ozone_auto_platforms=false" myconf_gn+=" ozone_platform_headless=true" - myconf_gn+=" ozone_platform_x11=$(usex headless false true)" - if use wayland || use headless; then - if use headless; then - myconf_gn+=" ozone_platform=\"headless\"" - myconf_gn+=" use_xkbcommon=false use_gtk=false" - myconf_gn+=" use_glib=false use_gio=false" - myconf_gn+=" use_pangocairo=false use_alsa=false" - myconf_gn+=" use_libpci=false use_udev=false" - myconf_gn+=" enable_print_preview=false" - myconf_gn+=" enable_remoting=false" - else - myconf_gn+=" ozone_platform_wayland=true" - myconf_gn+=" use_system_libdrm=true" - myconf_gn+=" use_system_minigbm=true" - myconf_gn+=" use_xkbcommon=true" - myconf_gn+=" ozone_platform=\"wayland\"" - fi + 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_pangocairo=false use_alsa=false" + myconf_gn+=" use_libpci=false use_udev=false" + myconf_gn+=" enable_print_preview=false" + myconf_gn+=" enable_remoting=false" else - myconf_gn+=" ozone_platform=\"x11\"" + myconf_gn+=" use_system_libdrm=true" + myconf_gn+=" use_system_minigbm=true" + myconf_gn+=" use_xkbcommon=true" + use qt5 && export PATH="${PATH}:$(qt5_get_bindir)" + myconf_gn+=" use_qt=$(usex qt5 true false)" + myconf_gn+=" ozone_platform_x11=$(usex X true false)" + myconf_gn+=" ozone_platform_wayland=$(usex wayland true false)" + myconf_gn+=" ozone_platform=$(usex wayland \"wayland\" \"x11\")" + if use wayland; then + myconf_gn+=" use_system_libwayland_server=true" + myconf_gn+=" use_system_wayland_scanner=true" + fi + fi + + # Results in undefined references in chrome linking, may require CFI to work + if use arm64; then + myconf_gn+=" arm_control_flow_integrity=\"none\"" fi # Enable official builds -- cgit v1.2.3