diff --git a/srcpkgs/firefox/files/firefox-wayland b/srcpkgs/firefox/files/firefox-wayland new file mode 100644 index 00000000000..bd7b93c7a92 --- /dev/null +++ b/srcpkgs/firefox/files/firefox-wayland @@ -0,0 +1,5 @@ +#!/bin/sh + +export GDK_BACKEND=wayland + +exec /usr/lib/firefox/firefox "$@" diff --git a/srcpkgs/firefox/files/firefox-x11 b/srcpkgs/firefox/files/firefox-x11 new file mode 100644 index 00000000000..613abcb80bb --- /dev/null +++ b/srcpkgs/firefox/files/firefox-x11 @@ -0,0 +1,5 @@ +#!/bin/sh + +export GDK_BACKEND=x11 + +exec /usr/lib/firefox/firefox "$@" diff --git a/srcpkgs/firefox/template b/srcpkgs/firefox/template index dad62a4809a..2e0c11083df 100644 --- a/srcpkgs/firefox/template +++ b/srcpkgs/firefox/template @@ -4,7 +4,7 @@ # pkgname=firefox version=64.0.2 -revision=2 +revision=3 short_desc="Mozilla Firefox web browser" maintainer="Juan RP " license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later" @@ -27,8 +27,8 @@ makedepends="nss-devel libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel depends="nss>=3.37.3 desktop-file-utils hicolor-icon-theme" conflicts="firefox-esr>=0" -build_options="alsa dbus pulseaudio startup_notification xscreensaver sndio" -build_options_default="alsa dbus pulseaudio startup_notification xscreensaver sndio" +build_options="alsa dbus pulseaudio startup_notification xscreensaver sndio wayland" +build_options_default="alsa dbus pulseaudio startup_notification xscreensaver sndio wayland" case $XBPS_TARGET_MACHINE in armv6*) @@ -139,6 +139,7 @@ ac_add_options $(vopt_enable dbus) ac_add_options $(vopt_enable dbus necko-wifi) ac_add_options $(vopt_enable pulseaudio) ac_add_options $(vopt_enable startup_notification startup-notification) +ac_add_options --enable-default-toolkit=$(vopt_if wayland 'cairo-gtk3-wayland' 'cairo-gtk3') ! rm -f old-configure @@ -160,4 +161,10 @@ do_install() { # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 ln -sf firefox ${DESTDIR}/usr/lib/firefox/firefox-bin + + vbin ${FILESDIR}/firefox-x11 + vbin ${FILESDIR}/firefox-wayland + + # Default to x11 for now, FF wayland is somewhat broken + ln -sf /usr/bin/firefox-x11 ${DESTDIR}/usr/bin/firefox }