Skip to content

Instantly share code, notes, and snippets.

@dpo
Created September 23, 2013 14:04
Show Gist options
  • Save dpo/6670845 to your computer and use it in GitHub Desktop.
Save dpo/6670845 to your computer and use it in GitHub Desktop.
require 'formula'
class Quadprog < Formula
homepage 'http://sourceforge.net/projects/quadprog'
url 'http://downloads.sourceforge.net/quadprog/quadprog-1.2.1.tar.gz'
sha1 '918bfd8cda2d058bcc9f63a4b03c69a0e2fd55fb'
version '1.2.1'
head 'svn://svn.code.sf.net/p/quadprog/code'
depends_on 'boost' => :recommended
def install
args = [ "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--bindir=#{share}/test" ]
if build.with? 'boost'
args << "--with-boost=#{Formula.factory('boost').prefix}"
else
args << "--without-boost"
end
system "./configure", *args
system "make", "install"
end
test do
system "#{share}/test/test"
system "#{share}/test/utest"
ohai "Test results are in ~/Library/Logs/Homebrew/quadprog"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment