SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "xorg-xf86-video-intel"

# SliTaz package receipt.

PACKAGE="xorg-xf86-video-intel"
VERSION="2.99.917"
CATEGORY="x-window"
TAGS="xorg display"
SHORT_DESC="Xorg server Intel driver."
MAINTAINER="pankso@slitaz.org"
LICENSE="MIT"
WEB_SITE="https://www.x.org/wiki/"

SOURCE="xf86-video-intel"
case $SLITAZ_ARCH in
    i?86)
        BRANCH="d39197bb" ;;
    x86_64)
        BRANCH="a511f22c" ;;
esac
TARBALL="$SOURCE-$VERSION-$BRANCH.tar.bz2"
WGET_URL="git|https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel.git"

DEPENDS="libdrm libdrm-intel mesa-dri-intel xcb-util xorg-libXfont2 \
xorg-libXvMC xorg-server"
BUILD_DEPENDS="automake libtool git libdrm-dev libpthread-stubs-dev \
xcb-util-dev xorg-libXfont2-dev xorg-libXvMC-dev xorg-server-dev"

MODS='/usr/lib/X11/modules'

HOST_ARCH="i486 x86_64"

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

# Rules to configure and make the package.
compile_rules()
{
    case $SLITAZ_ARCH in
        i?86)
            # Patch from use driver with new Xorg
            # see https://gnats.netbsd.org/51687
            patch -Np1 < $stuff/patch-src_compat-api.h
            patch -Np1 < $stuff/patch-src_legacy_i810_i810__video.c
            patch -Np1 < $stuff/patch-src_sna_sna__accel.c
            patch -Np1 < $stuff/patch-src_sna_sna__acpi.c
            patch -Np1 < $stuff/patch-src_sna_sna__driver.c
            patch -Np1 < $stuff/patch-src_sna_sna.h
            patch -Np1 < $stuff/patch-src_uxa_intel__display.c
            patch -Np1 < $stuff/patch-src_uxa_intel.h
            # see https://lists.x.org/archives/xorg-devel/2018-May/056924.html
            patch -Np1 < $stuff/patch2-src_sna_sna__accel.c
    esac

    # Patch to fix build for i686
    # see https://src.fedoraproject.org/rpms/xorg-x11-drv-intel/c/f2e86334f3a168b04afddb57d4bc4f630e59a5e9
    patch -Np1 < $stuff/fix_build_i686.patch

    # Patch to build with new glibc 2.28
    # see https://yhbt.net/lore/all/CAMKF1sqHoFmmW3-c1nPMcf04TCRT6EjUAtkQ=kksEy8aY=sMwQ@mail.gmail.com/T/ 
    patch -Np1 < $stuff/fix_build_glibc2.28.patch

    # Update src
    autoreconf -i

    case $SLITAZ_ARCH in
        i?86)
            # disable dri3, need check to add support
            ./configure                \
                --sysconfdir=/etc        \
                --mandir=/usr/share/man        \
                --localstatedir=/var        \
                --with-xorg-module-dir=$MODS    \
                --enable-dri                    \
                --enable-dri3                   \
                --enable-xvmc            \
                $CONFIGURE_ARGS ;;
        x86_64)
            ./configure                \
                --sysconfdir=/etc        \
                --mandir=/usr/share/man        \
                --localstatedir=/var        \
                --with-xorg-module-dir=$MODS    \
                --with-default-dri=3        \
                --enable-xvmc            \
                $CONFIGURE_ARGS ;;
    esac

    make &&
    make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p ${fs}${MODS}/drivers

    cp -a ${install}${MODS}/drivers/*.so    ${fs}${MODS}/drivers
    cp -a $install/usr/lib/*.so*        $fs/usr/lib
}
6091 packages and 256114 files in current database (Thu Apr 3 00:00:04 2025)