homebrew-core/Formula/recode.rb

40 lines
1.2 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Recode < Formula
2012-04-17 02:02:20 +00:00
homepage 'http://recode.progiciels-bpi.ca/index.html'
url 'https://github.com/pinard/Recode/archive/v3.7-beta2.tar.gz'
sha1 'a10c90009ad3e1743632ada2a302c824edc08eaf'
version '3.7-beta2'
depends_on "gettext"
2012-07-07 18:08:22 +00:00
depends_on :libtool
def copy_libtool_files!
if not MacOS::Xcode.provides_autotools?
2014-02-25 06:49:23 +00:00
s = Formula['libtool'].share
d = "#{s}/libtool/config"
cp ["#{d}/config.guess", "#{d}/config.sub"], "."
2013-07-10 02:30:15 +00:00
elsif MacOS.version <= :leopard
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config.*"], "."
2011-04-08 18:16:37 +00:00
else
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config/config.*"], "."
2010-11-09 05:35:10 +00:00
end
end
def install
# Yep, missing symbol errors without these
ENV.append 'LDFLAGS', '-liconv'
ENV.append 'LDFLAGS', '-lintl'
copy_libtool_files!
2010-11-09 15:45:09 +00:00
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
2010-07-15 16:37:11 +00:00
"--without-included-gettext",
"--prefix=#{prefix}",
"--infodir=#{info}",
2010-07-15 16:37:11 +00:00
"--mandir=#{man}"
system "make install"
end
end