Last active
August 29, 2015 14:05
-
-
Save mistydemeo/f1a516005437397c34eb to your computer and use it in GitHub Desktop.
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 Gopher < Formula | |
homepage "http://gopher.quux.org:70/give-me-gopher/" | |
url "http://archive.ubuntu.com/ubuntu/pool/universe/g/gopher/gopher_3.0.13.tar.gz" | |
sha1 "112ad8f119d35e4aedfadf7b83387e175f27b5df" | |
def install | |
# This is tremendously ugly! | |
# Gopher includes stub headers for compatibility with various OSs, and | |
# distinguishes them by capitalizing them. Obviously that does nothing on | |
# a case-sensitive OS, so gopher ends up with only its stubs and not the real things. | |
# This is documented in the README, whose advice is simply to build on UFS on OS X. | |
inreplace "object/Dirent.h", "dirent.h", "#{MacOS.sdk_path}/usr/include/dirent.h" | |
inreplace "object/Locale.h", "locale.h", "#{MacOS.sdk_path}/usr/include/locale.h" | |
inreplace "object/Regex.h", "regex.h", "#{MacOS.sdk_path}/usr/include/regex.h" | |
inreplace "object/String.h", "string.h", "#{MacOS.sdk_path}/usr/include/string.h" | |
inreplace "object/Stdlib.h", "stdlib.h", "#{MacOS.sdk_path}/usr/include/stdlib.h" | |
system "./configure", "--disable-dependency-tracking", | |
"--disable-silent-rules", | |
"--prefix=#{prefix}" | |
system "make", "install" | |
end | |
test do | |
system "#{bin}/gophfilt", "gopher://quux.org" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment