#! /bin/bash # libepoxy # Source: https://download.gnome.org/sources/libepoxy/1.5/libepoxy-1.5.10.tar.xz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: Mesa or libglvnd # 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 " export PVER="1.5.10" # If GL is not missing from mesa set -Dglx=yes # if building on a pure wayland system, add these flags: export CFLAGS="-DEGL_NO_X11 -DMESA_EGL_NO_X11_HEADERS" export CXXFLAGS="-DEGL_NO_X11 -DMESA_EGL_NO_X11_HEADERS" # ... and apply patch: patch -Np1 -i ../patches/libepoxy-mlfs/fallback-to-libOpenGL-when-GLX-is-disabled.patch meson setup --prefix=/usr \ -Ddocs=false \ -Degl=yes \ -Dx11=false \ -Dtests=true \ -Dglx=no OUT && read -p "Compile?" && ninja -C OUT -j2 && unset CFLAGS CXXFLAGS sudo -S DESTDIR=$BUILD ninja -C OUT 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-$PVER-$PSUFFIX && sudo -S rm -rf ${BUILD}/*