diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index d8a9b88ec6..b7b55c4c0c 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -67,6 +67,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`quake`](quake/) | Quake | 0.65 | https://github.com/SerenityOS/SerenityQuake | | [`rsync`](rsync/) | rsync | 3.1.3 | https://rsync.samba.org/ | | [`SDL2`](SDL2/) | Simple DirectMedia Layer (SDL2) | | https://github.com/SerenityOS/SDL | +| [`SDL2_ttf`](SDL2_ttf/) | SDL2\_ttf (TrueType Font add-on for SDL2) | 2.0.15 | https://www.libsdl.org/projects/SDL\_ttf/ | | [`sed`](sed/) | GNU sed | 4.2.1 | https://www.gnu.org/software/sed/ | | [`sl`](sl/) | Steam Locomotive (SL) | | https://github.com/mtoyoda/sl | | [`stress-ng`](stress-ng/) | stress-ng | 0.11.23 | https://github.com/ColinIanKing/stress-ng | diff --git a/Ports/SDL2_ttf/package.sh b/Ports/SDL2_ttf/package.sh new file mode 100755 index 0000000000..2999653c36 --- /dev/null +++ b/Ports/SDL2_ttf/package.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port=SDL2_ttf +version=2.0.15 +useconfigure=true +files="https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-${version}.tar.gz SDL2_ttf-${version}.tar.gz" +workdir="SDL2_ttf-$version" +depends="SDL2 freetype" + +configure() { + run ./configure \ + --host=${SERENITY_ARCH}-pc-serenity \ + --with-sdl-prefix=${SERENITY_ROOT}/Build/Root/usr \ + LIBS="-lgui -lgfx -lipc -lcore -lcompression" +} diff --git a/Ports/SDL2_ttf/patches/configure.patch b/Ports/SDL2_ttf/patches/configure.patch new file mode 100644 index 0000000000..014e2c71da --- /dev/null +++ b/Ports/SDL2_ttf/patches/configure.patch @@ -0,0 +1,12 @@ +diff -ru SDL2_ttf-2.0.15/config.sub SDL2_ttf-2.0.15-patched/config.sub +--- SDL2_ttf-2.0.15/config.sub 2021-03-05 22:11:27.518384348 +0100 ++++ SDL2_ttf-2.0.15-patched/config.sub 2019-01-12 20:44:11.000000000 +0100 +@@ -1408,7 +1408,7 @@ + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. +- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ ++ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \