Skip to content

Commit 02647fd

Browse files
gmtaawesomekling
authored andcommitted
Ports: Add Mesa GLU
This is a dependency for Tux Racer, and is compiled against Serenity's LibGL.
1 parent f856f49 commit 02647fd

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

Ports/AvailablePorts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
5353
| [`git`](git/) | Git | 2.33.0 | https://git-scm.com/ |
5454
| [`glib`](glib/) | GLib | 2.70.0 | https://wiki.gnome.org/Projects/GLib |
5555
| [`glm`](glm/) | OpenGL Mathematics (GLM) | 0.9.9.8 | https://github.com/g-truc/glm |
56+
| [`glu`](glu/) | Mesa GLU | 9.0.2 | https://gitlab.freedesktop.org/mesa/glu |
5657
| [`gmp`](gmp/) | GNU Multiple Precision Arithmetic Library (GMP) | 6.2.1 | https://gmplib.org/ |
5758
| [`gnucobol`](gnucobol/) | GnuCOBOL | 3.1.2 | https://gnucobol.sourceforge.io/ |
5859
| [`gnupg`](gnupg/) | GnuPG | 2.3.0 | https://gnupg.org/software/index.html |

Ports/glu/package.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env -S bash ../.port_include.sh
2+
port=glu
3+
useconfigure="true"
4+
version="9.0.2"
5+
workdir="glu-glu-${version}"
6+
files="https://gitlab.freedesktop.org/mesa/glu/-/archive/glu-${version}/glu-glu-${version}.tar.gz glu-glu-${version}.tar.gz 332d93a16376bc007e8232a8e5534da84e548cf3db9de040442c47a21f4625ba"
7+
auth_type=sha256
8+
depends=("pkgconf")
9+
10+
pre_configure() {
11+
export ACLOCAL="aclocal -I${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
12+
export GL_CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL"
13+
export GL_LIBS="-lgl"
14+
15+
run libtoolize
16+
run aclocal
17+
run autoconf
18+
run automake --add-missing
19+
20+
# Manual config.sub patch
21+
run cp config.sub config.sub.contents
22+
run mv -f config.sub.contents config.sub
23+
run sed -i 's/-haiku/-serenity/' config.sub
24+
}
25+
26+
post_configure() {
27+
unset ACLOCAL
28+
unset GL_CFLAGS
29+
unset GL_LIBS
30+
}

0 commit comments

Comments
 (0)