enable qt6 linux UI backend

epel9
Than Ngo 10 months ago
parent 88b401e09e
commit 74166f41a0

@ -193,6 +193,12 @@
%global use_qt 0 %global use_qt 0
%endif %endif
%if 0%{?rhel} >9 || 0%{?fedora}
%global use_qt6 1
%else
%global use_qt6 0
%endif
# enable gtk3 by default # enable gtk3 by default
%global gtk3 1 %global gtk3 1
@ -529,6 +535,11 @@ BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Widgets)
%endif %endif
%if %{use_qt6}
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Widgets)
%endif
%if ! %{bundleharfbuzz} %if ! %{bundleharfbuzz}
BuildRequires: harfbuzz-devel >= 2.4.0 BuildRequires: harfbuzz-devel >= 2.4.0
%endif %endif
@ -1090,9 +1101,6 @@ sed -i 's/getenv("CHROME_VERSION_EXTRA")/"Fedora Project"/' chrome/common/channe
# Fix hardcoded path in remoting code # Fix hardcoded path in remoting code
sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' remoting/host/setup/daemon_controller_delegate_linux.cc sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' remoting/host/setup/daemon_controller_delegate_linux.cc
# change moc to moc-qt5 for fedora
sed -i 's|moc|moc-qt5|g' ui/qt/moc_wrapper.py
%build %build
# utf8 issue on epel7, Internal parsing error 'ascii' codec can't # utf8 issue on epel7, Internal parsing error 'ascii' codec can't
# decode byte 0xe2 in position 474: ordinal not in range(128) # decode byte 0xe2 in position 474: ordinal not in range(128)
@ -1229,11 +1237,17 @@ CHROMIUM_BROWSER_GN_DEFINES+=' rtc_use_h264=false'
CHROMIUM_BROWSER_GN_DEFINES+=' use_kerberos=true' CHROMIUM_BROWSER_GN_DEFINES+=' use_kerberos=true'
%if %{use_qt} %if %{use_qt}
CHROMIUM_BROWSER_GN_DEFINES+=' use_qt=true' CHROMIUM_BROWSER_GN_DEFINES+=' use_qt=true moc_qt5_path="%{_libdir}/qt5/bin/"'
%else %else
CHROMIUM_BROWSER_GN_DEFINES+=' use_qt=false' CHROMIUM_BROWSER_GN_DEFINES+=' use_qt=false'
%endif %endif
%if %{use_qt6}
CHROMIUM_BROWSER_GN_DEFINES+=' use_qt6=true moc_qt6_path="%{_libdir}/qt6/libexec/"'
%else
CHROMIUM_BROWSER_GN_DEFINES+=' use_qt6=false'
%endif
CHROMIUM_BROWSER_GN_DEFINES+=' use_gio=true use_pulseaudio=true' CHROMIUM_BROWSER_GN_DEFINES+=' use_gio=true use_pulseaudio=true'
CHROMIUM_BROWSER_GN_DEFINES+=' enable_hangout_services_extension=true' CHROMIUM_BROWSER_GN_DEFINES+=' enable_hangout_services_extension=true'
CHROMIUM_BROWSER_GN_DEFINES+=' use_aura=true' CHROMIUM_BROWSER_GN_DEFINES+=' use_aura=true'
@ -1265,7 +1279,7 @@ CHROMIUM_HEADLESS_GN_DEFINES+=' v8_use_external_startup_data=false enable_print_
CHROMIUM_HEADLESS_GN_DEFINES+=' use_alsa=false use_bluez=false use_cups=false use_dbus=false use_gio=false use_kerberos=false' CHROMIUM_HEADLESS_GN_DEFINES+=' use_alsa=false use_bluez=false use_cups=false use_dbus=false use_gio=false use_kerberos=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' use_libpci=false use_pulseaudio=false use_udev=false rtc_use_pipewire=false' CHROMIUM_HEADLESS_GN_DEFINES+=' use_libpci=false use_pulseaudio=false use_udev=false rtc_use_pipewire=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' v8_enable_lazy_source_positions=false use_glib=false use_gtk=false use_pangocairo=false' CHROMIUM_HEADLESS_GN_DEFINES+=' v8_enable_lazy_source_positions=false use_glib=false use_gtk=false use_pangocairo=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' use_qt=false is_component_build=false enable_ffmpeg_video_decoders=false media_use_ffmpeg=false' CHROMIUM_HEADLESS_GN_DEFINES+=' use_qt=false use_qt6=false is_component_build=false enable_ffmpeg_video_decoders=false media_use_ffmpeg=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' media_use_libvpx=false proprietary_codecs=false' CHROMIUM_HEADLESS_GN_DEFINES+=' media_use_libvpx=false proprietary_codecs=false'
export CHROMIUM_HEADLESS_GN_DEFINES export CHROMIUM_HEADLESS_GN_DEFINES
@ -1425,6 +1439,10 @@ pushd %{builddir}
cp -a libqt5_shim.so %{buildroot}%{chromium_path} cp -a libqt5_shim.so %{buildroot}%{chromium_path}
%endif %endif
%if %{use_qt6}
cp -a libqt6_shim.so %{buildroot}%{chromium_path}
%endif
%if %{build_clear_key_cdm} %if %{build_clear_key_cdm}
%ifarch x86_64 %ifarch x86_64
cp -a ClearKeyCdm/_platform_specific/linux_x64/libclearkeycdm.so %{buildroot}%{chromium_path} cp -a ClearKeyCdm/_platform_specific/linux_x64/libclearkeycdm.so %{buildroot}%{chromium_path}
@ -1598,6 +1616,9 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%if %{use_qt} %if %{use_qt}
%{chromium_path}/libqt5_shim.so %{chromium_path}/libqt5_shim.so
%endif %endif
%if %{use_qt6}
%{chromium_path}/libqt6_shim.so
%endif
%{_mandir}/man1/%{chromium_browser_channel}.* %{_mandir}/man1/%{chromium_browser_channel}.*
%{_datadir}/icons/hicolor/*/apps/%{chromium_browser_channel}.png %{_datadir}/icons/hicolor/*/apps/%{chromium_browser_channel}.png
%{_datadir}/applications/*.desktop %{_datadir}/applications/*.desktop

Loading…
Cancel
Save