Skip to contentSkip to conversation

: : weston: build for weston 7 git version

PATCH New ayaka 1 participant 1 message Apr 21, 2019

lore
Share & tools
lore

ayaka

author
#0 lore raw

PATCH 1/1 : : weston: build for weston 7 git version

I didn't notice there is a build switch patch at mail list before or I didn't notice when I did this patch for weston 6.

I try to make weston merge all the patch that OE required before, but still one reminded, it should be merged in a short time.

About the weston-launch, I talked to weston, they suggest us use weston binary to start service instead of weston-launch if you don't want PAM. I did so in my packageconf, but I have no idea on how to make weston-init to check the packageconf of the others.

---
 .../weston/0001-make-error-portable-git.patch |  80 ++++++++++++
 meta/recipes-graphics/wayland/weston_git.bb   | 115 ++++++++++++++++++
 2 files changed, 195 insertions(+)
 create mode 100644 meta/recipes-graphics/wayland/weston/0001-make-error-portable-git.patch
 create mode 100644 meta/recipes-graphics/wayland/weston_git.bb
meta/recipes-graphics/wayland/weston/0001-make-error-portable-git.patch new file +80 -0
new file mode 100644
index 0000000000..74d9876a9f
@@ -0,0 +1,80 @@
+From e8e2c5e615483eda5ed59c2c91e3b12e736f96f2 Mon Sep 17 00:00:00 2001
+From: Randy 'ayaka' Li <[email protected]>
+Date: Thu, 28 Mar 2019 18:31:08 +0800
+Subject: [PATCH] make error() portable
+
+error() is not posix but gnu extension so may not be available on all
+kind of systemsi e.g. musl.
+
+Signed-off-by: Randy 'ayaka' Li <[email protected]>
+---
+ libweston/weston-error.h  | 23 +++++++++++++++++++++++
+ libweston/weston-launch.c |  2 +-
+ meson.build               |  1 +
+ 3 files changed, 25 insertions(+), 1 deletion(-)
+ create mode 100644 libweston/weston-error.h
+
+diff --git a/libweston/weston-error.h b/libweston/weston-error.h
+new file mode 100644
+index 00000000..0ba373f7
+--- /dev/null
++++ b/libweston/weston-error.h
+@@ -0,0 +1,23 @@
++#ifndef _WESTON_ERROR_H
++#define _WESTON_ERROR_H
++
++#if defined(HAVE_ERROR_H)
++#include <error.h>
++#else
++#include <string.h>
++#define _weston_error(S, E, F, ...) do { \
++	if (E)  { \
++		printf("\n"); \
++		fprintf(stderr, "weston: " F ": %s", ##__VA_ARGS__, strerror(E)); \
++		exit(S); \
++	} else  { \
++		printf("\n"); \
++		fprintf(stderr, "weston: " F, ##__VA_ARGS__); \
++		exit(S); \
++	} \
++} while(0)
++
++#define error _weston_error
++#endif
++
++#endif
+diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
+index bf73e0d6..90644394 100644
+--- a/libweston/weston-launch.c
++++ b/libweston/weston-launch.c
+@@ -33,7 +33,6 @@
+ #include <poll.h>
+ #include <errno.h>
+ 
+-#include <error.h>
+ #include <getopt.h>
+ 
+ #include <sys/types.h>
+@@ -59,6 +58,7 @@
+ #endif
+ 
+ #include "weston-launch.h"
++#include "weston-error.h"
+ 
+ #define DRM_MAJOR 226
+ 
+diff --git a/meson.build b/meson.build
+index aae96261..2f6c53d0 100644
+--- a/meson.build
++++ b/meson.build
+@@ -94,6 +94,7 @@ foreach func : optional_libc_funcs
+ endforeach
+ 
+ optional_system_headers = [
++	'error.h',
+ 	'linux/sync_file.h'
+ ]
+ foreach hdr : optional_system_headers
+-- 
+2.18.1
+
meta/recipes-graphics/wayland/weston_git.bb new file +115 -0

115 lines not on this page · raw message

Signature · 1 line
2.20.1