mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-20 14:31:47 +00:00
88 lines
3.3 KiB
Bash
88 lines
3.3 KiB
Bash
#! /bin/bash
|
|
|
|
# Xwayland
|
|
# Source: https://www.x.org/pub/individual/xserver/xwayland-24.1.0.tar.xz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: nettle, mesa, libdrm, libepoxy, libxfont2, pixman
|
|
# Required: xorgproto, xtrans, libxkbfile, dbus, font-util, libtirpc,
|
|
# Required: xkbutils libxcvt
|
|
# Recommended: NONE
|
|
# Optional: xkbcomp libdecor libei
|
|
|
|
# if optimizing with GCC:
|
|
export CFLAGS="-march=native -pipe "
|
|
export CFLAGS+="-O3 -Ofast -falign-functions=32 -ffat-lto-objects -flto=4 "
|
|
export CFLAGS+="-fno-semantic-interposition -fstack-protector-strong "
|
|
export CFLAGS+="-fzero-call-used-regs=used -mprefer-vector-width=256 "
|
|
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
|
|
|
|
patch -Np1 -i ../patches/xwayland-chimera/allow-overflow-on-glamor_composite_clipped_region.patch
|
|
patch -Np1 -i ../patches/xwayland-chimera/no-sighandler-segv-etc.patch
|
|
|
|
# Enable some feature
|
|
export MARGS="-Dipv6=true "
|
|
export MARGS="-Dxcsecurity=true "
|
|
export MARGS="-Ddri3=true "
|
|
export MARGS="-Dglamor=true "
|
|
|
|
# Disable some features
|
|
export MARGS+="-Dxvfb=false "
|
|
export MARGS+="-Dxdmcp=false "
|
|
|
|
# if libei is built:
|
|
export MARGS+="-Dxwayland_ei=socket "
|
|
|
|
# if egl-wayland not built:
|
|
export MARGS+="-Dxwayland_eglstream=false "
|
|
|
|
meson setup \
|
|
--prefix=$XORG_PREFIX \
|
|
-Dxkb_dir=$XORG_PREFIX/share/X11/xkb \
|
|
-Dxkb_output_dir=/var/lib/xkb \
|
|
$MARGS OUT
|
|
read -p "Compile?" && ninja -C OUT -j2 &&
|
|
unset MARGS
|
|
|
|
sudo -S DESTDIR=$BUILD ninja -C OUT install &&
|
|
sudo -S mkdir -vp /BMAN/install /BMAN/$XORG_PREFIX && \
|
|
sudo -S mv $BUILD/$XORG_PREFIX/share /BMAN/$XORG_PREFIX/ && \
|
|
|
|
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
|
|
cat > /tmp/slack-desc << "EOF"
|
|
# HOW TO EDIT THIS FILE:
|
|
# The "handy ruler" below makes it easier to edit a package description. Line
|
|
# up the first '|' above the ':' following the base package name, and the '|'
|
|
# on the right side marks the last column you can put a character in. You must
|
|
# make exactly 11 lines for the formatting to be correct. It's also
|
|
# customary to leave one space after the ':' except on otherwise blank lines.
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
xwayland: xwayland (X Clients under Wayland)
|
|
xwayland:
|
|
xwayland: Wayland is a complete window system in itself, but even so, if we're
|
|
xwayland: migrating away from X, it makes sense to have a good backwards
|
|
xwayland: compatibility story. With a few changes, the Xorg server can be
|
|
xwayland: modified to use Wayland input devices for input and forward either the
|
|
xwayland: root window or individual top-level windows as wayland surfaces. The
|
|
xwayland: server still runs the same 2D driver with the same acceleration code
|
|
xwayland: as it does when it runs natively. The main difference is that Wayland
|
|
xwayland: handles presentation of the windows instead of KMS.
|
|
xwayland:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/xwayland-24.1.0-$PSUFFIX && \
|
|
cd /BMAN && \
|
|
cat > /tmp/slack-desc << "EOF"
|
|
xwayland-doc: Manuals for xorg-server-xwayland
|
|
xwayland-doc:
|
|
xwayland-doc: X Clients under Wayland
|
|
xwayland-doc:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/xwayland-doc-24.1.0-$NOPSUFFIX && \
|
|
sudo -S rm -rf ${BUILD}/* /BMAN/*
|