From 02647fd4858f52053073458338835624e65a3604 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Fri, 24 Dec 2021 15:03:29 +0100 Subject: [PATCH] Ports: Add Mesa GLU This is a dependency for Tux Racer, and is compiled against Serenity's LibGL. --- Ports/AvailablePorts.md | 1 + Ports/glu/package.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 Ports/glu/package.sh diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 0730205acc0..7bb54abd804 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -53,6 +53,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`git`](git/) | Git | 2.33.0 | https://git-scm.com/ | | [`glib`](glib/) | GLib | 2.70.0 | https://wiki.gnome.org/Projects/GLib | | [`glm`](glm/) | OpenGL Mathematics (GLM) | 0.9.9.8 | https://github.com/g-truc/glm | +| [`glu`](glu/) | Mesa GLU | 9.0.2 | https://gitlab.freedesktop.org/mesa/glu | | [`gmp`](gmp/) | GNU Multiple Precision Arithmetic Library (GMP) | 6.2.1 | https://gmplib.org/ | | [`gnucobol`](gnucobol/) | GnuCOBOL | 3.1.2 | https://gnucobol.sourceforge.io/ | | [`gnupg`](gnupg/) | GnuPG | 2.3.0 | https://gnupg.org/software/index.html | diff --git a/Ports/glu/package.sh b/Ports/glu/package.sh new file mode 100755 index 00000000000..0ca4eebb689 --- /dev/null +++ b/Ports/glu/package.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port=glu +useconfigure="true" +version="9.0.2" +workdir="glu-glu-${version}" +files="https://gitlab.freedesktop.org/mesa/glu/-/archive/glu-${version}/glu-glu-${version}.tar.gz glu-glu-${version}.tar.gz 332d93a16376bc007e8232a8e5534da84e548cf3db9de040442c47a21f4625ba" +auth_type=sha256 +depends=("pkgconf") + +pre_configure() { + export ACLOCAL="aclocal -I${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig" + export GL_CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL" + export GL_LIBS="-lgl" + + run libtoolize + run aclocal + run autoconf + run automake --add-missing + + # Manual config.sub patch + run cp config.sub config.sub.contents + run mv -f config.sub.contents config.sub + run sed -i 's/-haiku/-serenity/' config.sub +} + +post_configure() { + unset ACLOCAL + unset GL_CFLAGS + unset GL_LIBS +}