void-packages/srcpkgs/weston/template

76 lines
2.2 KiB
Bash

# Template file for 'weston'
pkgname=weston
version=9.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)
libevdev-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=5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe
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*|ppc*)
build_options_default+=" vaapi"
configure_args+=" -Drenderer-gl=true"
;;
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
vdoc "${FILESDIR}/README.voidlinux"
}
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 plugin"
pkg_install() {
vmove "/usr/lib/libweston-${version%%.*}/xwayland.so"
}
}