summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/window-managers/weston
diff options
context:
space:
mode:
authorCarles Pagès <page@cubata.homelinux.net>2012-12-07 12:10:14 +0100
committerCarles Pagès <page@cubata.homelinux.net>2012-12-07 12:10:14 +0100
commitec99d9603c59a2c9b21ee7e7dcf687f603217c74 (patch)
tree7f19777c580b2ddf91996945b51f5bf268641f7d /pkgs/applications/window-managers/weston
parentb60d016a0ad58566381dd331c75a83dd8914fbd0 (diff)
Weston: add patches to fix the build.
The patches fix two issues: - screenshooter-client-protocol.h missing from tarball - missing flags for include paths and definitions I had to add auto* as inputs to be able to call autoreconf, as one patch modifies a Makefile.am. Both issues are already reported upstream.
Diffstat (limited to 'pkgs/applications/window-managers/weston')
-rw-r--r--pkgs/applications/window-managers/weston/default.nix11
-rw-r--r--pkgs/applications/window-managers/weston/makefile.patch45
-rw-r--r--pkgs/applications/window-managers/weston/screenshooter-client-protocol_h.patch72
3 files changed, 126 insertions, 2 deletions
diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix
index ddc4020d5480..ffd7c241ee4c 100644
--- a/pkgs/applications/window-managers/weston/default.nix
+++ b/pkgs/applications/window-managers/weston/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, wayland, mesa90x, libxkbcommon, pixman
, cairo, libxcb, libXcursor, x11, udev, libdrm2_4_39, mtdev
-, libjpeg, pam }:
+, libjpeg, pam, autoconf, automake, libtool }:
let version = "1.0.2"; in
@@ -12,9 +12,16 @@ stdenv.mkDerivation rec {
sha256 = "1496l8hmpxx7pivdpp14pv0hi30q18dmnaxz471v9jiqsnnrr11k";
};
+ patches = [
+ ./screenshooter-client-protocol_h.patch
+ ./makefile.patch
+ ];
+
buildInputs = [ pkgconfig wayland mesa90x libxkbcommon pixman
cairo libxcb libXcursor x11 udev libdrm2_4_39 mtdev
- libjpeg pam ];
+ libjpeg pam autoconf automake libtool ];
+
+ preConfigure = "autoreconf -vfi";
meta = {
description = "Reference implementation of a Wayland compositor";
diff --git a/pkgs/applications/window-managers/weston/makefile.patch b/pkgs/applications/window-managers/weston/makefile.patch
new file mode 100644
index 000000000000..1d6276d40914
--- /dev/null
+++ b/pkgs/applications/window-managers/weston/makefile.patch
@@ -0,0 +1,45 @@
+diff --git a/clients/Makefile.am b/clients/Makefile.am
+index 81d1b57..fec50af 100644
+--- a/clients/Makefile.am
++++ b/clients/Makefile.am
+@@ -80,6 +80,8 @@ libtoytoolkit_a_SOURCES = \
+ text-cursor-position-client-protocol.h \
+ workspaces-protocol.c \
+ workspaces-client-protocol.h
++libtoytoolkit_a_CPPFLAGS = \
++ $(AM_CPPFLAGS) $(PIXMAN_CFLAGS) $(CAIRO_CFLAGS)
+
+ toolkit_libs = \
+ libtoytoolkit.a \
+@@ -96,6 +98,7 @@ weston_terminal_SOURCES = terminal.c
+ weston_terminal_LDADD = $(toolkit_libs) -lutil
+
+ image_SOURCES = image.c
++image_CPPFLAGS = $(PIXMAN_CFLAGS) $(CAIRO_CFLAGS)
+ image_LDADD = $(toolkit_libs)
+
+ cliptest_SOURCES = cliptest.c
+@@ -103,6 +106,7 @@ cliptest_CPPFLAGS = $(AM_CPPFLAGS) $(PIXMAN_CFLAGS)
+ cliptest_LDADD = $(toolkit_libs) $(PIXMAN_LIBS)
+
+ dnd_SOURCES = dnd.c
++dnd_CPPFLAGS = $(PIXMAN_CFLAGS) $(CAIRO_CFLAGS)
+ dnd_LDADD = $(toolkit_libs)
+
+ smoke_SOURCES = smoke.c
+@@ -141,12 +145,15 @@ weston_desktop_shell_SOURCES = \
+ desktop-shell.c \
+ desktop-shell-client-protocol.h \
+ desktop-shell-protocol.c
++weston_desktop_shell_CPPFLAGS = \
++ $(AM_CPPFLAGS) $(PIXMAN_CFLAGS) $(CAIRO_CFLAGS)
+ weston_desktop_shell_LDADD = $(toolkit_libs)
+
+ weston_tablet_shell_SOURCES = \
+ tablet-shell.c \
+ tablet-shell-client-protocol.h \
+ tablet-shell-protocol.c
++weston_tablet_shell_CPPFLAGS = $(PIXMAN_CFLAGS) $(CAIRO_CFLAGS)
+ weston_tablet_shell_LDADD = $(toolkit_libs)
+
+ BUILT_SOURCES = \
diff --git a/pkgs/applications/window-managers/weston/screenshooter-client-protocol_h.patch b/pkgs/applications/window-managers/weston/screenshooter-client-protocol_h.patch
new file mode 100644
index 000000000000..1f528dcf9d06
--- /dev/null
+++ b/pkgs/applications/window-managers/weston/screenshooter-client-protocol_h.patch
@@ -0,0 +1,72 @@
+diff --git a/clients/screenshooter-client-protocol.h b/clients/screenshooter-client-protocol.h
+new file mode 100644
+index 0000000..8782ca1
+--- /dev/null
++++ b/clients/screenshooter-client-protocol.h
+@@ -0,0 +1,66 @@
++#ifndef SCREENSHOOTER_CLIENT_PROTOCOL_H
++#define SCREENSHOOTER_CLIENT_PROTOCOL_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdint.h>
++#include <stddef.h>
++#include "wayland-client.h"
++
++struct wl_client;
++struct wl_resource;
++
++struct screenshooter;
++
++extern const struct wl_interface screenshooter_interface;
++
++struct screenshooter_listener {
++ /**
++ * done - (none)
++ */
++ void (*done)(void *data,
++ struct screenshooter *screenshooter);
++};
++
++static inline int
++screenshooter_add_listener(struct screenshooter *screenshooter,
++ const struct screenshooter_listener *listener, void *data)
++{
++ return wl_proxy_add_listener((struct wl_proxy *) screenshooter,
++ (void (**)(void)) listener, data);
++}
++
++#define SCREENSHOOTER_SHOOT 0
++
++static inline void
++screenshooter_set_user_data(struct screenshooter *screenshooter, void *user_data)
++{
++ wl_proxy_set_user_data((struct wl_proxy *) screenshooter, user_data);
++}
++
++static inline void *
++screenshooter_get_user_data(struct screenshooter *screenshooter)
++{
++ return wl_proxy_get_user_data((struct wl_proxy *) screenshooter);
++}
++
++static inline void
++screenshooter_destroy(struct screenshooter *screenshooter)
++{
++ wl_proxy_destroy((struct wl_proxy *) screenshooter);
++}
++
++static inline void
++screenshooter_shoot(struct screenshooter *screenshooter, struct wl_output *output, struct wl_buffer *buffer)
++{
++ wl_proxy_marshal((struct wl_proxy *) screenshooter,
++ SCREENSHOOTER_SHOOT, output, buffer);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif