diff --git a/srcpkgs/weston/patches/0001-make-error-portable.patch b/srcpkgs/weston/patches/0001-make-error-portable.patch new file mode 100644 index 00000000000..bc47d193c7f --- /dev/null +++ b/srcpkgs/weston/patches/0001-make-error-portable.patch @@ -0,0 +1,80 @@ +From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 May 2015 20:56:00 -0700 +Subject: [PATCH weston] 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: Khem Raj +--- +Upstream-Status: Submitted + + configure.ac | 2 ++ + src/weston-error.h | 20 ++++++++++++++++++++ + src/weston-launch.c | 2 +- + 3 files changed, 23 insertions(+), 1 deletion(-) + create mode 100644 src/weston-error.h + +diff --git configure.ac configure.ac +index 263fc22..f52cd62 100644 +--- configure.ac ++++ configure.ac +@@ -57,6 +57,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], + [[#include ]]) + AC_CHECK_HEADERS([execinfo.h]) + ++AC_CHECK_HEADERS([error.h]) ++ + AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) + + COMPOSITOR_MODULES="wayland-server >= 1.7.93 pixman-1 >= 0.25.2" +diff --git src/weston-error.h src/weston-error.h +new file mode 100644 +index 0000000..2089d02 +--- /dev/null ++++ src/weston-error.h +@@ -0,0 +1,20 @@ ++#ifndef _WESTON_ERROR_H ++#define _WESTON_ERROR_H ++ ++#if defined(HAVE_ERROR_H) ++#include ++#else ++#include ++#include ++#define _weston_error(S, E, F, ...) do { \ ++ if (E) \ ++ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \ ++ else \ ++ err(S, F, ##__VA_ARGS__); \ ++} while(0) ++ ++#define error _weston_error ++#endif ++ ++#endif ++ +diff --git src/weston-launch.c src/weston-launch.c +index 10c66de..3e6d30a 100644 +--- src/weston-launch.c ++++ src/weston-launch.c +@@ -30,7 +30,6 @@ + #include + #include + +-#include + #include + + #include +@@ -56,6 +55,7 @@ + #endif + + #include "weston-launch.h" ++#include "weston-error.h" + + #define DRM_MAJOR 226 + +-- +2.1.4 + diff --git a/srcpkgs/weston/patches/fix-musl.patch b/srcpkgs/weston/patches/fix-musl.patch deleted file mode 100644 index 4f9f0670257..00000000000 --- a/srcpkgs/weston/patches/fix-musl.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- src/weston-launch.c.orig 2016-03-16 13:34:33.118723324 +0100 -+++ src/weston-launch.c 2016-03-16 13:35:30.332722300 +0100 -@@ -33,7 +33,6 @@ - #include - #include - --#include - #include - - #include -@@ -72,6 +71,41 @@ - - #define MAX_ARGV_SIZE 256 - -+#ifdef __GLIBC__ -+# include -+#else -+# include -+# include -+# include -+# include -+static void error_at_line(int status, int errnum, const char *filename, -+ unsigned int linenum, const char *format, ...) -+{ -+ va_list ap; -+ -+ fflush(stdout); -+ -+ if (filename != NULL) -+ fprintf(stderr, "%s:%u: ", filename, linenum); -+ -+ va_start(ap, format); -+ vfprintf(stderr, format, ap); -+ va_end(ap); -+ -+ if (errnum != 0) -+ fprintf(stderr, ": %s", strerror(errnum)); -+ -+ fprintf(stderr, "\n"); -+ -+ if (status != 0) -+ exit(status); -+} -+ -+#define error(status, errnum, format...) \ -+ error_at_line(status, errnum, NULL, 0, format) -+ -+#endif /* __GLIBC__ */ -+ - #ifdef HAVE_LIBDRM - - #include diff --git a/srcpkgs/weston/template b/srcpkgs/weston/template index 2e1312309e1..231609f4abe 100644 --- a/srcpkgs/weston/template +++ b/srcpkgs/weston/template @@ -1,7 +1,7 @@ # Template file for 'weston'. pkgname=weston version=1.10.0 -revision=1 +revision=2 build_style=gnu-configure # XXX enable rdp compositor if freerdp is updated to >=1.1. configure_args="--enable-libinput-backend --disable-setuid-install