Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brew formula is wrong #25

Open
keithyipkw opened this issue Mar 26, 2016 · 0 comments
Open

Brew formula is wrong #25

keithyipkw opened this issue Mar 26, 2016 · 0 comments

Comments

@keithyipkw
Copy link

In readme.md, "brew install gumbo-query" does not work so I am using brew tap instead. There are many problem in the gumbo-query.rb as indicated here Homebrew/legacy-homebrew#50276

  1. Maybe the repo should point to this repo instead of Falven's.
  2. No need to have sha256. I do not know much about homebrew formula but the sha245 seems to be for installing form an archive.
  3. "install" does not work at all. "system" should be inside "cd".
  4. The test does not work because the build folder does not exist when using "brew test". I do not know the way to properly write such a test in the formula so I removed the test in the formula below. Examples I found always create an adhoc file for testing, e.g. https://github.com/Homebrew/homebrew/blob/master/Library/Formula/tinyxml2.rb
  5. The version of gumbo-query is always "query". I guess that because there is no versions and the last word accidentally matches brew formula naming convention. It is not a big problem comparing with problem 3.
class GumboQuery < Formula
  homepage "https://github.com/lazytiger/gumbo-query"
  url "https://github.com/lazytiger/gumbo-query", :using => :git

  depends_on "cmake" => :build

  def install
    cd "build" do
      system "cmake", "..", "-DCMAKE_INSTALL_PREFIX=#{prefix}"
      system "make"
      system "make", "install"
    end
  end

end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant