aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Fish <gentoo@seaofdirac.net>2016-01-01 22:13:01 +0100
committerNicholas Fish <gentoo@seaofdirac.net>2016-01-01 22:13:01 +0100
commit5b509d499a455ee944c368bb36486cb4dfdb6b5e (patch)
tree2e01d302c892e9afccc179fa87d86f98b5fbaf72 /dev-libs
parentFix issue detecting crypt library to pam-1.2.1-r99 ebuild (diff)
downloadennui-5b509d499a455ee944c368bb36486cb4dfdb6b5e.tar.gz
ennui-5b509d499a455ee944c368bb36486cb4dfdb6b5e.tar.bz2
ennui-5b509d499a455ee944c368bb36486cb4dfdb6b5e.zip
Add patch for error.h/error() usage in weston
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/weston/Manifest5
-rw-r--r--dev-libs/weston/files/README.gentoo9
-rw-r--r--dev-libs/weston/files/weston-1.9.0-make-error-portable.patch66
-rw-r--r--dev-libs/weston/metadata.xml23
-rw-r--r--dev-libs/weston/weston-1.9.0-r99.ebuild144
5 files changed, 247 insertions, 0 deletions
diff --git a/dev-libs/weston/Manifest b/dev-libs/weston/Manifest
new file mode 100644
index 0000000..63e770d
--- /dev/null
+++ b/dev-libs/weston/Manifest
@@ -0,0 +1,5 @@
+AUX README.gentoo 383 SHA256 ded85eb05b14162aceb7ba67e49be207bbe15591fa519743478618def88cee85 SHA512 e4d8f8e0edeb6773dd7ef6329074d1e40b694b9e7e10b6a429d8c5dd4fe1170594f447a42eb41446ec2355829a1da1606bf6c544434551c5c931b0794422e786 WHIRLPOOL 8bc2485d91a399eb9d283ec3363546852be9a1a3e69214b3c7cc9a6427c4e10355dc8732de0d8b688f9df8a4bc03df25c3ce7b33c19773b7a47616c93f82bd81
+AUX weston-1.9.0-make-error-portable.patch 1599 SHA256 c9d556d8d30417662a835bc81a1dcd2a62a9334c1cf7956d24ceac0f9f5c5df9 SHA512 6aaf8f99461d8467d82d7ab9cd92d99e6320b2982310f1f06334b4093efbc070306958f863a0a6f670f420f23148c8c4e4739575e5fd12ee8dcbc3beca76aab3 WHIRLPOOL f10d8c7899e1eb1bec17cb61b3d077f4fec017d37dcc55565b7840d6da5828ff8a901f807ccb1de8626d390e9bd74cef7591080d59e276044c4d78936f9b6270
+DIST weston-1.9.0.tar.xz 1238240 SHA256 9c1b03f3184fa0b0dfdf67e215048085156e1a2ca344af6613fed36794ac48cf SHA512 9bcbb5971b8a55d9e10aacf0aae868ff03750a98daee5233dcbff5698ed84e41c4b147fa1fdb1e2be916e3b1e13f259e0eec62354517d6e2a7e1d301a8522f66 WHIRLPOOL 3329a1783da2c7509fb93a64343b6b70f6d45de614a15e17d3a2a2439b440298e25c3dd4504042de38e501877cf47d909849fd6263b081c6ccc0bf8e1362287b
+EBUILD weston-1.9.0-r99.ebuild 3148 SHA256 6b5e2d3da53d2f4facea09916eb7726f438c7e29474b0dfb5c9ebd03ea71b30b SHA512 ad1caf90cb73f6c937f26eb730fe1e614aa5378adb5bc03c4e40dae4297c4bb35a78d8993ecd15fbc31931b74cb8b73803fa70fa8e621acaef654412f9c366ea WHIRLPOOL 33b3fc7ad5faeb049cde905be5a830224e00e9e5cf2897124dbbfd1bd8f242416fc85b5b2bc6eee5dc5570f6384158c16c8c0e2eb64572f77c37d5b3536b2383
+MISC metadata.xml 1257 SHA256 30a5608ab189260222d32fa240fd3791b3e17a471e29e7a2e4a04466b21dfb29 SHA512 b95bd15b66265e1cbe25eee8c70a405dd5df9cc789d60968c9cae3ead3dc35a1a542a432ccf7e8be8c37ac23aa677a5383704e0822c77151f0fcaa101b3a57b3 WHIRLPOOL e53b1747e2e014af1e179c8fa6b8f77aa1dd2db43aec27e433561faa5c93700e57247c4bc06c74baa75f454672410dbf3b0e7d0375b9e7c620d6990ed5e42055
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/files/weston-1.9.0-make-error-portable.patch b/dev-libs/weston/files/weston-1.9.0-make-error-portable.patch
new file mode 100644
index 0000000..b1d2932
--- /dev/null
+++ b/dev-libs/weston/files/weston-1.9.0-make-error-portable.patch
@@ -0,0 +1,66 @@
+# Eliminate calls to error()/error.h, which are GNU extensions, not POSIX in order to compile with musl
+# See https://patchwork.freedesktop.org/patch/50793/
+
+diff --git a/configure.ac b/configure.ac
+index 263fc22..f52cd62 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -57,6 +57,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+ [[#include <time.h>]])
+ 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 a/src/weston-error.h b/src/weston-error.h
+new file mode 100644
+index 0000000..2089d02
+--- /dev/null
++++ b/src/weston-error.h
+@@ -0,0 +1,24 @@
+/* TODO
+ If S is zero error() will not exit so this macro should call warnx() in those cases
+ or just add a plain replacement function for error() to weston-launch.c */
+
++#ifndef WESTON_ERROR_H
++#define WESTON_ERROR_H
++
++#if HAVE_ERROR_H
++#include <error.h>
++#else
++#include <err.h>
++#include <string.h>
++#define weston_error(s, e, f, ...) do { \
++ if (e) \
++ errx((s), (f) ": %s", ##__VA_ARGS__, strerror(e)); \
++ else \
++ errx((s), (f), ##__VA_ARGS__); \
++} while(0)
++
++#define error weston_error
++#endif
++
++#endif
++
+diff --git a/src/weston-launch.c b/src/weston-launch.c
+index 10c66de..3e6d30a 100644
+--- a/src/weston-launch.c
++++ b/src/weston-launch.c
+@@ -30,7 +30,6 @@
+ #include <poll.h>
+ #include <errno.h>
+
+-#include <error.h>
+ #include <getopt.h>
+
+ #include <sys/types.h>
+@@ -56,6 +55,7 @@
+ #endif
+
+ #include "weston-launch.h"
++#include "weston-error.h"
+
+ #define DRM_MAJOR 226
+
diff --git a/dev-libs/weston/metadata.xml b/dev-libs/weston/metadata.xml
new file mode 100644
index 0000000..56eac98
--- /dev/null
+++ b/dev-libs/weston/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>x11</herd>
+<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='egl'>Enable egl acceleration</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='xwayland'>Enable ability support native X11 applications</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-libs/weston/weston-1.9.0-r99.ebuild b/dev-libs/weston/weston-1.9.0-r99.ebuild
new file mode 100644
index 0000000..f180560
--- /dev/null
+++ b/dev-libs/weston/weston-1.9.0-r99.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2015 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 toolchain-funcs virtualx $GIT_ECLASS
+
+DESCRIPTION="Wayland reference compositor"
+HOMEPAGE="http://wayland.freedesktop.org/"
+
+if [[ $PV = 9999* ]]; then
+ SRC_URI="${SRC_PATCHES}"
+ KEYWORDS="arm"
+else
+ SRC_URI="http://wayland.freedesktop.org/releases/${P}.tar.xz"
+ KEYWORDS="amd64 arm x86 ~arm-linux"
+fi
+
+LICENSE="MIT CC-BY-SA-3.0"
+SLOT="0"
+IUSE="colord dbus +drm editor examples fbdev +gles2 headless ivi rdp +resize-optimization rpi +launch screen-sharing static-libs +suid systemd test unwind wayland-compositor +X xwayland"
+
+REQUIRED_USE="
+ drm? ( gles2 )
+ screen-sharing? ( rdp )
+ test? ( X )
+ wayland-compositor? ( gles2 )
+"
+
+RDEPEND="
+ >=dev-libs/libinput-0.8.0
+ >=dev-libs/wayland-1.9.0
+ media-libs/lcms:2
+ media-libs/libpng:0=
+ media-libs/libwebp:0=
+ 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
+"
+
+src_prepare() {
+ if [[ ${PV} = 9999* ]]; then
+ eautoreconf
+ fi
+}
+
+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 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 xwayland) \
+ $(use_enable xwayland xwayland-test) \
+ ${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_src_install
+}