void-packages/srcpkgs/xorg-server/template

141 lines
4.2 KiB
Bash

# Template file for 'xorg-server'
pkgname=xorg-server
version=1.20.3
revision=1
build_style=meson
configure_args="-Dipv6=true -Dxorg=true -Dxnest=true -Dxephyr=true
-Dxvfb=true -Dhal=false -Dudev=true -Dxkb_dir=/usr/share/X11/xkb
-Dxkb_output_dir=/var/lib/xkb -Dfont_root_dir=/usr/share/fonts/X11
-Ddmx=true -Dlinux_acpi=true -Dlinux_apm=false -Dsuid_wrapper=true
-Dxcsecurity=true -Dsystem_logind=$(vopt_if elogind true false)
-Dos_vendor=Void"
hostmakedepends="pkg-config wayland-devel xkbcomp flex gzip"
makedepends="MesaLib-devel libXaw-devel libXfont-devel libXfont2-devel
libXrender-devel libXres-devel libXtst-devel libXv-devel libXxf86dga-devel
libdmx-devel libdri2-devel-git libepoxy-devel libressl-devel libxkbfile-devel
libxkbui-devel pixman-devel wayland-devel wayland-protocols
xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel
xcb-util-wm-devel nettle-devel $(vopt_if elogind 'dbus-devel')"
# See hw/xfree86/common/xf86Module.h. Only care for the major version.
depends="xkeyboard-config $(vopt_if elogind 'elogind')"
short_desc="The X11 server from X.org"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="MIT, BSD-3-Clause"
homepage="https://xorg.freedesktop.org"
distfiles="${XORG_SITE}/xserver/${pkgname}-${version}.tar.bz2"
checksum=1b3ce466c12cacbe2252b3ad5b0ed561972eef9d09e75900d65fb1e21f9201de
lib32disabled=yes
provides="xserver-abi-extension-10_1 xserver-abi-input-24_1 xserver-abi-video-24_1 xf86-video-modesetting-1_1"
replaces="xf86-video-modesetting>=0"
subpackages="xorg-server-devel xorg-server-xdmx xorg-server-xephyr xorg-server-xnest xorg-server-xvfb"
conf_files="/etc/X11/Xwrapper.config"
build_options="elogind"
desc_option_elogind="Rootless Xorg support with elogind"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*|aarch64*)
# Enable glamor/dri/opengl/xwayland by default on x86.
configure_args+=" -Dglamor=true -Ddri2=true -Ddri3=true -Dglx=true -Dxwayland=true"
makedepends+=" MesaLib-devel"
replaces+=" glamor-egl>=0"
subpackages+=" xorg-server-xwayland"
;;
*)
# Enable dri2 on !x86 via libdri.
configure_args+=" -Dglx=true -Ddri1=false -Ddri2=true -Ddri3=true -Dxwayland=false"
makedepends+=" MesaLib-devel libdri2-devel-git"
;;
esac
case "$XBPS_TARGET_MACHINE" in
*-musl)
# required when secure_rpc is enabled and not using glibc for rpc/rpc.h
makedepends+=" libtirpc-devel" ;;
esac
# Symbols must be resolved lazily for modules to work.
# See https://bugs.freedesktop.org/show_bug.cgi?id=41208#c5
LDFLAGS="-Wl,-z,lazy"
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl)
export CFLAGS+=" -D__uid_t=uid_t -D__gid_t=gid_t"
;;
esac
}
post_install() {
case "$XBPS_TARGET_MACHINE" in
*-musl) vinstall ${FILESDIR}/20-modules.conf 644 usr/share/X11/xorg.conf.d;;
esac
vinstall ${FILESDIR}/Xwrapper.config 644 etc/X11
vlicense COPYING
chmod 4755 ${DESTDIR}/usr/libexec/Xorg.wrap
if [ -e ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so ]; then
# Support nvidia and amd binary blobs to provide their own
# implementation.
mv ${DESTDIR}/usr/lib/xorg/modules/extensions/{libglx.so,libglx-xorg.so}
fi
find "${DESTDIR}"/usr/share/man -type f -iname '*[1-5].gz' -exec gunzip '{}' \;
# Readd old symlink
ln -s Xorg ${DESTDIR}/usr/bin/X
}
xorg-server-xdmx_package() {
short_desc="Distributed multihead X server and utilities"
pkg_install() {
vmove usr/bin/*dmx*
vmove usr/share/man/man1/*dmx*
}
}
xorg-server-xwayland_package() {
short_desc="A nested X server that runs as a wayland client"
pkg_install() {
vmove usr/bin/Xwayland
}
}
xorg-server-xnest_package() {
short_desc="A nested X server that runs as an X application"
pkg_install() {
vmove usr/bin/Xnest
vmove usr/share/man/man1/Xnest.1
}
}
xorg-server-xephyr_package() {
short_desc="X server outputting to a window on a pre-existing X display"
pkg_install() {
vmove usr/bin/Xephyr
vmove usr/share/man/man1/Xephyr.1
}
}
xorg-server-xvfb_package() {
short_desc="Virtual framebuffer X server"
depends="xkeyboard-config"
pkg_install() {
vmove usr/bin/Xvfb
vmove usr/share/man/man1/Xvfb.1
}
}
xorg-server-devel_package() {
depends="${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/share/aclocal
}
}