homebrew-core/Formula/weechat.rb

32 lines
1.2 KiB
Ruby
Raw Normal View History

require 'formula'
2009-09-17 18:41:05 +00:00
2011-03-10 05:11:03 +00:00
class Weechat < Formula
head 'git://git.sv.gnu.org/weechat.git'
2011-06-07 15:01:33 +00:00
url 'http://www.weechat.org/files/src/weechat-0.3.5.tar.bz2'
homepage 'http://www.weechat.org'
2011-06-07 15:01:33 +00:00
md5 '0d2a089bfbfa550e0c65618a171fb3c4'
2009-09-17 18:41:05 +00:00
depends_on 'cmake' => :build
depends_on 'gnutls'
2009-09-17 18:41:05 +00:00
def install
# Remove all arch flags from the PERL_*FLAGS as we specify them ourselves.
# This messes up because the system perl is a fat binary with 32,64 and PPC
# compiles, but our deps don't have that.
archs = ['-arch ppc', '-arch i386', '-arch x86_64']
inreplace "src/plugins/scripts/perl/CMakeLists.txt",
'IF(PERL_FOUND)',
'IF(PERL_FOUND)' +
%Q{\n STRING(REGEX REPLACE "#{archs.join '|'}" "" PERL_CFLAGS "${PERL_CFLAGS}")} +
%Q{\n STRING(REGEX REPLACE "#{archs.join '|'}" "" PERL_LFLAGS "${PERL_LFLAGS}")}
#FIXME: Compiling perl module doesn't work
#NOTE: -DPREFIX has to be specified because weechat devs enjoy being non-standard
system "cmake", "-DPREFIX=#{prefix}",
"-DENABLE_RUBY=OFF",
2011-01-20 16:40:22 +00:00
"-DENABLE_PERL=OFF",
std_cmake_parameters, "."
2009-09-17 18:41:05 +00:00
system "make install"
end
end