Files
BMLFS/build-scripts/cogl.build

71 lines
2.5 KiB
Bash

#! /bin/bash
# COGL
# Source: ftp://ftp.acc.umu.se/pub/gnome/sources/cogl/1.22/cogl-1.22.8.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: Cairo, gdk-pixbuf, GLU, Mesa, Pango, Wayland
# Recommended: Gobject-introspection
# Optional: gst-plugins-base, GTK-Doc, SDL, and SDL2
# If optimizing, use these flags with GCC
export CFLAGS="-march=native -mtune=native -pipe "
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
# If building with mesa with no GLX support, patch in missing GL headers
patch -Np1 -i ../patches/cogl-mlfs/add_missing_GL_header_for_NOX-builds.patch
autoreconf -vfi &&
./configure --prefix=/usr \
--disable-gles1 \
--enable-gles2 \
--enable-gl \
--enable-gdk-pixbuf \
--enable-introspection \
--enable-cairo \
--enable-kms-egl-platform \
--enable-wayland-egl-platform \
--enable-xlib-egl-platform \
--enable-wayland-egl-server \
--enable-cogl-gst $BUILDTRUPLE &&
## For non-GLX build:
#./configure --prefix=/usr --disable-gles1 --enable-gles2 \
# -enable-gdk-pixbuf --enable-introspection \
# --enable-cairo --enable-kms-egl-platform \
# --enable-wayland-egl-platform --enable-wayland-egl-server \
# $BUILDTRUPLE --enable-glx=no --disable-gl &&
read -p "Compile?" && make -j2 &&
sudo -S make DESTDIR=$BUILD 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------------------------------------------------------|
cogl: COGL
cogl:
cogl: Cogl is a modern 3D graphics API with associated utility APIs
cogl: designed to expose the features of 3D graphics hardware using a
cogl: direct state access API design, as opposed to the state-machine
cogl: style of OpenGL.
cogl:
cogl: Homepage: https://gitlab.gnome.org/GNOME/cogl
cogl:
cogl:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/cogl-1.22.8-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*