From 44dd8247647474df95137452b3c9cad9b83326be Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Mon, 3 Apr 2023 19:13:57 +0100 Subject: [PATCH] Ports: Add stockfish port --- Ports/AvailablePorts.md | 1 + Ports/stockfish/package.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 Ports/stockfish/package.sh diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index acb398fe7a..82453b2141 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -258,6 +258,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`speexdsp`](speexdsp/) | Speex audio processing library | 1.2.1 | https://www.speex.org/ | | [`sqlite`](sqlite/) | SQLite | 3410200 | https://www.sqlite.org/ | | [`stb`](stb/) | stb single-file public domain libraries for C/C++ | af1a5bc | https://github.com/nothings/stb | +| [`stockfish`](stockfish/) | Stockfish: A free and strong UCI chess engine | 15.1 | https://github.com/official-stockfish/Stockfish | | [`stpuzzles`](stpuzzles/) | Simon Tatham's Portable Puzzle Collection | | https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ | | [`stress-ng`](stress-ng/) | stress-ng | 0.14.03 | https://github.com/ColinIanKing/stress-ng | | [`Super-Mario`](Super-Mario/) | Super-Mario Clone | | https://github.com/Bennyhwanggggg/Super-Mario-Clone-Cpp | diff --git a/Ports/stockfish/package.sh b/Ports/stockfish/package.sh new file mode 100755 index 0000000000..e6f6580e47 --- /dev/null +++ b/Ports/stockfish/package.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port='stockfish' +version='15.1' +useconfigure='false' +files="https://github.com/official-stockfish/Stockfish/archive/refs/tags/sf_${version}.tar.gz sf_${version}.tar.gz d4272657905319328294355973faee40a8c28e3eecb0e7b266ed34ff33383b76" +auth_type='sha256' +workdir="Stockfish-sf_${version}/src/" +makeopts+=(ARCH="${SERENITY_ARCH}" SUPPORTED_ARCH=true COMPCXX="${CXX}") + +build() { + run make build "${makeopts[@]}" +} + +install() { + run mkdir -p "${SERENITY_INSTALL_ROOT}/usr/local/bin/" + run cp stockfish "${SERENITY_INSTALL_ROOT}/usr/local/bin/" +}