Files
BMLFS/build-scripts/libepoxy.build
2021-08-31 11:47:13 -05:00

60 lines
1.8 KiB
Bash

#! /bin/bash
# libepoxy
# Source: https://github.com/anholt/libepoxy/releases/download/1.5.9/libepoxy-1.5.9.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: Mesa
# Recommended: NONE
# Optional: Doxygen
# If optimizing, use flags with GCC
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -Ofast -falign-functions=32 "
export CFLAGS+="-ffat-lto-objects -flto=auto -fno-semantic-interposition "
export CFLAGS+="-mprefer-vector-width=256 "
export LDFLAGS="-flto=auto -Wl,-O2 -Wl,--as-needed "
mkdir build &&
cd build &&
# If GL is not missing from mesa set -Dglx=yes
meson --prefix=/usr \
-Ddocs=false \
-Degl=yes \
-Dx11=false \
-Dtests=true \
-Dglx=no .. &&
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------------------------------------------------------|
libepoxy: libepoxy (OpenGL function pointer management library)
libepoxy:
libepoxy: Epoxy is a library for handling OpenGL function pointer management.
libepoxy:
libepoxy: Homepage: https://github.com/anholt/libepoxy
libepoxy:
libepoxy:
libepoxy:
libepoxy:
libepoxy:
libepoxy:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/libepoxy-1.5.9-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*