Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140097762
D10599.id29075.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
78 KB
Referenced Files
None
Subscribers
None
D10599.id29075.diff
View Options
Index: GIDs
===================================================================
--- GIDs
+++ GIDs
@@ -801,7 +801,7 @@
# free: 857
# free: 858
# free: 859
-# free: 860
+weston-launch:*:860:
# free: 861
# free: 862
# free: 863
Index: x11-wm/Makefile
===================================================================
--- x11-wm/Makefile
+++ x11-wm/Makefile
@@ -121,6 +121,7 @@
SUBDIR += vtwm
SUBDIR += w9wm
SUBDIR += weewm
+ SUBDIR += weston
SUBDIR += windowlab
SUBDIR += windowmaker
SUBDIR += wm2
Index: x11-wm/weston/Makefile
===================================================================
--- /dev/null
+++ x11-wm/weston/Makefile
@@ -0,0 +1,100 @@
+# Created by: Johannes Lundberg <johalun0@gmail.com>
+# $FreeBSD$
+
+PORTNAME= weston
+PORTVERSION= 2.0.0
+CATEGORIES= x11-wm wayland
+MASTER_SITES= http://wayland.freedesktop.org/releases/
+
+MAINTAINER= x11@freebsd.org
+COMMENT= Wayland Reference Compositor
+
+LICENSE= MIT
+
+BUILD_DEPENDS= wayland-protocols>=1.7:graphics/wayland-protocols
+LIB_DEPENDS= \
+ libxkbcommon.so:x11/libxkbcommon \
+ libpixman-1.so:x11/pixman \
+ libcairo.so:graphics/cairo \
+ libpango-1.0.so:x11-toolkits/pango \
+ libcolord.so:graphics/colord \
+ libfontconfig.so:x11-fonts/fontconfig \
+ libfreetype.so:print/freetype2 \
+ libwayland-server.so:graphics/wayland \
+ libwayland-egl.so:graphics/mesa-libs \
+ libevent.so:devel/libevent2 \
+ libpng.so:graphics/png \
+ libwebp.so:graphics/webp \
+ libffi.so:devel/libffi \
+ libepoll-shim.so:devel/libepoll-shim \
+ libudev.so:devel/libudev-devd \
+ libunwind.so:devel/libunwind \
+ libevdev.so:devel/libevdev \
+ libinput.so:x11/libinput \
+ libmtdev.so:devel/libmtdev
+
+USES= autoreconf alias execinfo gmake pathfix jpeg libtool pkgconfig tar:xz localbase:ldflags
+
+USE_XORG= x11 xcb xcursor
+USE_GL= egl gbm glesv2
+
+OPTIONS_SUB= yes
+OPTIONS_DEFINE= SUID CLIENTS CLIENTS_INSTALL XWAYLAND
+OPTIONS_MULTI= COMPOSITORS
+OPTIONS_MULTI_COMPOSITORS= X11 DRM WAYLAND SCFB
+OPTIONS_SINGLE= CAIRO
+OPTIONS_SINGLE_CAIRO= CAIROIMAGE CAIROGL CAIROGLESV2
+
+OPTIONS_DEFAULT= SUID CAIROIMAGE CLIENTS CLIENTS_INSTALL XWAYLAND X11 DRM WAYLAND SCFB
+
+CAIRO_DESC= Cairo backend
+CAIROGL_DESC= GL (enabled in cairo by default)
+CAIROGLESV2_DESC= GLESv2 (requires cairo built with --enable-glesv2)
+CAIROIMAGE_DESC= Image (Recommended)
+CLIENTS_DESC= Build Weston clients
+CLIENTS_INSTALL_DESC= Install Weston clients
+DRM_DESC= Hardware accelerated compositor backend
+SCFB_DESC= Software rendered compositor backend
+SUID_DESC= Install weston-launch binary with setuid bit set
+WAYLAND_DESC= Nested Weston compositors
+X11_DESC= Run Weston as X11 client (good for testing)
+XWAYLAND_DESC= Support running X clients in Weston
+
+CAIROIMAGE_CONFIGURE_ON= --with-cairo=image
+CAIROGL_CONFIGURE_ON= --with-cairo=gl
+CAIROGLESV2_CONFIGURE_ON= --with-cairo=glesv2 --with-cairo-glesv2
+CLIENTS_CONFIGURE_ENABLE= clients
+CLIENTS_INSTALL_CONFIGURE_ENABLE= demo-clients-install
+DRM_CONFIGURE_ENABLE= drm-compositor
+DRM_LIB_DEPENDS= libdrm.so:graphics/libdrm
+SCFB_CONFIGURE_ENABLE= scfb-compositor
+WAYLAND_CONFIGURE_ENABLE= wayland-compositor
+X11_CONFIGURE_ENABLE= x11-compositor
+XWAYLAND_CONFIGURE_ENABLE= xwayland
+
+CPPFLAGS+= -I${LOCALBASE}/include/libepoll-shim
+
+GROUPS= weston-launch
+
+GNU_CONFIGURE= YES
+
+CONFIGURE_ARGS= --enable-weston-launch
+CONFIGURE_ARGS+= --disable-fbdev-compositor
+CONFIGURE_ARGS+= --disable-vaapi-recorder
+CONFIGURE_ARGS+= --disable-xwayland-test
+
+# We handle setuid in the plist. This allows to build as a user.
+CONFIGURE_ARGS+= --disable-setuid-install
+
+CONFIGURE_ENV+= LIBS="-lepoll-shim -lrt -lEGL"
+CONFIGURE_ENV+= EGL_TESTS_LIBS="-lwayland-client -lGLESv2 -lwayland-egl -lwayland-client"
+CONFIGURE_ENV+= EGL_TESTS_CFLAGS="-L${STAGEDIR}${PREFIX}/lib -I${STAGEDIR}${PREFIX}/include"
+
+# Should not have to do this. "make" should find them in $WAYLAND_PROTOCOLS_DATADIR set by automake...
+WAYLAND_PROTOCOLS_DATADIR=`pkg-config --variable=pkgdatadir wayland-protocols`
+pre-configure:
+ @cp ${WAYLAND_PROTOCOLS_DATADIR}/stable/*/* ${WRKSRC}/protocol/
+ @cp ${WAYLAND_PROTOCOLS_DATADIR}/unstable/*/* ${WRKSRC}/protocol/
+
+
+.include <bsd.port.mk>
Index: x11-wm/weston/distinfo
===================================================================
--- /dev/null
+++ x11-wm/weston/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1493801292
+SHA256 (weston-2.0.0.tar.xz) = b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8
+SIZE (weston-2.0.0.tar.xz) = 1272628
Index: x11-wm/weston/files/patch-Makefile.am
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-Makefile.am
@@ -0,0 +1,47 @@
+--- Makefile.am.orig 2017-05-03 10:47:21 UTC
++++ Makefile.am
+@@ -84,6 +84,7 @@ libweston_@LIBWESTON_MAJOR@_la_SOURCES =
+ libweston/compositor.h \
+ libweston/compositor-drm.h \
+ libweston/compositor-fbdev.h \
++ libweston/compositor-scfb.h \
+ libweston/compositor-headless.h \
+ libweston/compositor-rdp.h \
+ libweston/compositor-wayland.h \
+@@ -284,6 +285,7 @@ libwestoninclude_HEADERS = \
+ libweston/compositor.h \
+ libweston/compositor-drm.h \
+ libweston/compositor-fbdev.h \
++ libweston/compositor-scfb.h \
+ libweston/compositor-headless.h \
+ libweston/compositor-rdp.h \
+ libweston/compositor-wayland.h \
+@@ -452,6 +454,28 @@ fbdev_backend_la_SOURCES = \
+ $(INPUT_BACKEND_SOURCES)
+ endif
+
++if ENABLE_SCFB_COMPOSITOR
++libweston_module_LTLIBRARIES += scfb-backend.la
++scfb_backend_la_LDFLAGS = -module -avoid-version
++scfb_backend_la_LIBADD = \
++ $(COMPOSITOR_LIBS) \
++ $(SCFB_COMPOSITOR_LIBS) \
++ $(INPUT_BACKEND_LIBS) \
++ libsession-helper.la \
++ libshared.la
++scfb_backend_la_CFLAGS = \
++ $(COMPOSITOR_CFLAGS) \
++ $(EGL_CFLAGS) \
++ $(SCFB_COMPOSITOR_CFLAGS) \
++ $(PIXMAN_CFLAGS) \
++ $(AM_CFLAGS)
++scfb_backend_la_SOURCES = \
++ libweston/compositor-scfb.c \
++ libweston/compositor-scfb.h \
++ shared/helpers.h \
++ $(INPUT_BACKEND_SOURCES)
++endif
++
+ if ENABLE_RDP_COMPOSITOR
+ libweston_module_LTLIBRARIES += rdp-backend.la
+ rdp_backend_la_LDFLAGS = -module -avoid-version
Index: x11-wm/weston/files/patch-clients_desktop-shell.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-clients_desktop-shell.c
@@ -0,0 +1,19 @@
+--- clients/desktop-shell.c.orig 2017-01-19 01:41:20 UTC
++++ clients/desktop-shell.c
+@@ -41,6 +41,7 @@
+ #include <ctype.h>
+ #include <time.h>
+ #include <assert.h>
++#include <signal.h>
+
+ #include <wayland-client.h>
+ #include "window.h"
+@@ -50,6 +51,8 @@
+ #include "shared/xalloc.h"
+ #include "shared/zalloc.h"
+
++#define program_invocation_short_name getprogname()
++
+ #include "weston-desktop-shell-client-protocol.h"
+
+ #define DEFAULT_CLOCK_FORMAT CLOCK_FORMAT_MINUTES
Index: x11-wm/weston/files/patch-clients_screenshot.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-clients_screenshot.c
@@ -0,0 +1,11 @@
+--- clients/screenshot.c.orig 2016-08-10 22:56:50 UTC
++++ clients/screenshot.c
+@@ -40,6 +40,8 @@
+ #include "shared/os-compatibility.h"
+ #include "shared/xalloc.h"
+
++#define program_invocation_short_name getprogname()
++
+ /* The screenshooter is a good example of a custom object exposed by
+ * the compositor and serves as a test bed for implementing client
+ * side marshalling outside libwayland.so */
Index: x11-wm/weston/files/patch-clients_terminal.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-clients_terminal.c
@@ -0,0 +1,24 @@
+--- clients/terminal.c.orig 2016-11-21 17:00:30 UTC
++++ clients/terminal.c
+@@ -32,7 +32,11 @@
+ #include <unistd.h>
+ #include <math.h>
+ #include <time.h>
+-#include <pty.h>
++/* #include <pty.h> */
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <termios.h>
++#include <libutil.h>
+ #include <ctype.h>
+ #include <cairo.h>
+ #include <sys/epoll.h>
+@@ -3075,7 +3079,7 @@ int main(int argc, char *argv[])
+
+ option_shell = getenv("SHELL");
+ if (!option_shell)
+- option_shell = "/bin/bash";
++ option_shell = "/bin/sh";
+
+ config_file = weston_config_get_name_from_env();
+ config = weston_config_parse(config_file);
Index: x11-wm/weston/files/patch-clients_weston-info.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-clients_weston-info.c
@@ -0,0 +1,15 @@
+--- clients/weston-info.c.orig 2016-10-22 16:23:57 UTC
++++ clients/weston-info.c
+@@ -578,9 +578,9 @@ clock_name(clockid_t clk_id)
+ static const char *names[] = {
+ [CLOCK_REALTIME] = "CLOCK_REALTIME",
+ [CLOCK_MONOTONIC] = "CLOCK_MONOTONIC",
+- [CLOCK_MONOTONIC_RAW] = "CLOCK_MONOTONIC_RAW",
+- [CLOCK_REALTIME_COARSE] = "CLOCK_REALTIME_COARSE",
+- [CLOCK_MONOTONIC_COARSE] = "CLOCK_MONOTONIC_COARSE",
++ /* [CLOCK_MONOTONIC_RAW] = "CLOCK_MONOTONIC_RAW", */
++ /* [CLOCK_REALTIME_COARSE] = "CLOCK_REALTIME_COARSE", */
++ /* [CLOCK_MONOTONIC_COARSE] = "CLOCK_MONOTONIC_COARSE", */
+ #ifdef CLOCK_BOOTTIME
+ [CLOCK_BOOTTIME] = "CLOCK_BOOTTIME",
+ #endif
Index: x11-wm/weston/files/patch-compositor_main.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-compositor_main.c
@@ -0,0 +1,126 @@
+--- compositor/main.c.orig 2017-02-14 20:59:07 UTC
++++ compositor/main.c
+@@ -41,7 +41,9 @@
+ #include <sys/socket.h>
+ #include <libinput.h>
+ #include <sys/time.h>
+-#include <linux/limits.h>
++/* #include <linux/limits.h> */
++#include <limits.h>
++#define PATH_MAX _POSIX_PATH_MAX
+
+ #ifdef HAVE_LIBUNWIND
+ #define UNW_LOCAL_ONLY
+@@ -61,6 +63,7 @@
+ #include "compositor-headless.h"
+ #include "compositor-rdp.h"
+ #include "compositor-fbdev.h"
++#include "compositor-scfb.h"
+ #include "compositor-x11.h"
+ #include "compositor-wayland.h"
+ #include "windowed-output-api.h"
+@@ -538,6 +541,9 @@ usage(int error_code)
+ #if defined(BUILD_FBDEV_COMPOSITOR)
+ "\t\t\t\tfbdev-backend.so\n"
+ #endif
++#if defined(BUILD_SCFB_COMPOSITOR)
++ "\t\t\t\tscfb-backend.so\n"
++#endif
+ #if defined(BUILD_HEADLESS_COMPOSITOR)
+ "\t\t\t\theadless-backend.so\n"
+ #endif
+@@ -577,6 +583,14 @@ usage(int error_code)
+ "\n");
+ #endif
+
++#if defined(BUILD_SCFB_COMPOSITOR)
++ fprintf(stderr,
++ "Options for scfb-backend.so:\n\n"
++ " --tty=TTY\t\tThe tty to use\n"
++ " --device=DEVICE\tThe framebuffer device to use\n"
++ "\n");
++#endif
++
+ #if defined(BUILD_HEADLESS_COMPOSITOR)
+ fprintf(stderr,
+ "Options for headless-backend.so:\n\n"
+@@ -680,9 +694,9 @@ clock_name(clockid_t clk_id)
+ static const char *names[] = {
+ [CLOCK_REALTIME] = "CLOCK_REALTIME",
+ [CLOCK_MONOTONIC] = "CLOCK_MONOTONIC",
+- [CLOCK_MONOTONIC_RAW] = "CLOCK_MONOTONIC_RAW",
+- [CLOCK_REALTIME_COARSE] = "CLOCK_REALTIME_COARSE",
+- [CLOCK_MONOTONIC_COARSE] = "CLOCK_MONOTONIC_COARSE",
++ /* [CLOCK_MONOTONIC_RAW] = "CLOCK_MONOTONIC_RAW", */
++ /* [CLOCK_REALTIME_COARSE] = "CLOCK_REALTIME_COARSE", */
++ /* [CLOCK_MONOTONIC_COARSE] = "CLOCK_MONOTONIC_COARSE", */
+ #ifdef CLOCK_BOOTTIME
+ [CLOCK_BOOTTIME] = "CLOCK_BOOTTIME",
+ #endif
+@@ -1577,6 +1591,57 @@ load_x11_backend(struct weston_composito
+ }
+
+ static void
++scfb_backend_output_configure(struct wl_listener *listener, void *data)
++{
++ struct weston_output *output = data;
++ struct weston_config *wc = wet_get_config(output->compositor);
++ struct weston_config_section *section;
++
++ section = weston_config_get_section(wc, "output", "name", "scfb");
++
++ wet_output_set_transform(output, section, WL_OUTPUT_TRANSFORM_NORMAL, UINT32_MAX);
++ weston_output_set_scale(output, 1);
++
++ weston_output_enable(output);
++}
++
++static int
++load_scfb_backend(struct weston_compositor *c,
++ int *argc, char **argv, struct weston_config *wc)
++{
++ struct weston_scfb_backend_config config = {{ 0, }};
++ int ret = 0;
++
++ const struct weston_option scfb_options[] = {
++ { WESTON_OPTION_INTEGER, "tty", 0, &config.tty },
++ { WESTON_OPTION_STRING, "device", 0, &config.device },
++ };
++
++ parse_options(scfb_options, ARRAY_LENGTH(scfb_options), argc, argv);
++
++ if (!config.device)
++ config.device = strdup("/dev/ttyv1");
++
++ config.base.struct_version = WESTON_SCFB_BACKEND_CONFIG_VERSION;
++ config.base.struct_size = sizeof(struct weston_scfb_backend_config);
++ config.configure_device = configure_input_device;
++
++ /* load the actual wayland backend and configure it */
++ ret = weston_compositor_load_backend(c, WESTON_BACKEND_SCFB,
++ &config.base);
++
++ if (ret < 0)
++ goto out;
++
++ wet_set_pending_output_handler(c, scfb_backend_output_configure);
++
++out:
++ free(config.device);
++ return ret;
++
++}
++
++static void
+ wayland_backend_output_configure_hotplug(struct wl_listener *listener, void *data)
+ {
+ struct weston_output *output = data;
+@@ -1722,6 +1787,8 @@ load_backend(struct weston_compositor *c
+ return load_rdp_backend(compositor, argc, argv, config);
+ else if (strstr(backend, "fbdev-backend.so"))
+ return load_fbdev_backend(compositor, argc, argv, config);
++ else if (strstr(backend, "scfb-backend.so"))
++ return load_scfb_backend(compositor, argc, argv, config);
+ else if (strstr(backend, "drm-backend.so"))
+ return load_drm_backend(compositor, argc, argv, config);
+ else if (strstr(backend, "x11-backend.so"))
Index: x11-wm/weston/files/patch-configure.ac
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-configure.ac
@@ -0,0 +1,28 @@
+--- configure.ac.orig 2017-02-24 23:44:18 UTC
++++ configure.ac
+@@ -251,6 +251,17 @@ AS_IF([test x$enable_fbdev_compositor =
+ PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
+ ])
+
++
++AC_ARG_ENABLE([scfb-compositor], [ --enable-scfb-compositor],,
++ enable_scfb_compositor=yes)
++AM_CONDITIONAL([ENABLE_SCFB_COMPOSITOR],
++ [test x$enable_scfb_compositor = xyes])
++AS_IF([test x$enable_scfb_compositor = xyes], [
++ AC_DEFINE([BUILD_SCFB_COMPOSITOR], [1], [Build the scfb compositor])
++ PKG_CHECK_MODULES([SCFB_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
++])
++
++
+ AC_ARG_ENABLE([rdp-compositor], [ --enable-rdp-compositor],,
+ enable_rdp_compositor=no)
+ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
+@@ -707,6 +718,7 @@ AC_MSG_RESULT([
+ Wayland Compositor ${enable_wayland_compositor}
+ Headless Compositor ${enable_headless_compositor}
+ FBDEV Compositor ${enable_fbdev_compositor}
++ SCFB Compositor ${enable_scfb_compositor}
+ RDP Compositor ${enable_rdp_compositor}
+ Screen Sharing ${enable_screen_sharing}
+ JUnit XML output ${enable_junit_xml}
Index: x11-wm/weston/files/patch-libweston_compositor-drm.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_compositor-drm.c
@@ -0,0 +1,96 @@
+--- libweston/compositor-drm.c.orig 2017-02-14 20:59:07 UTC
++++ libweston/compositor-drm.c
+@@ -34,7 +34,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <linux/input.h>
+-#include <linux/vt.h>
++//#include <linux/vt.h>
+ #include <assert.h>
+ #include <sys/mman.h>
+ #include <dlfcn.h>
+@@ -2956,44 +2956,50 @@ find_primary_gpu(struct drm_backend *b,
+ struct udev_device *device, *drm_device, *pci;
+
+ e = udev_enumerate_new(b->udev);
+- udev_enumerate_add_match_subsystem(e, "drm");
+- udev_enumerate_add_match_sysname(e, "card[0-9]*");
+
+- udev_enumerate_scan_devices(e);
+- drm_device = NULL;
+- udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) {
+- path = udev_list_entry_get_name(entry);
+- device = udev_device_new_from_syspath(b->udev, path);
+- if (!device)
+- continue;
+- device_seat = udev_device_get_property_value(device, "ID_SEAT");
+- if (!device_seat)
+- device_seat = default_seat;
+- if (strcmp(device_seat, seat)) {
+- udev_device_unref(device);
+- continue;
+- }
++ // libudev-devd don't support matching properly yet
++ device = udev_device_new_from_syspath(e, "/dev/dri/card0");
++ return device;
+
+- pci = udev_device_get_parent_with_subsystem_devtype(device,
+- "pci", NULL);
+- if (pci) {
+- id = udev_device_get_sysattr_value(pci, "boot_vga");
+- if (id && !strcmp(id, "1")) {
+- if (drm_device)
+- udev_device_unref(drm_device);
+- drm_device = device;
+- break;
+- }
+- }
++ /* udev_enumerate_add_match_subsystem(e, "drm"); */
++ /* udev_enumerate_add_match_sysname(e, "card0"); */
+
+- if (!drm_device)
+- drm_device = device;
+- else
+- udev_device_unref(device);
+- }
++ /* udev_enumerate_scan_devices(e); */
++ /* drm_device = NULL; */
++ /* udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) { */
++ /* path = udev_list_entry_get_name(entry); */
++ /* printf("udev iterate got path %s\n",path); */
++ /* device = udev_device_new_from_syspath(b->udev, path); */
++ /* if (!device) */
++ /* continue; */
++ /* device_seat = udev_device_get_property_value(device, "ID_SEAT"); */
++ /* if (!device_seat) */
++ /* device_seat = default_seat; */
++ /* if (strcmp(device_seat, seat)) { */
++ /* udev_device_unref(device); */
++ /* continue; */
++ /* } */
+
+- udev_enumerate_unref(e);
+- return drm_device;
++ /* pci = udev_device_get_parent_with_subsystem_devtype(device, */
++ /* "pci", NULL); */
++ /* if (pci) { */
++ /* id = udev_device_get_sysattr_value(pci, "boot_vga"); */
++ /* if (id && !strcmp(id, "1")) { */
++ /* if (drm_device) */
++ /* udev_device_unref(drm_device); */
++ /* drm_device = device; */
++ /* break; */
++ /* } */
++ /* } */
++
++ /* if (!drm_device) */
++ /* drm_device = device; */
++ /* else */
++ /* udev_device_unref(device); */
++ /* } */
++
++ /* udev_enumerate_unref(e); */
++ /* return drm_device; */
+ }
+
+ static void
Index: x11-wm/weston/files/patch-libweston_compositor-scfb.h
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_compositor-scfb.h
@@ -0,0 +1,64 @@
+--- libweston/compositor-scfb.h.orig 2017-05-03 10:47:21 UTC
++++ libweston/compositor-scfb.h
+@@ -0,0 +1,61 @@
++/*
++ * Copyright © 2016 Benoit Gschwind
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining
++ * a copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation the rights to use, copy, modify, merge, publish,
++ * distribute, sublicense, and/or sell copies of the Software, and to
++ * permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the
++ * next paragraph) shall be included in all copies or substantial
++ * portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ */
++
++#ifndef WESTON_COMPOSITOR_SCFB_H
++#define WESTON_COMPOSITOR_SCFB_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdint.h>
++
++#include "compositor.h"
++
++#define WESTON_SCFB_BACKEND_CONFIG_VERSION 2
++
++struct libinput_device;
++
++struct weston_scfb_backend_config {
++ struct weston_backend_config base;
++
++ int tty;
++ char *device;
++
++ /** Callback used to configure input devices.
++ *
++ * This function will be called by the backend when a new input device
++ * needs to be configured.
++ * If NULL the device will use the default configuration.
++ */
++ void (*configure_device)(struct weston_compositor *compositor,
++ struct libinput_device *device);
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* WESTON_COMPOSITOR_SCFB_H */
Index: x11-wm/weston/files/patch-libweston_compositor-scfb.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_compositor-scfb.c
@@ -0,0 +1,835 @@
+--- libweston/compositor-scfb.c.orig 2017-05-03 10:47:21 UTC
++++ libweston/compositor-scfb.c
+@@ -0,0 +1,832 @@
++/*
++ * Copyright © 2008-2011 Kristian Høgsberg
++ * Copyright © 2011 Intel Corporation
++ * Copyright © 2012 Raspberry Pi Foundation
++ * Copyright © 2013 Philip Withnall
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining
++ * a copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation the rights to use, copy, modify, merge, publish,
++ * distribute, sublicense, and/or sell copies of the Software, and to
++ * permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the
++ * next paragraph) shall be included in all copies or substantial
++ * portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ */
++
++#include "config.h"
++
++#include <errno.h>
++#include <stdlib.h>
++#include <stdint.h>
++#include <stdio.h>
++#include <string.h>
++#include <math.h>
++#include <sys/mman.h>
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <sys/fbio.h>
++#include <fcntl.h>
++#include <unistd.h>
++
++#include <linux/input.h>
++
++#include <libudev.h>
++
++#include "shared/helpers.h"
++#include "compositor.h"
++#include "compositor-scfb.h"
++#include "launcher-util.h"
++#include "pixman-renderer.h"
++#include "libinput-seat.h"
++#include "presentation-time-server-protocol.h"
++
++struct scfb_backend {
++ struct weston_backend base;
++ struct weston_compositor *compositor;
++ uint32_t prev_state;
++
++ struct udev *udev;
++ struct udev_input input;
++ uint32_t output_transform;
++ struct wl_listener session_listener;
++};
++
++struct scfb_screeninfo {
++ unsigned int x_resolution; /* pixels, visible area */
++ unsigned int y_resolution; /* pixels, visible area */
++ unsigned int width_mm; /* visible screen width in mm */
++ unsigned int height_mm; /* visible screen height in mm */
++ unsigned int bits_per_pixel;
++
++ size_t buffer_length; /* length of frame buffer memory in bytes */
++ size_t line_length; /* length of a line in bytes */
++ char id[16]; /* screen identifier */
++
++ pixman_format_code_t pixel_format; /* frame buffer pixel format */
++ unsigned int refresh_rate; /* Hertz */
++};
++
++struct scfb_output {
++ struct scfb_backend *backend;
++ struct weston_output base;
++
++ struct weston_mode mode;
++ struct wl_event_source *finish_frame_timer;
++
++ /* Frame buffer details. */
++ char *device;
++ struct scfb_screeninfo fb_info;
++ void *fb; /* length is fb_info.buffer_length */
++
++ /* pixman details. */
++ pixman_image_t *hw_surface;
++ uint8_t depth;
++};
++
++static const char default_seat[] = "seat0";
++
++static inline struct scfb_output *
++to_scfb_output(struct weston_output *base)
++{
++ return container_of(base, struct scfb_output, base);
++}
++
++static inline struct scfb_backend *
++to_scfb_backend(struct weston_compositor *base)
++{
++ return container_of(base->backend, struct scfb_backend, base);
++}
++
++static void
++scfb_output_start_repaint_loop(struct weston_output *output)
++{
++ struct timespec ts;
++
++ weston_compositor_read_presentation_clock(output->compositor, &ts);
++ weston_output_finish_frame(output, &ts, WP_PRESENTATION_FEEDBACK_INVALID);
++}
++
++static int
++scfb_output_repaint(struct weston_output *base, pixman_region32_t *damage)
++{
++ struct scfb_output *output = to_scfb_output(base);
++ struct weston_compositor *ec = output->base.compositor;
++
++ /* Repaint the damaged region onto the back buffer. */
++ pixman_renderer_output_set_buffer(base, output->hw_surface);
++ ec->renderer->repaint_output(base, damage);
++
++ /* Update the damage region. */
++ pixman_region32_subtract(&ec->primary_plane.damage,
++ &ec->primary_plane.damage, damage);
++
++ /* Schedule the end of the frame. We do not sync this to the frame
++ * buffer clock because users who want that should be using the DRM
++ * compositor. FBIO_WAITFORVSYNC blocks and FB_ACTIVATE_VBL requires
++ * panning, which is broken in most kernel drivers.
++ *
++ * Finish the frame synchronised to the specified refresh rate. The
++ * refresh rate is given in mHz and the interval in ms. */
++ wl_event_source_timer_update(output->finish_frame_timer,
++ 1000000 / output->mode.refresh);
++
++ return 0;
++}
++
++static int
++finish_frame_handler(void *data)
++{
++ struct scfb_output *output = data;
++ struct timespec ts;
++
++ weston_compositor_read_presentation_clock(output->base.compositor, &ts);
++ weston_output_finish_frame(&output->base, &ts, 0);
++
++ return 1;
++}
++
++static pixman_format_code_t
++calculate_pixman_format(struct fbtype *fb)
++{
++ /* Calculate the pixman format supported by the frame buffer from the
++ * buffer's metadata. Return 0 if no known pixman format is supported
++ * (since this has depth 0 it's guaranteed to not conflict with any
++ * actual pixman format).
++ *
++ * Documentation on the vinfo and finfo structures:
++ * http://www.mjmwired.net/kernel/Documentation/fb/api.txt
++ *
++ * TODO: Try a bit harder to support other formats, including setting
++ * the preferred format in the hardware. */
++ int type;
++
++ /* weston_log("Calculating pixman format from:\n" */
++ /* STAMP_SPACE " - type: %i (aux: %i)\n" */
++ /* STAMP_SPACE " - visual: %i\n" */
++ /* STAMP_SPACE " - bpp: %i (grayscale: %i)\n" */
++ /* STAMP_SPACE " - red: offset: %i, length: %i, MSB: %i\n" */
++ /* STAMP_SPACE " - green: offset: %i, length: %i, MSB: %i\n" */
++ /* STAMP_SPACE " - blue: offset: %i, length: %i, MSB: %i\n" */
++ /* STAMP_SPACE " - transp: offset: %i, length: %i, MSB: %i\n", */
++ /* finfo->type, finfo->type_aux, finfo->visual, */
++ /* vinfo->bits_per_pixel, vinfo->grayscale, */
++ /* vinfo->red.offset, vinfo->red.length, vinfo->red.msb_right, */
++ /* vinfo->green.offset, vinfo->green.length, */
++ /* vinfo->green.msb_right, */
++ /* vinfo->blue.offset, vinfo->blue.length, */
++ /* vinfo->blue.msb_right, */
++ /* vinfo->transp.offset, vinfo->transp.length, */
++ /* vinfo->transp.msb_right); */
++
++ /* We only handle packed formats at the moment. */
++ /* if (vinfo->vi_mem_model != V_INFO_MM_PACKED) { */
++ /* weston_log("[scfb %s] Error! Only packed format supported\n", */
++ /* __func__); */
++ /* return 0; */
++ /* } */
++
++ /* /\* We only handle true-colour frame buffers at the moment. *\/ */
++ /* switch(finfo->visual) { */
++ /* case FB_VISUAL_TRUECOLOR: */
++ /* case FB_VISUAL_DIRECTCOLOR: */
++ /* if (vinfo->grayscale != 0) */
++ /* return 0; */
++ /* break; */
++ /* default: */
++ /* return 0; */
++ /* } */
++
++ /* We only support formats with MSBs on the left. */
++ /* if (vinfo->red.msb_right != 0 || vinfo->green.msb_right != 0 || */
++ /* vinfo->blue.msb_right != 0) */
++ /* return 0; */
++
++ /* Work out the format type from the offsets. We only support RGBA and
++ * ARGB at the moment. */
++ /* type = PIXMAN_TYPE_OTHER; */
++
++ /* if ((vinfo->transp.offset >= vinfo->red.offset || */
++ /* vinfo->transp.length == 0) && */
++ /* vinfo->red.offset >= vinfo->green.offset && */
++ /* vinfo->green.offset >= vinfo->blue.offset) */
++ /* type = PIXMAN_TYPE_ARGB; */
++ /* else if (vinfo->red.offset >= vinfo->green.offset && */
++ /* vinfo->green.offset >= vinfo->blue.offset && */
++ /* vinfo->blue.offset >= vinfo->transp.offset) */
++
++ type = PIXMAN_TYPE_ARGB;
++
++ /* if (type == PIXMAN_TYPE_OTHER) */
++ /* return 0; */
++
++ /* Build the format. */
++ return PIXMAN_FORMAT(fb->fb_depth, type,
++ fb->fb_depth/4,
++ fb->fb_depth/4,
++ fb->fb_depth/4,
++ fb->fb_depth/4);
++}
++
++
++static int
++calculate_refresh_rate(struct fbtype *fb)
++{
++ /* uint64_t quot; */
++
++ /* /\* Calculate monitor refresh rate. Default is 60 Hz. Units are mHz. *\/ */
++ /* quot = (vinfo->upper_margin + vinfo->lower_margin + vinfo->yres); */
++ /* quot *= (vinfo->left_margin + vinfo->right_margin + vinfo->xres); */
++ /* quot *= vinfo->pixclock; */
++
++ /* if (quot > 0) { */
++ /* uint64_t refresh_rate; */
++
++ /* refresh_rate = 1000000000000000LLU / quot; */
++ /* if (refresh_rate > 200000) */
++ /* refresh_rate = 200000; /\* cap at 200 Hz *\/ */
++
++ /* return refresh_rate; */
++ /* } */
++
++ return 60 * 1000; /* default to 60 Hz */
++}
++
++static int
++scfb_query_screen_info(struct scfb_output *output, int fd,
++ struct scfb_screeninfo *info)
++{
++ weston_log("[scfb %s] fd %d\n",__func__,fd);
++
++ struct fbtype fb;
++ /* struct video_info vinfo; */
++ /* struct video_color_palette vpalette; */
++ uint32_t linewidth;
++
++ if (ioctl(fd, FBIOGTYPE, &fb) == -1) {
++ weston_log("Failed to get FBIOTYPE: %s\n", strerror(errno));
++ return -1;
++ }
++
++ /* if (ioctl(fd, FBIO_GETPALETTE, &vpalette) == -1) { */
++ /* weston_log("Failed to get FBIO_GETPALETTE: %s\n", strerror(errno)); */
++ /* return -1; */
++ /* } */
++
++ /* if (ioctl(fd, FBIO_GETLINEWIDTH, &linewidth) == -1) { */
++ /* weston_log("Failed to get FBIO_GETLINEWIDTH: %s\n", strerror(errno)); */
++ /* return -1; */
++ /* } */
++
++ /* if (ioctl(fd, FBIO_MODEINFO, &vinfo) == -1) { */
++ /* weston_log("Failed to get FBIO_MODEINFO: %s\n", strerror(errno)); */
++ /* return -1; */
++ /* } */
++
++ linewidth = fb.fb_size / fb.fb_height;
++
++ weston_log("[scfb %s]: width %d px\n", __func__, fb.fb_width);
++ weston_log("[scfb %s]: height %d px\n", __func__, fb.fb_height);
++ weston_log("[scfb %s]: depth %d bits per pixel\n", __func__, fb.fb_depth);
++ weston_log("[scfb %s]: size %d bytes\n", __func__, fb.fb_size);
++ weston_log("[scfb %s]: linewidth %d bytes\n", __func__, linewidth);
++ /* weston_log("[scfb %s]: palette c %d\n", __func__, vpalette.count); */
++ /* weston_log("[scfb %s]: palette r %d\n", __func__, *vpalette.red); */
++ /* weston_log("[scfb %s]: palette g %d\n", __func__, *vpalette.blue); */
++ /* weston_log("[scfb %s]: palette b %d\n", __func__, *vpalette.green); */
++ /* weston_log("[scfb %s]: palette a %d\n", __func__, *vpalette.transparent); */
++
++ info->x_resolution = fb.fb_width;
++ info->y_resolution = fb.fb_height;
++ info->width_mm = 0;
++ info->height_mm = 0;
++ info->bits_per_pixel = fb.fb_depth;
++ info->buffer_length = fb.fb_size;
++ info->line_length = linewidth;
++
++ const char *id = "scfb";
++ strncpy(info->id, id, sizeof(info->id));
++ info->id[sizeof(info->id)-1] = '\0';
++
++ info->pixel_format = calculate_pixman_format(&fb);
++ info->refresh_rate = calculate_refresh_rate(&fb);
++
++ if (info->pixel_format == 0) {
++ weston_log("Frame buffer uses an unsupported format.\n");
++ return -1;
++ }
++
++ return 1;
++}
++
++static int
++scfb_set_screen_info(struct scfb_output *output, int fd,
++ struct scfb_screeninfo *info)
++{
++ weston_log("[scfb %s] Changing video info is unsupported\n",__func__);
++ return 1;
++}
++
++static void scfb_frame_buffer_destroy(struct scfb_output *output);
++
++/* Returns an FD for the frame buffer device. */
++static int
++scfb_frame_buffer_open(struct scfb_output *output, const char *fb_dev,
++ struct scfb_screeninfo *screen_info)
++{
++ weston_log("[scfb %s] fb_dev %s\n",__func__,fb_dev);
++
++ int fd = -1;
++
++ /* weston_log("Opening scfb frame buffer.\n"); */
++
++ /* Open the frame buffer device. */
++ fd = open(fb_dev, O_RDWR | O_CLOEXEC);
++ if (fd < 0) {
++ weston_log("Failed to open frame buffer device ‘%s’: %s\n",
++ fb_dev, strerror(errno));
++ return -1;
++ }
++
++ /* Grab the screen info. */
++ if (scfb_query_screen_info(output, fd, screen_info) < 0) {
++ weston_log("Failed to get frame buffer info: %s\n",
++ strerror(errno));
++
++ close(fd);
++ return -1;
++ }
++
++ return fd;
++}
++
++/* Map the framebuffer's memory. */
++static void*
++scfb_mmap(size_t len, off_t off, int fd)
++{
++ int pagemask, mapsize;
++ caddr_t addr;
++ void *mapaddr;
++
++ pagemask = getpagesize() - 1;
++ mapsize = ((int) len + pagemask) & ~pagemask;
++ addr = 0;
++ /* Make it write only because read is slow (from fbdev backend) */
++ mapaddr = mmap(addr, mapsize, PROT_WRITE, MAP_SHARED, fd, off);
++
++ weston_log("[scfb %s] mmap returns: addr %p len 0x%x, fd %d, off %lx\n",
++ __func__, mapaddr, mapsize, fd, off);
++ return mapaddr;
++}
++
++/* Closes the FD on success or failure. */
++static int
++scfb_frame_buffer_map(struct scfb_output *output, int fd)
++{
++ weston_log("[scfb %s] fd %d\n",__func__,fd);
++
++ int retval = -1;
++
++
++ /* Map the frame buffer. Write-only mode, since we don't want to read
++ * anything back (because it's slow). */
++ output->fb = scfb_mmap(output->fb_info.buffer_length, 0, fd);
++ if (output->fb == MAP_FAILED) {
++ weston_log("Failed to mmap frame buffer: %s\n",
++ strerror(errno));
++ goto out_close;
++ }
++
++ /* Create a pixman image to wrap the memory mapped frame buffer. */
++ output->hw_surface =
++ pixman_image_create_bits(output->fb_info.pixel_format,
++ output->fb_info.x_resolution,
++ output->fb_info.y_resolution,
++ output->fb,
++ output->fb_info.line_length);
++ if (output->hw_surface == NULL) {
++ weston_log("Failed to create surface for frame buffer.\n");
++ goto out_unmap;
++ }
++
++ /* Success! */
++ retval = 0;
++
++out_unmap:
++ if (retval != 0 && output->fb != NULL)
++ scfb_frame_buffer_destroy(output);
++
++out_close:
++ if (fd >= 0)
++ close(fd);
++
++ return retval;
++}
++
++static void
++scfb_frame_buffer_destroy(struct scfb_output *output)
++{
++ weston_log("Destroying scfb frame buffer.\n");
++
++ if (munmap(output->fb, output->fb_info.buffer_length) < 0)
++ weston_log("Failed to munmap frame buffer: %s\n",
++ strerror(errno));
++
++ output->fb = NULL;
++}
++
++static void scfb_output_destroy(struct weston_output *base);
++static void scfb_output_disable(struct weston_output *base);
++
++static int
++scfb_output_enable(struct weston_output *base)
++{
++ struct scfb_output *output = to_scfb_output(base);
++ struct scfb_backend *backend = to_scfb_backend(base->compositor);
++ int fb_fd;
++ struct wl_event_loop *loop;
++
++ /* Create the frame buffer. */
++ fb_fd = scfb_frame_buffer_open(output, output->device, &output->fb_info);
++ if (fb_fd < 0) {
++ weston_log("Creating frame buffer failed.\n");
++ return -1;
++ }
++
++ if (scfb_frame_buffer_map(output, fb_fd) < 0) {
++ weston_log("Mapping frame buffer failed.\n");
++ return -1;
++ }
++
++ output->base.start_repaint_loop = scfb_output_start_repaint_loop;
++ output->base.repaint = scfb_output_repaint;
++
++ if (pixman_renderer_output_create(&output->base) < 0)
++ goto out_hw_surface;
++
++ loop = wl_display_get_event_loop(backend->compositor->wl_display);
++ output->finish_frame_timer =
++ wl_event_loop_add_timer(loop, finish_frame_handler, output);
++
++ weston_log("scfb output %d×%d px\n",
++ output->mode.width, output->mode.height);
++ weston_log_continue(STAMP_SPACE "guessing %d Hz and 96 dpi\n",
++ output->mode.refresh / 1000);
++
++ return 0;
++
++out_hw_surface:
++ pixman_image_unref(output->hw_surface);
++ output->hw_surface = NULL;
++ scfb_frame_buffer_destroy(output);
++
++ return -1;
++}
++
++static int
++scfb_output_create(struct scfb_backend *backend,
++ const char *device)
++{
++ weston_log("[scfb %s] device %s\n",__func__,device);
++
++ struct scfb_output *output;
++ int fb_fd;
++
++ weston_log("Creating scfb output.\n");
++
++ output = zalloc(sizeof *output);
++ if (output == NULL)
++ return -1;
++
++ output->backend = backend;
++ output->device = strdup(device);
++
++ /* Create the frame buffer. */
++ fb_fd = scfb_frame_buffer_open(output, device, &output->fb_info);
++ if (fb_fd < 0) {
++ weston_log("Creating frame buffer failed.\n");
++ goto out_free;
++ }
++
++ output->base.name = strdup("scfb");
++ output->base.destroy = scfb_output_destroy;
++ output->base.disable = NULL;
++ output->base.enable = scfb_output_enable;
++
++ weston_output_init(&output->base, backend->compositor);
++
++ /* only one static mode in list */
++ output->mode.flags =
++ WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED;
++ output->mode.width = output->fb_info.x_resolution;
++ output->mode.height = output->fb_info.y_resolution;
++ output->mode.refresh = output->fb_info.refresh_rate;
++ wl_list_init(&output->base.mode_list);
++ wl_list_insert(&output->base.mode_list, &output->mode.link);
++
++ output->base.current_mode = &output->mode;
++ output->base.subpixel = WL_OUTPUT_SUBPIXEL_UNKNOWN;
++ output->base.make = "unknown";
++ output->base.model = output->fb_info.id;
++
++ output->base.mm_width = output->fb_info.width_mm;
++ output->base.mm_height = output->fb_info.height_mm;
++
++ close(fb_fd);
++
++ weston_compositor_add_pending_output(&output->base, backend->compositor);
++
++ return 0;
++
++out_free:
++ free(output->device);
++ free(output);
++
++ return -1;
++}
++
++static void
++scfb_output_destroy(struct weston_output *base)
++{
++ struct scfb_output *output = to_scfb_output(base);
++
++ weston_log("Destroying scfb output.\n");
++
++ /* Close the frame buffer. */
++ scfb_output_disable(base);
++
++ if (base->renderer_state != NULL)
++ pixman_renderer_output_destroy(base);
++
++ /* Remove the output. */
++ weston_output_destroy(&output->base);
++
++ free(output->device);
++ free(output);
++}
++
++/* strcmp()-style return values. */
++static int
++compare_screen_info (const struct scfb_screeninfo *a,
++ const struct scfb_screeninfo *b)
++{
++ if (a->x_resolution == b->x_resolution &&
++ a->y_resolution == b->y_resolution &&
++ a->width_mm == b->width_mm &&
++ a->height_mm == b->height_mm &&
++ a->bits_per_pixel == b->bits_per_pixel &&
++ a->pixel_format == b->pixel_format &&
++ a->refresh_rate == b->refresh_rate)
++ return 0;
++
++ return 1;
++}
++
++static int
++scfb_output_reenable(struct scfb_backend *backend,
++ struct weston_output *base)
++{
++ struct scfb_output *output = to_scfb_output(base);
++ struct scfb_screeninfo new_screen_info;
++ int fb_fd;
++ char *device;
++
++ weston_log("Re-enabling scfb output.\n");
++
++ /* Create the frame buffer. */
++ fb_fd = scfb_frame_buffer_open(output, output->device,
++ &new_screen_info);
++ if (fb_fd < 0) {
++ weston_log("Creating frame buffer failed.\n");
++ goto err;
++ }
++
++ /* Check whether the frame buffer details have changed since we were
++ * disabled. */
++ if (compare_screen_info (&output->fb_info, &new_screen_info) != 0) {
++ /* Perform a mode-set to restore the old mode. */
++ if (scfb_set_screen_info(output, fb_fd,
++ &output->fb_info) < 0) {
++ weston_log("Failed to restore mode settings. "
++ "Attempting to re-open output anyway.\n");
++ }
++
++ close(fb_fd);
++
++ /* Remove and re-add the output so that resources depending on
++ * the frame buffer X/Y resolution (such as the shadow buffer)
++ * are re-initialised. */
++ device = strdup(output->device);
++ scfb_output_destroy(&output->base);
++ scfb_output_create(backend, device);
++ free(device);
++
++ return 0;
++ }
++
++ /* Map the device if it has the same details as before. */
++ if (scfb_frame_buffer_map(output, fb_fd) < 0) {
++ weston_log("Mapping frame buffer failed.\n");
++ goto err;
++ }
++
++ return 0;
++
++err:
++ return -1;
++}
++
++/* NOTE: This leaves output->fb_info populated, caching data so that if
++ * scfb_output_reenable() is called again, it can determine whether a mode-set
++ * is needed. */
++static void
++scfb_output_disable(struct weston_output *base)
++{
++ struct scfb_output *output = to_scfb_output(base);
++
++ weston_log("Disabling scfb output.\n");
++
++ if (output->hw_surface != NULL) {
++ pixman_image_unref(output->hw_surface);
++ output->hw_surface = NULL;
++ }
++
++ scfb_frame_buffer_destroy(output);
++}
++
++static void
++scfb_backend_destroy(struct weston_compositor *base)
++{
++ struct scfb_backend *backend = to_scfb_backend(base);
++
++ udev_input_destroy(&backend->input);
++
++ /* Destroy the output. */
++ weston_compositor_shutdown(base);
++
++ /* Chain up. */
++ weston_launcher_destroy(base->launcher);
++
++ free(backend);
++}
++
++static void
++session_notify(struct wl_listener *listener, void *data)
++{
++ struct weston_compositor *compositor = data;
++ struct scfb_backend *backend = to_scfb_backend(compositor);
++ struct weston_output *output;
++
++ if (compositor->session_active) {
++ weston_log("entering VT\n");
++ compositor->state = backend->prev_state;
++
++ wl_list_for_each(output, &compositor->output_list, link) {
++ scfb_output_reenable(backend, output);
++ }
++
++ weston_compositor_damage_all(compositor);
++
++ udev_input_enable(&backend->input);
++ } else {
++ weston_log("leaving VT\n");
++ udev_input_disable(&backend->input);
++
++ wl_list_for_each(output, &compositor->output_list, link) {
++ scfb_output_disable(output);
++ }
++
++ backend->prev_state = compositor->state;
++ weston_compositor_offscreen(compositor);
++
++ /* If we have a repaint scheduled (from the idle handler), make
++ * sure we cancel that so we don't try to pageflip when we're
++ * vt switched away. The OFFSCREEN state will prevent
++ * further attempts at repainting. When we switch
++ * back, we schedule a repaint, which will process
++ * pending frame callbacks. */
++
++ wl_list_for_each(output,
++ &compositor->output_list, link) {
++ output->repaint_needed = 0;
++ }
++ }
++}
++
++static void
++scfb_restore(struct weston_compositor *compositor)
++{
++ weston_launcher_restore(compositor->launcher);
++}
++
++static struct scfb_backend *
++scfb_backend_create(struct weston_compositor *compositor,
++ struct weston_scfb_backend_config *param)
++{
++ struct scfb_backend *backend;
++ const char *seat_id = default_seat;
++
++ weston_log("initializing scfb backend\n");
++
++ backend = zalloc(sizeof *backend);
++ if (backend == NULL)
++ return NULL;
++
++ backend->compositor = compositor;
++ if (weston_compositor_set_presentation_clock_software(
++ compositor) < 0)
++ goto out_compositor;
++
++ backend->udev = udev_new();
++ if (backend->udev == NULL) {
++ weston_log("Failed to initialize udev context.\n");
++ goto out_compositor;
++ }
++
++ /* Set up the TTY. */
++ backend->session_listener.notify = session_notify;
++ wl_signal_add(&compositor->session_signal,
++ &backend->session_listener);
++ compositor->launcher =
++ weston_launcher_connect(compositor, param->tty, "seat0", false);
++ if (!compositor->launcher) {
++ weston_log("fatal: scfb backend should be run "
++ "using weston-launch binary or as root\n");
++ goto out_udev;
++ }
++
++ backend->base.destroy = scfb_backend_destroy;
++ backend->base.restore = scfb_restore;
++
++ backend->prev_state = WESTON_COMPOSITOR_ACTIVE;
++
++ weston_setup_vt_switch_bindings(compositor);
++
++ if (pixman_renderer_init(compositor) < 0)
++ goto out_launcher;
++
++ if (scfb_output_create(backend, param->device) < 0)
++ goto out_launcher;
++
++ udev_input_init(&backend->input, compositor, backend->udev,
++ seat_id, param->configure_device);
++
++ compositor->backend = &backend->base;
++ return backend;
++
++out_launcher:
++ weston_launcher_destroy(compositor->launcher);
++
++out_udev:
++ udev_unref(backend->udev);
++
++out_compositor:
++ weston_compositor_shutdown(compositor);
++ free(backend);
++
++ return NULL;
++}
++
++static void
++config_init_to_defaults(struct weston_scfb_backend_config *config)
++{
++ /* TODO: Ideally, available frame buffers should be enumerated using
++ * udev, rather than passing a device node in as a parameter. */
++ config->tty = 0; /* default to current tty */
++ config->device = "/dev/fb0"; /* default frame buffer */
++}
++
++WL_EXPORT int
++weston_backend_init(struct weston_compositor *compositor,
++ struct weston_backend_config *config_base)
++{
++ struct scfb_backend *b;
++ struct weston_scfb_backend_config config = {{ 0, }};
++
++ if (config_base == NULL ||
++ config_base->struct_version != WESTON_SCFB_BACKEND_CONFIG_VERSION ||
++ config_base->struct_size > sizeof(struct weston_scfb_backend_config)) {
++ weston_log("scfb backend config structure is invalid\n");
++ return -1;
++ }
++
++ config_init_to_defaults(&config);
++ memcpy(&config, config_base, config_base->struct_size);
++
++ b = scfb_backend_create(compositor, &config);
++ if (b == NULL)
++ return -1;
++ return 0;
++}
Index: x11-wm/weston/files/patch-libweston_compositor-x11.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_compositor-x11.c
@@ -0,0 +1,10 @@
+--- libweston/compositor-x11.c.orig 2017-01-19 01:41:20 UTC
++++ libweston/compositor-x11.c
+@@ -37,6 +37,7 @@
+ #include <errno.h>
+ #include <sys/time.h>
+ #include <sys/shm.h>
++#include <sys/stat.h>
+ #include <linux/input.h>
+
+ #include <xcb/xcb.h>
Index: x11-wm/weston/files/patch-libweston_compositor.h
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_compositor.h
@@ -0,0 +1,10 @@
+--- libweston/compositor.h.orig 2017-02-07 22:58:35 UTC
++++ libweston/compositor.h
+@@ -1619,6 +1619,7 @@ weston_compositor_create(struct wl_displ
+ enum weston_compositor_backend {
+ WESTON_BACKEND_DRM,
+ WESTON_BACKEND_FBDEV,
++ WESTON_BACKEND_SCFB,
+ WESTON_BACKEND_HEADLESS,
+ WESTON_BACKEND_RDP,
+ WESTON_BACKEND_WAYLAND,
Index: x11-wm/weston/files/patch-libweston_compositor.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_compositor.c
@@ -0,0 +1,24 @@
+--- libweston/compositor.c.orig 2017-02-07 22:58:35 UTC
++++ libweston/compositor.c
+@@ -5224,10 +5224,10 @@ weston_compositor_set_presentation_clock
+ {
+ /* In order of preference */
+ static const clockid_t clocks[] = {
+- CLOCK_MONOTONIC_RAW, /* no jumps, no crawling */
+- CLOCK_MONOTONIC_COARSE, /* no jumps, may crawl, fast & coarse */
++ //CLOCK_MONOTONIC_RAW, /* no jumps, no crawling */
++ //CLOCK_MONOTONIC_COARSE, /* no jumps, may crawl, fast & coarse */
+ CLOCK_MONOTONIC, /* no jumps, may crawl */
+- CLOCK_REALTIME_COARSE, /* may jump and crawl, fast & coarse */
++ //CLOCK_REALTIME_COARSE, /* may jump and crawl, fast & coarse */
+ CLOCK_REALTIME /* may jump and crawl */
+ };
+ unsigned i;
+@@ -5416,6 +5416,7 @@ weston_compositor_get_user_data(struct w
+ static const char * const backend_map[] = {
+ [WESTON_BACKEND_DRM] = "drm-backend.so",
+ [WESTON_BACKEND_FBDEV] = "fbdev-backend.so",
++ [WESTON_BACKEND_SCFB] = "scfb-backend.so",
+ [WESTON_BACKEND_HEADLESS] = "headless-backend.so",
+ [WESTON_BACKEND_RDP] = "rdp-backend.so",
+ [WESTON_BACKEND_WAYLAND] = "wayland-backend.so",
Index: x11-wm/weston/files/patch-libweston_input.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_input.c
@@ -0,0 +1,12 @@
+--- libweston/input.c.orig 2016-12-10 00:45:56 UTC
++++ libweston/input.c
+@@ -32,7 +32,8 @@
+ #include <sys/mman.h>
+ #include <assert.h>
+ #include <unistd.h>
+-#include <values.h>
++//#include <values.h>
++#include <float.h>
+ #include <fcntl.h>
+ #include <limits.h>
+
Index: x11-wm/weston/files/patch-libweston_launcher-direct.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_launcher-direct.c
@@ -0,0 +1,171 @@
+--- libweston/launcher-direct.c.orig 2017-02-14 20:59:07 UTC
++++ libweston/launcher-direct.c
+@@ -34,17 +34,25 @@
+ #include <signal.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+-#include <linux/vt.h>
+-#include <linux/kd.h>
+-#include <linux/major.h>
++/* #include <linux/vt.h> */
++/* #include <linux/kd.h> */
++/* #include <linux/major.h> */
++/* #define TTY_BASENAME "/dev/tty" */
++/* #define TTY_0 "/dev/tty0" */
++
++#include <termios.h>
++#include <sys/consio.h>
++#include <sys/kbio.h>
++#define TTY_BASENAME "/dev/ttyv"
++#define TTY_0 "/dev/ttyv0"
+
+ #include "launcher-impl.h"
+
+-#define DRM_MAJOR 226
++/* #define DRM_MAJOR 226 */
+
+-#ifndef KDSKBMUTE
+-#define KDSKBMUTE 0x4B51
+-#endif
++/* #ifndef KDSKBMUTE */
++/* #define KDSKBMUTE 0x4B51 */
++/* #endif */
+
+ #ifdef HAVE_LIBDRM
+
+@@ -116,7 +124,7 @@ setup_tty(struct launcher_direct *launch
+ struct vt_mode mode = { 0 };
+ struct stat buf;
+ char tty_device[32] ="<stdin>";
+- int ret, kd_mode;
++ int ret, kd_mode, vt;
+
+ if (tty == 0) {
+ launcher->tty = dup(tty);
+@@ -125,7 +133,7 @@ setup_tty(struct launcher_direct *launch
+ return -1;
+ }
+ } else {
+- snprintf(tty_device, sizeof tty_device, "/dev/tty%d", tty);
++ snprintf(tty_device, sizeof tty_device, "%s%d", TTY_BASENAME, tty);
+ launcher->tty = open(tty_device, O_RDWR | O_CLOEXEC);
+ if (launcher->tty == -1) {
+ weston_log("couldn't open tty %s: %m\n", tty_device);
+@@ -133,14 +141,20 @@ setup_tty(struct launcher_direct *launch
+ }
+ }
+
+- if (fstat(launcher->tty, &buf) == -1 ||
+- major(buf.st_rdev) != TTY_MAJOR || minor(buf.st_rdev) == 0) {
+- weston_log("%s not a vt\n", tty_device);
+- weston_log("if running weston from ssh, "
+- "use --tty to specify a tty\n");
+- goto err_close;
++ ret = ioctl(launcher->tty, VT_GETINDEX, &vt);
++ if (ret) {
++ weston_log("failed to get VT index: %m\n");
++ return -1;
+ }
+
++ /* if (fstat(launcher->tty, &buf) == -1 || */
++ /* major(buf.st_rdev) != TTY_MAJOR || minor(buf.st_rdev) == 0) { */
++ /* weston_log("%s not a vt\n", tty_device); */
++ /* weston_log("if running weston from ssh, " */
++ /* "use --tty to specify a tty\n"); */
++ /* goto err_close; */
++ /* } */
++
+ ret = ioctl(launcher->tty, KDGETMODE, &kd_mode);
+ if (ret) {
+ weston_log("failed to get VT mode: %m\n");
+@@ -152,17 +166,28 @@ setup_tty(struct launcher_direct *launch
+ goto err_close;
+ }
+
+- ioctl(launcher->tty, VT_ACTIVATE, minor(buf.st_rdev));
+- ioctl(launcher->tty, VT_WAITACTIVE, minor(buf.st_rdev));
++ ioctl(launcher->tty, VT_ACTIVATE, vt);
++ ioctl(launcher->tty, VT_WAITACTIVE, vt);
+
+ if (ioctl(launcher->tty, KDGKBMODE, &launcher->kb_mode)) {
+ weston_log("failed to read keyboard mode: %m\n");
+ goto err_close;
+ }
+
+- if (ioctl(launcher->tty, KDSKBMUTE, 1) &&
+- ioctl(launcher->tty, KDSKBMODE, K_OFF)) {
+- weston_log("failed to set K_OFF keyboard mode: %m\n");
++ if (ioctl(launcher->tty, KDSKBMODE, K_RAW) == -1) {
++ weston_log("Could not set keyboard mode to K_RAW");
++ goto err_close;
++ }
++
++ /* Put the tty into raw mode */
++ struct termios tios;
++ if (tcgetattr(launcher->tty, &tios)) {
++ weston_log("Failed to get terminal attribute");
++ goto err_close;
++ }
++ cfmakeraw(&tios);
++ if (tcsetattr(launcher->tty, TCSAFLUSH, &tios)) {
++ weston_log("Failed to set terminal attribute");
+ goto err_close;
+ }
+
+@@ -183,10 +208,10 @@ setup_tty(struct launcher_direct *launch
+ ret = -EINVAL;
+ goto err_close;
+ }
+-
+ mode.mode = VT_PROCESS;
+- mode.relsig = SIGRTMIN;
++ mode.relsig = SIGRTMAX;
+ mode.acqsig = SIGRTMIN;
++ mode.frsig = SIGIO; /* not used, but has to be set anyway */
+ if (ioctl(launcher->tty, VT_SETMODE, &mode) < 0) {
+ weston_log("failed to take control of vt handling\n");
+ goto err_close;
+@@ -221,13 +246,11 @@ launcher_direct_open(struct weston_launc
+ return -1;
+ }
+
+- if (major(s.st_rdev) == DRM_MAJOR) {
+- launcher->drm_fd = fd;
+- if (!is_drm_master(fd)) {
+- weston_log("drm fd not master\n");
+- close(fd);
+- return -1;
+- }
++ launcher->drm_fd = fd;
++ if (!is_drm_master(fd)) {
++ weston_log("drm fd not master\n");
++ close(fd);
++ return -1;
+ }
+
+ return fd;
+@@ -245,13 +268,22 @@ launcher_direct_restore(struct weston_la
+ struct launcher_direct *launcher = wl_container_of(launcher_base, launcher, base);
+ struct vt_mode mode = { 0 };
+
+- if (ioctl(launcher->tty, KDSKBMUTE, 0) &&
+- ioctl(launcher->tty, KDSKBMODE, launcher->kb_mode))
++ if (ioctl(launcher->tty, KDSKBMODE, launcher->kb_mode))
+ weston_log("failed to restore kb mode: %m\n");
+
+ if (ioctl(launcher->tty, KDSETMODE, KD_TEXT))
+ weston_log("failed to set KD_TEXT mode on tty: %m\n");
+
++ /* Restore sane mode */
++ struct termios tios;
++ if (tcgetattr(launcher->tty, &tios)) {
++ weston_log("Failed to get terminal attribute");
++ } else {
++ cfmakesane(&tios);
++ if (tcsetattr(launcher->tty, TCSAFLUSH, &tios)) {
++ weston_log("Failed to set terminal attribute");
++ }
++ }
+ /* We have to drop master before we switch the VT back in
+ * VT_AUTO, so we don't risk switching to a VT with another
+ * display server, that will then fail to set drm master. */
Index: x11-wm/weston/files/patch-libweston_launcher-weston-launch.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_launcher-weston-launch.c
@@ -0,0 +1,87 @@
+--- libweston/launcher-weston-launch.c.orig 2017-02-14 20:59:07 UTC
++++ libweston/launcher-weston-launch.c
+@@ -40,19 +40,29 @@
+ #include <sys/ioctl.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+-#include <linux/vt.h>
+-#include <linux/kd.h>
+-#include <linux/major.h>
++
++#include <termios.h>
++#include <sys/consio.h>
++#include <sys/kbio.h>
++#define TTY_BASENAME "/dev/ttyv"
++#define TTY_0 "/dev/ttyv0"
++
++/* #include <linux/kd.h> */
++/* #include <linux/major.h> */
++/* #include <linux/vt.h> */
++/* #define TTY_BASENAME "/dev/tty" */
++/* #define TTY_0 "/dev/tty0" */
++
+
+ #include "compositor.h"
+ #include "weston-launch.h"
+ #include "launcher-impl.h"
+
+-#define DRM_MAJOR 226
++/* #define DRM_MAJOR 226 */
+
+-#ifndef KDSKBMUTE
+-#define KDSKBMUTE 0x4B51
+-#endif
++/* #ifndef KDSKBMUTE */
++/* #define KDSKBMUTE 0x4B51 */
++/* #endif */
+
+ #ifdef HAVE_LIBDRM
+
+@@ -151,22 +161,35 @@ launcher_weston_launch_open(struct westo
+ static void
+ launcher_weston_launch_close(struct weston_launcher *launcher_base, int fd)
+ {
++ weston_log("%s: fd %d\n",__func__,fd);
+ close(fd);
+ }
+
+ static void
+ launcher_weston_launch_restore(struct weston_launcher *launcher_base)
+ {
++ weston_log("%s\n",__func__);
+ struct launcher_weston_launch *launcher = wl_container_of(launcher_base, launcher, base);
+ struct vt_mode mode = { 0 };
+
+- if (ioctl(launcher->tty, KDSKBMUTE, 0) &&
++ if (/*ioctl(launcher->tty, KDSKBMUTE, 0) &&*/
+ ioctl(launcher->tty, KDSKBMODE, launcher->kb_mode))
+ weston_log("failed to restore kb mode: %m\n");
+
+ if (ioctl(launcher->tty, KDSETMODE, KD_TEXT))
+ weston_log("failed to set KD_TEXT mode on tty: %m\n");
+
++ /* Restore sane mode */
++ struct termios tios;
++ if (tcgetattr(launcher->tty, &tios)) {
++ weston_log("Failed to get terminal attribute\n");
++ } else {
++ cfmakesane(&tios);
++ if (tcsetattr(launcher->tty, TCSAFLUSH, &tios)) {
++ weston_log("Failed to set terminal attribute\n");
++ }
++ }
++
+ /* We have to drop master before we switch the VT back in
+ * VT_AUTO, so we don't risk switching to a VT with another
+ * display server, that will then fail to set drm master. */
+@@ -243,7 +266,9 @@ launcher_weston_launch_connect(struct we
+ /* We don't get a chance to read out the original kb
+ * mode for the tty, so just hard code K_UNICODE here
+ * in case we have to clean if weston-launch dies. */
+- launcher->kb_mode = K_UNICODE;
++
++ launcher->kb_mode = K_XLATE;
++ /* launcher->kb_mode = K_UNICODE; */
+
+ loop = wl_display_get_event_loop(compositor->wl_display);
+ launcher->source = wl_event_loop_add_fd(loop, launcher->fd,
Index: x11-wm/weston/files/patch-libweston_libbacklight.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_libbacklight.c
@@ -0,0 +1,16 @@
+--- libweston/libbacklight.c.orig 2016-10-22 16:23:57 UTC
++++ libweston/libbacklight.c
+@@ -36,11 +36,11 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+-#include <linux/types.h>
++/* #include <linux/types.h> */
+ #include <dirent.h>
+ #include <drm.h>
+ #include <fcntl.h>
+-#include <malloc.h>
++/* #include <malloc.h> */
+ #include <string.h>
+ #include <errno.h>
+
Index: x11-wm/weston/files/patch-libweston_libinput-device.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_libinput-device.c
@@ -0,0 +1,18 @@
+--- libweston/libinput-device.c.orig 2016-10-22 16:23:57 UTC
++++ libweston/libinput-device.c
+@@ -538,6 +538,7 @@ struct evdev_device *
+ evdev_device_create(struct libinput_device *libinput_device,
+ struct weston_seat *seat)
+ {
++ printf("%s\n",__func__);
+ struct evdev_device *device;
+
+ device = zalloc(sizeof *device);
+@@ -573,6 +574,7 @@ evdev_device_create(struct libinput_devi
+ void
+ evdev_device_destroy(struct evdev_device *device)
+ {
++ printf("%s\n",__func__);
+ if (device->seat_caps & EVDEV_SEAT_POINTER)
+ weston_seat_release_pointer(device->seat);
+ if (device->seat_caps & EVDEV_SEAT_KEYBOARD)
Index: x11-wm/weston/files/patch-libweston_libinput-seat.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_libinput-seat.c
@@ -0,0 +1,58 @@
+--- libweston/libinput-seat.c.orig 2016-11-20 21:46:09 UTC
++++ libweston/libinput-seat.c
+@@ -114,6 +114,7 @@ device_removed(struct udev_input *input,
+ {
+ struct evdev_device *device;
+
++ printf("%s\n",__func__);
+ device = libinput_device_get_user_data(libinput_device);
+ evdev_device_destroy(device);
+ }
+@@ -131,9 +132,11 @@ udev_seat_remove_devices(struct udev_sea
+ void
+ udev_input_disable(struct udev_input *input)
+ {
++ printf("%s\n",__func__);
+ if (input->suspended)
+ return;
+
++ printf("%s\n",__func__);
+ libinput_suspend(input->libinput);
+ process_events(input);
+ input->suspended = 1;
+@@ -142,6 +145,7 @@ udev_input_disable(struct udev_input *in
+ static int
+ udev_input_process_event(struct libinput_event *event)
+ {
++ /* printf("%s\n",__func__); */
+ struct libinput *libinput = libinput_event_get_context(event);
+ struct libinput_device *libinput_device =
+ libinput_event_get_device(event);
+@@ -150,9 +154,11 @@ udev_input_process_event(struct libinput
+
+ switch (libinput_event_get_type(event)) {
+ case LIBINPUT_EVENT_DEVICE_ADDED:
++ printf("%s: Device added\n",__func__);
+ device_added(input, libinput_device);
+ break;
+ case LIBINPUT_EVENT_DEVICE_REMOVED:
++ printf("%s: Device removed\n",__func__);
+ device_removed(input, libinput_device);
+ break;
+ default:
+@@ -177,6 +183,7 @@ process_events(struct udev_input *input)
+ struct libinput_event *event;
+
+ while ((event = libinput_get_event(input->libinput))) {
++ /* printf("%s\n",__func__); */
+ process_event(event);
+ libinput_event_destroy(event);
+ }
+@@ -227,6 +234,7 @@ const struct libinput_interface libinput
+ int
+ udev_input_enable(struct udev_input *input)
+ {
++ printf("%s\n",__func__);
+ struct wl_event_loop *loop;
+ struct weston_compositor *c = input->compositor;
+ int fd;
Index: x11-wm/weston/files/patch-libweston_timeline.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_timeline.c
@@ -0,0 +1,16 @@
+--- libweston/timeline.c.orig 2016-10-22 16:23:57 UTC
++++ libweston/timeline.c
+@@ -1,3 +1,4 @@
++
+ /*
+ * Copyright © 2014 Pekka Paalanen <pq@iki.fi>
+ * Copyright © 2014 Collabora, Ltd.
+@@ -36,6 +37,8 @@
+ #include "compositor.h"
+ #include "file-util.h"
+
++#define ETIME ETIMEDOUT
++
+ struct timeline_log {
+ clock_t clk_id;
+ FILE *file;
Index: x11-wm/weston/files/patch-libweston_weston-launch.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-libweston_weston-launch.c
@@ -0,0 +1,320 @@
+--- libweston/weston-launch.c.orig 2016-10-22 16:23:57 UTC
++++ libweston/weston-launch.c
+@@ -33,7 +33,6 @@
+ #include <poll.h>
+ #include <errno.h>
+
+-#include <error.h>
+ #include <getopt.h>
+
+ #include <sys/types.h>
+@@ -46,9 +45,34 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+
+-#include <linux/vt.h>
+-#include <linux/major.h>
+-#include <linux/kd.h>
++#include <termios.h>
++#include <sys/consio.h>
++#include <sys/kbio.h>
++#define TTY_BASENAME "/dev/ttyv"
++#define TTY_0 "/dev/ttyv0"
++#define error(s,e,...) \
++ do { \
++ if(e) \
++ fprintf(stderr, "errno: %s\n",strerror(e)); \
++ fprintf(stderr, __VA_ARGS__); \
++ fprintf(stderr, "\n"); \
++ if (s != 0) { \
++ exit(-1); \
++ } \
++ } while(false)
++static inline int clearenv(void) {
++ extern char **environ;
++ environ[0] = NULL;
++ return 0;
++}
++
++/* #include <error.h> */
++/* #include <linux/kd.h> */
++/* #include <linux/major.h> */
++/* #include <linux/vt.h> */
++/* #define TTY_BASENAME "/dev/tty" */
++/* #define TTY_0 "/dev/tty0" */
++
+
+ #include <pwd.h>
+ #include <grp.h>
+@@ -60,11 +84,12 @@
+
+ #include "weston-launch.h"
+
+-#define DRM_MAJOR 226
+
+-#ifndef KDSKBMUTE
+-#define KDSKBMUTE 0x4B51
+-#endif
++/* #define DRM_MAJOR 226 */
++
++/* #ifndef KDSKBMUTE */
++/* #define KDSKBMUTE 0x4B51 */
++/* #endif */
+
+ #ifndef EVIOCREVOKE
+ #define EVIOCREVOKE _IOW('E', 0x91, int)
+@@ -142,7 +167,7 @@ weston_launch_allowed(struct weston_laun
+ {
+ struct group *gr;
+ gid_t *groups;
+- int i;
++ int i,n;
+ #ifdef HAVE_SYSTEMD_LOGIN
+ char *session, *seat;
+ int err;
+@@ -155,7 +180,8 @@ weston_launch_allowed(struct weston_laun
+ if (gr) {
+ groups = read_groups();
+ if (groups) {
+- for (i = 0; groups[i]; ++i) {
++ n = getgroups(0, NULL);
++ for (i = 0; i<n; ++i) {
+ if (groups[i] == gr->gr_gid) {
+ free(groups);
+ return true;
+@@ -322,14 +348,14 @@ handle_open(struct weston_launch *wl, st
+ goto err0;
+ }
+
+- if (major(s.st_rdev) != INPUT_MAJOR &&
+- major(s.st_rdev) != DRM_MAJOR) {
+- close(fd);
+- fd = -1;
+- fprintf(stderr, "Device %s is not an input or drm device\n",
+- message->path);
+- goto err0;
+- }
++ /* if (major(s.st_rdev) != INPUT_MAJOR && */
++ /* major(s.st_rdev) != DRM_MAJOR) { */
++ /* close(fd); */
++ /* fd = -1; */
++ /* fprintf(stderr, "Device %s is not an input or drm device\n", */
++ /* message->path); */
++ /* goto err0; */
++ /* } */
+
+ err0:
+ memset(&nmsg, 0, sizeof nmsg);
+@@ -350,8 +376,8 @@ err0:
+ iov.iov_base = &ret;
+ iov.iov_len = sizeof ret;
+
+- if (wl->verbose)
+- fprintf(stderr, "weston-launch: opened %s: ret: %d, fd: %d\n",
++ /* if (wl->verbose) */
++ printf("weston-launch: opened %s: ret: %d, fd: %d\n",
+ message->path, ret, fd);
+ do {
+ len = sendmsg(wl->sock[0], &nmsg, 0);
+@@ -360,10 +386,9 @@ err0:
+ if (len < 0)
+ return -1;
+
+- if (fd != -1 && major(s.st_rdev) == DRM_MAJOR)
++ if (fd != -1)
+ wl->drm_fd = fd;
+- if (fd != -1 && major(s.st_rdev) == INPUT_MAJOR &&
+- wl->last_input_fd < fd)
++ if (fd != -1 && wl->last_input_fd < fd)
+ wl->last_input_fd = fd;
+
+ return 0;
+@@ -422,9 +447,18 @@ quit(struct weston_launch *wl, int statu
+ pam_end(wl->ph, err);
+ }
+
+- if (ioctl(wl->tty, KDSKBMUTE, 0) &&
+- ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
+- fprintf(stderr, "failed to restore keyboard mode: %m\n");
++ /* if (ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) */
++ if (ioctl(wl->tty, KDSKBMODE, K_XLATE))
++ fprintf(stderr, "Could not restore keyboard\n");
++
++ struct termios tios;
++ if (tcgetattr(wl->tty, &tios)) {
++ fprintf(stderr, "Failed to get terminal attribute\n");
++ } else {
++ cfmakesane(&tios);
++ if (tcsetattr(wl->tty , TCSAFLUSH, &tios))
++ fprintf(stderr, "Failed to set terminal attribute\n");
++ }
+
+ if (ioctl(wl->tty, KDSETMODE, KD_TEXT))
+ fprintf(stderr, "failed to set KD_TEXT mode on tty: %m\n");
+@@ -435,6 +469,7 @@ quit(struct weston_launch *wl, int statu
+ drmDropMaster(wl->drm_fd);
+
+ mode.mode = VT_AUTO;
++ mode.frsig = SIGIO; /* not used, but has to be set anyway */
+ if (ioctl(wl->tty, VT_SETMODE, &mode) < 0)
+ fprintf(stderr, "could not reset vt handling\n");
+
+@@ -444,15 +479,25 @@ quit(struct weston_launch *wl, int statu
+ static void
+ close_input_fds(struct weston_launch *wl)
+ {
++ // Input device are being closed by: launcher_weston_launch_close()
++ // on exit or deactivate.
++ // This function will close the wayland socket fd as well
++ // and crash the program...
++
++ // Do we need this function?
++
+ struct stat s;
+ int fd;
+
+ for (fd = 3; fd <= wl->last_input_fd; fd++) {
+- if (fstat(fd, &s) == 0 && major(s.st_rdev) == INPUT_MAJOR) {
++ if (fstat(fd, &s) == 0) {
+ /* EVIOCREVOKE may fail if the kernel doesn't
+ * support it, but all we can do is ignore it. */
++ printf("%s: Closing fd %d\n",__func__,fd);
+ ioctl(fd, EVIOCREVOKE, 0);
+ close(fd);
++ } else {
++ fprintf(stderr,"%s: stat failed on fd %d\n",__func__,fd);
+ }
+ }
+ }
+@@ -460,16 +505,22 @@ close_input_fds(struct weston_launch *wl
+ static int
+ handle_signal(struct weston_launch *wl)
+ {
++ printf("%s\n",__func__);
++
+ struct signalfd_siginfo sig;
+ int pid, status, ret;
+
+- if (read(wl->signalfd, &sig, sizeof sig) != sizeof sig) {
+- error(0, errno, "reading signalfd failed");
++ ret = read(wl->signalfd, &sig, sizeof sig);
++ if (ret != sizeof sig) {
++ error(0, errno, "reading signalfd %d failed", wl->signalfd);
++ // Temporary add delay here so we don't get spammed with error messages
++ usleep(500000);
+ return -1;
+ }
+
+ switch (sig.ssi_signo) {
+ case SIGCHLD:
++ printf("%s: SIGCHLD\n",__func__);
+ pid = waitpid(-1, &status, 0);
+ if (pid == wl->child) {
+ wl->child = 0;
+@@ -489,22 +540,32 @@ handle_signal(struct weston_launch *wl)
+ }
+ break;
+ case SIGTERM:
++ printf("%s: SIGTERM - killing\n",__func__);
+ case SIGINT:
++ printf("%s: SIGINT - killing\n",__func__);
+ if (wl->child)
+ kill(wl->child, sig.ssi_signo);
+ break;
+ case SIGUSR1:
++ printf("%s: SIGUSR1 - deactivating\n",__func__);
+ send_reply(wl, WESTON_LAUNCHER_DEACTIVATE);
+- close_input_fds(wl);
++
++ // This is done in launcher-weston-launcher.c,
++ // compositor-drm.c (session-notify)
++ // Double close = crash on vt switch (socket also get closed)
++ /* close_input_fds(wl); */
++
+ drmDropMaster(wl->drm_fd);
+ ioctl(wl->tty, VT_RELDISP, 1);
+ break;
+ case SIGUSR2:
++ printf("%s: SIGUSR2 - activating\n",__func__);
+ ioctl(wl->tty, VT_RELDISP, VT_ACKACQ);
+ drmSetMaster(wl->drm_fd);
+ send_reply(wl, WESTON_LAUNCHER_ACTIVATE);
+ break;
+ default:
++ printf("%s: Unknown signal\n",__func__);
+ return -1;
+ }
+
+@@ -527,7 +588,7 @@ setup_tty(struct weston_launch *wl, cons
+ else
+ wl->tty = open(tty, O_RDWR | O_NOCTTY);
+ } else {
+- int tty0 = open("/dev/tty0", O_WRONLY | O_CLOEXEC);
++ int tty0 = open(TTY_0, O_WRONLY | O_CLOEXEC);
+ char filename[16];
+
+ if (tty0 < 0)
+@@ -536,7 +597,7 @@ setup_tty(struct weston_launch *wl, cons
+ if (ioctl(tty0, VT_OPENQRY, &wl->ttynr) < 0 || wl->ttynr == -1)
+ error(1, errno, "failed to find non-opened console");
+
+- snprintf(filename, sizeof filename, "/dev/tty%d", wl->ttynr);
++ snprintf(filename, sizeof filename, "%s%d", TTY_BASENAME, wl->ttynr);
+ wl->tty = open(filename, O_RDWR | O_NOCTTY);
+ close(tty0);
+ }
+@@ -544,26 +605,26 @@ setup_tty(struct weston_launch *wl, cons
+ if (wl->tty < 0)
+ error(1, errno, "failed to open tty");
+
+- if (fstat(wl->tty, &buf) == -1 ||
+- major(buf.st_rdev) != TTY_MAJOR || minor(buf.st_rdev) == 0)
+- error(1, 0, "weston-launch must be run from a virtual terminal");
+-
+ if (tty) {
+ if (fstat(wl->tty, &buf) < 0)
+ error(1, errno, "stat %s failed", tty);
+
+- if (major(buf.st_rdev) != TTY_MAJOR)
+- error(1, 0, "invalid tty device: %s", tty);
+-
+- wl->ttynr = minor(buf.st_rdev);
++ if(ioctl(wl->tty, VT_GETINDEX, &wl->ttynr))
++ error(1, errno, "failed to get vt index for tty %s", tty);
+ }
+
+ if (ioctl(wl->tty, KDGKBMODE, &wl->kb_mode))
+ error(1, errno, "failed to get current keyboard mode: %m\n");
+
+- if (ioctl(wl->tty, KDSKBMUTE, 1) &&
+- ioctl(wl->tty, KDSKBMODE, K_OFF))
+- error(1, errno, "failed to set K_OFF keyboard mode: %m\n");
++ if (ioctl(wl->tty, KDSKBMODE, K_RAW) == -1)
++ error(1, errno, "Could not set keyboard mode to K_RAW\n");
++
++ struct termios tios;
++ if (tcgetattr(wl->tty, &tios))
++ error(1, errno, "Failed to get terminal attribute %m\n");
++ cfmakeraw(&tios);
++ if (tcsetattr(wl->tty , TCSAFLUSH, &tios))
++ error(1, errno, "Failed to set terminal attribute %m\n");
+
+ if (ioctl(wl->tty, KDSETMODE, KD_GRAPHICS))
+ error(1, errno, "failed to set KD_GRAPHICS mode on tty: %m\n");
+@@ -571,6 +632,7 @@ setup_tty(struct weston_launch *wl, cons
+ mode.mode = VT_PROCESS;
+ mode.relsig = SIGUSR1;
+ mode.acqsig = SIGUSR2;
++ mode.frsig = SIGIO; /* not used, but has to be set anyway */
+ if (ioctl(wl->tty, VT_SETMODE, &mode) < 0)
+ error(1, errno, "failed to take control of vt handling\n");
+
+@@ -735,7 +797,7 @@ main(int argc, char *argv[])
+ #else
+ " - enable systemd session support for weston-launch.\n"
+ #endif
+- " - or add yourself to the 'weston-launch' group.");
++ " - or add yourself to the 'weston-launch' group.\n");
+
+ if (setup_tty(&wl, tty) < 0)
+ exit(EXIT_FAILURE);
Index: x11-wm/weston/files/patch-shared_file-util.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-shared_file-util.c
@@ -0,0 +1,11 @@
+--- shared/file-util.c.orig 2015-10-24 00:02:43 UTC
++++ shared/file-util.c
+@@ -34,6 +34,8 @@
+
+ #include "file-util.h"
+
++#define ETIME ETIMEDOUT
++
+ static int
+ current_time_str(char *str, size_t len, const char *fmt)
+ {
Index: x11-wm/weston/files/patch-shared_string-helpers.h
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-shared_string-helpers.h
@@ -0,0 +1,10 @@
+--- shared/string-helpers.h.orig 2016-11-20 21:46:09 UTC
++++ shared/string-helpers.h
+@@ -31,6 +31,7 @@
+ #include <stdint.h>
+ #include <errno.h>
+ #include <assert.h>
++#include <unistd.h>
+
+ /* Convert string to integer
+ *
Index: x11-wm/weston/files/patch-shared_xalloc.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-shared_xalloc.c
@@ -0,0 +1,11 @@
+--- shared/xalloc.c.orig 2016-10-22 16:23:57 UTC
++++ shared/xalloc.c
+@@ -32,6 +32,8 @@
+
+ #include "xalloc.h"
+
++#define program_invocation_short_name getprogname()
++
+ void *
+ fail_on_null(void *p, size_t size, char *file, int32_t line)
+ {
Index: x11-wm/weston/files/patch-tests_surface-screenshot.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-tests_surface-screenshot.c
@@ -0,0 +1,11 @@
+--- tests/surface-screenshot.c.orig 2017-01-19 01:41:20 UTC
++++ tests/surface-screenshot.c
+@@ -37,6 +37,8 @@
+ #include "compositor/weston.h"
+ #include "file-util.h"
+
++#define ETIME ETIMEDOUT
++
+ static char *
+ encode_PAM_comment_line(const char *comment)
+ {
Index: x11-wm/weston/files/patch-tests_weston-test-runner.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-tests_weston-test-runner.c
@@ -0,0 +1,11 @@
+--- tests/weston-test-runner.c.orig 2017-02-07 22:58:35 UTC
++++ tests/weston-test-runner.c
+@@ -38,6 +38,8 @@
+
+ #define SKIP 77
+
++#define program_invocation_short_name getprogname()
++
+ char __attribute__((weak)) *server_parameters="";
+
+ extern const struct weston_test __start_test_section, __stop_test_section;
Index: x11-wm/weston/files/patch-tools_zunitc_src_zunitc__impl.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-tools_zunitc_src_zunitc__impl.c
@@ -0,0 +1,10 @@
+--- tools/zunitc/src/zunitc_impl.c.orig 2016-08-10 22:56:50 UTC
++++ tools/zunitc/src/zunitc_impl.c
+@@ -36,6 +36,7 @@
+ #include <sys/wait.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <signal.h>
+
+ #include "zunitc/zunitc_impl.h"
+ #include "zunitc/zunitc.h"
Index: x11-wm/weston/files/patch-xwayland_launcher.c
===================================================================
--- /dev/null
+++ x11-wm/weston/files/patch-xwayland_launcher.c
@@ -0,0 +1,58 @@
+--- xwayland/launcher.c.orig 2017-01-19 01:41:20 UTC
++++ xwayland/launcher.c
+@@ -42,6 +42,10 @@
+ #include "shared/string-helpers.h"
+ #include "compositor/weston.h"
+
++#define LOCK_FMT "/tmp/.X%d-lock"
++#define SOCKET_FMT "/tmp/.X11-unix/X%d"
++#define SOCKET2_FMT "/tmp/.X11-unix/X%d_"
++
+ static int
+ weston_xserver_handle_event(int listen_fd, uint32_t mask, void *data)
+ {
+@@ -68,9 +72,11 @@ weston_xserver_shutdown(struct weston_xs
+ {
+ char path[256];
+
+- snprintf(path, sizeof path, "/tmp/.X%d-lock", wxs->display);
++ snprintf(path, sizeof path, LOCK_FMT, wxs->display);
+ unlink(path);
+- snprintf(path, sizeof path, "/tmp/.X11-unix/X%d", wxs->display);
++ snprintf(path, sizeof path, SOCKET_FMT, wxs->display);
++ unlink(path);
++ snprintf(path, sizeof path, SOCKET2_FMT, wxs->display);
+ unlink(path);
+ if (wxs->pid == 0) {
+ wl_event_source_remove(wxs->abstract_source);
+@@ -98,10 +104,10 @@ bind_to_abstract_socket(int display)
+
+ addr.sun_family = AF_LOCAL;
+ name_size = snprintf(addr.sun_path, sizeof addr.sun_path,
+- "%c/tmp/.X11-unix/X%d", 0, display);
++ SOCKET2_FMT, display);
+ size = offsetof(struct sockaddr_un, sun_path) + name_size;
+ if (bind(fd, (struct sockaddr *) &addr, size) < 0) {
+- weston_log("failed to bind to @%s: %m\n", addr.sun_path + 1);
++ weston_log("failed to bind to '%s'\n", addr.sun_path);
+ close(fd);
+ return -1;
+ }
+@@ -127,7 +133,7 @@ bind_to_unix_socket(int display)
+
+ addr.sun_family = AF_LOCAL;
+ name_size = snprintf(addr.sun_path, sizeof addr.sun_path,
+- "/tmp/.X11-unix/X%d", display) + 1;
++ SOCKET_FMT, display);
+ size = offsetof(struct sockaddr_un, sun_path) + name_size;
+ unlink(addr.sun_path);
+ if (bind(fd, (struct sockaddr *) &addr, size) < 0) {
+@@ -154,7 +160,7 @@ create_lockfile(int display, char *lockf
+ int fd, size;
+ pid_t other;
+
+- snprintf(lockfile, lsize, "/tmp/.X%d-lock", display);
++ snprintf(lockfile, lsize, LOCK_FMT, display);
+ fd = open(lockfile, O_WRONLY | O_CLOEXEC | O_CREAT | O_EXCL, 0444);
+ if (fd < 0 && errno == EEXIST) {
+ fd = open(lockfile, O_CLOEXEC | O_RDONLY);
Index: x11-wm/weston/pkg-descr
===================================================================
--- /dev/null
+++ x11-wm/weston/pkg-descr
@@ -0,0 +1,6 @@
+Weston is a reference implementation of a Wayland compositor. Weston can
+run as an X client or under KMS and ships with a few demo clients. The Weston
+compositor is a minimal and fast compositor and is suitable for many embedded
+and mobile use cases
+
+www: http://wayland.freedesktop.org
Index: x11-wm/weston/pkg-plist
===================================================================
--- /dev/null
+++ x11-wm/weston/pkg-plist
@@ -0,0 +1,104 @@
+%%SUID%%@(,,4755) bin/weston-launch
+%%NO_SUID%%bin/weston-launch
+bin/weston
+bin/wcap-decode
+%%CLIENTS_INSTALL%%bin/weston-calibrator
+%%CLIENTS_INSTALL%%bin/weston-clickdot
+%%CLIENTS_INSTALL%%bin/weston-cliptest
+%%CLIENTS_INSTALL%%bin/weston-confine
+%%CLIENTS_INSTALL%%bin/weston-dnd
+%%CLIENTS_INSTALL%%bin/weston-editor
+%%CLIENTS_INSTALL%%bin/weston-eventdemo
+%%CLIENTS_INSTALL%%bin/weston-flower
+%%CLIENTS_INSTALL%%bin/weston-fullscreen
+%%CLIENTS_INSTALL%%bin/weston-image
+%%CLIENTS_INSTALL%%bin/weston-info
+%%CLIENTS_INSTALL%%bin/weston-multi-resource
+%%CLIENTS_INSTALL%%bin/weston-presentation-shm
+%%CLIENTS_INSTALL%%bin/weston-resizor
+%%CLIENTS_INSTALL%%bin/weston-scaler
+%%CLIENTS_INSTALL%%bin/weston-simple-damage
+%%CLIENTS_INSTALL%%bin/weston-simple-dmabuf-intel
+%%CLIENTS_INSTALL%%bin/weston-simple-dmabuf-v4l
+%%CLIENTS_INSTALL%%bin/weston-simple-egl
+%%CLIENTS_INSTALL%%bin/weston-simple-shm
+%%CLIENTS_INSTALL%%bin/weston-simple-touch
+%%CLIENTS_INSTALL%%bin/weston-smoke
+%%CLIENTS_INSTALL%%bin/weston-stacking
+%%CLIENTS_INSTALL%%bin/weston-subsurfaces
+%%CLIENTS_INSTALL%%bin/weston-terminal
+%%CLIENTS_INSTALL%%bin/weston-transformed
+%%DRM%%include/libweston-2/compositor-drm.h
+include/libweston-2/compositor-fbdev.h
+include/libweston-2/compositor-headless.h
+include/libweston-2/compositor-rdp.h
+%%SCFB%%include/libweston-2/compositor-scfb.h
+%%WAYLAND%%include/libweston-2/compositor-wayland.h
+%%X11%%include/libweston-2/compositor-x11.h
+include/libweston-2/compositor.h
+include/libweston-2/config-parser.h
+include/libweston-2/libweston-desktop.h
+include/libweston-2/matrix.h
+include/libweston-2/plugin-registry.h
+include/libweston-2/timeline-object.h
+include/libweston-2/version.h
+include/libweston-2/windowed-output-api.h
+%%XWAYLAND%%include/libweston-2/xwayland-api.h
+include/libweston-2/zalloc.h
+include/weston/ivi-layout-export.h
+include/weston/weston.h
+lib/libweston-2.so
+lib/libweston-2.so.0
+lib/libweston-2.so.0.0.0
+%%DRM%%lib/libweston-2/drm-backend.so
+lib/libweston-2/gl-renderer.so
+lib/libweston-2/headless-backend.so
+%%SCFB%%lib/libweston-2/scfb-backend.so
+%%WAYLAND%%lib/libweston-2/wayland-backend.so
+%%X11%%lib/libweston-2/x11-backend.so
+%%XWAYLAND%%lib/libweston-2/xwayland.so
+lib/libweston-desktop-2.so
+lib/libweston-desktop-2.so.0
+lib/libweston-desktop-2.so.0.0.0
+lib/weston/cms-colord.so
+lib/weston/cms-static.so
+lib/weston/desktop-shell.so
+lib/weston/fullscreen-shell.so
+lib/weston/hmi-controller.so
+lib/weston/ivi-shell.so
+libdata/pkgconfig/libweston-2.pc
+libdata/pkgconfig/libweston-desktop-2.pc
+libdata/pkgconfig/weston.pc
+libexec/weston-desktop-shell
+libexec/weston-ivi-shell-user-interface
+libexec/weston-keyboard
+libexec/weston-screenshooter
+libexec/weston-simple-im
+man/man1/weston.1.gz
+man/man5/weston.ini.5.gz
+%%DRM%%man/man7/weston-drm.7.gz
+share/wayland-sessions/weston.desktop
+%%DATADIR%%/background.png
+%%DATADIR%%/border.png
+%%DATADIR%%/fullscreen.png
+%%DATADIR%%/home.png
+%%DATADIR%%/icon_editor.png
+%%DATADIR%%/icon_flower.png
+%%DATADIR%%/icon_ivi_clickdot.png
+%%DATADIR%%/icon_ivi_flower.png
+%%DATADIR%%/icon_ivi_simple-egl.png
+%%DATADIR%%/icon_ivi_simple-shm.png
+%%DATADIR%%/icon_ivi_smoke.png
+%%DATADIR%%/icon_terminal.png
+%%DATADIR%%/icon_window.png
+%%DATADIR%%/panel.png
+%%DATADIR%%/pattern.png
+%%DATADIR%%/random.png
+%%DATADIR%%/sidebyside.png
+%%DATADIR%%/sign_close.png
+%%DATADIR%%/sign_maximize.png
+%%DATADIR%%/sign_minimize.png
+%%DATADIR%%/terminal.png
+%%DATADIR%%/tiling.png
+%%DATADIR%%/wayland.png
+%%DATADIR%%/wayland.svg
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 21, 4:55 AM (6 h, 38 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27107521
Default Alt Text
D10599.id29075.diff (78 KB)
Attached To
Mode
D10599: Add x11-wm/weston port
Attached
Detach File
Event Timeline
Log In to Comment