Skip to content

Commit

Permalink
Ports: Add port for Brogue (BrogueCE)
Browse files Browse the repository at this point in the history
  • Loading branch information
nooga authored and linusg committed May 15, 2021
1 parent 08c55b7 commit da4928f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions Ports/AvailablePorts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`bc`](bc/) | bc | 2.5.1 | https://github.com/gavinhoward/bc |
| [`binutils`](binutils/) | GNU Binutils | 2.36.1 | https://www.gnu.org/software/binutils/ |
| [`bison`](bison/) | GNU Bison | 1.25 | https://www.gnu.org/software/bison/ |
| [`brogue`](brogue/) | BrogueCE | 1.9.3 | https://github.com/tmewett/BrogueCE |
| [`byacc`](byacc/) | Berkeley Yacc | 20191125 | https://invisible-island.net/byacc/byacc.html |
| [`bzip2`](bzip2/) | bzip2 | 1.0.8 | https://sourceware.org/bzip2/ |
| [`carl`](carl/) | Crypto Ancienne Resource Loader | 1.5 | https://github.com/classilla/cryanc |
Expand Down
16 changes: 16 additions & 0 deletions Ports/brogue/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=brogue
depends="SDL2 SDL2_image"
version=1.9.3
workdir="BrogueCE-${version}"
files="https://github.com/tmewett/BrogueCE/archive/refs/tags/v${version}.tar.gz brogue.tar.gz 441182916a16114bedfee614b09a198b4877a25db2544c5e087c86038aae2452"
auth_type=sha256
makeopts="bin/brogue"

install() {
datadir="$SERENITY_INSTALL_ROOT/usr/local/share/games/brogue/assets"
mkdir -p "${SERENITY_INSTALL_ROOT}/usr/local/bin"
mkdir -p $datadir
cp $workdir/bin/assets/* $datadir
cp "${workdir}/bin/brogue" "${SERENITY_INSTALL_ROOT}/usr/local/bin"
}
22 changes: 22 additions & 0 deletions Ports/brogue/patches/config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:100644 100644 0000000000 0000000000 M config.mk.orig

diff --git a/config.mk.orig b/config.mk
index b33967bf2c..d2b07a8ade 100644
--- a/config.mk.orig
+++ b/config.mk
@@ -1,5 +1,5 @@
# Where to look for game data files (found in 'bin'). Must be without trailing slashes!
-DATADIR := .
+DATADIR := /usr/local/share/games/brogue

# Include terminal support. Requires ncurses
TERMINAL := NO
@@ -7,7 +7,7 @@ TERMINAL := NO
# Include graphical support. Requires SDL2 and SDL2_image
GRAPHICS := YES
# Path to sdl2-config script
-SDL_CONFIG := sdl2-config
+SDL_CONFIG := pkg-config sdl2

# Select web brogue mode. Requires POSIX system.
WEBBROGUE := NO

0 comments on commit da4928f

Please sign in to comment.