homebrew-core/Formula/dos2unix.rb

30 lines
668 B
Ruby
Raw Normal View History

require 'formula'
2009-06-08 15:00:25 +00:00
2011-03-10 05:11:03 +00:00
class Dos2unix < Formula
url 'http://waterlan.home.xs4all.nl/dos2unix/dos2unix-5.3.1.tar.gz'
md5 '438c48ebd6891b80b58de14c022ca69e'
homepage 'http://waterlan.home.xs4all.nl/dos2unix.html'
2009-06-08 15:00:25 +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
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
args << "install"
system "make", *args
2009-06-08 15:00:25 +00:00
end
end