void-packages/srcpkgs/weston/template

78 lines
2.3 KiB
Bash

# Template file for 'weston'
pkgname=weston
version=8.0.0
revision=1
build_style=meson
configure_args="-Dtest-junit-xml=false -Dbackend-rdp=false -Dsystemd=false
-Dremoting=false -Dlauncher-logind=$(vopt_if elogind true false)
-Dbackend-drm-screencast-vaapi=$(vopt_if vaapi true false) -Dpipewire=false"
hostmakedepends="pkg-config wayland-devel wayland-protocols"
makedepends="libpng-devel wayland-devel wayland-protocols libxkbcommon-devel
pixman-devel pango-devel cairo-devel mtdev-devel libwebp-devel
poppler-glib-devel pam-devel lcms2-devel eudev-libudev-devel libdrm-devel
libinput-devel libxcb-devel libXcursor-devel colord-devel dbus-devel
$(vopt_if vaapi 'glu-devel libva-devel') $(vopt_if elogind elogind-devel)"
short_desc="Reference implementation of a Wayland compositor"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://wayland.freedesktop.org/"
distfiles="https://wayland.freedesktop.org/releases/${pkgname}-${version}.tar.xz"
checksum=7518b49b2eaa1c3091f24671bdcc124fd49fc8f1af51161927afa4329c027848
system_groups="weston-launch"
lib32disabled=yes
# Package build options
build_options="elogind vaapi"
desc_option_elogind="Use elogind for suidless startup"
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*|aarch64*)
build_options_default+=" vaapi"
configure_args+=" -Drenderer-gl=true"
;;
ppc*)
build_options_default+=" vaapi"
configure_args+=" -Ddemo-clients=false -Drenderer-gl=false -Dsimple-clients=[]"
;;
armv*)
configure_args+=" -Ddemo-clients=false -Drenderer-gl=false -Dsimple-clients=[]"
;;
esac
pre_configure() {
vsed -i "/subdir('tests')/d" meson.build
}
post_install() {
# weston-launch must be setuid
if [ -z "$build_option_elogind" ]; then
chmod u+s ${DESTDIR}/usr/bin/weston-launch
fi
vlicense COPYING LICENSE
# Remove development files.
rm -rf ${DESTDIR}/usr/include
rm -rf ${DESTDIR}/usr/lib/pkgconfig
}
weston-colord_package() {
short_desc+=" - colord plugin"
pkg_install() {
vmove /usr/lib/weston/cms-colord.so
}
}
weston-x11_package() {
short_desc+=" - x11 backend"
depends="weston"
pkg_install() {
vmove "/usr/lib/libweston-${version%%.*}/x11-backend.so"
}
}
weston-xwayland_package() {
short_desc+=" - xwayland backend"
pkg_install() {
vmove "/usr/lib/libweston-${version%%.*}/xwayland.so"
}
}