Created
September 6, 2010 11:12
-
-
Save sedm0784/566916 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 Tads2Compiler <Formula | |
url 'http://www.tads.org/frobtads/frobtads-t2compiler-0.13.tar.gz' | |
md5 '12caf94d9c1e646ae04b44da0df83a30' | |
end | |
class Tads3Compiler <Formula | |
url 'http://www.tads.org/frobtads/frobtads-t3compiler-0.13.tar.gz' | |
md5 '231d359f389be3d28e8134a2b832dd70' | |
end | |
class Frobtads <Formula | |
url 'http://www.tads.org/frobtads/frobtads-0.13.tar.gz' | |
homepage 'http://www.tads.org/frobtads.htm' | |
md5 'b6f25787b9ff7b89931d765046c68642' | |
def options | |
[ | |
['--tads2-compiler', "Include TADS 2 compiler"], | |
['--tads3-compiler', "Include TADS 3 compiler"] | |
] | |
end | |
def install | |
workdir=Pathname.getwd | |
if ARGV.include? '--tads2-compiler' | |
Tads2Compiler.new.brew { workdir.install Dir["*"] } | |
end | |
if ARGV.include? '--tads3-compiler' | |
Tads3Compiler.new.brew { workdir.install Dir["*"] } | |
end | |
system "./configure", "--disable-dependency-tracking", | |
"--prefix=#{prefix}" | |
system "make install" | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attempting to achieve this:
There are no extra configuration steps required to build the compilers. Just unpack them inside the FrobTADS directory and reconfigure the package. The FrobTADS configuration script will detect the presence of the compiler sources and build them along with the interpreter. For example, if you previously unpacked FrobTADS in
and your downloaded TADS 3 compiler package is
you can unpack the compiler with:
But it fails because both the main frobtads archive and the compiler archives both contain directories named "t3compiler" and the workdir.install call fails, even though the two similarly-named directories have different contents.