2009-12-29 02:50:51 +00:00
|
|
|
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'
|
2013-01-29 23:37:50 +00:00
|
|
|
url 'https://github.com/pinard/Recode/archive/v3.7-beta2.tar.gz'
|
|
|
|
sha1 'a10c90009ad3e1743632ada2a302c824edc08eaf'
|
|
|
|
version '3.7-beta2'
|
2009-12-29 02:50:51 +00:00
|
|
|
|
|
|
|
depends_on "gettext"
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on :libtool
|
2009-12-29 02:50:51 +00:00
|
|
|
|
2012-07-17 16:37:43 +00:00
|
|
|
def copy_libtool_files!
|
2012-08-09 14:10:39 +00:00
|
|
|
if not MacOS::Xcode.provides_autotools?
|
2014-02-25 06:49:23 +00:00
|
|
|
s = Formula['libtool'].share
|
2012-07-17 16:37:43 +00:00
|
|
|
d = "#{s}/libtool/config"
|
2012-02-27 12:56:35 +00:00
|
|
|
cp ["#{d}/config.guess", "#{d}/config.sub"], "."
|
2013-07-10 02:30:15 +00:00
|
|
|
elsif MacOS.version <= :leopard
|
2012-07-11 01:25:16 +00:00
|
|
|
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config.*"], "."
|
2011-04-08 18:16:37 +00:00
|
|
|
else
|
2012-07-11 01:25:16 +00:00
|
|
|
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config/config.*"], "."
|
2010-11-09 05:35:10 +00:00
|
|
|
end
|
2012-07-17 16:37:43 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2013-01-29 23:37:50 +00:00
|
|
|
# Yep, missing symbol errors without these
|
2012-07-17 16:37:43 +00:00
|
|
|
ENV.append 'LDFLAGS', '-liconv'
|
2013-01-29 23:37:50 +00:00
|
|
|
ENV.append 'LDFLAGS', '-lintl'
|
2012-07-17 16:37:43 +00:00
|
|
|
|
|
|
|
copy_libtool_files!
|
2010-11-09 15:45:09 +00:00
|
|
|
|
2012-08-09 14:10:39 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
2010-07-15 16:37:11 +00:00
|
|
|
"--without-included-gettext",
|
|
|
|
"--prefix=#{prefix}",
|
2012-08-09 14:10:39 +00:00
|
|
|
"--infodir=#{info}",
|
2010-07-15 16:37:11 +00:00
|
|
|
"--mandir=#{man}"
|
2009-12-29 02:50:51 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|