Last active
January 21, 2022 15:16
-
-
Save ctdk/5938940 to your computer and use it in GitHub Desktop.
A homebrew formula for installing bsdgames-osx. For now, just plunk it into /usr/local/Library/Formula/ and run "brew install bsdgames-osx". Tested successfully in MacOS X 10.7 and 10.8. If it fails to compile, try adding the "--with-clang" option. Some versions of clang will also require CFLAGS="-std=c11" to compile correctly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class BsdgamesOsx < Formula | |
homepage 'https://github.com/ctdk/bsdgames-osx' | |
url 'https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar.gz' | |
sha1 '31013cbc8fbad71f1e3e0b9b85fd7c943219a99b' | |
head 'https://github.com/ctdk/bsdgames-osx.git' | |
version '2.19.3' | |
depends_on :bsdmake => :build | |
def install | |
ENV.j1 | |
# This replicates the behavior of wargames calling games from /usr/games | |
inreplace 'wargames/wargames.sh' do |s| | |
s.gsub! /\/usr\/games/, "#{prefix}/bin" | |
end | |
system "bsdmake PREFIX=#{prefix} VARDIR=#{HOMEBREW_PREFIX}/var/games" | |
system "bsdmake install PREFIX=#{prefix} VARDIR=#{HOMEBREW_PREFIX}/var/games" | |
end | |
def test | |
%w[ pom ].each do |game| | |
system game | |
end | |
end | |
end |
I just saw this finally, and that's awesome. Thanks, I hadn't gotten around to installing Yosemite on my main Mac yet and couldn't get the formula updated yet.
W00t!
Following on from bartdorsey, I forked this and updated it for macOS Sierra. Brew threw a couple of errors (one hard, on the sha1/sha256 change, and a couple of deprecated warnings on 'depends_on' and 'ENV'). Seems to be working, now. Really glad to have access to these games. Thanks! :) https://gist.github.com/jdmartin/24807e561fe8f90eca256f4e3b92c7fa
Worked on Catalina too, no changes or options required. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I forked this and updated it to work on OS X yosemite. https://gist.github.com/bartdorsey/908002f74f1870b3135a