weston: update to 5.0.0

pmaport recreated on top of Alpine's current aport. The --pixman-type
patches were removed, it would have needed to be rewritten to work with
newer Weston source code. It is a Weston specific workaround for a
problem with the downstream kernels, so this is better fixed in the
kernel source code:
https://wiki.postmarketos.org/wiki/Troubleshooting:display#My_screen_is_red.21

The ABGR patch was rebased and submitted for upstreaming here:
https://gitlab.freedesktop.org/wayland/weston/merge_requests/61

Fixes #136.
This commit is contained in:
Oliver Smith 2018-11-28 09:41:48 +01:00
parent 0ab7ce3676
commit a9570538e2
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
10 changed files with 101 additions and 478 deletions

View file

@ -1,156 +0,0 @@
From 77a099b85dea6aac096413f95d02479e75e5df44 Mon Sep 17 00:00:00 2001
From: Pablo Castellano <pablo@anche.no>
Date: Fri, 16 Jun 2017 21:35:34 +0200
Subject: [PATCH 1/3] compositor-fbdev: Added parameter --pixman-type
This parameter allows to override the weston heuristic in
calculate_pixman_format() and specify a PIXMAN_TYPE_ value.
This is needed at least in LG Nexus 5 because the framebuffer
drivers seem to be reporting wrong information and causes
the screen to be redish when weston is run.
---
compositor/main.c | 2 ++
libweston/compositor-fbdev.c | 23 +++++++++++++++++++----
libweston/compositor-fbdev.h | 1 +
libweston/compositor.h | 3 +++
4 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/compositor/main.c b/compositor/main.c
index f8a60e9..6246c89 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -574,6 +574,7 @@ usage(int error_code)
"Options for fbdev-backend.so:\n\n"
" --tty=TTY\t\tThe tty to use\n"
" --device=DEVICE\tThe framebuffer device to use\n"
+ " --pixman-type=PIXMAN_TYPE\tThe pixman type to use\n"
"\n");
#endif
@@ -1445,6 +1446,7 @@ load_fbdev_backend(struct weston_compositor *c,
const struct weston_option fbdev_options[] = {
{ WESTON_OPTION_INTEGER, "tty", 0, &config.tty },
+ { WESTON_OPTION_INTEGER, "pixman-type", 0, &config.pixman_type },
{ WESTON_OPTION_STRING, "device", 0, &config.device },
};
diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index e80a504..b7d2c74 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -159,7 +159,8 @@ finish_frame_handler(void *data)
static pixman_format_code_t
calculate_pixman_format(struct fb_var_screeninfo *vinfo,
- struct fb_fix_screeninfo *finfo)
+ struct fb_fix_screeninfo *finfo,
+ int pixman_type)
{
/* Calculate the pixman format supported by the frame buffer from the
* buffer's metadata. Return 0 if no known pixman format is supported
@@ -180,7 +181,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
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",
+ STAMP_SPACE " - transp: offset: %i, length: %i, MSB: %i\n"
+ STAMP_SPACE " - pixman_type: %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,
@@ -189,7 +191,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->blue.offset, vinfo->blue.length,
vinfo->blue.msb_right,
vinfo->transp.offset, vinfo->transp.length,
- vinfo->transp.msb_right);
+ vinfo->transp.msb_right,
+ pixman_type);
/* We only handle packed formats at the moment. */
if (finfo->type != FB_TYPE_PACKED_PIXELS)
@@ -211,6 +214,15 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->blue.msb_right != 0)
return 0;
+ /* Use pixman type specified by parameter */
+ if (pixman_type != PIXMAN_TYPE_OTHER) {
+ return PIXMAN_FORMAT(vinfo->bits_per_pixel, pixman_type,
+ vinfo->transp.length,
+ vinfo->red.length,
+ vinfo->green.length,
+ vinfo->blue.length);
+ }
+
/* Work out the format type from the offsets. We only support RGBA and
* ARGB at the moment. */
type = PIXMAN_TYPE_OTHER;
@@ -285,7 +297,7 @@ fbdev_query_screen_info(struct fbdev_output *output, int fd,
strncpy(info->id, fixinfo.id, sizeof(info->id));
info->id[sizeof(info->id)-1] = '\0';
- info->pixel_format = calculate_pixman_format(&varinfo, &fixinfo);
+ info->pixel_format = calculate_pixman_format(&varinfo, &fixinfo, output->base.pixman_type);
info->refresh_rate = calculate_refresh_rate(&varinfo);
if (info->pixel_format == 0) {
@@ -495,6 +507,7 @@ fbdev_output_create(struct fbdev_backend *backend,
goto out_free;
}
+ output->base.pixman_type = backend->base.pixman_type;
output->base.name = strdup("fbdev");
output->base.destroy = fbdev_output_destroy;
output->base.disable = NULL;
@@ -742,6 +755,7 @@ fbdev_backend_create(struct weston_compositor *compositor,
goto out_udev;
}
+ backend->base.pixman_type = param->pixman_type;
backend->base.destroy = fbdev_backend_destroy;
backend->base.restore = fbdev_restore;
@@ -781,6 +795,7 @@ config_init_to_defaults(struct weston_fbdev_backend_config *config)
* 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 */
+ config->pixman_type = PIXMAN_TYPE_RGBA; /* default pixman type */
}
WL_EXPORT int
diff --git a/libweston/compositor-fbdev.h b/libweston/compositor-fbdev.h
index 8b7d900..268de31 100644
--- a/libweston/compositor-fbdev.h
+++ b/libweston/compositor-fbdev.h
@@ -43,6 +43,7 @@ struct weston_fbdev_backend_config {
int tty;
char *device;
+ int pixman_type;
/** Callback used to configure input devices.
*
diff --git a/libweston/compositor.h b/libweston/compositor.h
index 21c4046..fee8de0 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -235,6 +235,7 @@ struct weston_output {
bool enabled;
int scale;
+ int pixman_type;
int (*enable)(struct weston_output *output);
int (*disable)(struct weston_output *output);
@@ -810,6 +811,8 @@ struct weston_backend_config {
};
struct weston_backend {
+ int pixman_type;
+
void (*destroy)(struct weston_compositor *compositor);
void (*restore)(struct weston_compositor *compositor);
--
2.7.4

View file

@ -1,30 +1,29 @@
From cfa2141a88a135968db9db517493e7b0ae7ab722 Mon Sep 17 00:00:00 2001
From: Pablo Castellano <pablo@anche.no>
Date: Mon, 17 Jul 2017 19:55:45 +0200
Subject: [PATCH 2/3] compositor-fbdev: Add support for ABGR
From 7c21c1974c11ce6bf5901e7267104bde0ff00c15 Mon Sep 17 00:00:00 2001
From: Oliver Smith <ollieparanoid@bitmessage.ch>
Date: Wed, 28 Nov 2018 08:19:16 +0100
Subject: [PATCH] compositor-fbdev: add support for ABGR
This is needed for Asus grouper (Google Nexus 7 2012)
https://wiki.postmarketos.org/wiki/Google_Nexus_7_2012_(asus-grouper)
Thanks to Pablo Castellano for the original patch.
---
libweston/compositor-fbdev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index b7d2c74..8158841 100644
index a71b7bdc..44d15077 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -223,8 +223,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->blue.length);
}
@@ -234,8 +234,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->blue.msb_right != 0)
return 0;
- /* Work out the format type from the offsets. We only support RGBA and
- * ARGB at the moment. */
+ /* Work out the format type from the offsets. We only support RGBA,
+ * ARGB and ABGR at the moment. */
+ /* Work out the format type from the offsets. We only support RGBA, ARGB
+ * and ABGR at the moment. */
type = PIXMAN_TYPE_OTHER;
if ((vinfo->transp.offset >= vinfo->red.offset ||
@@ -236,6 +236,10 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
@@ -247,6 +247,10 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->green.offset >= vinfo->blue.offset &&
vinfo->blue.offset >= vinfo->transp.offset)
type = PIXMAN_TYPE_RGBA;
@ -32,8 +31,9 @@ index b7d2c74..8158841 100644
+ vinfo->blue.offset >= vinfo->green.offset &&
+ vinfo->green.offset >= vinfo->red.offset)
+ type = PIXMAN_TYPE_ABGR;
if (type == PIXMAN_TYPE_OTHER)
return 0;
--
2.7.4
--
2.17.2

View file

@ -1,26 +0,0 @@
From 764885a2d850600d1e7ca50a54271ba2d42374d0 Mon Sep 17 00:00:00 2001
From: Pablo Castellano <pablo@anche.no>
Date: Mon, 17 Jul 2017 20:04:24 +0200
Subject: [PATCH 3/3] compositor-fbdev: print the pixman type guessed in
calculate_pixman_format()
---
libweston/compositor-fbdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index 8158841..4ee3279 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -241,6 +241,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->green.offset >= vinfo->red.offset)
type = PIXMAN_TYPE_ABGR;
+ weston_log("Type guessed: %i:\n", type);
+
if (type == PIXMAN_TYPE_OTHER)
return 0;
--
2.7.4

View file

@ -1,40 +0,0 @@
diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
index 140fde1..84f7d60 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>
@@ -112,6 +111,25 @@ struct weston_launch {
union cmsg_data { unsigned char b[4]; int fd; };
+static void
+error(int status, int errnum, const char *msg, ...)
+{
+ va_list args;
+
+ fputs("weston-launch: ", stderr);
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+
+ if (errnum)
+ fprintf(stderr, ": %s\n", strerror(errnum));
+ else
+ fputc('\n', stderr);
+
+ if (status)
+ exit(status);
+}
+
static gid_t *
read_groups(void)
{
--
2.10.0

View file

@ -1,78 +0,0 @@
From acd71fb0af82fb6065dd239865bd18bbbf1ceab4 Mon Sep 17 00:00:00 2001
From: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Date: Tue, 15 Aug 2017 10:35:09 +0300
Subject: [PATCH] compositor-fbdev: fix start-up assertion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes the failure to start with fbdev-backend:
weston: /home/pq/git/weston/libweston/compositor.c:4733: weston_compositor_add_pending_output: Assertion `output->disable' failed.
The disable hook was completely unimplemented, and the regression was
caused by e952a01c3b42c7c870091e71488e9469bd897153
"libweston: move asserts to add_pending_output()".
It used to work because Weston never tried to explicitly disable the
fbdev output, but now it is hitting the assert.
Fix it by tentatively implementing a disable hook. It has not been
tested to work for explicit disabling, but it does solve the regression.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102208
Cc: bluescreen_avenger@verizon.net
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Tested-by: n3rdopolis <bluescreen_avenger@verizon.net>
---
libweston/compositor-fbdev.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index e80a5040..6a305385 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -473,6 +473,21 @@ fbdev_output_enable(struct weston_output *base)
}
static int
+fbdev_output_disable_handler(struct weston_output *base)
+{
+ if (!base->enabled)
+ return 0;
+
+ /* Close the frame buffer. */
+ fbdev_output_disable(base);
+
+ if (base->renderer_state != NULL)
+ pixman_renderer_output_destroy(base);
+
+ return 0;
+}
+
+static int
fbdev_output_create(struct fbdev_backend *backend,
const char *device)
{
@@ -497,7 +512,7 @@ fbdev_output_create(struct fbdev_backend *backend,
output->base.name = strdup("fbdev");
output->base.destroy = fbdev_output_destroy;
- output->base.disable = NULL;
+ output->base.disable = fbdev_output_disable_handler;
output->base.enable = fbdev_output_enable;
weston_output_init(&output->base, backend->compositor);
@@ -539,11 +554,7 @@ fbdev_output_destroy(struct weston_output *base)
weston_log("Destroying fbdev output.\n");
- /* Close the frame buffer. */
- fbdev_output_disable(base);
-
- if (base->renderer_state != NULL)
- pixman_renderer_output_destroy(base);
+ fbdev_output_disable_handler(base);
/* Remove the output. */
weston_output_destroy(&output->base);

View file

@ -1,121 +0,0 @@
From 8fad15621a4cc5858edd240987a8b3a3b90895a3 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Thu, 10 May 2018 18:36:41 +0200
Subject: [PATCH] Fix compositor-rdp compilation with freerdp 2.0.0-rc2
See https://github.com/FreeRDP/FreeRDP/commit/1f7d33a2f22a372c124ce985a394619e186e06b9
---
libweston/compositor-rdp.c | 50 +++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c
index 091472b0..79b7f68d 100644
--- a/libweston/compositor-rdp.c
+++ b/libweston/compositor-rdp.c
@@ -185,10 +185,10 @@ rdp_peer_refresh_rfx(pixman_region32_t *damage, pixman_image_t *image, freerdp_p
cmd->destTop = damage->extents.y1;
cmd->destRight = damage->extents.x2;
cmd->destBottom = damage->extents.y2;
- cmd->bpp = 32;
- cmd->codecID = peer->settings->RemoteFxCodecId;
- cmd->width = width;
- cmd->height = height;
+ cmd->bmp.bpp = 32;
+ cmd->bmp.codecID = peer->settings->RemoteFxCodecId;
+ cmd->bmp.width = width;
+ cmd->bmp.height = height;
ptr = pixman_image_get_data(image) + damage->extents.x1 +
damage->extents.y1 * (pixman_image_get_stride(image) / sizeof(uint32_t));
@@ -211,8 +211,8 @@ rdp_peer_refresh_rfx(pixman_region32_t *damage, pixman_image_t *image, freerdp_p
pixman_image_get_stride(image)
);
- cmd->bitmapDataLength = Stream_GetPosition(context->encode_stream);
- cmd->bitmapData = Stream_Buffer(context->encode_stream);
+ cmd->bmp.bitmapDataLength = Stream_GetPosition(context->encode_stream);
+ cmd->bmp.bitmapData = Stream_Buffer(context->encode_stream);
update->SurfaceBits(update->context, cmd);
}
@@ -242,19 +242,19 @@ rdp_peer_refresh_nsc(pixman_region32_t *damage, pixman_image_t *image, freerdp_p
cmd->destTop = damage->extents.y1;
cmd->destRight = damage->extents.x2;
cmd->destBottom = damage->extents.y2;
- cmd->bpp = 32;
- cmd->codecID = peer->settings->NSCodecId;
- cmd->width = width;
- cmd->height = height;
+ cmd->bmp.bpp = 32;
+ cmd->bmp.codecID = peer->settings->NSCodecId;
+ cmd->bmp.width = width;
+ cmd->bmp.height = height;
ptr = pixman_image_get_data(image) + damage->extents.x1 +
damage->extents.y1 * (pixman_image_get_stride(image) / sizeof(uint32_t));
nsc_compose_message(context->nsc_context, context->encode_stream, (BYTE *)ptr,
- cmd->width, cmd->height,
+ cmd->bmp.width, cmd->bmp.height,
pixman_image_get_stride(image));
- cmd->bitmapDataLength = Stream_GetPosition(context->encode_stream);
- cmd->bitmapData = Stream_Buffer(context->encode_stream);
+ cmd->bmp.bitmapDataLength = Stream_GetPosition(context->encode_stream);
+ cmd->bmp.bitmapData = Stream_Buffer(context->encode_stream);
update->SurfaceBits(update->context, cmd);
}
@@ -291,16 +291,16 @@ rdp_peer_refresh_raw(pixman_region32_t *region, pixman_image_t *image, freerdp_p
update->SurfaceFrameMarker(peer->context, marker);
memset(cmd, 0, sizeof(*cmd));
- cmd->bpp = 32;
- cmd->codecID = 0;
+ cmd->bmp.bpp = 32;
+ cmd->bmp.codecID = 0;
for (i = 0; i < nrects; i++, rect++) {
/*weston_log("rect(%d,%d, %d,%d)\n", rect->x1, rect->y1, rect->x2, rect->y2);*/
cmd->destLeft = rect->x1;
cmd->destRight = rect->x2;
- cmd->width = rect->x2 - rect->x1;
+ cmd->bmp.width = rect->x2 - rect->x1;
- heightIncrement = peer->settings->MultifragMaxRequestSize / (16 + cmd->width * 4);
+ heightIncrement = peer->settings->MultifragMaxRequestSize / (16 + cmd->bmp.width * 4);
remainingHeight = rect->y2 - rect->y1;
top = rect->y1;
@@ -308,21 +308,21 @@ rdp_peer_refresh_raw(pixman_region32_t *region, pixman_image_t *image, freerdp_p
subrect.x2 = rect->x2;
while (remainingHeight) {
- cmd->height = (remainingHeight > heightIncrement) ? heightIncrement : remainingHeight;
+ cmd->bmp.height = (remainingHeight > heightIncrement) ? heightIncrement : remainingHeight;
cmd->destTop = top;
- cmd->destBottom = top + cmd->height;
- cmd->bitmapDataLength = cmd->width * cmd->height * 4;
- cmd->bitmapData = (BYTE *)realloc(cmd->bitmapData, cmd->bitmapDataLength);
+ cmd->destBottom = top + cmd->bmp.height;
+ cmd->bmp.bitmapDataLength = cmd->bmp.width * cmd->bmp.height * 4;
+ cmd->bmp.bitmapData = (BYTE *)realloc(cmd->bmp.bitmapData, cmd->bmp.bitmapDataLength);
subrect.y1 = top;
- subrect.y2 = top + cmd->height;
- pixman_image_flipped_subrect(&subrect, image, cmd->bitmapData);
+ subrect.y2 = top + cmd->bmp.height;
+ pixman_image_flipped_subrect(&subrect, image, cmd->bmp.bitmapData);
/*weston_log("* sending (%d,%d, %d,%d)\n", subrect.x1, subrect.y1, subrect.x2, subrect.y2); */
update->SurfaceBits(peer->context, cmd);
- remainingHeight -= cmd->height;
- top += cmd->height;
+ remainingHeight -= cmd->bmp.height;
+ top += cmd->bmp.height;
}
}
--
2.17.0

View file

@ -1,46 +1,43 @@
# Forked from Alpine to add patches that make it work with weird framebuffer drivers
# from downstream kernels
# "backend-rdp" temporarily disabled, because Alpine's freerdp package doesn't exist
# for armhf yet and we can't build freerdp with pmbootstrap (#1489)
# Forked from Alpine until the ABGR patch lands in Alpine's package:
# https://gitlab.freedesktop.org/wayland/weston/merge_requests/61
pkgname=weston
pkgver=9999
_pkgver=3.0.0
pkgrel=15
_pkgver=5.0.0
pkgrel=16
_libname=lib$pkgname
_libdir=$_libname-${_pkgver%%.*}
pkgdesc="The reference Wayland server"
url="http://wayland.freedesktop.org"
url="https://wayland.freedesktop.org/"
arch="x86_64 armhf aarch64"
license="MIT"
depends=""
makedepends="wayland-protocols libxkbcommon-dev xkeyboard-config
libinput-dev libunwind-dev mtdev-dev libxcursor-dev glu-dev
pango-dev colord-dev libwebp-dev libva-dev dbus-dev
linux-pam-dev wayland-dev"
linux-pam-dev wayland-dev
"
_cms="cms-colord cms-static"
_shell="shell-desktop shell-fullscreen shell-ivi"
_client="info terminal wcap-decode"
_backend="backend-drm backend-fbdev backend-headless backend-x11 backend-wayland"
options="!check suid"
_backend="backend-drm backend-fbdev backend-headless
backend-x11 backend-wayland
"
for _sub in $_cms $_shell $_client $_backend; do
subpackages="$subpackages $pkgname-$_sub:_sub"
done
subpackages="$pkgname-dev $pkgname-doc $subpackages
$pkgname-clients $_libname-desktop:_libd $_libname:libs
$pkgname-xwayland $pkgname-desktop-x11:_x11:noarch
"
source="
http://wayland.freedesktop.org/releases/$pkgname-$_pkgver.tar.xz
0001-compositor-fbdev-Added-parameter-pixman-type.patch
0002-compositor-fbdev-Add-support-for-ABGR.patch
0003-compositor-fbdev-print-the-pixman-type-guessed-in-ca.patch
0004-musl-weston-launcher.patch
0005-timespec.patch
0006-compositor-fbdev-fix-start-up-assertion.patch
0007-Fix-compositor-rdp-compilation-with-freerdp-2.0.0-rc.patch
"
"
source="https://wayland.freedesktop.org/releases/$pkgname-$_pkgver.tar.xz
timespec.patch
weston-launch-custom-error-function.patch
0001-compositor-fbdev-add-support-for-ABGR.patch
"
builddir="$srcdir/$pkgname-$_pkgver"
# weston-launch requires suid
options="!check suid"
install="$pkgname.pre-install"
build() {
cd "$builddir"
@ -55,11 +52,12 @@ build() {
--enable-screen-sharing \
--enable-vaapi-recorder \
--enable-clients \
--enable-demo-clients-install \
--disable-setuid-install
--enable-demo-clients-install
make
}
# Does not run through, see also:
# https://github.com/alpinelinux/aports/pull/1689
check() {
make -C "$builddir" check
return 0
@ -76,22 +74,19 @@ libs() {
_libd() {
pkgdesc="Desktop shells abstraction library for libweston compositors"
mkdir -p "$subpkgdir"/usr/lib
mkdir -p "$subpkgdir"/usr/lib || return 1
mv "$pkgdir"/usr/lib/*desktop* "$subpkgdir"/usr/lib
}
clients() {
pkgdesc="Weston example clients"
mkdir -p "$subpkgdir"/usr/bin
mkdir -p "$subpkgdir"/usr/bin || return 1
mv "$pkgdir"/usr/bin/$pkgname-* "$subpkgdir"/usr/bin
# Set SUID bit to run it with proper credentials
chmod +s "$subpkgdir"/usr/bin/weston-launch
}
xwayland() {
pkgdesc="Wayland module to run X Clients"
mkdir -p "$subpkgdir"/usr/lib/$_libdir
mkdir -p "$subpkgdir"/usr/lib/$_libdir || return 1
mv "$pkgdir"/usr/lib/$_libdir/xwayland.so \
"$subpkgdir"/usr/lib/$_libdir
}
@ -132,14 +127,10 @@ _sub() {
pkgdesc="Weston client: $name"
;;
esac
mkdir -p "$subpkgdir"/$path
mkdir -p "$subpkgdir"/$path || return 1
mv "$pkgdir"/$path/$name "$subpkgdir"/$path
}
sha512sums="b824c39f2a884f6d50d607613f447090621f684c96f7d905f25f6e500dabd03ecb2b1cd1030babc193c3417223cb220103abb792437e1a5ead7229a76b5c7a58 weston-3.0.0.tar.xz
2daa68ee19f4e123d7f3148517c2afcd4df0f065815a0e28db38f301260cd833b7170060c46127e65a25021e2d814afb40fc0f2987cbb3ab5cd4f9dae778bc98 0001-compositor-fbdev-Added-parameter-pixman-type.patch
fa1099258aaef38f228de2e9ca3e2ae5e9e21ed10891f8686f5abd16d7f6bc6c57e43e0bfc3175ed70f32bb80d98f6ec009e663cd4f8724e29dea13c7fcc12fb 0002-compositor-fbdev-Add-support-for-ABGR.patch
b5eb741ea8b6fcbd9de95e773fe0bf4ae6588ef57564f97a65aefc6c7ec29f1a01de9764a25672fd7c76c8ff514b497743cbaf279818123041c161c7a1e62bb6 0003-compositor-fbdev-print-the-pixman-type-guessed-in-ca.patch
856a28a324cb9adf94b92bf5489ff43827d57e6acee0c7e0e558018357166b782126e086a4308c3e3499d068fa07f02862cc20cdfbc9a3d6af30ec823eb1b78f 0004-musl-weston-launcher.patch
3e596af4bf0a6b06a5d28376043db111fe1c161ead04501fa6d2c667b5a21889cca3354d1bdc4ac794841bef68ed5e1a7a84e44e7d510e947e3673195706caed 0005-timespec.patch
5d356bc8534c5486b0c5daf727fb8d2cd8409f7f964e3f391c225a2b21b9f293e36d10344f55f0e6566bfbde415c990a72d57fe5db6081acd3c788106cda319f 0006-compositor-fbdev-fix-start-up-assertion.patch
fb1f97058723bca27fc80b41e97d6f30987ab5fa2861d07bc41df4755fe431e0900fb82fbd92fd235db30cbca7869b624ffb95a07c0dfe752379a3ff8690c4ef 0007-Fix-compositor-rdp-compilation-with-freerdp-2.0.0-rc.patch"
sha512sums="b6f97eca014ea47f3de0c5ddd89712f896cd66423d0eb499e1d88d35aab616cef1e735ebb8e0cefd8b60085314b6ec3d56b39d7c4776188bb56d58efc84a52cf weston-5.0.0.tar.xz
3e596af4bf0a6b06a5d28376043db111fe1c161ead04501fa6d2c667b5a21889cca3354d1bdc4ac794841bef68ed5e1a7a84e44e7d510e947e3673195706caed timespec.patch
3f742a29075fd447995cdda283d12655910925811b22a28fc279bcc7cf5c7c1a888cd391bec42d934b3bad24578504c642882100f15647178f6f6f89a8405916 weston-launch-custom-error-function.patch
788e9ea291ce2d3e96965456ff6ca8a15ba2dda18eee37bca744f826a3277d087e9fb637c6d57175036872c2c9c0e052180ab4212af811eac1a232178a23f663 0001-compositor-fbdev-add-support-for-ABGR.patch"

View file

@ -0,0 +1,48 @@
https://patchwork.freedesktop.org/patch/112884/
error.h is a gnu extension and not available in other
popular libcs like musl. This patch provides a replacement.
Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
---
libweston/weston-launch.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
index 140fde1..84f7d60 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>
@@ -112,6 +111,25 @@ struct weston_launch {
union cmsg_data { unsigned char b[4]; int fd; };
+static void
+error(int status, int errnum, const char *msg, ...)
+{
+ va_list args;
+
+ fputs("weston-launch: ", stderr);
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+
+ if (errnum)
+ fprintf(stderr, ": %s\n", strerror(errnum));
+ else
+ fputc('\n', stderr);
+
+ if (status)
+ exit(status);
+}
+
static gid_t *
read_groups(void)
{

View file

@ -0,0 +1,5 @@
#!/bin/sh
addgroup -S weston-launch 2>/dev/null
exit 0