testing/weston: Added weston-launch

This commit is contained in:
Marian Buschsieweke 2018-02-06 14:55:04 +01:00 committed by Leonardo Arena
parent f7107bcb9d
commit 20b05ae1dc
3 changed files with 63 additions and 7 deletions

View File

@ -2,7 +2,7 @@
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=weston
pkgver=3.0.0
pkgrel=0
pkgrel=1
_libname=lib$pkgname
_libdir=$_libname-${pkgver%%.*}
pkgdesc="The reference Wayland server"
@ -13,6 +13,7 @@ depends=""
makedepends="wayland-protocols libxkbcommon-dev xkeyboard-config
libinput-dev libunwind-dev mtdev-dev libxcursor-dev glu-dev
pango-dev colord-dev freerdp-dev libwebp-dev libva-dev dbus-dev
linux-pam-dev
"
_cms="cms-colord cms-static"
_shell="shell-desktop shell-fullscreen shell-ivi"
@ -28,9 +29,12 @@ subpackages="$pkgname-dev $pkgname-doc $subpackages
$pkgname-xwayland $pkgname-desktop-x11:_x11:noarch
"
source="http://wayland.freedesktop.org/releases/$pkgname-$pkgver.tar.xz
timespec.patch"
timespec.patch
weston-launch-custom-error-function.patch"
builddir="$srcdir/$pkgname-$pkgver"
options="!check"
# weston-launch requires suid
options="!check suid"
install="$pkgname.pre-install"
build() {
cd "$builddir"
@ -46,9 +50,7 @@ build() {
--enable-screen-sharing \
--enable-vaapi-recorder \
--enable-clients \
--enable-demo-clients-install \
--disable-weston-launch \
--disable-setuid-install
--enable-demo-clients-install
make
}
@ -128,4 +130,5 @@ _sub() {
}
sha512sums="b824c39f2a884f6d50d607613f447090621f684c96f7d905f25f6e500dabd03ecb2b1cd1030babc193c3417223cb220103abb792437e1a5ead7229a76b5c7a58 weston-3.0.0.tar.xz
3e596af4bf0a6b06a5d28376043db111fe1c161ead04501fa6d2c667b5a21889cca3354d1bdc4ac794841bef68ed5e1a7a84e44e7d510e947e3673195706caed timespec.patch"
3e596af4bf0a6b06a5d28376043db111fe1c161ead04501fa6d2c667b5a21889cca3354d1bdc4ac794841bef68ed5e1a7a84e44e7d510e947e3673195706caed timespec.patch
3f742a29075fd447995cdda283d12655910925811b22a28fc279bcc7cf5c7c1a888cd391bec42d934b3bad24578504c642882100f15647178f6f6f89a8405916 weston-launch-custom-error-function.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