diff options
| author | Justin Hahn | 2011-06-29 11:47:52 -0400 |
|---|---|---|
| committer | Jack Nagel | 2011-09-08 17:48:38 -0500 |
| commit | 3895d58748e78f9cd418df06a524bc61e81fed12 (patch) | |
| tree | b0404a1f8818cdf779c5e12b8e928bff8b54b680 | |
| parent | 9ef83210d1efb89559ef71db9dfedd10cdbaa13d (diff) | |
| download | homebrew-3895d58748e78f9cd418df06a524bc61e81fed12.tar.bz2 | |
dos2unix 5.3.1
This change upgrades dos2unix to release 5.3.1, eliminating the now
duplicate unix2dos formula. This also introduces optional NLS support
for dos2unix through the --enable-nls option.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Formula/dos2unix.rb | 27 | ||||
| -rw-r--r-- | Library/Formula/unix2dos.rb | 14 |
2 files changed, 20 insertions, 21 deletions
diff --git a/Library/Formula/dos2unix.rb b/Library/Formula/dos2unix.rb index 238856cd8..efe6ca898 100644 --- a/Library/Formula/dos2unix.rb +++ b/Library/Formula/dos2unix.rb @@ -1,16 +1,29 @@ require 'formula' class Dos2unix < Formula - url 'http://sourceforge.net/projects/dos2unix/files/dos2unix/3.2/dos2unix-3.2.tar.gz' - md5 'db3902feba8a4bae26e9a1bd27c7ce53' + url 'http://sourceforge.net/projects/dos2unix/files/dos2unix/5.3.1/dos2unix-5.3.1.tar.gz' + md5 '438c48ebd6891b80b58de14c022ca69e' homepage 'http://dos2unix.sourceforge.net/' + depends_on "gettext" if ARGV.include? "--enable-nls" + + def options + [["--enable-nls", "Enable NLS support."]] + end + def install - # we don't use the Makefile as it doesn't optimize - system "#{ENV.cc} #{ENV.cflags} dos2unix.c -o dos2unix" + 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" - bin.install %w[dos2unix] - ln_sf bin+'dos2unix', bin+'mac2unix' - man1.install %w[mac2unix.1 dos2unix.1] + system "make", *args end end diff --git a/Library/Formula/unix2dos.rb b/Library/Formula/unix2dos.rb deleted file mode 100644 index 0056a09df..000000000 --- a/Library/Formula/unix2dos.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'formula' - -class Unix2dos < Formula - url 'http://trac.macports.org/export/31021/distfiles/unix2dos/unix2dos-2.2.src.tar.gz' - md5 'caf9f33155073d3efd310eff9103170b' - homepage 'http://en.wikipedia.org/wiki/Unix2dos' - - def install - # Don't use the Makefile as it doesn't optimize - system "#{ENV.cc} #{ENV.cflags} unix2dos.c -o unix2dos" - bin.install "unix2dos" - man1.install "unix2dos.1" - end -end |
