forked from Homebrew/legacy-homebrew
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
- Loading branch information
Showing
1 changed file
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,40 @@ | ||
require 'formula' | ||
|
||
class Mcabber <Formula | ||
url 'http://mcabber.com/files/mcabber-0.9.10.tar.bz2' | ||
url 'http://mcabber.com/files/mcabber-0.10.0.tar.bz2' | ||
homepage 'http://mcabber.com/' | ||
md5 '887415d16c32af58eab2ec2d9bb17fa6' | ||
md5 '97faad2154a87da9329d51db957f9024' | ||
head 'http://mcabber.com/hg/' | ||
|
||
depends_on 'pkg-config' | ||
depends_on 'glib' | ||
depends_on 'gpgme' => :optional | ||
depends_on 'aspell' => :optional | ||
depends_on 'enchant' => :optional | ||
depends_on 'libotr' => :optional | ||
depends_on 'libgcrypt' => :optional | ||
depends_on 'loudmouth' | ||
depends_on 'gpgme' | ||
depends_on 'libgcrypt' | ||
depends_on 'aspell' => :optional if ARGV.include? '--enable-aspell' | ||
depends_on 'enchant' => :optional if ARGV.include? '--enable-enchant' | ||
depends_on 'libotr' => :optional if ARGV.include? '--enable-otr' | ||
depends_on 'libidn' => :optional | ||
|
||
def options | ||
[ | ||
["--enable-enchant", "Enable spell checking support via enchant"], | ||
["--enable-aspell", "Enable spell checking support via aspell"], | ||
["--enable-otr", "Enable support for off-the-record messages"] | ||
] | ||
end | ||
|
||
def install | ||
system "./configure", "--prefix=#{prefix}", | ||
"--disable-debug", | ||
"--disable-dependency-tracking", | ||
"--enable-aspell", | ||
"--enable-enchant", | ||
"--enable-otr", | ||
"--with-ssl" | ||
args = ["--disable-debug", "--disable-dependency-tracking", | ||
"--prefix=#{prefix}"] | ||
|
||
args << "--enable-aspell" if ARGV.include? "--enable-aspell" | ||
args << "--enable-enchant" if ARGV.include? "--enable-enchant" | ||
args << "--enable-otr" if ARGV.include? "--enable-otr" | ||
|
||
system "./configure", *args | ||
system "make install" | ||
|
||
(share+'mcabber').install %w[mcabberrc.example contrib] | ||
end | ||
end |