mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-13 14:24:02 +00:00
66 lines
2.2 KiB
Bash
66 lines
2.2 KiB
Bash
#! /bin/bash
|
|
|
|
# Libdrm
|
|
# Source: https://dri.freedesktop.org/libdrm/libdrm-2.4.110.tar.xz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: libpciacess (for drm_intel)
|
|
# Recommended: NONE
|
|
# Optional: Cairo, CMake, docbook-xml, docbook-xsl, libxslt, libatomic_ops, valgrind, CUNIT
|
|
|
|
# If optimizing:
|
|
export CFLAGS="-march=native -mtune=native -pipe "
|
|
export CFLAGS+="-O3 -Ofast -falign-functions=32 "
|
|
export CFLAGS+="-ffat-lto-objects -flto=4 "
|
|
export CFLAGS+="-fno-semantic-interposition -mprefer-vector-width=256 "
|
|
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
|
|
|
|
patch -Np0 -i ../patches/libdrm-void/dont-build-noveau-tests.patch &&
|
|
mkdir build &&
|
|
cd build &&
|
|
|
|
case $(uname -m) in
|
|
i686|x86_64) export MARGS+=" -Dnouveau=true -Dradeon=true -Damdgpu=true "
|
|
export MARGS+=" -Dexynos=false -Dvc4=false -Dtegra=false "
|
|
export MARGS+=" -Dfreedreno=false -Dvmwgfx=false -Domap=false " ;;
|
|
arm*) export MARGS+=" -Dexynos=true Dvc4=true -Dtegra=true -Dfreedreno=false "
|
|
export MARGS+=" -Dnouveau=true -Dradeon=false -Damdgpu=false "
|
|
export MARGS+=" -Dvmwgfx=false -Domap=false "
|
|
;;
|
|
esac
|
|
|
|
meson --prefix=/usr -Dudev=true ${MARGS} ..
|
|
|
|
read -p "Compile?" && ninja -j2 &&
|
|
|
|
sudo -S DESTDIR=$BUILD ninja install &&
|
|
|
|
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------------------------------------------------------|
|
|
libdrm: libdrm (A library to support Direct Rendering)
|
|
libdrm:
|
|
libdrm: This library implements an interface to the kernel's DRM services.
|
|
libdrm: It is used to support hardware accelerated 3D rendering.
|
|
libdrm:
|
|
libdrm:
|
|
libdrm:
|
|
libdrm:
|
|
libdrm:
|
|
libdrm:
|
|
libdrm:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/libdrm-2.4.110-$(uname -m)-mlfs.txz &&
|
|
sudo -S rm -rf ${BUILD}/*
|