homebrew-core/Formula/mcabber.rb
Nibbles 2bits 9afa12b403 mcabber: fixes for autogen.sh
Define a couple of variables to help --HEAD run autogen.sh and locate
our m4 macros.  Adds a Dir.chdir for HEAD, and a depend_on libotr,
otherwise configure will choke once you generate it and run it.  Adds a
caveat to inform the user how to setup their .mcabberrc configuration
file.  This compiles on Lion and Snow Lep with all five compilers,
either stable or head.

Changes --enable-otr from an option to being the default.

Closes Homebrew/homebrew#10174.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-15 12:19:42 -06:00

56 lines
1.7 KiB
Ruby

require 'formula'
class Mcabber < Formula
url 'http://mcabber.com/files/mcabber-0.10.1.tar.bz2'
homepage 'http://mcabber.com/'
md5 'fe96beab30f535d5d6270fd1719659b4'
head 'http://mcabber.com/hg/', :using => :hg
depends_on 'pkg-config' => :build
depends_on 'glib'
depends_on 'loudmouth'
depends_on 'gpgme'
depends_on 'libgcrypt'
depends_on 'libotr'
depends_on 'libidn'
depends_on 'aspell' if ARGV.include? '--enable-aspell'
depends_on 'enchant' if ARGV.include? '--enable-enchant'
def options
[
["--enable-enchant", "Enable spell checking support via enchant"],
["--enable-aspell", "Enable spell checking support via aspell"],
]
end
def install
if ARGV.build_head? then
ENV['LIBTOOLIZE'] = '/usr/bin/glibtoolize'
ENV['ACLOCAL'] = "/usr/bin/aclocal -I #{HOMEBREW_PREFIX}/share/aclocal"
Dir.chdir 'mcabber'
inreplace 'autogen.sh', 'libtoolize', '$LIBTOOLIZE'
inreplace 'autogen.sh', 'aclocal', '$ACLOCAL'
system "./autogen.sh"
end
args = ["--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}", "--enable-otr"]
args << "--enable-aspell" if ARGV.include? "--enable-aspell"
args << "--enable-enchant" if ARGV.include? "--enable-enchant"
system "./configure", *args
system "make install"
(share+'mcabber').install %w[mcabberrc.example contrib]
end
def caveats
<<-EOS.undent
A configuration file is necessary to start mcabber. The template is here:
#{share}/mcabber/mcabberrc.example
And there is a Getting Started Guide you will need to setup Mcabber:
http://wiki.mcabber.com/index.php/Getting_started
EOS
end
end