ruby J2OBJC FORMULA(HOMEBREW)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ruby J2OBJC FORMULA(HOMEBREW)相关的知识,希望对你有一定的参考价值。

# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
#                /usr/local/Library/Contributions/example-formula.rb
#
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
#
# FOR LOCAL INSTALLATION COPY IT IN /usr/local/Library/Formula/
#

class J2objc < Formula
  homepage "http://j2objc.org/"
  url "https://github.com/google/j2objc/releases/download/0.9.7/j2objc-0.9.7.zip"
  version "0.9.7"
  sha1 "0346eb7ad20793a8cc7e2e6a907039290b0abe3d"

  # depends_on "cmake" => :build
  #depends_on :x11 # if your formula requires any X11/XQuartz components

  def shim_script target
    <<-EOS.undent
      #!/bin/bash
      export J2OBJC_HOME=#{libexec}
      "#{libexec}/#{target}" "$@"
    EOS
  end

  def install
	libexec.install %w{ lib include }
  	man.install Dir["man/*"]
  	libexec.install "j2objc"
  	libexec.install "j2objcc"
  	libexec.install "cycle_finder"

  	(bin+'j2objc').write shim_script('j2objc')
    (bin+'j2objcc').write shim_script('j2objcc')
    (bin+'cycle_finder').write shim_script('cycle_finder')
  	#bin.install_symlink libexec/"j2objc"
  	#bin.install_symlink libexec/"j2objcc"
  	#bin.install_symlink libexec/"cycle_finder"
  end

  test do
    # `test do` will create, run in and delete a temporary directory.
    #
    # This test will fail and we won't accept that! It's enough to just replace
    # "false" with the main program this formula installs, but it'd be nice if you
    # were more thorough. Run the test with `brew test j2objc`. Options passed
    # to `brew install` such as `--HEAD` also need to be provided to `brew test`.
    #
    # The installed folder is not in the path, so use the entire path to any
    # executables being tested: `system "#{bin}/program", "do", "something"`.
    #system "false"
  end
end

以上是关于ruby J2OBJC FORMULA(HOMEBREW)的主要内容,如果未能解决你的问题,请参考以下文章

ruby pycdc_homebrew_formula

react最佳入门实践

如何根据工作日Ruby on Rails显示数据

在 Mac OS X 中编译 ClickHouse

使用 Hibernate @Formula 查找时差

[URAL1519]Formula 1