2012-03-19 17:35:17 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Crossroads < Formula
|
|
|
|
homepage 'http://www.crossroads.io/'
|
2012-06-15 09:43:07 +00:00
|
|
|
url 'http://download.crossroads.io/libxs-1.2.0.tar.gz'
|
2012-07-07 18:08:22 +00:00
|
|
|
sha1 'd9633e6df56e3ed0c4f0e86d80ee0ae10c8a966a'
|
2012-03-19 17:35:17 +00:00
|
|
|
|
2012-07-07 18:08:22 +00:00
|
|
|
head 'https://github.com/crossroads-io/libxs.git'
|
2012-03-19 17:35:17 +00:00
|
|
|
|
2012-08-27 05:21:28 +00:00
|
|
|
option 'with-pgm', 'Build with PGM extension'
|
|
|
|
|
2012-10-02 20:59:08 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
2012-10-02 20:59:08 +00:00
|
|
|
depends_on 'libpgm' if build.include? 'with-pgm'
|
2012-03-19 17:35:17 +00:00
|
|
|
|
2012-07-07 18:08:22 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2326
|
|
|
|
cause "Compiling with LLVM gives a segfault while linking."
|
|
|
|
end
|
|
|
|
|
2012-03-19 17:35:17 +00:00
|
|
|
def install
|
2012-08-27 05:21:28 +00:00
|
|
|
system "./autogen.sh" if build.head?
|
2012-03-19 17:35:17 +00:00
|
|
|
|
2012-10-02 20:59:08 +00:00
|
|
|
# Help it find openpgm-5.2 because it searches for openpgm-5.1.pc
|
|
|
|
# https://github.com/mxcl/homebrew/issues/15217
|
|
|
|
if build.include? 'with-pgm'
|
|
|
|
libpgm = Formula.factory('libpgm')
|
|
|
|
ENV['OpenPGM_CFLAGS'] = "-I#{libpgm.include}/pgm-5.2 -I#{libpgm.lib}/pgm-5.2/include"
|
|
|
|
ENV['OpenPGM_LIBS'] = "-L#{libpgm.lib} -lpgm"
|
|
|
|
end
|
|
|
|
|
2012-03-19 17:35:17 +00:00
|
|
|
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
|
2012-10-02 20:59:08 +00:00
|
|
|
args << "--with-system-pgm" if build.include? 'with-pgm'
|
2012-03-19 17:35:17 +00:00
|
|
|
system "./configure", *args
|
|
|
|
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|