homebrew-core/Formula/falcon.rb
Max Howell 912802f673 Fix Falcon on 10.8
Probably 10.x in fact. Main problem was the internal PCRE didn't build and link errors occurred. Cmake sucks.
2012-08-21 12:09:05 -04:00

48 lines
1.1 KiB
Ruby

require 'formula'
class Falcon < Formula
homepage 'http://www.falconpl.org/'
url 'http://falconpl.org/project_dl/_official_rel/Falcon-0.9.6.8.tgz'
md5 '8435f6f2fe95097ac2fbe000da97c242'
head 'http://git.falconpl.org/falcon.git'
depends_on 'cmake' => :build
depends_on 'pcre'
conflicts_with 'sdl',
:because => "Falcon optionally depends on SDL and then the build breaks. Fix it!"
def options
[
['--editline', "Use editline instead of readline"],
['--feathers', "Include feathers (extra libraries)"]
]
end
def install
args = std_cmake_args + %W{
-DCMAKE_INSTALL_PREFIX=#{prefix}
-DFALCON_BIN_DIR=#{bin}
-DFALCON_LIB_DIR=#{lib}
-DFALCON_MAN_DIR=#{man1}
-DFALCON_WITH_INTERNAL_PCRE=OFF
-DFALCON_WITH_MANPAGES=ON}
if ARGV.include? '--editline'
args << "-DFALCON_WITH_EDITLINE=ON"
else
args << "-DFALCON_WITH_EDITLINE=OFF"
end
if ARGV.include? '--feathers'
args << "-DFALCON_WITH_FEATHERS=feathers"
else
args << "-DFALCON_WITH_FEATHERS=NO"
end
system "cmake", *args
system "make"
system "make install"
end
end