2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-08 15:00:25 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Dos2unix < Formula
|
2011-09-08 22:56:09 +00:00
|
|
|
homepage 'http://waterlan.home.xs4all.nl/dos2unix.html'
|
2012-05-07 10:26:33 +00:00
|
|
|
url 'http://waterlan.home.xs4all.nl/dos2unix/dos2unix-6.0.tar.gz'
|
|
|
|
sha1 '77ff5b9203f2a0abc4900c00d69e8d5b67d617a5'
|
2009-06-08 15:00:25 +00:00
|
|
|
|
2011-06-29 15:47:52 +00:00
|
|
|
depends_on "gettext" if ARGV.include? "--enable-nls"
|
|
|
|
|
|
|
|
def options
|
|
|
|
[["--enable-nls", "Enable NLS support."]]
|
|
|
|
end
|
|
|
|
|
2009-06-08 15:00:25 +00:00
|
|
|
def install
|
2011-06-29 15:47:52 +00:00
|
|
|
args = ["prefix=#{prefix}"]
|
|
|
|
|
|
|
|
if ARGV.include? "--enable-nls"
|
|
|
|
gettext = Formula.factory("gettext")
|
|
|
|
args << "CFLAGS_OS=-I#{gettext.include}"
|
|
|
|
args << "LDFLAGS_EXTRA=-L#{gettext.lib} -lintl"
|
|
|
|
else
|
|
|
|
args << "ENABLE_NLS="
|
|
|
|
end
|
|
|
|
|
2012-01-05 02:57:19 +00:00
|
|
|
args << "CC=#{ENV.cc}"
|
|
|
|
args << "CPP=#{ENV.cc}"
|
|
|
|
args << "CFLAGS=#{ENV.cflags}"
|
2011-06-29 15:47:52 +00:00
|
|
|
args << "install"
|
2009-09-21 18:52:47 +00:00
|
|
|
|
2011-06-29 15:47:52 +00:00
|
|
|
system "make", *args
|
2009-06-08 15:00:25 +00:00
|
|
|
end
|
|
|
|
end
|