Skip to content

Instantly share code, notes, and snippets.

@osxi
Last active June 15, 2023 05:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osxi/9707c12bcf9b813fa632 to your computer and use it in GitHub Desktop.
Save osxi/9707c12bcf9b813fa632 to your computer and use it in GitHub Desktop.
Classic BSD Games on OS X

The following are the terminal commands that I used to get bsdgames installed on OS X Yosemite PB3. Install bsdmake via Homebrew before proceeding.

Clone down ctdk/bsdgames-osx

$ git clone https://github.com/ctdk/bsdgames-osx.git

Enter the bsdgames-osx directory.

(optional) Change the Installation Path

# The prefix of /usr/local is hard-coded in a lot of places, let's use /Users/osxi/.local
# (substitute `osxi` with your user name).
$ find . -type f | xargs -n1 -I {} perl -e "s/\/usr\/local/\/Users\/osxi\/.local/g;" -pi {}

# Open `Makefile` and remove the line for ching. I don't know what that is but it didn't want to
# install so I deleted it. All that matters is `atc`, right? :D
$ vim Makefile

Compile

# Compile everything
$ CFLAGS="-std=c11" CC=clang bsdmake

Install

# Install everything
$ bsdmake install

All you should have to do is add /Users/osxi/.local/bin to your $PATH. You can add something like export PATH="$PATH:$HOME/.local/bin" to your shell's RC script so it knows where to find your shiny new bsdgames executables.

The final step is to reduce your terminal emulator's font size and play atc at work.

@pncnmnp
Copy link

pncnmnp commented Mar 29, 2023

Thanks! The above instructions were quite helpful!

A quick note to everyone on macOS 12.4, if you are seeing issues with bsdmake install such as install: brew: Invalid argument, you'll need to modify some parameters within Makefile.inc.

Something like this should do the trick:

BINOWN?=	<your-user-name>
LIBOWN?=	<your-user-name>
MANOWN?=	<your-user-name>
SHAREOWN?=	<your-user-name>

BINGRP?=	staff
SHAREGRP?= 	staff

Edit: From https://github.com/ctdk/bsdgames-osx/blob/master/Homebrew/Yosemite/bsdgames-osx.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment