PageRenderTime 200ms CodeModel.GetById 78ms RepoModel.GetById 0ms app.codeStats 0ms

/Formula/w3m.rb

https://gitlab.com/jcsilkey/homebrew-core
Ruby | 54 lines | 43 code | 8 blank | 3 comment | 2 complexity | 9dc6b3da2dfb8340a8336fc68238e182 MD5 | raw file
  1. class W3m < Formula
  2. desc "Pager/text based browser"
  3. homepage "http://w3m.sourceforge.net/"
  4. url "https://downloads.sourceforge.net/project/w3m/w3m/w3m-0.5.3/w3m-0.5.3.tar.gz"
  5. sha256 "e994d263f2fd2c22febfbe45103526e00145a7674a0fda79c822b97c2770a9e3"
  6. bottle do
  7. sha256 "c6443287699a058e58ff0e378a8f6459370de79f89246ac7217e11f9f748abed" => :el_capitan
  8. sha256 "57a644921789316e92cbc37d2e0c51eaf5591876992626a9bcf9f4a56c0e3897" => :yosemite
  9. sha256 "e2972a26e7c734e6814257516ebda796e907df5787906c4144321fc63e70f1a1" => :mavericks
  10. end
  11. depends_on "pkg-config" => :build
  12. depends_on "bdw-gc"
  13. depends_on "openssl"
  14. fails_with :llvm do
  15. build 2334
  16. end
  17. patch :DATA
  18. def install
  19. system "./configure", "--prefix=#{prefix}", "--disable-image",
  20. "--with-ssl=#{Formula["openssl"].opt_prefix}"
  21. # Race condition in build reported in:
  22. # https://github.com/Homebrew/homebrew/issues/12854
  23. ENV.j1
  24. system "make", "install"
  25. end
  26. test do
  27. assert_match /DuckDuckGo/, shell_output("#{bin}/w3m -dump https://duckduckgo.com")
  28. end
  29. end
  30. __END__
  31. diff --git a/main.c b/main.c
  32. index b421943..865c744 100644
  33. --- a/main.c
  34. +++ b/main.c
  35. @@ -833,7 +833,12 @@ main(int argc, char **argv, char **envp)
  36. mySignal(SIGPIPE, SigPipe);
  37. #endif
  38. +#if GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 2
  39. + orig_GC_warn_proc = GC_get_warn_proc();
  40. + GC_set_warn_proc(wrap_GC_warn_proc);
  41. +#else
  42. orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
  43. +#endif
  44. err_msg = Strnew();
  45. if (load_argc == 0) {
  46. /* no URL specified */