ruby libsvm for homebrew with python bindings

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ruby 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

以上是关于ruby libsvm for homebrew with python bindings的主要内容,如果未能解决你的问题,请参考以下文章

通过 Homebrew 在 MacOS 上使用 asdf 安装 ruby

ruby HomeBrew修复

ruby Homebrew中的zlog

ruby nyancat_homebrew_formula

ruby pycdc_homebrew_formula

ruby Homebrew的tsunami-udp