ruby 通过自制软件启用cpu挖掘的cgminer公式

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ruby 通过自制软件启用cpu挖掘的cgminer公式相关的知识,希望对你有一定的参考价值。

require 'formula'
class Cgminer < Formula
  homepage 'https://github.com/ckolivas/cgminer'
  url 'https://github.com/ckolivas/cgminer/archive/v2.11.0.tar.gz'
  sha1 '56f7d2bed9b51a3a9b6cafacb09c10de552f5e82'
  version '2.11'
  depends_on 'automake' => :build
  depends_on 'curl' => :build
  depends_on 'c-ares' => :build
  depends_on 'libusb'
  depends_on 'pkg-config' => :build
  def install
    ENV['NOCONFIGURE'] = '1'
    system "./autogen.sh"
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
    "--prefix=#{prefix}", "--enable-cpumining", "--enable-scrypt"
    system "make install"
  end
end
require 'formula'

class CgminerMavericks < Formula
  homepage 'https://github.com/ckolivas/cgminer'
  head 'https://github.com/ckolivas/cgminer.git', :branch => 'master'
  url 'https://github.com/ckolivas/cgminer/archive/v3.8.1.tar.gz'
  sha1 '29a0348685d0c1d3a89c3ee67b6decc0e5de59ad'

  depends_on 'autoconf' => :build
  depends_on 'automake' => :build
  depends_on 'libtool' => :build
  depends_on 'pkg-config' => :build
  depends_on 'coreutils' => :build
  depends_on 'curl'

  def install
    inreplace "autogen.sh", "libtoolize", "glibtoolize"
    inreplace "autogen.sh", "readlink", "greadlink"
    system "autoreconf -fvi"
    system "./autogen.sh", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "PKG_CONFIG_PATH=#{HOMEBREW_PREFIX}/opt/curl/lib/pkgconfig:#{HOMEBREW_PREFIX}/opt/jansson/lib/pkgconfig:#{HOMEBREW_PREFIX}/opt/libusb/lib/pkgconfig",
                          "--enable-scrypt",
                          "--enable-bflsc",
                          "--enable-bitforce",
                          "--enable-cpumining",
                          "--enable-icarus",
                          "--enable-modminer",
                          "--enable-ztex",
                          "--enable-avalon",
                          "--disable-adl",
                          "--enable-opencl",
                          "--enable-bitfury",
                          "--enable-hashfast",
                          "--enable-klondike"
    system "make", "install"
  end

  test do
    system "cgminer"
  end
end

以上是关于ruby 通过自制软件启用cpu挖掘的cgminer公式的主要内容,如果未能解决你的问题,请参考以下文章

ruby 生成自制软件安装命令

如何在自制软件上使用 mpi 支持来构建提升?

如何避免在 OSX 上从自制​​软件中“无法加载此类文件 - utils/popen”

东京大学版「一生一芯」:自制CPUC编译器,还成功运行了类Unix系统

Fastlane 不断警告我正在使用 Ruby 2.2.4

ruby 自制的libcpuid公式