2011-09-28 23:29:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libsvm < Formula
|
|
|
|
homepage 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/'
|
2012-04-13 20:07:44 +00:00
|
|
|
url 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/libsvm-3.12.tar.gz'
|
|
|
|
md5 'a1b1083fe69a4ac695da753f4c83ed42'
|
2011-09-28 23:29:41 +00:00
|
|
|
|
|
|
|
def install
|
2012-02-03 23:02:21 +00:00
|
|
|
inreplace 'Makefile', '-soname', '-install_name'
|
|
|
|
inreplace 'Makefile', 'libsvm.so.$(SHVER)', 'libsvm.$(SHVER).dylib'
|
|
|
|
|
2012-04-14 01:38:23 +00:00
|
|
|
system "make", "CFLAGS=#{ENV.cflags}"
|
2012-02-03 23:02:21 +00:00
|
|
|
system "make lib"
|
|
|
|
ln_s 'libsvm.2.dylib', 'libsvm.dylib'
|
|
|
|
|
2012-02-12 22:38:28 +00:00
|
|
|
bin.install 'svm-scale', 'svm-train', 'svm-predict'
|
|
|
|
lib.install 'libsvm.2.dylib', 'libsvm.dylib'
|
|
|
|
include.install 'svm.h'
|
2011-09-28 23:29:41 +00:00
|
|
|
end
|
|
|
|
end
|