SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "xorg-server"

# SliTaz package receipt.

PACKAGE="xorg-server"
VERSION="1.20.14"
CATEGORY="x-window"
SHORT_DESC="Xorg core server."
MAINTAINER="pankso@slitaz.org"
LICENSE="MIT"
SUGGESTED="xorg-xf86-input-evdev xorg-xf86-video-vesa"
TARBALL="$PACKAGE-$VERSION.tar.xz"
WEB_SITE="https://www.x.org/"
WGET_URL="http://xorg.freedesktop.org/releases/individual/xserver/$TARBALL"

# Mesa build dep make also Xorg depends on libdrm.
DEPENDS="xorg-xkeyboard-config xorg-libpciaccess xorg-libXxf86vm \
xorg-libXfont xorg-libXfont2 xorg-libXau xorg-base-fonts libgcrypt \
pixman udev libdrm libepoxy xorg-xf86-input-evdev"
BUILD_DEPENDS="xorg-libxkbfile-dev xorg-libpciaccess-dev xorg-libXxf86vm-dev \
xorg-libXfont-dev libgcrypt-dev pixman-dev udev-dev mesa-dev pkg-config perl \
flex xorg-xf86driproto xorg-xcmiscproto xorg-bigreqsproto xorg-randrproto \
xorg-presentproto xorg-dri2proto xorg-libXau-dev xorg-dev-proto libepoxy-dev \
xorg-xkbcomp-dev xorg-libXfont2-dev libdrm-dev xorg-glproto xorg-libXv-dev \
xcb-util-dev xcb-util-image-dev xcb-util-renderutil-dev \
xcb-util-keysyms-dev xcb-util-wm-dev"

current_version()
{
    wget -O - $(dirname $WGET_URL) 2>/dev/null | \
    sed "/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    cd $src

    # Patch to build with gcc > 5
    patch -p1 < $stuff/xorg-gcc6.patch

    # Patch to build xorg 1.20 with udev
    # see https://gitlab.freedesktop.org/xorg/xserver/-/issues/879
    patch -p1 < $stuff/xorg-udev.patch

    # Patch xorg CVEs, thanks Slackware
    # http://ftp.slackware.com/pub/slackware/slackware-15.0/patches/source/xorg-server/patch

    patch -p1 < $stuff/0001-f1070c01d616c5f21f939d5ebc533738779451ac.patch
    patch -p1 < $stuff/0002-dd8caf39e9e15d8f302e54045dd08d8ebf1025dc.patch
    patch -p1 < $stuff/0003-6907b6ea2b4ce949cb07271f5b678d5966d9df42.patch
    patch -p1 < $stuff/CVE-2022-3550.patch
    patch -p1 < $stuff/CVE-2022-3551.patch
    patch -p1 < $stuff/CVE-2022-3553.patch
    patch -p1 < $stuff/CVE-2022-4283.patch
    patch -p1 < $stuff/CVE-2022-46340.patch
    patch -p1 < $stuff/CVE-2022-46341.patch
    patch -p1 < $stuff/CVE-2022-46342.patch
    patch -p1 < $stuff/CVE-2022-46343.patch
    patch -p1 < $stuff/CVE-2022-46344.patch
    patch -p1 < $stuff/CVE-2022-46340.correction.patch
    patch -p1 < $stuff/CVE-2023-0494.patch
    patch -p1 < $stuff/CVE-2023-1393.patch
    patch -p1 < $stuff/CVE-2023-5367.patch
    patch -p1 < $stuff/CVE-2023-5380.patch
    patch -p1 < $stuff/CVE-2023-6377.patch
    patch -p1 < $stuff/CVE-2023-6478.patch

    # Patch xorg CVEs January 2024
    # see https://lists.x.org/archives/xorg/2024-January/061525.html
    patch -p1 < $stuff/CVE-2023-6816.patch
    patch -p1 < $stuff/CVE-2024-0229-1.patch
    patch -p1 < $stuff/CVE-2024-0229-2.patch
    patch -p1 < $stuff/CVE-2024-0229-3.patch
    patch -p1 < $stuff/CVE-2024-0408.patch
    patch -p1 < $stuff/CVE-2024-0409.patch
    patch -p1 < $stuff/CVE-2024-21885.patch
    patch -p1 < $stuff/CVE-2024-21886-1.patch
    patch -p1 < $stuff/CVE-2024-21886-2.patch

    # Patch xorg CVEs April 2024
    # see https://lists.x.org/archives/xorg-announce/2024-April/003497.html
    patch -p1 < $stuff/CVE-2024-31080.patch
    patch -p1 < $stuff/CVE-2024-31081.patch
    patch -p1 < $stuff/CVE-2024-31082.patch
    patch -p1 < $stuff/CVE-2024-31083.patch

    # Xephyr make possible to use Xorg in a chroot.
    ./configure \
        --prefix=/usr \
        --sysconfdir=/etc \
        --mandir=/usr/share/man \
        --localstatedir=/var \
        --with-module-dir=/usr/lib/X11/modules \
        --with-xkb-output=/var/lib/xkb \
        --with-serverconfig-path=/etc/X11 \
        --enable-install-setuid \
        --enable-xorg \
        --enable-kdrive \
        --enable-kdrive-kbd \
        --enable-kdrive-mouse \
        --enable-kdrive-evdev \
        --enable-xfbdev \
        --enable-xephyr \
        --enable-config-udev \
        --disable-config-dbus \
        --disable-docs \
        --disable-devel-docs \
        --with-fontrootdir=/usr/share/fonts/X11 \
        --with-os-name="SliTaz GNU/Linux" \
        --with-vendor-web="http://www.slitaz.org/" \
        --with-builder-addr=$MAINTAINER \
        $CONFIGURE_ARGS &&
    make && make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/lib $fs/var $fs/etc/X11/xorg.conf.d
    cp -a $install/usr/lib/X11 $fs/usr/lib
    cp -a $install/usr/bin $fs/usr
    cp -a $install/var/lib $fs/var
    cp -a $install/etc $fs
    # Remove static libs and split Xnest
    rm $fs/usr/lib/X11/*/*.*a
    rm $fs/usr/lib/X11/*/*/*.*a
    rm $fs/usr/bin/Xnest
    rm $fs/usr/bin/Xvfb
    # Kdrive/tinyX --> xorg-server-Xephyr xorg-server-Xfbdev
    rm $fs/usr/bin/Xephyr
    #rm $fs/usr/bin/Xfbdev
}

# We need /var/tmp rw to let xkbcomp builr XKB definition.
post_install()
{
    chmod 1777 "$1/var/tmp"
}

6047 packages and 209931 files in current database (Wed Jun 26 15:35:30 2024)