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'
|
2014-01-13 04:11:44 +00:00
|
|
|
url 'http://waterlan.home.xs4all.nl/dos2unix/dos2unix-6.0.4.tar.gz'
|
|
|
|
sha1 '93d73148c09908a42dcbf5339312c9aa1f18ba7c'
|
2009-06-08 15:00:25 +00:00
|
|
|
|
2012-08-13 14:36:30 +00:00
|
|
|
depends_on 'gettext'
|
2011-06-29 15:47:52 +00:00
|
|
|
|
2014-01-14 04:57:43 +00:00
|
|
|
devel do
|
2014-03-21 18:07:45 +00:00
|
|
|
url 'http://waterlan.home.xs4all.nl/dos2unix/dos2unix-6.0.5-beta11.tar.gz'
|
|
|
|
sha1 'f7d17dc4dbf723c81d1459b9664fc8045a77541d'
|
2014-01-14 04:57:43 +00:00
|
|
|
end
|
|
|
|
|
2009-06-08 15:00:25 +00:00
|
|
|
def install
|
2014-02-25 05:19:22 +00:00
|
|
|
gettext = Formula["gettext"]
|
2012-08-13 14:36:30 +00:00
|
|
|
system "make", "prefix=#{prefix}",
|
|
|
|
"CC=#{ENV.cc}",
|
|
|
|
"CPP=#{ENV.cc}",
|
|
|
|
"CFLAGS=#{ENV.cflags}",
|
|
|
|
"CFLAGS_OS=-I#{gettext.include}",
|
|
|
|
"LDFLAGS_EXTRA=-L#{gettext.lib} -lintl",
|
|
|
|
"install"
|
2009-06-08 15:00:25 +00:00
|
|
|
end
|
2014-01-14 02:54:53 +00:00
|
|
|
|
|
|
|
test do
|
2014-04-08 17:58:44 +00:00
|
|
|
path = testpath/"test.txt"
|
|
|
|
path.write "foo\r\nbar\r\n"
|
|
|
|
|
|
|
|
system "#{bin}/dos2unix", path
|
|
|
|
assert_equal "foo\nbar\n", path.read
|
2014-01-14 02:54:53 +00:00
|
|
|
end
|
2009-06-08 15:00:25 +00:00
|
|
|
end
|