weston: update to 1.3.0 + build fix for rpi.

This commit is contained in:
Juan RP 2013-10-20 06:35:39 +02:00
parent c549126f2f
commit 4bf346ff98
2 changed files with 52 additions and 6 deletions

View file

@ -0,0 +1,44 @@
From 0b12db5f519a347ce0e1d5262e0cb2e9e2cc6990 Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Date: Wed, 09 Oct 2013 09:30:57 +0000
Subject: launcher: Wrap drmGetMagic and drmAuthMagic so we can build without libdrm
---
diff --git a/src/launcher-util.c b/src/launcher-util.c
index 6b6a5f3..35a5698 100644
--- src/launcher-util.c
+++ src/launcher-util.c
@@ -80,9 +80,19 @@ drm_set_master(int drm_fd)
return drmSetMaster(drm_fd);
return -EBADF;
}
+static int
+drm_check_master(int drm_fd)
+{
+ drm_magic_t magic;
+ if (drm_fd != -1)
+ return drmGetMagic(drm_fd, &magic) != 0 ||
+ drmAuthMagic(drm_fd, magic) != 0;
+ return 0;
+}
#else
static int drm_drop_master(int drm_fd) {return 0;}
static int drm_set_master(int drm_fd) {return 0;}
+static int drm_check_master(int drm_fd) {return 1;}
#endif
int
@@ -110,10 +120,8 @@ weston_launcher_open(struct weston_launcher *launcher,
}
if (major(s.st_rdev) == DRM_MAJOR) {
- drm_magic_t magic;
launcher->drm_fd = fd;
- if (drmGetMagic(fd, &magic) != 0 ||
- drmAuthMagic(fd, magic) != 0) {
+ if (!drm_check_master(fd)) {
weston_log("drm fd not master\n");
close(fd);
return -1;
--
cgit v0.9.0.2-2-gbebe

View file

@ -1,6 +1,6 @@
# Template file for 'weston'.
pkgname=weston
version=1.2.2
version=1.3.0
revision=1
build_style=gnu-configure
short_desc="Reference implementation of a Wayland compositor"
@ -8,16 +8,17 @@ maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://wayland.freedesktop.org/"
license="MIT"
distfiles="http://wayland.freedesktop.org/releases/${pkgname}-${version}.tar.xz"
checksum=ecdd6530020e462cec122a14f58841b0f12c037e25ad8a6f93fc5c01d88f64b3
checksum=8e4f5b4736358b63d83c3252567ba7aa49cc0da9e2e2c30f59ddf635159702a0
hostmakedepends="pkg-config"
makedepends="libpng-devel>=1.6 wayland-devel>=1.2.1 libxkbcommon-devel
makedepends="libpng-devel>=1.6 wayland-devel>=${version} libxkbcommon-devel
libxcb-devel>=1.9.1 xcb-util-keysyms-devel pixman-devel pango-devel
cairo-devel>=1.12.14_5 mtdev-devel libwebp-devel poppler-glib-devel pam-devel
systemd-devel libunwind-devel lcms2-devel libudev-devel"
case "$XBPS_TARGET_MACHINE" in
armv6l) # Assume RPi for now.
CFLAGS="-I${XBPS_CROSS_BASE}/opt/vc/include"
makedepends+=" rpi-firmware rpi-firmware-pcfiles"
# Just enable the RPi compositor.
configure_args+=" --disable-x11-compositor --disable-drm-compositor
@ -28,8 +29,8 @@ armv6l) # Assume RPi for now.
--disable-weston-launch WESTON_NATIVE_BACKEND=rpi-backend.so"
;;
x86_64|i686)
makedepends+=" libXcursor-devel colord-devel glu-devel"
configure_args+=" --with-cairo-glesv2 --enable-demo-clients"
makedepends+=" libXcursor-devel colord-devel glu-devel libva-devel"
configure_args+=" --with-cairo-glesv2 --enable-demo-clients --enable-vaapi-recorder"
;;
esac
@ -37,6 +38,7 @@ if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" wayland-devel"
fi
post_install() {
vinstall COPYING 644 usr/share/license/$pkgname
# Remove development files.
@ -46,7 +48,7 @@ post_install() {
weston_package() {
# cairo built with gles2 option.
depends="wayland>=1.2.0 cairo>=1.12.14_5"
depends="wayland>=${version} cairo>=1.12.14_5"
pkg_install() {
vmove all
}