2010-08-10 06:05:50 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Squirrel < Formula
|
2010-08-10 06:05:50 +00:00
|
|
|
homepage 'http://www.squirrel-lang.org'
|
2012-11-19 01:32:22 +00:00
|
|
|
url 'http://squirrel.googlecode.com/files/squirrel_3_0_4_stable.tar.gz'
|
|
|
|
version '3.0.4'
|
|
|
|
sha1 '384d278630040902bc111d8b9fb607d4d4941904'
|
2010-08-10 06:05:50 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "make"
|
|
|
|
|
|
|
|
prefix.install %w[bin include lib]
|
|
|
|
doc.install Dir['doc/*.pdf']
|
|
|
|
doc.install %w[etc samples]
|
2012-02-04 21:28:49 +00:00
|
|
|
# See: https://github.com/mxcl/homebrew/pull/9977
|
2013-03-25 02:09:38 +00:00
|
|
|
(lib+'pkgconfig/libsquirrel.pc').write pc_file
|
2012-02-04 21:28:49 +00:00
|
|
|
end
|
|
|
|
|
2013-03-25 02:09:38 +00:00
|
|
|
def pc_file; <<-EOS.undent
|
|
|
|
prefix=#{opt_prefix}
|
2012-02-04 21:28:49 +00:00
|
|
|
exec_prefix=${prefix}
|
|
|
|
libdir=/${exec_prefix}/lib
|
|
|
|
includedir=/${prefix}/include
|
|
|
|
bindir=/${prefix}/bin
|
|
|
|
ldflags= -L/${prefix}/lib
|
|
|
|
|
|
|
|
Name: libsquirrel
|
|
|
|
Description: squirrel library
|
2013-03-25 02:09:38 +00:00
|
|
|
Version: #{version}
|
2012-02-04 21:28:49 +00:00
|
|
|
|
|
|
|
Requires:
|
|
|
|
Libs: -L${libdir} -lsquirrel -lsqstdlib
|
|
|
|
Cflags: -I${includedir}
|
|
|
|
EOS
|
2010-08-10 06:05:50 +00:00
|
|
|
end
|
|
|
|
end
|