Mail archive
alpine-aports

[alpine-aports] [PATCH v2] testing/weston: upgrade to 2.0.0

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Mon, 13 Mar 2017 13:16:12 +0200

take maintain
shared libs moved to libweston, libweston-desktop
split to submodules: cms-*, client-*, shell-*, backend-*
add check() function
add helper submodule weston-desktop-x11 to run as x11 client

---
v1 -> v2: fix makedepends.
		wayland-protocols-dev -> wayland-protocols
---
 testing/weston/APKBUILD         | 126 +++++++++++++++++++++++++++++++++-------
 testing/weston/musl-fixes.patch |  10 ----
 2 files changed, 104 insertions(+), 32 deletions(-)
 delete mode 100644 testing/weston/musl-fixes.patch
diff --git a/testing/weston/APKBUILD b/testing/weston/APKBUILD
index 845642d22c..99d32b234d 100644
--- a/testing/weston/APKBUILD
+++ b/testing/weston/APKBUILD
_at_@ -1,21 +1,35 @@
 # Contributor: Sören Tempel <soeren+alpine_at_soeren-tempel.net>
-# Maintainer:
+# Maintainer: Valery Kartel <valery.kartel_at_gmail.com>
 pkgname=weston
-pkgver=1.12.0
-pkgrel=1
-pkgdesc="Reference implementation of a Wayland compositor"
+pkgver=2.0.0
+pkgrel=0
+_libname=lib$pkgname
+_libdir=$_libname-${pkgver%%.*}
+pkgdesc="The reference Wayland server"
 url="http://wayland.freedesktop.org"
 arch="x86_64 armhf"
 license="MIT"
 depends=""
-makedepends="wayland-protocols libxkbcommon-dev libinput-dev
-	libunwind-dev poppler-glib mtdev-dev libxcursor-dev
-	glu-dev pango-dev colord-dev"
-subpackages="$pkgname-doc"
-source="http://wayland.freedesktop.org/releases/$pkgname-$pkgver.tar.xz
-	musl-fixes.patch"
-
+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
+	"
+_cms="cms-colord cms-static"
+_shell="shell-desktop shell-fullscreen shell-ivi"
+_client="info terminal wcap-decode"
+_backend="backend-drm backend-fbdev backend-headless
+	backend-rdp backend-x11 backend-wayland
+	"
+for _sub in $_cms $_shell $_client $_backend; do
+	subpackages="$subpackages $pkgname-$_sub:_sub"
+done
+subpackages="$pkgname-dev $pkgname-doc $subpackages
+	$pkgname-clients $_libname-desktop:_libd $_libname:libs
+	$pkgname-xwayland $pkgname-desktop-x11:_x11:noarch
+	"
+source="http://wayland.freedesktop.org/releases/$pkgname-$pkgver.tar.xz"
 builddir="$srcdir/$pkgname-$pkgver"
+
 build() {
 	cd "$builddir"
 	./configure \
_at_@ -25,21 +39,89 @@ build() {
 		--sysconfdir=/etc \
 		--mandir=/usr/share/man \
 		--localstatedir=/var \
-		--libexecdir=/usr/lib/weston \
+		--libexecdir=/usr/lib/$pkgname \
+		--enable-rdp-compositor \
+		--enable-screen-sharing \
+		--enable-vaapi-recorder \
+		--enable-clients \
+		--enable-demo-clients-install \
 		--disable-weston-launch \
-		--enable-libinput-backend \
+		--disable-setuid-install \
 		|| return 1
-	make || return 1
+	make
+}
+
+check() {
+	make -C "$builddir" check
+	return 0
 }
 
 package() {
-	make DESTDIR="$pkgdir" \
-		-C "$builddir" install || return 1
+	make  -C "$builddir" DESTDIR="$pkgdir" install
+}
+
+libs() {
+	depends="xkeyboard-config"
+	default_libs
+}
+
+_libd() {
+	pkgdesc="Desktop shells abstraction library for libweston compositors"
+	mkdir -p "$subpkgdir"/usr/lib || return 1
+	mv "$pkgdir"/usr/lib/*desktop* "$subpkgdir"/usr/lib
+}
+
+clients() {
+	pkgdesc="Weston example clients"
+	mkdir -p "$subpkgdir"/usr/bin || return 1
+	mv "$pkgdir"/usr/bin/$pkgname-* "$subpkgdir"/usr/bin
+}
+
+xwayland() {
+	pkgdesc="Wayland module to run X Clients"
+	mkdir -p "$subpkgdir"/usr/lib/$_libdir || return 1
+	mv "$pkgdir"/usr/lib/$_libdir/xwayland.so \
+		"$subpkgdir"/usr/lib/$_libdir
+}
+
+_x11() {
+	pkgdesc="Weston desktop helper pack (x11 backend)"
+	depends="$pkgname $pkgname-shell-desktop $pkgname-xwayland
+		$pkgname-backend-x11 $pkgname-terminal"
+	mkdir -p "$subpkgdir"
+}
+
+_sub() {
+	local name path
+	case $subpkgname in
+	*-cms-*)
+		name=${subpkgname#$pkgname-cms-}
+		path=/usr/lib/$pkgname
+		pkgdesc="Weston CMS module: $name"
+		name=cms-$name.so
+		;;
+	*-shell-*)
+		name=${subpkgname#$pkgname-shell-}
+		path=/usr/lib/$pkgname
+		pkgdesc="Weston shell: $name"
+		name=*$name-shell*
+		;;
+	*-backend-*)
+		name=${subpkgname#$pkgname-backend-}
+		path=/usr/lib/$_libdir
+		pkgdesc="Weston backend: $name"
+		name=$name-backend.so
+		grep -q cairo "$pkgdir"/$path/$name && depends="mesa-dri-swrast"
+		;;
+	*)
+		name=$subpkgname
+		path=/usr/bin
+		[ -x "$pkgdir"/$path/$name ] || name=${subpkgname#$pkgname-}
+		pkgdesc="Weston client: $name"
+		;;
+	esac
+	mkdir -p "$subpkgdir"/$path || return 1
+	mv "$pkgdir"/$path/$name "$subpkgdir"/$path
 }
 
-md5sums="310af6d7f8ba03c3418cec8ad72ea748  weston-1.12.0.tar.xz
-6f68d03829f100d358283a5714573d37  musl-fixes.patch"
-sha256sums="ac7ac2a32e3b9f50131fccded5d2326bd36b2226712d90b61999118a09af5033  weston-1.12.0.tar.xz
-03b6225fa84b52523afe571b0ec820342933e1052d87b8a8f6eb1177847ecfae  musl-fixes.patch"
-sha512sums="80cf7c01951cc72b32284a5a6960c2ae7a8dfffffb155cb0f94cd3585b0afa3f06bb8e2b87467d18ab95f0fd673ad9319a6e14ee5f3cec1d3b72c7c0146c927e  weston-1.12.0.tar.xz
-f9f892cdba13b1ae4d2726cfda5543364da545e725fabbf2145cd977648e84a138bb65197c604aae43a5e8415e3a58a45ec8d7a15e23eb72b7b95edefca531bc  musl-fixes.patch"
+sha512sums="085a0ba278932d41b50edd6e89db5df31cd6a1179c6cfe9a8ac5ac64e63b25cfc3da1ad8c587259273c3812593029b803867195e2d82b12b5cdd2588ac59acc6  weston-2.0.0.tar.xz"
diff --git a/testing/weston/musl-fixes.patch b/testing/weston/musl-fixes.patch
deleted file mode 100644
index 00886d6d02..0000000000
--- a/testing/weston/musl-fixes.patch
+++ /dev/null
_at_@ -1,10 +0,0 @@
---- weston-1.12.0/shared/string-helpers.h.orig
-+++ weston-1.12.0/shared/string-helpers.h
-_at_@ -28,6 +28,7 @@
- 
- #include <stdbool.h>
- #include <stdlib.h>
-+#include <stdint.h>
- #include <errno.h>
- #include <assert.h>
- 
-- 
2.11.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Mar 13 2017 - 13:16:12 GMT