commit: 9dacace1698884a65a9cd45bc8b59af1b76f7fcd
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Nov 9 01:20:27 2016 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Nov 9 01:21:50 2016 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=9dacace1
dev-libs/weston: Add Latest
1.11.0 in both weston and wayland added a lot of musl incompatibilities for no
reason -- the patch removes use of error.h, which musl doesn't have.
dev-libs/weston/Manifest | 5 +
dev-libs/weston/files/1.11.0-musl.patch | 265 ++++++++++++++++++++++++++++++++
dev-libs/weston/files/README.gentoo | 9 ++
dev-libs/weston/metadata.xml | 26 ++++
dev-libs/weston/weston-1.11.0.ebuild | 158 +++++++++++++++++++
5 files changed, 463 insertions(+)
diff --git a/dev-libs/weston/Manifest b/dev-libs/weston/Manifest
new file mode 100644
index 0000000..08a2abf
--- /dev/null
+++ b/dev-libs/weston/Manifest
@@ -0,0 +1,5 @@
+AUX 1.11.0-musl.patch 6945 SHA256
c328fffeeb5e5c8ad1b5198c62ba0da415fb0c0ac003070d83c11cde5057b5dc SHA512
6c798b7dad8f81c1cd550b9aa30e11729881dff09141cd811d90e2ad06da7f756542d8844b1a2a2948b247935cd4261d46aa9b991aaaeada226c418512734b2f
WHIRLPOOL
719cf3a43ee54c4ab2fd3f3500560a3c10bb974d897cd07c501afe85ee37ab1235ffc5583bbfd3015ecfbe7d9745e6350f9ef9cf78913346bb9f8e4659a0108c
+AUX README.gentoo 383 SHA256
ded85eb05b14162aceb7ba67e49be207bbe15591fa519743478618def88cee85 SHA512
e4d8f8e0edeb6773dd7ef6329074d1e40b694b9e7e10b6a429d8c5dd4fe1170594f447a42eb41446ec2355829a1da1606bf6c544434551c5c931b0794422e786
WHIRLPOOL
8bc2485d91a399eb9d283ec3363546852be9a1a3e69214b3c7cc9a6427c4e10355dc8732de0d8b688f9df8a4bc03df25c3ce7b33c19773b7a47616c93f82bd81
+DIST weston-1.11.0.tar.xz 1242244 SHA256
05e086e9f186a06843b9f7a5e1abf19347b1a6e4be26d7e74927abc17b6b7125 SHA512
30c43058aeca2d90d8c57ee3beb824aa42474eb2d0fa942622949b49c7771eb5d8d9c452d496a13950baabffef3c343d7386821778ae931939039fab2f782ad5
WHIRLPOOL
5e76484c1413ddc14c426c80845790e6b636bb2d827188563ca9b41f23ca4afd6cf20c8a743c0ff1b6c09d371c3e6988d0e9765333660aeb8723ddf62208b876
+EBUILD weston-1.11.0.ebuild 3671 SHA256
1961ced3c29cdae326f21323f8404ca56ac4880c791bfc35bb781a239bd21a13 SHA512
88de8968e3ca286cbea8df932225619cb000cbfadf591174b8f687fe67831b8e17ca2c4a1c9a0b3d200ebd6b18fdb08789115a914e1df284ce534a4139c24be0
WHIRLPOOL
a7a68946e418bbfe6e32a65512e5b5a9fcaecb6ea1b5abe0072767f736b3c77f6be33f4ea681612e081681ba636041fafb694d6ae95939571dd2f72eccfea624
+MISC metadata.xml 1346 SHA256
2710b274618784eb36f2c67fa8778b95c49ff2eeb3b52757bca963a363f455e4 SHA512
27e5e3fde5db5d9e04138b1abdeb77a09a3a0c726c28b1ba63db4aec44c1be8804cfc171893573ac2b4365dc94c725129843267cb0ab938bc5599aa186f26094
WHIRLPOOL
70f1a3c35da4948698ab39fc95d3b433d50b9170090050a0b8f4f1c2669011f2bd0d0f177414ae4744fcebdf7728174339578666b26d1508c56720cdb530fbfe
diff --git a/dev-libs/weston/files/1.11.0-musl.patch
b/dev-libs/weston/files/1.11.0-musl.patch
new file mode 100644
index 0000000..b568b47
--- /dev/null
+++ b/dev-libs/weston/files/1.11.0-musl.patch
@@ -0,0 +1,265 @@
+diff -Naur weston-1.11.0.orig/shared/xalloc.h weston-1.11.0/shared/xalloc.h
+--- weston-1.11.0.orig/shared/xalloc.h 2016-06-21 10:44:19.589264446 -0700
++++ weston-1.11.0/shared/xalloc.h 2016-06-21 10:44:32.790394210 -0700
+@@ -30,6 +30,7 @@
+ extern "C" {
+ #endif
+
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+
+diff -Naur weston-1.11.0.orig/src/weston-launch.c
weston-1.11.0/src/weston-launch.c
+--- weston-1.11.0.orig/src/weston-launch.c 2016-06-21 10:44:19.613264682
-0700
++++ weston-1.11.0/src/weston-launch.c 2016-06-21 10:54:33.890366803 -0700
+@@ -33,7 +33,7 @@
+ #include <poll.h>
+ #include <errno.h>
+
+-#include <error.h>
++#include <err.h>
+ #include <getopt.h>
+
+ #include <sys/types.h>
+@@ -225,11 +225,15 @@
+ static int
+ setup_launcher_socket(struct weston_launch *wl)
+ {
+- if (socketpair(AF_LOCAL, SOCK_SEQPACKET, 0, wl->sock) < 0)
+- error(1, errno, "socketpair failed");
++ if (socketpair(AF_LOCAL, SOCK_SEQPACKET, 0, wl->sock) < 0) {
++ err(errno, "socketpair failed");
++ exit(1);
++ }
+
+- if (fcntl(wl->sock[0], F_SETFD, FD_CLOEXEC) < 0)
+- error(1, errno, "fcntl failed");
++ if (fcntl(wl->sock[0], F_SETFD, FD_CLOEXEC) < 0) {
++ err(errno, "fcntl failed");
++ exit(1);
++ }
+
+ return 0;
+ }
+@@ -464,7 +468,7 @@
+ int pid, status, ret;
+
+ if (read(wl->signalfd, &sig, sizeof sig) != sizeof sig) {
+- error(0, errno, "reading signalfd failed");
++ err(errno, "reading signalfd failed");
+ return -1;
+ }
+
+@@ -530,49 +534,69 @@
+ int tty0 = open("/dev/tty0", O_WRONLY | O_CLOEXEC);
+ char filename[16];
+
+- if (tty0 < 0)
+- error(1, errno, "could not open tty0");
++ if (tty0 < 0) {
++ err(errno, "could not open tty0");
++ exit(1);
++ }
+
+- if (ioctl(tty0, VT_OPENQRY, &wl->ttynr) < 0 || wl->ttynr == -1)
+- error(1, errno, "failed to find non-opened console");
++ if (ioctl(tty0, VT_OPENQRY, &wl->ttynr) < 0 || wl->ttynr == -1)
{
++ err(errno, "failed to find non-opened console");
++ exit(1);
++ }
+
+ snprintf(filename, sizeof filename, "/dev/tty%d", wl->ttynr);
+ wl->tty = open(filename, O_RDWR | O_NOCTTY);
+ close(tty0);
+ }
+
+- if (wl->tty < 0)
+- error(1, errno, "failed to open tty");
++ if (wl->tty < 0) {
++ err(errno, "failed to open tty");
++ exit(1);
++ }
+
+ if (fstat(wl->tty, &buf) == -1 ||
+- major(buf.st_rdev) != TTY_MAJOR || minor(buf.st_rdev) == 0)
+- error(1, 0, "weston-launch must be run from a virtual
terminal");
++ major(buf.st_rdev) != TTY_MAJOR || minor(buf.st_rdev) == 0) {
++ err(0, "weston-launch must be run from a virtual terminal");
++ exit(1);
++ }
+
+ if (tty) {
+- if (fstat(wl->tty, &buf) < 0)
+- error(1, errno, "stat %s failed", tty);
++ if (fstat(wl->tty, &buf) < 0) {
++ err(errno, "stat %s failed", tty);
++ exit(1);
++ }
+
+- if (major(buf.st_rdev) != TTY_MAJOR)
+- error(1, 0, "invalid tty device: %s", tty);
++ if (major(buf.st_rdev) != TTY_MAJOR) {
++ err(0, "invalid tty device: %s", tty);
++ exit(1);
++ }
+
+ wl->ttynr = minor(buf.st_rdev);
+ }
+
+- if (ioctl(wl->tty, KDGKBMODE, &wl->kb_mode))
+- error(1, errno, "failed to get current keyboard mode: %m\n");
++ if (ioctl(wl->tty, KDGKBMODE, &wl->kb_mode)) {
++ err(errno, "failed to get current keyboard mode: %m\n");
++ exit(1);
++ }
+
+ if (ioctl(wl->tty, KDSKBMUTE, 1) &&
+- ioctl(wl->tty, KDSKBMODE, K_OFF))
+- error(1, errno, "failed to set K_OFF keyboard mode: %m\n");
++ ioctl(wl->tty, KDSKBMODE, K_OFF)) {
++ err(errno, "failed to set K_OFF keyboard mode: %m\n");
++ exit(1);
++ }
+
+- if (ioctl(wl->tty, KDSETMODE, KD_GRAPHICS))
+- error(1, errno, "failed to set KD_GRAPHICS mode on tty: %m\n");
++ if (ioctl(wl->tty, KDSETMODE, KD_GRAPHICS)) {
++ err(errno, "failed to set KD_GRAPHICS mode on tty: %m\n");
++ exit(1);
++ }
+
+ mode.mode = VT_PROCESS;
+ mode.relsig = SIGUSR1;
+ mode.acqsig = SIGUSR2;
+- if (ioctl(wl->tty, VT_SETMODE, &mode) < 0)
+- error(1, errno, "failed to take control of vt handling\n");
++ if (ioctl(wl->tty, VT_SETMODE, &mode) < 0) {
++ err(errno, "failed to take control of vt handling\n");
++ exit(1);
++ }
+
+ return 0;
+ }
+@@ -585,10 +609,14 @@
+ int i;
+
+ if (wl->tty != STDIN_FILENO) {
+- if (setsid() < 0)
+- error(1, errno, "setsid failed");
+- if (ioctl(wl->tty, TIOCSCTTY, 0) < 0)
+- error(1, errno, "TIOCSCTTY failed - tty is in use");
++ if (setsid() < 0) {
++ err(errno, "setsid failed");
++ exit(1);
++ }
++ if (ioctl(wl->tty, TIOCSCTTY, 0) < 0) {
++ err(errno, "TIOCSCTTY failed - tty is in use");
++ exit(1);
++ }
+ }
+
+ term = getenv("TERM");
+@@ -604,7 +632,7 @@
+ if (env) {
+ for (i = 0; env[i]; ++i) {
+ if (putenv(env[i]) != 0)
+- error(0, 0, "putenv %s failed", env[i]);
++ err(0, "putenv %s failed", env[i]);
+ }
+ free(env);
+ }
+@@ -617,8 +645,10 @@
+ #ifdef HAVE_INITGROUPS
+ initgroups(wl->pw->pw_name, wl->pw->pw_gid) < 0 ||
+ #endif
+- setuid(wl->pw->pw_uid) < 0)
+- error(1, errno, "dropping privileges failed");
++ setuid(wl->pw->pw_uid) < 0) {
++ err(errno, "dropping privileges failed");
++ exit(1);
++ }
+ }
+
+ static void
+@@ -658,7 +688,8 @@
+ child_argv[5 + i] = NULL;
+
+ execv(child_argv[0], child_argv);
+- error(1, errno, "exec failed");
++ err(errno, "exec failed");
++ exit(1);
+ }
+
+ static void
+@@ -691,8 +722,10 @@
+ switch (c) {
+ case 'u':
+ wl.new_user = optarg;
+- if (getuid() != 0)
+- error(1, 0, "Permission denied. -u allowed for
root only");
++ if (getuid() != 0) {
++ err(0, "Permission denied. -u allowed for root
only");
++ exit(1);
++ }
+ break;
+ case 't':
+ tty = optarg;
+@@ -706,24 +739,30 @@
+ }
+ }
+
+- if ((argc - optind) > (MAX_ARGV_SIZE - 6))
+- error(1, E2BIG, "Too many arguments to pass to weston");
++ if ((argc - optind) > (MAX_ARGV_SIZE - 6)) {
++ err(E2BIG, "Too many arguments to pass to weston");
++ exit(1);
++ }
+
+ if (wl.new_user)
+ wl.pw = getpwnam(wl.new_user);
+ else
+ wl.pw = getpwuid(getuid());
+- if (wl.pw == NULL)
+- error(1, errno, "failed to get username");
++ if (wl.pw == NULL) {
++ err(errno, "failed to get username");
++ exit(1);
++ }
+
+- if (!weston_launch_allowed(&wl))
+- error(1, 0, "Permission denied. You should either:\n"
++ if (!weston_launch_allowed(&wl)) {
++ err(0, "Permission denied. You should either:\n"
+ #ifdef HAVE_SYSTEMD_LOGIN
+ " - run from an active and local (systemd) session.\n"
+ #else
+ " - enable systemd session support for weston-launch.\n"
+ #endif
+ " - or add yourself to the 'weston-launch' group.");
++ exit(1);
++ }
+
+ if (setup_tty(&wl, tty) < 0)
+ exit(EXIT_FAILURE);
+@@ -738,8 +777,10 @@
+ exit(EXIT_FAILURE);
+
+ wl.child = fork();
+- if (wl.child == -1)
+- error(EXIT_FAILURE, errno, "fork failed");
++ if (wl.child == -1) {
++ err(errno, "fork failed");
++ exit(EXIT_FAILURE);
++ }
+
+ if (wl.child == 0)
+ launch_compositor(&wl, argc - optind, argv + optind);
+@@ -759,7 +800,7 @@
+
+ n = poll(fds, 2, -1);
+ if (n < 0)
+- error(0, errno, "poll failed");
++ err(errno, "poll failed");
+ if (fds[0].revents & POLLIN)
+ handle_socket_msg(&wl);
+ if (fds[1].revents)
diff --git a/dev-libs/weston/files/README.gentoo
b/dev-libs/weston/files/README.gentoo
new file mode 100644
index 0000000..ed8c5c3
--- /dev/null
+++ b/dev-libs/weston/files/README.gentoo
@@ -0,0 +1,9 @@
+For running Weston you need to have $XDG_RUNTIME_DIR in your environment,
+directory must exist and have correct permissions. If you are not using
systemd,
+it will not be created automatically, you can create it using your shell,
+add these lines to ~/.bash_profile:
+
+# wayland
+export XDG_RUNTIME_DIR=/tmp/.runtime-${USER}
+mkdir -p "${XDG_RUNTIME_DIR}"
+chmod 0700 "${XDG_RUNTIME_DIR}"
diff --git a/dev-libs/weston/metadata.xml b/dev-libs/weston/metadata.xml
new file mode 100644
index 0000000..54c4041
--- /dev/null
+++ b/dev-libs/weston/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>[email protected]</email>
+ <name>X11</name>
+</maintainer>
+<use>
+ <flag name="colord">Allow setting color managment</flag>
+ <flag name="drm">Enable drm compositor support</flag>
+ <flag name="editor">Install wayland-editor example application</flag>
+ <flag name="fbdev">Enable fbdev compositor support</flag>
+ <flag name="gles2">Use GLESv2 cairo instead of full GL</flag>
+ <flag name="headless">Headless backend and a noop renderer, mainly for
testing purposes</flag>
+ <flag name="ivi">Enable the IVI shell</flag>
+ <flag name="launch">Install weston-launch utility</flag>
+ <flag name="rdp">Enable Remote Desktop Protocol compositor
support</flag>
+ <flag name="resize-optimization">Increase performance, allocate more
RAM. Recommended to disable on Raspberry Pi</flag>
+ <flag name="rpi">Raspberry Pi GPU support</flag>
+ <flag name="screen-sharing">Enable screen-sharing through RDP</flag>
+ <flag name="unwind">Enable libunwind usage for backtraces</flag>
+ <flag name="wayland-compositor">Enable Wayland compositor support</flag>
+ <flag name="webp">Add support for the WebP image format</flag>
+ <flag name="xwayland">Enable ability support native X11
applications</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-libs/weston/weston-1.11.0.ebuild
b/dev-libs/weston/weston-1.11.0.ebuild
new file mode 100644
index 0000000..8af796a
--- /dev/null
+++ b/dev-libs/weston/weston-1.11.0.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} = 9999* ]]; then
+ EGIT_REPO_URI="git://anongit.freedesktop.org/git/wayland/${PN}"
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+VIRTUALX_REQUIRED="test"
+RESTRICT="test"
+
+inherit autotools readme.gentoo-r1 toolchain-funcs virtualx $GIT_ECLASS
+
+DESCRIPTION="Wayland reference compositor"
+HOMEPAGE="https://wayland.freedesktop.org/"
+
+if [[ $PV = 9999* ]]; then
+ SRC_URI="${SRC_PATCHES}"
+ KEYWORDS="amd64 arm x86"
+else
+ SRC_URI="https://wayland.freedesktop.org/releases/${P}.tar.xz"
+ KEYWORDS="amd64 arm x86 ~arm-linux"
+fi
+
+LICENSE="MIT CC-BY-SA-3.0"
+SLOT="0"
+
+IUSE_VIDEO_CARDS="video_cards_intel video_cards_v4l"
+IUSE="colord dbus +drm editor examples fbdev +gles2 headless ivi jpeg lcms rdp
+resize-optimization rpi +launch screen-sharing static-libs +suid systemd test
unwind wayland-compositor webp +X xwayland ${IUSE_VIDEO_CARDS}"
+
+REQUIRED_USE="
+ drm? ( gles2 )
+ screen-sharing? ( rdp )
+ systemd? ( dbus )
+ test? ( X )
+ wayland-compositor? ( gles2 )
+"
+
+RDEPEND="
+ >=dev-libs/libinput-0.8.0
+ >=dev-libs/wayland-1.10.0
+ >=dev-libs/wayland-protocols-1.2
+ lcms? ( media-libs/lcms:2 )
+ media-libs/libpng:0=
+ webp? ( media-libs/libwebp:0= )
+ jpeg? ( virtual/jpeg:0= )
+ >=x11-libs/cairo-1.11.3
+ >=x11-libs/libdrm-2.4.30
+ x11-libs/libxkbcommon
+ x11-libs/pixman
+ x11-misc/xkeyboard-config
+ fbdev? (
+ >=sys-libs/mtdev-1.1.0
+ >=virtual/udev-136
+ )
+ colord? ( >=x11-misc/colord-0.1.27 )
+ dbus? ( sys-apps/dbus )
+ drm? (
+ media-libs/mesa[gbm]
+ >=sys-libs/mtdev-1.1.0
+ >=virtual/udev-136
+ )
+ editor? ( x11-libs/pango )
+ gles2? (
+ media-libs/mesa[gles2,wayland]
+ )
+ rdp? ( >=net-misc/freerdp-1.1.0_beta1_p20130710 )
+ rpi? (
+ >=sys-libs/mtdev-1.1.0
+ >=virtual/udev-136
+ )
+ systemd? (
+ sys-auth/pambase[systemd]
+ sys-apps/systemd[pam]
+ )
+ launch? ( sys-auth/pambase )
+ unwind? ( sys-libs/libunwind )
+ X? (
+ x11-libs/libxcb
+ x11-libs/libX11
+ )
+ xwayland? (
+ x11-base/xorg-server[wayland]
+ x11-libs/cairo[xcb]
+ x11-libs/libxcb
+ x11-libs/libXcursor
+ )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/${PV}-musl.patch" )
+
+src_prepare() {
+ if [[ ${PV} = 9999* ]]; then
+ eautoreconf
+ fi
+ epatch "${PATCHES[@]}"
+}
+
+src_configure() {
+ local myconf
+ if use examples || use test; then
+ myconf="--enable-simple-clients"
+ else
+ myconf="--disable-simple-clients"
+ fi
+
+ myconf+=" --with-cairo=image --disable-simple-egl-clients"
+
+ econf \
+ $(use_enable examples demo-clients-install) \
+ $(use_enable fbdev fbdev-compositor) \
+ $(use_enable dbus) \
+ $(use_enable drm drm-compositor) \
+ $(use_enable headless headless-compositor) \
+ $(use_enable ivi ivi-shell) \
+ $(use_enable lcms) \
+ $(use_enable rdp rdp-compositor) \
+ $(use_enable rpi rpi-compositor) \
+ $(use_enable wayland-compositor) \
+ $(use_enable X x11-compositor) \
+ $(use_enable launch weston-launch) \
+ $(use_enable colord) \
+ $(use_enable gles2 egl) \
+ $(use_enable unwind libunwind) \
+ $(use_enable resize-optimization) \
+ $(use_enable screen-sharing) \
+ $(use_enable suid setuid-install) \
+ $(use_enable systemd systemd-login) \
+ $(use_enable systemd systemd-notify) \
+ $(use_enable xwayland) \
+ $(use_enable xwayland xwayland-test) \
+ $(use_enable video_cards_intel simple-dmabuf-intel-client) \
+ $(use_enable video_cards_v4l simple-dmabuf-v4l-client) \
+ $(use_with jpeg) \
+ $(use_with webp) \
+ ${myconf}
+}
+
+src_test() {
+ export XDG_RUNTIME_DIR="${T}/runtime-dir"
+ mkdir "${XDG_RUNTIME_DIR}" || die
+ chmod 0700 "${XDG_RUNTIME_DIR}" || die
+
+ cd "${BUILD_DIR}" || die
+ Xemake check
+}
+
+src_install() {
+ default
+
+ readme.gentoo_create_doc
+}