Skip to content

Instantly share code, notes, and snippets.

@Congee
Created November 6, 2014 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Congee/1fb4e07d2ee5d6ef9eaa to your computer and use it in GitHub Desktop.
Save Congee/1fb4e07d2ee5d6ef9eaa to your computer and use it in GitHub Desktop.
libsvm for homebrew with python bindings
require 'formula'
class Libsvm < Formula
homepage 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/'
url 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/oldfiles/libsvm-3.18.tar.gz'
sha1 '20bd3e2d21d79c3714007043475b92dfeed29135'
bottle do
cellar :any
revision 1
sha1 "90aa0337c4b35d26d3c51283dc69a3f6d3221824" => :yosemite
sha1 "dd4e5a85187a0729083cdb1adfb69bd54d5c2cd9" => :mavericks
sha1 "697539637c9cb4e007f1124822ef1c92bc5f90ed" => :mountain_lion
end
def install
system "make", "CFLAGS=#{ENV.cflags}"
system "make", "lib"
bin.install "svm-scale", "svm-train", "svm-predict"
lib.install "libsvm.so.2" => "libsvm.2.dylib"
lib.install_symlink "libsvm.2.dylib" => "libsvm.dylib"
system "install_name_tool", "-id", "#{lib}/libsvm.2.dylib", "#{lib}/libsvm.2.dylib"
include.install "svm.h"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment