meta-tizen: weston: use Tizen recipe
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Fri, 12 Sep 2014 13:34:38 +0000 (15:34 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 17:22:33 +0000 (09:22 -0800)
Use weston from Tizen since it has some Tizen specific patches.

Note that weston-extraconf.inc is inspired from the weston recipe from
Poky so some configure options aren't the same as the ones found in
weston from Tizen (upstream). Setting exactly the same options as in
Tizen (upstream) ends up in weston not being started at runtime. This
issue is reported as Bug-Tizen: BTY-39.

Also create the user weston-launch inside the weston recipe instead of
the config-tizen-ivi.

Change-Id: I6b29bd62ec6abd7ab27c9362c3cbc10b0eb2d6c8
(From meta-tizen rev: 5464a5d5d3a2e9447d97d7538cee8a01de39b387)

Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
18 files changed:
meta-tizen/conf/layer.conf
meta-tizen/recipes-graphics/wayland/weston/0001-comp-wayland-use-safe-foreach-when-destroying-output.patch [deleted file]
meta-tizen/recipes-graphics/wayland/weston/0001-fix:-missingpanelregressionintroducedbypanelopt.patch [deleted file]
meta-tizen/recipes-graphics/wayland/weston/0002-This-vfunc-lets-us-read-out-a-rectangle-of-pixels-fr.patch [deleted file]
meta-tizen/recipes-graphics/wayland/weston/0003-downstream-allow-to-start-for-system-users.patch [deleted file]
meta-tizen/recipes-graphics/wayland/weston/0004-downstream-shell-make-panel-optional-panel-false-in-.patch [deleted file]
meta-tizen/recipes-graphics/wayland/weston/0005-downstream-Hack-to-allow-selecting-a-default-output.patch [deleted file]
meta-tizen/recipes-graphics/wayland/weston/0006-downstream-accept-the-new-enable-sys-uid-configure-o.patch [deleted file]
meta-tizen/recipes-graphics/wayland/weston/weston.target [deleted file]
meta-tizen/recipes-graphics/wayland/weston_1.5.0.bbappend [deleted file]
meta-tizen/recipes-image/config-tizen-profiles/config-tizen-ivi.bb
meta-tizen/recipes-image/images/tizen-common-core-image-minimal.bb
meta-tizen/recipes-image/images/tizen-core-image-minimal.bb
meta-tizen/recipes-tizen/weston/weston-extraconf.inc [new file with mode: 0644]
meta-tizen/recipes-tizen/weston/weston.inc [new file with mode: 0644]
meta-tizen/recipes-tizen/weston/weston/make-lcms-explicitly-configurable.patch [new file with mode: 0644]
meta-tizen/recipes-tizen/weston/weston/make-libwebp-explicitly-configurable.patch [new file with mode: 0644]
meta-tizen/recipes-tizen/weston/weston_git.bb [new file with mode: 0644]

index e709be6..7826220 100644 (file)
@@ -29,6 +29,8 @@ PREFERRED_VERSION_pam = "git"
 
 DISTRO_FEATURES_remove = " x11"
 DISTRO_FEATURES_append = " wayland"
+# Use weston from Tizen since it contains Tizen specific patches
+PREFERRED_VERSION_weston = "git"
 WESTONSTARTUP ??= "weston-common"
 
 DEPENDS_remove =  "rpmresolve-native"
diff --git a/meta-tizen/recipes-graphics/wayland/weston/0001-comp-wayland-use-safe-foreach-when-destroying-output.patch b/meta-tizen/recipes-graphics/wayland/weston/0001-comp-wayland-use-safe-foreach-when-destroying-output.patch
deleted file mode 100644 (file)
index 19d583d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From: "U. Artie Eoff" <ullysses.a.eoff@intel.com>
-Date: Wed, 21 May 2014 09:20:02 -0700
-Subject: comp-wayland: use safe foreach when destroying outputs
-
-wl_list_for_each dereference's output to increment the
-next iteration of the loop.  However, output is free'd
-inside the loop resulting in a dereference to free'd
-memory.
-
-Use wl_list_for_each_safe instead, which is designed to
-handle this kind of pattern.
-
-Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
-Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
-Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
----
- src/compositor-wayland.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
-index a08b71a..76e5396 100644
---- a/src/compositor-wayland.c
-+++ b/src/compositor-wayland.c
-@@ -1997,9 +1997,9 @@ err_free:
- static void
- wayland_compositor_destroy(struct wayland_compositor *c)
- {
--      struct weston_output *output;
-+      struct weston_output *output, *next;
--      wl_list_for_each(output, &c->base.output_list, link)
-+      wl_list_for_each_safe(output, next, &c->base.output_list, link)
-               wayland_output_destroy(output);
-       c->base.renderer->destroy(&c->base);
diff --git a/meta-tizen/recipes-graphics/wayland/weston/0001-fix:-missingpanelregressionintroducedbypanelopt.patch b/meta-tizen/recipes-graphics/wayland/weston/0001-fix:-missingpanelregressionintroducedbypanelopt.patch
deleted file mode 100644 (file)
index 4942868..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-From beedbb821fe9fd068d7ef7b2bf102516c1f73074 Mon Sep 17 00:00:00 2001
-From: Philippe Coval <philippe.coval@open.eurogiciel.org>
-Date: Wed, 25 Jun 2014 14:14:05 +0200
-Subject: [PATCH] meta-tizen: fix: missing panel regression introduced by panel opt
-
-to be squashed into d733bcef2670f30da232748f09b10eab98d625b8
-
-Change-Id: I63b5860b2d8be106abab1eaf287142e15fef59d9
-Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
----
- clients/desktop-shell.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
-index 161d3ac..1c36b2f 100644
---- a/clients/desktop-shell.c
-+++ b/clients/desktop-shell.c
-@@ -1206,7 +1206,7 @@ static void
- output_init(struct output *output, struct desktop *desktop)
- {
-       struct wl_surface *surface;
--      if(output->panel) {
-+      if(desktop->panel) {
-               output->panel = panel_create(desktop);
-               surface = window_get_wl_surface(output->panel->window);
-               desktop_shell_set_panel(desktop->shell,
--- 
-1.8.1.4
-
diff --git a/meta-tizen/recipes-graphics/wayland/weston/0002-This-vfunc-lets-us-read-out-a-rectangle-of-pixels-fr.patch b/meta-tizen/recipes-graphics/wayland/weston/0002-This-vfunc-lets-us-read-out-a-rectangle-of-pixels-fr.patch
deleted file mode 100644 (file)
index 320ee1f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-From: =?utf-8?q?Kristian_H=C3=B8gsberg?= <krh@bitplanet.net>
-Date: Wed, 29 Jan 2014 15:55:09 +0900
-Subject: This vfunc lets us read out a rectangle of pixels from the currently
- attached surface buffer.
-
-Change-Id: Ia12d01fd0d157654602a2c46dd5874218252dd2f
----
- src/compositor.h  |  3 +++
- src/gl-renderer.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 57 insertions(+)
-
-diff --git a/src/compositor.h b/src/compositor.h
-index 057f8be..d646ebe 100644
---- a/src/compositor.h
-+++ b/src/compositor.h
-@@ -544,6 +544,9 @@ struct weston_renderer {
-                              pixman_format_code_t format, void *pixels,
-                              uint32_t x, uint32_t y,
-                              uint32_t width, uint32_t height);
-+      int (*read_surface_pixels)(struct weston_surface *es,
-+                                 pixman_format_code_t format, void *pixels,
-+                                 int x, int y, int width, int height);
-       void (*repaint_output)(struct weston_output *output,
-                              pixman_region32_t *output_damage);
-       void (*flush_damage)(struct weston_surface *surface);
-diff --git a/src/gl-renderer.c b/src/gl-renderer.c
-index 63af75d..19e2c53 100644
---- a/src/gl-renderer.c
-+++ b/src/gl-renderer.c
-@@ -123,6 +123,8 @@ struct gl_renderer {
-       EGLContext egl_context;
-       EGLConfig egl_config;
-+      GLuint fbo;
-+
-       struct wl_array vertices;
-       struct wl_array vtxcnt;
-@@ -608,6 +610,54 @@ out:
-       pixman_region32_fini(&repaint);
- }
-+static int
-+gl_renderer_read_surface_pixels(struct weston_surface *es,
-+                              pixman_format_code_t format, void *pixels,
-+                              int x, int y, int width, int height)
-+{
-+      struct weston_buffer *buffer = es->buffer_ref.buffer;
-+      struct weston_compositor *ec = es->compositor;
-+      struct gl_renderer *gr = get_renderer(ec);
-+      struct gl_surface_state *gs = get_surface_state(es);
-+      GLenum gl_format;
-+      int size;
-+      struct wl_shm_buffer *shm_buffer = NULL;
-+
-+      switch (format) {
-+      case PIXMAN_a8r8g8b8:
-+              gl_format = GL_BGRA_EXT;
-+              break;
-+      case PIXMAN_a8b8g8r8:
-+              gl_format = GL_RGBA;
-+              break;
-+      default:
-+              return -1;
-+      }
-+
-+        if (buffer) {
-+              shm_buffer = wl_shm_buffer_get(buffer->resource);
-+      }
-+      if (shm_buffer) {
-+              size = buffer->width * 4 * buffer->height;
-+              memcpy(pixels, wl_shm_buffer_get_data(shm_buffer), size);
-+      } else {
-+              if (gr->fbo == 0)
-+                      glGenFramebuffers(1, &gr->fbo);
-+              glBindFramebuffer(GL_FRAMEBUFFER, gr->fbo);
-+              glFramebufferTexture2D(GL_FRAMEBUFFER,
-+                                     GL_COLOR_ATTACHMENT0,
-+                                     GL_TEXTURE_2D,
-+                                     gs->textures[0], 0);
-+
-+              glReadPixels(x, y, width, height,
-+                           gl_format, GL_UNSIGNED_BYTE, pixels);
-+
-+              glBindFramebuffer(GL_FRAMEBUFFER, 0);
-+      }
-+
-+      return 0;
-+}
-+
- static void
- repaint_views(struct weston_output *output, pixman_region32_t *damage)
- {
-@@ -1818,6 +1868,9 @@ gl_renderer_destroy(struct weston_compositor *ec)
-       wl_signal_emit(&gr->destroy_signal, gr);
-+      if (gr->fbo)
-+              glDeleteFramebuffers(1, &gr->fbo);
-+
-       if (gr->has_bind_display)
-               gr->unbind_display(gr->egl_display, ec->wl_display);
-@@ -1927,6 +1980,7 @@ gl_renderer_create(struct weston_compositor *ec, EGLNativeDisplayType display,
-               return -1;
-       gr->base.read_pixels = gl_renderer_read_pixels;
-+      gr->base.read_surface_pixels = gl_renderer_read_surface_pixels;
-       gr->base.repaint_output = gl_renderer_repaint_output;
-       gr->base.flush_damage = gl_renderer_flush_damage;
-       gr->base.attach = gl_renderer_attach;
diff --git a/meta-tizen/recipes-graphics/wayland/weston/0003-downstream-allow-to-start-for-system-users.patch b/meta-tizen/recipes-graphics/wayland/weston/0003-downstream-allow-to-start-for-system-users.patch
deleted file mode 100644 (file)
index eefaeb4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Philippe Coval <philippe.coval@open.eurogiciel.org>
-Date: Tue, 10 Jun 2014 15:01:27 +0200
-Subject: downstream: allow to start for system users
-
-Change-Id: I1529784d5dd9ce30e595de80c66d895d97338ff8
-Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
----
- src/launcher-util.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/launcher-util.c b/src/launcher-util.c
-index ac764dc..f53bb33 100644
---- a/src/launcher-util.c
-+++ b/src/launcher-util.c
-@@ -409,7 +409,11 @@ weston_launcher_connect(struct weston_compositor *compositor, int tty,
-                                         seat_id, tty);
-               if (r < 0) {
-                       launcher->logind = NULL;
-+#ifdef LOCAL_CONFIG_WESTON_ALLOW_SYS_UID
-+                      if (geteuid() <= 499) { /* 499 = SYS_UID_MAX in login.defs, but it should be parsed */
-+#else
-                       if (geteuid() == 0) {
-+#endif
-                               if (setup_tty(launcher, tty) == -1) {
-                                       free(launcher);
-                                       return NULL;
diff --git a/meta-tizen/recipes-graphics/wayland/weston/0004-downstream-shell-make-panel-optional-panel-false-in-.patch b/meta-tizen/recipes-graphics/wayland/weston/0004-downstream-shell-make-panel-optional-panel-false-in-.patch
deleted file mode 100644 (file)
index 0100932..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-From: Philippe Coval <philippe.coval@open.eurogiciel.org>
-Date: Tue, 10 Jun 2014 15:17:46 +0200
-Subject: downstream: shell: make panel optional panel false in weston.ini
-
-Adapted from Manuel Bachmann <manuel.bachmann@open.eurogiciel.org> hack
-
-Change-Id: I110503d03a6ac495c3394cec99ab841ce27c02c9
-Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
----
- clients/desktop-shell.c | 30 ++++++++++++++++++------------
- 1 file changed, 18 insertions(+), 12 deletions(-)
-
-diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
-index e121cc7..161d3ac 100644
---- a/clients/desktop-shell.c
-+++ b/clients/desktop-shell.c
-@@ -62,6 +62,7 @@ struct desktop {
-       struct weston_config *config;
-       int locking;
-+      int panel;
-       enum cursor_type grab_cursor;
-@@ -171,8 +172,10 @@ is_desktop_painted(struct desktop *desktop)
-       struct output *output;
-       wl_list_for_each(output, &desktop->outputs, link) {
--              if (output->panel && !output->panel->painted)
--                      return 0;
-+              if (desktop->panel) {
-+                      if (output->panel && !output->panel->painted)
-+                              return 0;
-+              }
-               if (output->background && !output->background->painted)
-                       return 0;
-       }
-@@ -1130,7 +1133,8 @@ static void
- output_destroy(struct output *output)
- {
-       background_destroy(output->background);
--      panel_destroy(output->panel);
-+      if (output->panel)
-+              panel_destroy(output->panel);
-       wl_output_destroy(output->output);
-       wl_list_remove(&output->link);
-@@ -1159,8 +1163,8 @@ output_handle_geometry(void *data,
-                        int transform)
- {
-       struct output *output = data;
--
--      window_set_buffer_transform(output->panel->window, transform);
-+      if (output->panel)
-+              window_set_buffer_transform(output->panel->window, transform);
-       window_set_buffer_transform(output->background->window, transform);
- }
-@@ -1186,8 +1190,8 @@ output_handle_scale(void *data,
-                     int32_t scale)
- {
-       struct output *output = data;
--
--      window_set_buffer_scale(output->panel->window, scale);
-+      if(output->panel)
-+              window_set_buffer_scale(output->panel->window, scale);
-       window_set_buffer_scale(output->background->window, scale);
- }
-@@ -1202,11 +1206,12 @@ static void
- output_init(struct output *output, struct desktop *desktop)
- {
-       struct wl_surface *surface;
--
--      output->panel = panel_create(desktop);
--      surface = window_get_wl_surface(output->panel->window);
--      desktop_shell_set_panel(desktop->shell,
--                              output->output, surface);
-+      if(output->panel) {
-+              output->panel = panel_create(desktop);
-+              surface = window_get_wl_surface(output->panel->window);
-+              desktop_shell_set_panel(desktop->shell,
-+                                      output->output, surface);
-+      }
-       output->background = background_create(desktop);
-       surface = window_get_wl_surface(output->background->window);
-@@ -1319,6 +1324,7 @@ int main(int argc, char *argv[])
-       desktop.config = weston_config_parse("weston.ini");
-       s = weston_config_get_section(desktop.config, "shell", NULL, NULL);
-       weston_config_section_get_bool(s, "locking", &desktop.locking, 1);
-+      weston_config_section_get_bool(s, "panel", &desktop.panel, 1);
-       desktop.display = display_create(&argc, argv);
-       if (desktop.display == NULL) {
diff --git a/meta-tizen/recipes-graphics/wayland/weston/0005-downstream-Hack-to-allow-selecting-a-default-output.patch b/meta-tizen/recipes-graphics/wayland/weston/0005-downstream-Hack-to-allow-selecting-a-default-output.patch
deleted file mode 100644 (file)
index 66b109d..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-From: Philippe Coval <philippe.coval@open.eurogiciel.org>
-Date: Tue, 10 Jun 2014 15:29:57 +0200
-Subject: downstream: Hack to allow selecting a default output
-
-This code originally by Rafael Antognolli <rafael.antognolli@intel.com>
-was commited by Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-as packaging patch
-
-Change-Id: I48a8cb074f48debe027ca9cf42878ec0a3726044
-Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
----
- desktop-shell/shell.c |  2 ++
- src/compositor-drm.c  |  5 +++++
- src/compositor-x11.c  | 15 ++++++++++++---
- src/compositor.h      |  3 +++
- 4 files changed, 22 insertions(+), 3 deletions(-)
-
-diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
-index 84f5c83..4eef849 100644
---- a/desktop-shell/shell.c
-+++ b/desktop-shell/shell.c
-@@ -488,6 +488,8 @@ shell_configuration(struct desktop_shell *shell)
- struct weston_output *
- get_default_output(struct weston_compositor *compositor)
- {
-+    if (compositor->default_output)
-+        return compositor->default_output;
-       return container_of(compositor->output_list.next,
-                           struct weston_output, link);
- }
-diff --git a/src/compositor-drm.c b/src/compositor-drm.c
-index 7d514e4..9c29dd5 100644
---- a/src/compositor-drm.c
-+++ b/src/compositor-drm.c
-@@ -1906,6 +1906,7 @@ create_output_for_connector(struct drm_compositor *ec,
-       const char *type_name;
-       enum output_config config;
-       uint32_t transform;
-+      int default_output;
-       i = find_crtc_for_connector(ec, resources, connector);
-       if (i < 0) {
-@@ -1954,6 +1955,8 @@ create_output_for_connector(struct drm_compositor *ec,
-       weston_config_section_get_string(section, "transform", &s, "normal");
-       transform = parse_transform(s, output->base.name);
-       free(s);
-+      weston_config_section_get_int(section, "default_output",
-+                    &default_output, 0);
-       if (get_gbm_format_from_section(section,
-                                       ec->format,
-@@ -2076,6 +2079,8 @@ create_output_for_connector(struct drm_compositor *ec,
-       }
-       wl_list_insert(ec->base.output_list.prev, &output->base.link);
-+    if (default_output)
-+        ec->base.default_output = &output->base;
-       find_and_parse_output_edid(ec, output, connector);
-       if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
-diff --git a/src/compositor-x11.c b/src/compositor-x11.c
-index 56b3228..bf32e1a 100644
---- a/src/compositor-x11.c
-+++ b/src/compositor-x11.c
-@@ -752,7 +752,8 @@ static struct x11_output *
- x11_compositor_create_output(struct x11_compositor *c, int x, int y,
-                            int width, int height, int fullscreen,
-                            int no_input, char *configured_name,
--                           uint32_t transform, int32_t scale)
-+                           uint32_t transform, int32_t scale,
-+                 int default_output)
- {
-       static const char name[] = "Weston Compositor";
-       static const char class[] = "weston-1\0Weston Compositor";
-@@ -906,6 +907,8 @@ x11_compositor_create_output(struct x11_compositor *c, int x, int y,
-               wl_event_loop_add_timer(loop, finish_frame_handler, output);
-       wl_list_insert(c->base.output_list.prev, &output->base.link);
-+    if (default_output)
-+        c->base.default_output = &output->base;
-       weston_log("x11 output %dx%d, window id %d\n",
-                  width, height, output->window);
-@@ -1489,6 +1492,7 @@ x11_compositor_create(struct wl_display *display,
-       const char *section_name;
-       char *name, *t, *mode;
-       uint32_t transform;
-+    int default_output;
-       weston_log("initializing x11 backend\n");
-@@ -1578,11 +1582,14 @@ x11_compositor_create(struct wl_display *display,
-                                                "transform", &t, "normal");
-               transform = parse_transform(t, name);
-               free(t);
-+        weston_config_section_get_int(section, "default_output",
-+                    &default_output, 0);
-               output = x11_compositor_create_output(c, x, 0,
-                                                     width, height,
-                                                     fullscreen, no_input,
--                                                    name, transform, scale);
-+                                                    name, transform, scale,
-+                              default_output);
-               free(name);
-               if (output == NULL)
-                       goto err_x11_input;
-@@ -1597,7 +1604,9 @@ x11_compositor_create(struct wl_display *display,
-       for (i = output_count; i < count; i++) {
-               output = x11_compositor_create_output(c, x, 0, width, height,
-                                                     fullscreen, no_input, NULL,
--                                                    WL_OUTPUT_TRANSFORM_NORMAL, scale);
-+                                                    WL_OUTPUT_TRANSFORM_NORMAL, scale,
-+                                                    default_output);
-+
-               if (output == NULL)
-                       goto err_x11_input;
-               x = pixman_region32_extents(&output->base.region)->x2;
-diff --git a/src/compositor.h b/src/compositor.h
-index d646ebe..f1e2e02 100644
---- a/src/compositor.h
-+++ b/src/compositor.h
-@@ -199,6 +199,7 @@ struct weston_output {
-       int move_x, move_y;
-       uint32_t frame_time;
-       int disable_planes;
-+    uint32_t default_output;
-       int destroying;
-       char *make, *model, *serial_number;
-@@ -617,6 +618,8 @@ struct weston_compositor {
-       struct wl_list axis_binding_list;
-       struct wl_list debug_binding_list;
-+    struct weston_output *default_output;
-+
-       uint32_t state;
-       struct wl_event_source *idle_source;
-       uint32_t idle_inhibit;
diff --git a/meta-tizen/recipes-graphics/wayland/weston/0006-downstream-accept-the-new-enable-sys-uid-configure-o.patch b/meta-tizen/recipes-graphics/wayland/weston/0006-downstream-accept-the-new-enable-sys-uid-configure-o.patch
deleted file mode 100644 (file)
index 958ad96..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-Date: Thu, 12 Jun 2014 15:51:27 +0200
-Subject: downstream: accept the new "--enable-sys-uid" configure option
-
-This configure option activates the code allowing non-root users
-(such as "display") to launch Weston directly.
-
-Change-Id: I844ce7aaba717d1453092e62885b704e9473c4f7
-Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
----
- Makefile.am  | 4 ++++
- configure.ac | 7 +++++++
- 2 files changed, 11 insertions(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index 343adc6..239a27a 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -33,6 +33,10 @@ AM_CPPFLAGS =                                       \
-       -DLIBEXECDIR='"$(libexecdir)"'          \
-       -DBINDIR='"$(bindir)"'
-+if ENABLE_SYS_UID
-+AM_CPPFLAGS += -DLOCAL_CONFIG_WESTON_ALLOW_SYS_UID=1
-+endif
-+
- CLEANFILES = weston.ini $(BUILT_SOURCES)
- bin_PROGRAMS += weston
-diff --git a/configure.ac b/configure.ac
-index f55cea8..d7bb414 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -69,6 +69,13 @@ if test x$enable_egl = xyes; then
-         PKG_CHECK_MODULES([EGL_TESTS], [egl >= 7.10 glesv2 wayland-client wayland-egl])
- fi
-+AC_ARG_ENABLE(sys_uid, [  --enable-sys-uid],,
-+              enable_sys_uid=no)
-+AM_CONDITIONAL(ENABLE_SYS_UID, test x$enable_sys_uid = xyes)
-+if test x$enable_sys_uid = xyes; then
-+      AC_DEFINE([ENABLE_SYS_UID], [1], [Allow system users to launch Weston without weston-launch])
-+fi
-+
- AC_ARG_ENABLE(xkbcommon,
-             AS_HELP_STRING([--disable-xkbcommon], [Disable libxkbcommon
-                             support: This is only useful in environments
diff --git a/meta-tizen/recipes-graphics/wayland/weston/weston.target b/meta-tizen/recipes-graphics/wayland/weston/weston.target
deleted file mode 100644 (file)
index 2717047..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-
-[Unit]
-Description=Weston Compositor
-Requires=dbus.socket
-AllowIsolate=true
diff --git a/meta-tizen/recipes-graphics/wayland/weston_1.5.0.bbappend b/meta-tizen/recipes-graphics/wayland/weston_1.5.0.bbappend
deleted file mode 100644 (file)
index 6a0ccf7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/weston"
-
-SRC_URI += "file://weston.target \
-            file://0001-comp-wayland-use-safe-foreach-when-destroying-output.patch \
-            file://0002-This-vfunc-lets-us-read-out-a-rectangle-of-pixels-fr.patch \
-            file://0003-downstream-allow-to-start-for-system-users.patch \
-            file://0004-downstream-shell-make-panel-optional-panel-false-in-.patch \
-            file://0005-downstream-Hack-to-allow-selecting-a-default-output.patch \
-            file://0006-downstream-accept-the-new-enable-sys-uid-configure-o.patch \
-            file://0001-fix:-missingpanelregressionintroducedbypanelopt.patch \
-            "
-
-do_install_append() {
-    install -d ${D}/lib/systemd/user
-    install -m 644 ${WORKDIR}/weston.target ${D}/lib/systemd/user/weston.target
-}
-
-FILES_${PN} += " /lib/systemd/user/weston.target"
-
-EXTRA_OECONF += "--enable-sys-uid"
\ No newline at end of file
index 59c32cb..e9fc025 100644 (file)
@@ -9,6 +9,6 @@ ALLOW_EMPTY_${PN} = "1"
 
 USERADD_PACKAGES = "${PN}"
 
-GROUPADD_PARAM_${PN} = "-g 100 users; -g 5000 app; -g 192 weston-launch"
+GROUPADD_PARAM_${PN} = "-g 100 users; -g 5000 app"
 
-USERADD_PARAM_${PN} += " -u 5000 -d /home/app   -m -g users -G users,weston-launch -r -s /bin/sh app "
+USERADD_PARAM_${PN} += " -u 5000 -d /home/app -m -g users -G users,weston-launch -r -s /bin/sh app "
index cf0df72..54afdfe 100644 (file)
@@ -10,8 +10,8 @@ IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs"
 
 REQUIRED_DISTRO_FEATURES = "wayland pam"
 
-CORE_IMAGE_BASE_INSTALL += "weston weston-init"
-CORE_IMAGE_BASE_INSTALL += "weston-examples"
+CORE_IMAGE_BASE_INSTALL += "weston"
+CORE_IMAGE_BASE_INSTALL += "weston-init"
 CORE_IMAGE_BASE_INSTALL += "clutter-1.0-examples"
 CORE_IMAGE_BASE_INSTALL += "weston-common"
 CORE_IMAGE_BASE_INSTALL += "weston-common-tz-launcher"
index c6e1331..64aaa58 100644 (file)
@@ -8,7 +8,7 @@ inherit core-image distro_features_check
 
 REQUIRED_DISTRO_FEATURES = "wayland pam"
 
-CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples clutter-1.0-examples"
+CORE_IMAGE_BASE_INSTALL += "weston weston-init clutter-1.0-examples"
 
 DESCRIPTION = "A weston image with Tizen common."
 
diff --git a/meta-tizen/recipes-tizen/weston/weston-extraconf.inc b/meta-tizen/recipes-tizen/weston/weston-extraconf.inc
new file mode 100644 (file)
index 0000000..ef4ef53
--- /dev/null
@@ -0,0 +1,41 @@
+inherit useradd
+
+RDEPENDS_${PN} += "xkeyboard-config"
+RRECOMMENDS_${PN} = "liberation-fonts"
+
+SRC_URI += "file://make-lcms-explicitly-configurable.patch"
+SRC_URI += "file://make-libwebp-explicitly-configurable.patch"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system -g 192 weston-launch"
+
+EXTRA_OECONF += "   \
+                    --enable-wayland-compositor \
+                    --disable-vaapi-recorder \
+                    --enable-weston-launch \
+                    --enable-drm-compositor \
+                    --disable-rdp-compositor \
+                    --enable-sys-uid \
+                    --with-cairo=image \
+                    --enable-egl \
+                    --enable-simple-egl-clients \
+                    --enable-fbdev-compositor \
+                    --disable-headless-compositor \
+                    --enable-setuid-install \
+                    --enable-demo-clients-install \
+                    --disable-lcms \
+                    --disable-webp \
+                    "
+
+do_configure_prepend() {
+    sed -i 's/PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)//' configure.ac
+}
+
+pkg_preinst_${PN}() {
+}
+
+FILES_${PN} += "${prefix}/lib/weston/weston-keyboard"
+FILES_${PN} += "${prefix}/lib/weston/weston-desktop-shell"
+FILES_${PN} += "${prefix}/lib/weston/cms-static.so"
+FILES_${PN} += "${prefix}/lib/weston/weston-screenshooter"
+FILES_${PN} += "${prefix}/lib/weston/weston-simple-im"
diff --git a/meta-tizen/recipes-tizen/weston/weston.inc b/meta-tizen/recipes-tizen/weston/weston.inc
new file mode 100644 (file)
index 0000000..fc0375a
--- /dev/null
@@ -0,0 +1,218 @@
+DESCRIPTION = "Wayland Compositor Infrastructure"
+HOMEPAGE = "http://weston.freedesktop.org/"
+SECTION = "Graphics & UI Framework/Wayland Window System"
+LICENSE = "MIT"
+
+SRC_URI = ""
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep
+
+BBCLASSEXTEND = ""
+PROVIDES = ""
+
+#PROVIDES by weston
+
+
+#PROVIDES by weston-dev
+PROVIDES += "weston-dev"
+
+
+#PROVIDES by weston-docs
+PROVIDES += "weston-docs "
+
+
+#PROVIDES by weston-clients
+PROVIDES += "weston-clients"
+
+
+RDEPENDS = ""
+#RDEPENDS of weston (${PN})
+RDEPENDS_${PN} += "weston-startup"
+RDEPENDS_${PN} += "shadow"
+
+
+DEPENDS = ""
+#DEPENDS of weston
+DEPENDS += "mtdev"
+DEPENDS += "cairo"
+DEPENDS += "expat"
+DEPENDS += "udev"
+DEPENDS += "libvpx"
+DEPENDS += "xz"
+DEPENDS += "poppler"
+DEPENDS += "mesa"
+DEPENDS += "systemd"
+DEPENDS_append_class-native = " pkgconfig-native"
+DEPENDS_append_class-target = " pkgconfig-native"
+DEPENDS += "glib-2.0"
+DEPENDS += "wayland"
+DEPENDS += "pixman"
+DEPENDS += "libdrm"
+DEPENDS_append_class-native = " libtool"
+DEPENDS_append_class-target = " libtool-cross"
+DEPENDS += "libffi"
+DEPENDS += "pango"
+DEPENDS += "libpam"
+DEPENDS += "libxkbcommon"
+DEPENDS += "libjpeg-turbo"
+DEPENDS_append_class-native = " autoconf-native"
+DEPENDS_append_class-target = " autoconf-native"
+DEPENDS_append_class-native = " automake-native"
+DEPENDS_append_class-target = " automake-native"
+
+do_prep() {
+ cd ${S}
+ chmod -Rf a+rX,u+w,g-w,o-w ${S}
+ #setup -q
+ cp ${S}/packaging/weston.manifest .
+}
+do_patch_append() {
+    bb.build.exec_func('do_prep', d)
+}
+
+do_configure() {
+}
+
+do_compile() {
+ cd ${S}
+  LANG=C
+  export LANG
+  unset DISPLAY
+  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
+  
+  
+   
+  autotools_do_configure
+  
+  make -j16
+  
+  
+  
+}
+EXTRA_OECONF += " --disable-static --disable-setuid-install --enable-simple-clients --enable-clients --disable-libunwind --disable-xwayland --disable-xwayland-test --disable-x11-compositor --disable-rpi-compositor "
+
+do_install() {
+ export RPM_BUILD_ROOT=${D}
+ cd ${S}
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf ${D}
+ mkdir -p ${D}
+   oe_runmake \
+         DESTDIR=${D} \
+         INSTALL_ROOT=${D} \
+         BINDIR=${prefix}/bin \
+   install  
+   rm -f ${D}${infodir}/dir 
+   find ${D} -regex ".*\.la$" | xargs rm -f -- 
+   find ${D} -regex ".*\.a$" | xargs rm -f --
+ # install example clients
+ install -m 755 weston-calibrator ${D}${prefix}/bin
+ install -m 755 weston-simple-touch ${D}${prefix}/bin
+ install -m 755 weston-simple-shm ${D}${prefix}/bin
+ install -m 755 weston-simple-egl ${D}${prefix}/bin
+ install -m 755 weston-flower ${D}${prefix}/bin
+ install -m 755 weston-image ${D}${prefix}/bin
+ install -m 755 weston-cliptest ${D}${prefix}/bin
+ install -m 755 weston-dnd ${D}${prefix}/bin
+ install -m 755 weston-editor ${D}${prefix}/bin
+ install -m 755 weston-smoke ${D}${prefix}/bin
+ install -m 755 weston-resizor ${D}${prefix}/bin
+ install -m 755 weston-eventdemo ${D}${prefix}/bin
+ install -m 755 weston-clickdot ${D}${prefix}/bin
+ install -m 755 weston-subsurfaces ${D}${prefix}/bin
+ install -m 755 weston-transformed ${D}${prefix}/bin
+ install -m 755 weston-fullscreen ${D}${prefix}/bin
+ install -d ${D}/lib/systemd/user
+ install -m 644 ${S}/packaging/weston.target ${D}/lib/systemd/user/weston.target
+ # The weston.service unit file must be provided by the weston-startup
+ # virtual package, i.e. "Provide: weston-startup".  The weston-startup
+ # virtual package requirement is intended to force Tizen profile
+ # maintainers to add the necessary start-up script or systemd unit
+ # file to start weston. Otherwise it becomes possible to install
+ # weston without an automated means to start weston at boot, which may
+ # lead to confusion.  This approach allows startup related files to be
+ # maintained outside of this weston package.
+}
+
+pkg_preinst_${PN}() {
+    #!/bin/sh -e
+
+    getent group weston-launch >/dev/null || $D${prefix}/sbin/groupadd -o -r weston-launch
+
+}
+
+PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
+PACKAGES += " weston "
+PACKAGES += " weston-clients "
+PACKAGES += " weston-docs "
+PACKAGES += " weston-dev "
+
+weston_files = ""
+weston_files += "${prefix}/bin/wcap-*"
+weston_files += "${prefix}/bin/weston"
+weston_files += "${prefix}/bin/weston-info"
+weston_files += "${prefix}/bin/weston-launch"
+weston_files += "${prefix}/bin/weston-terminal"
+weston_files += "${prefix}/libexec/weston-*"
+weston_files += "${prefix}/lib/weston/desktop-shell.so"
+weston_files += "${prefix}/lib/weston/drm-backend.so"
+weston_files += "${prefix}/lib/weston/fbdev-backend.so"
+weston_files += "${prefix}/lib/weston/fullscreen-shell.so"
+weston_files += "${prefix}/lib/weston/headless-backend.so"
+weston_files += "${prefix}/lib/weston/wayland-backend.so"
+weston_files += "${prefix}/lib/weston/gl-renderer.so"
+weston_files += "${prefix}/share/weston"
+weston_files += "/lib/systemd/user/weston.target"
+MANIFESTFILES_${PN} = "weston.manifest"
+
+weston-clients_files = ""
+weston-clients_files += "${prefix}/bin/weston-simple-touch"
+weston-clients_files += "${prefix}/bin/weston-simple-shm"
+weston-clients_files += "${prefix}/bin/weston-simple-egl"
+weston-clients_files += "${prefix}/bin/weston-flower"
+weston-clients_files += "${prefix}/bin/weston-image"
+weston-clients_files += "${prefix}/bin/weston-cliptest"
+weston-clients_files += "${prefix}/bin/weston-dnd"
+weston-clients_files += "${prefix}/bin/weston-editor"
+weston-clients_files += "${prefix}/bin/weston-smoke"
+weston-clients_files += "${prefix}/bin/weston-resizor"
+weston-clients_files += "${prefix}/bin/weston-eventdemo"
+weston-clients_files += "${prefix}/bin/weston-clickdot"
+weston-clients_files += "${prefix}/bin/weston-subsurfaces"
+weston-clients_files += "${prefix}/bin/weston-transformed"
+weston-clients_files += "${prefix}/bin/weston-fullscreen"
+weston-clients_files += "${prefix}/bin/weston-calibrator"
+MANIFESTFILES_${PN}-clients = "weston.manifest"
+
+weston-docs_files = ""
+
+weston-dev_files = ""
+weston-dev_files += "${prefix}/include/weston/*.h"
+weston-dev_files += "${prefix}/lib/pkgconfig/*.pc"
+MANIFESTFILES_${PN}-dev = "weston.manifest"
+
+FILES_${PN} = "${weston_files}"
+FILES_${PN}-clients = "${weston-clients_files}"
+FILES_${PN}-docs = "${weston-docs_files}"
+FILES_${PN}-dev = "${weston-dev_files}"
+
+PKG_weston= "weston"
+PKG_weston-clients= "weston-clients"
+PKG_weston-docs= "weston-docs"
+PKG_weston-dev= "weston-dev"
+
+require weston-extraconf.inc
+
diff --git a/meta-tizen/recipes-tizen/weston/weston/make-lcms-explicitly-configurable.patch b/meta-tizen/recipes-tizen/weston/weston/make-lcms-explicitly-configurable.patch
new file mode 100644 (file)
index 0000000..35e6d6f
--- /dev/null
@@ -0,0 +1,43 @@
+weston-1.5.0/configure.ac: make lcms explicitly configurable
+
+The lcms package is outside of openembedded-core, so make it
+explicitly configurable. Make it deterministic, so that if lcms
+dependencies are missing, autoconf throws a fatal error. Follow
+upstream style to make it more likely to be merged.
+
+Upstream-Status: Pending
+
+Index: weston-1.5.0/configure.ac
+===================================================================
+--- weston-1.5.0.orig/configure.ac
++++ weston-1.5.0/configure.ac
+@@ -491,12 +491,24 @@ AC_ARG_ENABLE(demo-clients-install,
+                            enable_demo_clients_install=no)
+ AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
+-PKG_CHECK_MODULES(LCMS, lcms2,
+-                  [have_lcms=yes], [have_lcms=no])
+-if test "x$have_lcms" = xyes; then
+-       AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
++AC_ARG_ENABLE(lcms,
++              AS_HELP_STRING([--disable-lcms],
++                             [Disable lcms support]),,
++              enable_lcms=auto)
++AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
++if test "x$enable_lcms" != "xno"; then
++        PKG_CHECK_MODULES(LCMS, 
++                         lcms2,
++                         [have_lcms=yes],
++                         [have_lcms=no])
++        if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
++          AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
++        fi
++        if test "x$have_lcms" = "xyes"; then
++                enable_lcms=yes
++                AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
++        fi
+ fi
+-AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
+ AC_PATH_PROG([wayland_scanner], [wayland-scanner])
+ if test x$wayland_scanner = x; then
diff --git a/meta-tizen/recipes-tizen/weston/weston/make-libwebp-explicitly-configurable.patch b/meta-tizen/recipes-tizen/weston/weston/make-libwebp-explicitly-configurable.patch
new file mode 100644 (file)
index 0000000..ad07d4f
--- /dev/null
@@ -0,0 +1,37 @@
+
+The libwebp package is outside of openembedded-core, so make it
+explicitly configurable. Make it deterministic, so that if libwebp 
+dependencies are missing, autoconf throws a fatal error.
+
+Upstream-Status: Pending
+
+Index: weston-1.5.0/configure.ac
+===================================================================
+--- weston-1.5.0.orig/configure.ac
++++ weston-1.5.0/configure.ac
+@@ -268,9 +268,22 @@ fi
+ PKG_CHECK_MODULES(PIXMAN, [pixman-1])
+ PKG_CHECK_MODULES(PNG, [libpng])
+-PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
+-AS_IF([test "x$have_webp" = "xyes"],
+-      [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
++AC_ARG_ENABLE(webp,
++              AS_HELP_STRING([--disable-webp],
++                             [Disable libwebp support]),,
++              enable_webp=auto)
++AM_CONDITIONAL(HAVE_WEBP, [test "x$enable_webp" = xyes])
++AS_IF([test "x$enable_webp" != "xno"],
++    PKG_CHECK_MODULES(WEBP,
++                     [libwebp],
++                     [have_webp=yes],
++                     [have_webp=no])
++    AS_IF([test "x$have_webp" = "xno" -a "x$enable_webp" = "xyes"],
++        AC_MSG_ERROR([libwebp support explicitly request, but lipwebp could not be found]))
++    AS_IF([test "x$have_webp" = "xyes"],
++        [enable_webp=yes]
++        [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
++)
+ AC_ARG_ENABLE(vaapi-recorder, [  --enable-vaapi-recorder],,
+             enable_vaapi_recorder=auto)
diff --git a/meta-tizen/recipes-tizen/weston/weston_git.bb b/meta-tizen/recipes-tizen/weston/weston_git.bb
new file mode 100644 (file)
index 0000000..25ede27
--- /dev/null
@@ -0,0 +1,10 @@
+require weston.inc
+
+PRIORITY = "10"
+
+LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+SRC_URI += "git://review.tizen.org/platform/upstream/weston;tag=8856decb5cbcb41a042cffd8d969c52983e8125d;nobranch=1"
+
+BBCLASSEXTEND += " native "
+