aboutsummaryrefslogtreecommitdiffstats
path: root/community/weston
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2019-10-22 12:34:01 +0200
committerLeo <thinkabit.ukim@gmail.com>2019-10-22 07:46:12 -0300
commitcff16f05f21dfbb46f74b4513fb606aa045c9611 (patch)
treecb0fd80adb5a95e9fe9d293ceb89ab9e8b30a98b /community/weston
parent88786ed5fa9fa2d7a276dcf218210dd2433962b8 (diff)
downloadaports-cff16f05f21dfbb46f74b4513fb606aa045c9611.tar.bz2
aports-cff16f05f21dfbb46f74b4513fb606aa045c9611.tar.xz
community/weston: move from testing
Diffstat (limited to 'community/weston')
-rw-r--r--community/weston/APKBUILD127
-rw-r--r--community/weston/timespec.patch10
-rw-r--r--community/weston/weston.pre-install5
3 files changed, 142 insertions, 0 deletions
diff --git a/community/weston/APKBUILD b/community/weston/APKBUILD
new file mode 100644
index 0000000000..f552dad6c5
--- /dev/null
+++ b/community/weston/APKBUILD
@@ -0,0 +1,127 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Maintainer: Valery Kartel <valery.kartel@gmail.com>
+pkgname=weston
+pkgver=7.0.0
+pkgrel=0
+_libname=lib$pkgname
+_libdir=$_libname-${pkgver%%.*}
+pkgdesc="The reference Wayland server"
+url="https://wayland.freedesktop.org/"
+arch="all !s390x !ppc64le"
+license="MIT"
+makedepends="wayland-protocols libxkbcommon-dev xkeyboard-config
+ libinput-dev libunwind-dev mtdev-dev libxcursor-dev glu-dev
+ pango-dev colord-dev libwebp-dev libva-dev dbus-dev
+ linux-pam-dev wayland-dev libevdev-dev libjpeg-turbo-dev
+ freerdp-dev lcms2-dev gstreamer-dev gst-plugins-base-dev meson
+ elogind-dev pipewire-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-x11 backend-wayland backend-rdp
+ "
+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="https://wayland.freedesktop.org/releases/weston-$pkgver.tar.xz
+ timespec.patch
+ "
+# weston-launch requires suid
+options="!check suid"
+install="$pkgname.pre-install"
+
+build() {
+ meson \
+ -Dprefix=/usr \
+ -Dlauncher-logind=true \
+ -Dsystemd=false \
+ -Dsimple-dmabuf-drm=auto \
+ build
+ ninja -C build
+}
+
+# Does not run through, see also:
+# https://github.com/alpinelinux/aports/pull/1689
+check() {
+ ninja -C "$builddir"/build test
+}
+
+package() {
+ DESTDIR="$pkgdir" ninja -C "$builddir"/build install
+
+ mkdir -p "$pkgdir"/usr/lib
+ mv "$pkgdir"/usr/share/pkgconfig/* "$pkgdir"/usr/lib/pkgconfig/
+}
+
+libs() {
+ depends="xkeyboard-config"
+ default_libs
+}
+
+_libd() {
+ pkgdesc="Desktop shells abstraction library for libweston compositors"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/*desktop* "$subpkgdir"/usr/lib
+}
+
+clients() {
+ pkgdesc="Weston example clients"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/$pkgname-* "$subpkgdir"/usr/bin
+}
+
+xwayland() {
+ pkgdesc="Wayland module to run X Clients"
+ mkdir -p "$subpkgdir"/usr/lib/$_libdir
+ 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
+ mv "$pkgdir"/$path/$name "$subpkgdir"/$path
+}
+
+sha512sums="fa14467ab89fb12175830d9cf29d89dc04899fd21d801e60e85836e8e52e17e144be78098b3eedfab6c51b7fb055ecfabb456a8a74f4e40485134da59ac58ea3 weston-7.0.0.tar.xz
+3e596af4bf0a6b06a5d28376043db111fe1c161ead04501fa6d2c667b5a21889cca3354d1bdc4ac794841bef68ed5e1a7a84e44e7d510e947e3673195706caed timespec.patch"
diff --git a/community/weston/timespec.patch b/community/weston/timespec.patch
new file mode 100644
index 0000000000..7c2c8f62e9
--- /dev/null
+++ b/community/weston/timespec.patch
@@ -0,0 +1,10 @@
+--- a/tests/timespec-test.c
++++ b/tests/timespec-test.c
+@@ -25,6 +25,7 @@
+
+ #include "config.h"
+
++#include <time.h>
+ #include <stdlib.h>
+ #include <stdint.h>
+ #include <stdio.h>
diff --git a/community/weston/weston.pre-install b/community/weston/weston.pre-install
new file mode 100644
index 0000000000..0db3c455be
--- /dev/null
+++ b/community/weston/weston.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S weston-launch 2>/dev/null
+
+exit 0