commit: 1771d988bf17176ded284bc9cc39268d75af37c6 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> AuthorDate: Mon Dec 8 21:26:06 2014 +0000 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> CommitDate: Mon Dec 8 21:49:13 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=1771d988
x11-wm/mutter: fix automagic kms and wayland support Was previously not optional to avoid unwanted dependencies being installed/removed at the wrong time. --- x11-wm/mutter/files/mutter-3.14.2-automagic.patch | 90 +++++++++++++++++++++++ x11-wm/mutter/mutter-3.14.2.ebuild | 30 ++++++-- x11-wm/mutter/mutter-9999.ebuild | 30 ++++++-- 3 files changed, 136 insertions(+), 14 deletions(-) diff --git a/x11-wm/mutter/files/mutter-3.14.2-automagic.patch b/x11-wm/mutter/files/mutter-3.14.2-automagic.patch new file mode 100644 index 0000000..3956004 --- /dev/null +++ b/x11-wm/mutter/files/mutter-3.14.2-automagic.patch @@ -0,0 +1,90 @@ +From d723a752982e12b7a7fb7998c3e28efd9082abd9 Mon Sep 17 00:00:00 2001 +From: Gilles Dartiguelongue <[email protected]> +Date: Mon, 8 Dec 2014 22:00:32 +0100 +Subject: [PATCH] Make wayland support optional + +--- + configure.ac | 58 +++++++++++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 43 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0870afa..251f909 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -200,23 +200,49 @@ AC_SUBST(XWAYLAND_PATH) + + PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES) + +-PKG_CHECK_MODULES(MUTTER_NATIVE_BACKEND, [clutter-egl-1.0 libdrm libsystemd libinput gbm >= 10.3], [have_native_backend=yes], [have_native_backend=no]) +-if test $have_native_backend = yes; then +- AC_DEFINE([HAVE_NATIVE_BACKEND],[1],[Define if you want to enable the native (KMS) backend based on systemd]) +-fi +-AM_CONDITIONAL([HAVE_NATIVE_BACKEND],[test $have_native_backend = yes]) +- +-PKG_CHECK_MODULES(MUTTER_WAYLAND, [clutter-wayland-1.0 clutter-wayland-compositor-1.0 wayland-server >= 1.5.90], [have_wayland=yes], [have_wayland=no]) +-if test $have_wayland = yes; then +- AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no]) +- AS_IF([test $WAYLAND_SCANNER = "no"], +- AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols])) +- AC_SUBST([WAYLAND_SCANNER]) +- +- AC_DEFINE([HAVE_WAYLAND],[1],[Define if you want to enable Wayland support]) +-fi ++have_wayland=no ++AC_ARG_ENABLE( ++ [wayland], ++ AS_HELP_STRING([--disable-wayland], [disable mutter on wayland support]), ++ [], ++ enable_wayland=yes ++) ++AS_IF([test "$enable_wayland" != "no"], ++ [ ++ PKG_CHECK_MODULES([MUTTER_WAYLAND], ++ [clutter-wayland-1.0 clutter-wayland-compositor-1.0 wayland-server >= 1.5.90], ++ [ ++ have_wayland=yes ++ AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no]) ++ AS_IF([test $WAYLAND_SCANNER = "no"], ++ [AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols])]) ++ AC_SUBST([WAYLAND_SCANNER]) ++ AC_DEFINE([HAVE_WAYLAND],[1],[Define if you want to enable Wayland support]) ++ ], ++ [have_wayland=no]) ++]) + AM_CONDITIONAL([HAVE_WAYLAND],[test $have_wayland = yes]) + ++have_native_backend=no ++AC_ARG_ENABLE( ++ [native-backend], ++ AS_HELP_STRING([--disable-native-backend], [disable mutter native (KMS) backend]), ++ [], ++ enable_native_backend=yes ++) ++AS_IF([test "$enable_native_backend" != "no"], ++ [ ++ PKG_CHECK_MODULES([MUTTER_NATIVE_BACKEND], ++ [clutter-egl-1.0 libdrm libsystemd libinput gudev-1.0 gbm >= 10.3], ++ [ ++ have_native_backend=yes ++ AC_DEFINE([HAVE_NATIVE_BACKEND],[1], ++ [Define if you want to enable the native (KMS) backend based on systemd]) ++ ], ++ [have_native_backend=no]) ++]) ++AM_CONDITIONAL([HAVE_NATIVE_BACKEND],[test $have_native_backend = yes]) ++ + PKG_CHECK_EXISTS([xi >= 1.6.99.1], + AC_DEFINE([HAVE_XI23],[1],[Define if you have support for XInput 2.3 or greater])) + +@@ -416,6 +442,8 @@ mutter-$VERSION + libcanberra: ${have_libcanberra} + Introspection: ${found_introspection} + Session management: ${found_sm} ++ Wayland: ${have_wayland} ++ Native (KMS) backend: ${have_native_backend} + " + + +-- +2.2.0 + diff --git a/x11-wm/mutter/mutter-3.14.2.ebuild b/x11-wm/mutter/mutter-3.14.2.ebuild index 6a0df12..28b4529 100644 --- a/x11-wm/mutter/mutter-3.14.2.ebuild +++ b/x11-wm/mutter/mutter-3.14.2.ebuild @@ -5,23 +5,22 @@ EAPI="5" GCONF_DEBUG="yes" -inherit eutils gnome2 +inherit autotools eutils gnome2 DESCRIPTION="GNOME 3 compositing window manager based on Clutter" HOMEPAGE="http://git.gnome.org/browse/mutter/" LICENSE="GPL-2+" SLOT="0" -IUSE="+introspection test" +IUSE="+introspection +kms test wayland" KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" -# FIXME: automagic on systemd/libinput/wayland COMMON_DEPEND=" >=x11-libs/pango-1.2[X,introspection?] >=x11-libs/cairo-1.10[X] >=x11-libs/gtk+-3.9.11:3[X,introspection?] >=dev-libs/glib-2.36.0:2 - >=media-libs/clutter-1.19.5:1.0[egl,introspection?] + >=media-libs/clutter-1.19.5:1.0[introspection?] >=media-libs/cogl-1.17.1:1.0=[introspection?] >=media-libs/libcanberra-0.26[gtk3] >=x11-libs/startup-notification-0.7 @@ -30,7 +29,6 @@ COMMON_DEPEND=" gnome-base/gnome-desktop:3= >sys-power/upower-0.99 - >=media-libs/mesa-10.3[gbm] x11-libs/libICE x11-libs/libSM x11-libs/libX11 @@ -51,6 +49,18 @@ COMMON_DEPEND=" gnome-extra/zenity introspection? ( >=dev-libs/gobject-introspection-0.9.5 ) + kms? ( + dev-libs/libinput + media-libs/clutter[egl] + media-libs/cogl:1.0=[kms] + >=media-libs/mesa-10.3[gbm] + sys-apps/systemd + virtual/libgudev + x11-libs/libdrm:= ) + wayland? ( + >=dev-libs/wayland-1.5.90 + media-libs/clutter[wayland] + x11-base/xorg-server[wayland] ) " DEPEND="${COMMON_DEPEND} >=dev-util/gtk-doc-am-1.15 @@ -68,8 +78,12 @@ RDEPEND="${COMMON_DEPEND} src_prepare() { # Compat with Ubuntu metacity themes (e.g. x11-themes/light-themes) - epatch "${FILESDIR}/${PN}-3.2.1-ignore-shadow-and-padding.patch" + epatch "${FILESDIR}"/${PN}-3.2.1-ignore-shadow-and-padding.patch + # Automagic fixes + epatch "${FILESDIR}"/${PN}-3.14.2-automagic.patch + + eautoreconf gnome2_src_prepare } @@ -80,5 +94,7 @@ src_configure() { --enable-startup-notification \ --enable-verbose-mode \ --with-libcanberra \ - $(use_enable introspection) + $(use_enable introspection) \ + $(use_enable kms native-backend) \ + $(use_enable wayland) } diff --git a/x11-wm/mutter/mutter-9999.ebuild b/x11-wm/mutter/mutter-9999.ebuild index 17eb551..f18cc50 100644 --- a/x11-wm/mutter/mutter-9999.ebuild +++ b/x11-wm/mutter/mutter-9999.ebuild @@ -5,7 +5,7 @@ EAPI="5" GCONF_DEBUG="yes" -inherit eutils gnome2 +inherit autotools eutils gnome2 if [[ ${PV} = 9999 ]]; then inherit gnome2-live fi @@ -15,20 +15,19 @@ HOMEPAGE="http://git.gnome.org/browse/mutter/" LICENSE="GPL-2+" SLOT="0" -IUSE="+introspection test" +IUSE="+introspection +kms test wayland" if [[ ${PV} = 9999 ]]; then KEYWORDS="" else KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" fi -# FIXME: automagic on systemd/libinput/wayland COMMON_DEPEND=" >=x11-libs/pango-1.2[X,introspection?] >=x11-libs/cairo-1.10[X] >=x11-libs/gtk+-3.9.11:3[X,introspection?] >=dev-libs/glib-2.36.0:2 - >=media-libs/clutter-1.19.5:1.0[egl,introspection?] + >=media-libs/clutter-1.19.5:1.0[introspection?] >=media-libs/cogl-1.17.1:1.0=[introspection?] >=media-libs/libcanberra-0.26[gtk3] >=x11-libs/startup-notification-0.7 @@ -37,7 +36,6 @@ COMMON_DEPEND=" gnome-base/gnome-desktop:3= >sys-power/upower-0.99 - >=media-libs/mesa-10.3[gbm] x11-libs/libICE x11-libs/libSM x11-libs/libX11 @@ -58,6 +56,18 @@ COMMON_DEPEND=" gnome-extra/zenity introspection? ( >=dev-libs/gobject-introspection-0.9.5 ) + kms? ( + dev-libs/libinput + media-libs/clutter[egl] + media-libs/cogl:1.0=[kms] + >=media-libs/mesa-10.3[gbm] + sys-apps/systemd + virtual/libgudev + x11-libs/libdrm:= ) + wayland? ( + >=dev-libs/wayland-1.5.90 + media-libs/clutter[wayland] + x11-base/xorg-server[wayland] ) " DEPEND="${COMMON_DEPEND} >=dev-util/gtk-doc-am-1.15 @@ -75,8 +85,12 @@ RDEPEND="${COMMON_DEPEND} src_prepare() { # Compat with Ubuntu metacity themes (e.g. x11-themes/light-themes) - epatch "${FILESDIR}/${PN}-3.2.1-ignore-shadow-and-padding.patch" + epatch "${FILESDIR}"/${PN}-3.2.1-ignore-shadow-and-padding.patch + # Automagic fixes + epatch "${FILESDIR}"/${PN}-3.14.2-automagic.patch + + eautoreconf gnome2_src_prepare } @@ -87,5 +101,7 @@ src_configure() { --enable-startup-notification \ --enable-verbose-mode \ --with-libcanberra \ - $(use_enable introspection) + $(use_enable introspection) \ + $(use_enable kms native-backend) \ + $(use_enable wayland) }
