diff options
| author | Sean Goller | 2012-10-04 12:00:49 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2013-01-07 13:04:14 -0800 |
| commit | da8f1351689ed803f91a91809f21e26fcbc65850 (patch) | |
| tree | 3d7e25768a7f481505d4ff9c6ba6520b41113d03 /Library/Formula | |
| parent | c48c568a3e2b28809dac3e6c228ce2e114a9b5d0 (diff) | |
| download | homebrew-da8f1351689ed803f91a91809f21e26fcbc65850.tar.bz2 | |
unac 1.8.0
unac is a C library and command that removes accents from a string.
Closes #15306.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/unac.rb | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Library/Formula/unac.rb b/Library/Formula/unac.rb new file mode 100644 index 000000000..b75e27670 --- /dev/null +++ b/Library/Formula/unac.rb @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +require 'formula' + +class Unac < Formula + homepage 'http://savannah.nongnu.org/projects/unac' + url 'http://ftp.de.debian.org/debian/pool/main/u/unac/unac_1.8.0.orig.tar.gz' + sha1 '3e779bb7f3b505880ac4f43b48ee2f935ef8aa36' + + depends_on :autoconf + depends_on :automake + depends_on :libtool + depends_on 'gettext' => :build + + def patches + { + :p0 => [ + "http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=patch-libunac1.txt;att=1;bug=623340", + "http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=patch-unaccent.c.txt;att=1;bug=623340"], + :p1 => [ + "http://ftp.de.debian.org/debian/pool/main/u/unac/unac_1.8.0-6.diff.gz", + DATA] + } + end + + def install + # Compatibility with Automake 1.13 and newer. + inreplace 'configure.ac', 'AM_CONFIG_HEADER', 'AC_CONFIG_HEADERS' + + system "chmod", "+x", "./configure" + touch "config.rpath" + inreplace "autogen.sh", "libtool", "glibtool" + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + + # Separate steps to prevent race condition in folder creation + system "make" + ENV.j1 + system "make install" + end + + def test + `#{bin}/unaccent utf-8 fóó`.chomp == 'foo' + end +end + +# +# configure.ac doesn't properly detect Mac OS's iconv library. This patch fixes that. +# +__END__ +diff --git a/configure.ac b/configure.ac +index 4a4eab6..9f25d50 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -49,6 +49,7 @@ AM_MAINTAINER_MODE + + AM_ICONV + ++LIBS="$LIBS -liconv" + AC_CHECK_FUNCS(iconv_open,,AC_MSG_ERROR([ + iconv_open not found try to install replacement from + http://www.gnu.org/software/libiconv/ |
