repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
0x07CB/linuxbrew-core
Formula/v.rb
<filename>Formula/v.rb class V < Formula desc "Z for vim" homepage "https://github.com/rupa/v" url "https://github.com/rupa/v/archive/v1.1.tar.gz" sha256 "6483ef1248dcbc6f360b0cdeb9f9c11879815bd18b0c4f053a18ddd56a69b81f" head "https://github.com/rupa/v.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "3fc81e5ce826641b151e30b303496e791296a2864ded5756d6bf47408aadec12" sha256 cellar: :any_skip_relocation, big_sur: "bbee3c584bca388ac94dcd3dc701c395fc4f44418dcd0f213033cec8f4f41b17" sha256 cellar: :any_skip_relocation, catalina: "bbee3c584bca388ac94dcd3dc701c395fc4f44418dcd0f213033cec8f4f41b17" sha256 cellar: :any_skip_relocation, mojave: "bbee3c584bca388ac94dcd3dc701c395fc4f44418dcd0f213033cec8f4f41b17" end uses_from_macos "vim" def install bin.install "v" man1.install "v.1" end test do (testpath/".vimrc").write "set viminfo='25,\"50,n#{testpath}/.viminfo" system "vim", "-u", testpath/".vimrc", "+wq", "test.txt" assert_equal "#{testpath}/test.txt", shell_output("#{bin}/v -a --debug").chomp end end
0x07CB/linuxbrew-core
Formula/rmcast.rb
<reponame>0x07CB/linuxbrew-core<filename>Formula/rmcast.rb class Rmcast < Formula desc "IP Multicast library" homepage "http://www.land.ufrj.br/tools/rmcast/rmcast.html" url "http://www.land.ufrj.br/tools/rmcast/download/rmcast-2.0.0.tar.gz" sha256 "79ccbdbe4a299fd122521574eaf9b3e2d524dd5e074d9bc3eb521f1d934a59b1" livecheck do url :homepage regex(/href=.*?rmcast[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any, arm64_big_sur: "7edab23a8770a245b0f06197b2d46c4777b8fdac0f39842ce619c56d74f1eef4" sha256 cellar: :any, big_sur: "b2cc007eec98b5e422a7948e9e680f3a0d7c622eb4703f9b2bae6c867635107f" sha256 cellar: :any, catalina: "e2054828627f6afdd376cfd276536c770b8dd77b082a44c5b63212e8dff84351" sha256 cellar: :any, mojave: "37226d25db0ae3fe7491c530e1f382b869d134d7e38a851acfbe13cb308f7c1d" sha256 cellar: :any, high_sierra: "d30e495d583d02a5ea74cd7ec82d1bd67b62981248d853ce7138a7997f6b6ed2" sha256 cellar: :any, sierra: "9ef73c5d52886029cd89d829cdceccca0d03bce0dc72647d8cce6704d492f080" sha256 cellar: :any, el_capitan: "4fe0a1745659bb99748972c2fa0640e6b864e92739ba192a89ed12c0614b1372" sha256 cellar: :any, yosemite: "502e09994a9b455d9040f8e346419a2a3ef0156a73b0249bc161446448729292" sha256 cellar: :any, x86_64_linux: "66d26e6af4e5b3f82527e222677c68d724d461b1fc354bbcfdb04c3f981714ad" # linuxbrew-core end def install system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end end
0x07CB/linuxbrew-core
Formula/dotnet.rb
<gh_stars>100-1000 class Dotnet < Formula desc ".NET Core" homepage "https://dotnet.microsoft.com/" url "https://github.com/dotnet/source-build.git", tag: "v5.0.207-SDK", revision: "52296950a9e8d1b34a2e0e10e4b8bb06daba2dcc" license "MIT" livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)-SDK$/i) end bottle do sha256 cellar: :any, big_sur: "dd058f1a46a84ee8cfbdf5450a5248ca1b5af91ae018efd5f96b0b760a4cc84f" sha256 cellar: :any, catalina: "a9c2b8e900351d1cb074100a60de404f033436032c1116c6094351446253e777" sha256 cellar: :any, mojave: "b7a7a743c0b409569cc5f139ada574e0b32f331b2950252a5afb2809123514d7" sha256 cellar: :any_skip_relocation, x86_64_linux: "c741d21bd0b6224e4cad5c661b7e80621cdffe552249ecbdff378092c8f461b8" # linuxbrew-core end depends_on "cmake" => :build depends_on "pkg-config" => :build depends_on xcode: :build depends_on arch: :x86_64 depends_on "curl" depends_on "icu4c" depends_on "openssl@1.1" uses_from_macos "krb5" uses_from_macos "zlib" on_linux do depends_on "llvm" => [:build, :test] depends_on "libunwind" depends_on "lttng-ust" end fails_with :gcc def install ENV.append_path "LD_LIBRARY_PATH", Formula["icu4c"].opt_lib if OS.linux? # Arguments needed to not artificially time-limit downloads from Azure. # See the following GitHub issue comment for details: # https://github.com/dotnet/source-build/issues/1596#issuecomment-670995776 system "./build.sh", "/p:DownloadSourceBuildReferencePackagesTimeoutSeconds=N/A", "/p:DownloadSourceBuiltArtifactsTimeoutSeconds=N/A" libexec.mkpath tarball = Dir["artifacts/*/Release/dotnet-sdk-#{version}-*.tar.gz"].first system "tar", "-xzf", tarball, "--directory", libexec doc.install Dir[libexec/"*.txt"] (bin/"dotnet").write_env_script libexec/"dotnet", DOTNET_ROOT: libexec end def caveats <<~EOS For other software to find dotnet you may need to set: export DOTNET_ROOT="#{opt_libexec}" EOS end test do target_framework = "net#{version.major_minor}" (testpath/"test.cs").write <<~EOS using System; namespace Homebrew { public class Dotnet { public static void Main(string[] args) { var joined = String.Join(",", args); Console.WriteLine(joined); } } } EOS (testpath/"test.csproj").write <<~EOS <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFrameworks>#{target_framework}</TargetFrameworks> <PlatformTarget>AnyCPU</PlatformTarget> <RootNamespace>Homebrew</RootNamespace> <PackageId>Homebrew.Dotnet</PackageId> <Title>Homebrew.Dotnet</Title> <Product>$(AssemblyName)</Product> <EnableDefaultCompileItems>false</EnableDefaultCompileItems> </PropertyGroup> <ItemGroup> <Compile Include="test.cs" /> </ItemGroup> </Project> EOS system bin/"dotnet", "build", "--framework", target_framework, "--output", testpath, testpath/"test.csproj" assert_equal "#{testpath}/test.dll,a,b,c\n", shell_output("#{bin}/dotnet run --framework #{target_framework} #{testpath}/test.dll a b c") end end
0x07CB/linuxbrew-core
Formula/prips.rb
class Prips < Formula desc "Print the IP addresses in a given range" homepage "https://devel.ringlet.net/sysutils/prips/" url "https://devel.ringlet.net/files/sys/prips/prips-1.1.1.tar.xz" sha256 "16efeac69b8bd9d13c80ec365ea66bc3bb8326dc23975acdac03184ee8da63a8" livecheck do url :homepage regex(/current version .*?prips.*?v?(\d+(?:\.\d+)+)/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "500cfb4e4680b767d3a765e542e59660ed07d05724902e43d243be184194e916" sha256 cellar: :any_skip_relocation, big_sur: "19470cbc2e9339887d983fe9e008a70c861cbe81c22c493bb83b9550d4204994" sha256 cellar: :any_skip_relocation, catalina: "06f354f3564aa9aa391d56b952fb97056c911f32232f6afeefcb23bce5a8bc0c" sha256 cellar: :any_skip_relocation, mojave: "771e030cbbf61a7914af375462d24bc2fccb6e60e8959110906e23544aacbb17" sha256 cellar: :any_skip_relocation, high_sierra: "ecf0f743bfaffc303c8f520f5f29f10917b63708866fc50553c10f6952c5e06e" sha256 cellar: :any_skip_relocation, sierra: "65a400f8d42e7c38cbc26898dadf3110b0aad7e347ba40585f398d4bcc696d04" sha256 cellar: :any_skip_relocation, x86_64_linux: "19565969341e072d19968e0dbb9405f278bd774bdeb66f3a074e7bfde9195eaf" # linuxbrew-core end def install system "make" bin.install "prips" man1.install "prips.1" end test do assert_equal "127.0.0.0\n127.0.0.1", shell_output("#{bin}/prips 127.0.0.0/31").strip end end
0x07CB/linuxbrew-core
Formula/rc.rb
<filename>Formula/rc.rb class Rc < Formula desc "Implementation of the AT&T Plan 9 shell" homepage "http://doc.cat-v.org/plan_9/4th_edition/papers/rc" url "https://web.archive.org/web/20200227085442/static.tobold.org/rc/rc-1.7.4.tar.gz" mirror "https://src.fedoraproject.org/repo/extras/rc/rc-1.7.4.tar.gz/f99732d7a8be3f15f81e99c3af46dc95/rc-1.7.4.tar.gz" sha256 "5ed26334dd0c1a616248b15ad7c90ca678ae3066fa02c5ddd0e6936f9af9bfd8" license "Zlib" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "18c672af9e2e5d2e88ca29d57aec584aaa57daac97b9ac330d9f8164beb9ecce" sha256 cellar: :any_skip_relocation, big_sur: "0e2ce85a1d122543d504138da5f09b88890ea175311572024b4e627bda9b3c65" sha256 cellar: :any_skip_relocation, catalina: "ab871610d857058773a87f70ad995a5e02fdeb1e6fe3d699e2051892ce60af84" sha256 cellar: :any_skip_relocation, mojave: "f14ceeb0e4315379e2052e39a24fafb529f841428b1a64e3009cfd62769b9e4a" sha256 cellar: :any_skip_relocation, high_sierra: "c2ee55c504be78889adc7d0cba962528f995bf222dc77ce5a6b930210851294e" sha256 cellar: :any_skip_relocation, sierra: "627e45477eabd5854e3c5f39af5290befd43d03b385d1b20f0ce4b49636fd2d9" end uses_from_macos "libedit" def install system "./configure", "--prefix=#{prefix}", "--mandir=#{man}", "--with-edit=edit" system "make" system "make", "install" end test do assert_equal "Hello!", shell_output("#{bin}/rc -c 'echo Hello!'").chomp end end
0x07CB/linuxbrew-core
Formula/http-parser.rb
class HttpParser < Formula desc "HTTP request/response parser for c" homepage "https://github.com/nodejs/http-parser" url "https://github.com/nodejs/http-parser/archive/v2.9.4.tar.gz" sha256 "467b9e30fd0979ee301065e70f637d525c28193449e1b13fbcb1b1fab3ad224f" license "MIT" bottle do sha256 cellar: :any, arm64_big_sur: "7130d0b0338eaf592eb0510251f95a8a4e580ef9ecc4eaf787ba048204639498" sha256 cellar: :any, big_sur: "48d383aa989a940b3918cc83fa2bb6b5fad92c9b4c70018172d36f9e465087e3" sha256 cellar: :any, catalina: "f03615a5ecb9e65d4bd7b302a8429ba9130012b092f3f42e0afd85df2bf47453" sha256 cellar: :any, mojave: "b36ae811b2b72823cea4c7ab445ee2a5f628255aa169f0bc453fda1d3d520fbb" sha256 cellar: :any, high_sierra: "0c6b69289fa4a8dd7ad532fcefb0848af229dcb5a64df981c03e99af2ce3acd8" sha256 cellar: :any, x86_64_linux: "46f21c3eb750edef6c569bf57e42107f2fb33417e1ca5f590977b1983d26db72" # linuxbrew-core end depends_on "coreutils" => :build def install system "make", "install", "PREFIX=#{prefix}", "INSTALL=ginstall" pkgshare.install "test.c" end test do # Set HTTP_PARSER_STRICT=0 to bypass "tab in URL" test on macOS system ENV.cc, pkgshare/"test.c", "-o", "test", "-L#{lib}", "-lhttp_parser", "-DHTTP_PARSER_STRICT=0" system "./test" end end
0x07CB/linuxbrew-core
Formula/hspell.rb
<gh_stars>100-1000 class Hspell < Formula desc "Free Hebrew linguistic project" homepage "http://hspell.ivrix.org.il/" url "http://hspell.ivrix.org.il/hspell-1.4.tar.gz" sha256 "7310f5d58740d21d6d215c1179658602ef7da97a816bc1497c8764be97aabea3" license "AGPL-3.0-only" livecheck do url "http://hspell.ivrix.org.il/download.html" regex(/href=.*?hspell[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do rebuild 1 sha256 arm64_big_sur: "421fdc3ab5d0ebde258ce7bdb235d2b50144966a27a74cbbe5c607dff0984c7f" sha256 big_sur: "426c87d91350f33392c862296b5d1b0081bc953adae5c04a9769ebb2a626213f" sha256 catalina: "a0406d5a4d5adefa40b5e820510a9b7f461fcea6a61112103c112775fff49ae8" sha256 mojave: "32e8037e9d494241b975c7558635456991285d53c9bbc89005cd6c86744f30e3" end depends_on "autoconf" => :build uses_from_macos "zlib" on_macos do # hspell was built for linux and compiles a .so shared library, to comply with macOS # standards this patch creates a .dylib instead patch :p0 do url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/hspell/1.3.patch" sha256 "63cc1bc753b1062d1144dcdd959a0a8f712b8872dce89e54ddff2d24f2ca2065" end end def install ENV.deparallelize # The build scripts rely on "." being in @INC which was disabled by default in perl 5.26 ENV["PERL_USE_UNSAFE_INC"] = "1" # autoconf needs to pick up on the patched configure.in and create a new ./configure # script system "autoconf" system "./configure", "--prefix=#{prefix}", "--enable-shared", "--enable-linginfo" system "make", "dolinginfo" system "make", "install" end test do File.open("test.txt", "w:ISO8859-8") do |f| f.write "שלום" end system "#{bin}/hspell", "-l", "test.txt" end end
0x07CB/linuxbrew-core
Formula/abnfgen.rb
class Abnfgen < Formula desc "Quickly generate random documents that match an ABFN grammar" homepage "http://www.quut.com/abnfgen/" url "http://www.quut.com/abnfgen/abnfgen-0.20.tar.gz" sha256 "73ce23ab8f95d649ab9402632af977e11666c825b3020eb8c7d03fa4ca3e7514" livecheck do url :homepage regex(%r{href=.*?/abnfgen[._-]v?(\d+(?:\.\d+)+)\.t}i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "e3c6fe963835658791592b3846bcab8bfeafbee2c63f3fb804405ce72ed2e64a" sha256 cellar: :any_skip_relocation, big_sur: "bddcdbc3e7993d70dc27f99fd18b439ecb25cd338c8c88762d7d3842439fd2f2" sha256 cellar: :any_skip_relocation, catalina: "c1531bab58a352221fca0cc5b73db2d9f206e1b98272ff06a90d72aa9e991925" sha256 cellar: :any_skip_relocation, mojave: "b553651b5500f66d10a369f4d8862ed9c6d2b39d395c43e372b346b4c7bfead0" sha256 cellar: :any_skip_relocation, high_sierra: "3a62e72bec09b9bfff637710db366f713abc95de45437aeadbfa87a87dfc040c" sha256 cellar: :any_skip_relocation, sierra: "0d69f39473838a8e46fb02009329e05be6eeaed579ff5533a09cbbecd8d46a2d" sha256 cellar: :any_skip_relocation, el_capitan: "fd51cb760ed8afb8a9e3dd5d05c8efa832361b238ad95410fb2864c91c081825" sha256 cellar: :any_skip_relocation, x86_64_linux: "7f87311cc93a40da50b39b5e291eefffd0cd06e8cce69f44a6895e8d9e3ee53b" # linuxbrew-core end def install system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--mandir=#{man}" system "make", "install" end test do (testpath/"grammar").write 'ring = 1*12("ding" SP) "dong" CRLF' system "#{bin}/abnfgen", (testpath/"grammar") end end
0x07CB/linuxbrew-core
Formula/soapysdr.rb
class Soapysdr < Formula desc "Vendor and platform neutral SDR support library" homepage "https://github.com/pothosware/SoapySDR/wiki" url "https://github.com/pothosware/SoapySDR/archive/soapy-sdr-0.8.1.tar.gz" sha256 "a508083875ed75d1090c24f88abef9895ad65f0f1b54e96d74094478f0c400e6" license "BSL-1.0" head "https://github.com/pothosware/SoapySDR.git", branch: "master" bottle do sha256 cellar: :any, arm64_big_sur: "a6fdf172d9d0bc7338b9792211cd9b5f945656908b1d642b987b84d68e1c7704" sha256 cellar: :any, big_sur: "43f22365e9bc1ecb07cc3c4ee22c198f25c3465ae5cf72f2681223aee30f357b" sha256 cellar: :any, catalina: "befa2166bf6dd66c45cb2aa00a439d480c227972a5a17242b5a11f50ffdbc25e" sha256 cellar: :any, mojave: "73f853d0e804e3b3253bd0e23a2387254d8a178850f989f9a7c7cb87e6bafc7c" end depends_on "cmake" => :build depends_on "swig" => :build depends_on "python@3.9" def install args = std_cmake_args + %W[ -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=ON -DSOAPY_SDR_ROOT=#{HOMEBREW_PREFIX} -DCMAKE_INSTALL_RPATH=#{rpath} ] args << "-DSOAPY_SDR_EXTVER=release" unless build.head? mkdir "build" do system "cmake", "..", *args system "make", "install" end end test do assert_match "Loading modules... done", shell_output("#{bin}/SoapySDRUtil --check=null") end end
0x07CB/linuxbrew-core
Formula/pyinstaller.rb
<filename>Formula/pyinstaller.rb class Pyinstaller < Formula include Language::Python::Virtualenv desc "Bundle a Python application and all its dependencies" homepage "https://www.pyinstaller.org" url "https://files.pythonhosted.org/packages/a9/d9/9fdfb0ac2354d059e466d562689dbe53a23c4062019da2057f0eaed635e0/pyinstaller-4.5.1.tar.gz" sha256 "30733baaf8971902286a0ddf77e5499ac5f7bf8e7c39163e83d4f8c696ef265e" license "GPL-2.0-or-later" head "https://github.com/pyinstaller/pyinstaller.git", branch: "develop" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "4272eaf2d73796e1509b1df73cd8d16b94a6355b27abac02f0ce0d17741260f4" sha256 cellar: :any_skip_relocation, big_sur: "18d32eca7f24a755e73cdc63f64f1c2bbd813ee16d91d5f883a77cad112ea3a7" sha256 cellar: :any_skip_relocation, catalina: "fcd5279e9d8fc01bdd988a3ad7ebb3bb13162f0221d1651746beb55570824c92" sha256 cellar: :any_skip_relocation, mojave: "14b0ce068eb56e05a847cc72834163072ef3da7bfdbbd517d2f82255164ed226" sha256 cellar: :any_skip_relocation, x86_64_linux: "832df8774c85fc2608ad416ec0205718507c25ec7d8c907465f5787362b291e0" # linuxbrew-core end depends_on "python@3.9" resource "altgraph" do url "https://files.pythonhosted.org/packages/22/5a/ac50b52581bbf0d8f6fd50ad77d20faac19a2263b43c60e7f3af8d1ec880/altgraph-0.17.tar.gz" sha256 "1f05a47122542f97028caf78775a095fbe6a2699b5089de8477eb583167d69aa" end resource "macholib" do url "https://files.pythonhosted.org/packages/5f/cd/045e6e025d7484eef8c534a0ffe98792fd1ea19aadc8ac048a5ed9272e9d/macholib-1.15.tar.gz" sha256 "196b62c592e46f0859508a73a11eca6b082a5c8db330ba90cb56f2409e48e2d5" end resource "pyinstaller-hooks-contrib" do url "https://files.pythonhosted.org/packages/eb/fa/fe062e44776ab8edb4ac62daca1a02bb744ebdd556ec7a75c19c717e80b4/pyinstaller-hooks-contrib-2021.2.tar.gz" sha256 "7f5d0689b30da3092149fc536a835a94045ac8c9f0e6dfb23ac171890f5ea8f2" end # Work around to create native thin bootloader using `--no-universal2` flag # Upstream ref: https://github.com/pyinstaller/pyinstaller/issues/6091 patch :DATA def install cd "bootloader" do system "python3", "./waf", "all", "--no-universal2", "STRIP=/usr/bin/strip" end virtualenv_install_with_resources end test do (testpath/"easy_install.py").write <<~EOS """Run the EasyInstall command""" if __name__ == '__main__': from setuptools.command.easy_install import main main() EOS system bin/"pyinstaller", "-F", "--distpath=#{testpath}/dist", "--workpath=#{testpath}/build", "#{testpath}/easy_install.py" assert_predicate testpath/"dist/easy_install", :exist? end end __END__ --- a/bootloader/wscript +++ b/bootloader/wscript @@ -360,7 +360,7 @@ def set_arch_flags(ctx): if ctx.options.macos_universal2: mac_arch = UNIVERSAL2_FLAGS else: - mac_arch = ['-arch', 'x86_64'] + mac_arch = [] ctx.env.append_value('CFLAGS', mac_arch) ctx.env.append_value('CXXFLAGS', mac_arch) ctx.env.append_value('LINKFLAGS', mac_arch)
0x07CB/linuxbrew-core
Formula/mussh.rb
class Mussh < Formula desc "Multi-host SSH wrapper" homepage "https://mussh.sourceforge.io/" url "https://downloads.sourceforge.net/project/mussh/mussh/1.0/mussh-1.0.tgz" sha256 "6ba883cfaacc3f54c2643e8790556ff7b17da73c9e0d4e18346a51791fedd267" bottle do sha256 cellar: :any_skip_relocation, x86_64_linux: "9454e3f271552a7261a4009e43e77383fb87a62a418443437b74a568ff51cfb3" # linuxbrew-core end def install bin.install "mussh" man1.install "mussh.1" end test do system "#{bin}/mussh", "--help" end end
0x07CB/linuxbrew-core
Formula/gnirehtet.rb
class Gnirehtet < Formula desc "Reverse tethering tool for Android" homepage "https://github.com/Genymobile/gnirehtet" url "https://github.com/Genymobile/gnirehtet/archive/v2.5.tar.gz" sha256 "2b55b56e1b21d1b609a0899fe85d1f311120bb12b04761ec586187338daf6ec5" license "Apache-2.0" revision 1 head "https://github.com/Genymobile/gnirehtet.git" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "7fd56faf93c88c65df43599e0dda5c7d3044e6b1dee05ef535d6eff42b558684" sha256 cellar: :any_skip_relocation, big_sur: "c81db3a1b9c0c6ebbe81ebca2ffd111f97d6eda2cff2cb92955cc8c42abcce63" sha256 cellar: :any_skip_relocation, catalina: "6f65def77cc1708e7a1ae8e85dfe2cbede4717225e8a5c2f7a9f09c8271282f3" sha256 cellar: :any_skip_relocation, mojave: "7ebc9b16c6d6856be8604388d4ca2bfc9cc2c4ec02e255f1a462be681283c6e8" sha256 cellar: :any_skip_relocation, high_sierra: "a57d5039af819db991968751511a63874cd0c20d1d10fe106ef92e83b216eb38" sha256 cellar: :any_skip_relocation, x86_64_linux: "c06f01b8240bdf47fe053e4a485e2bb76762ae2861b3ccad5cde8eca59933f51" # linuxbrew-core end depends_on "rust" => :build depends_on "socat" => :test resource "java_bundle" do url "https://github.com/Genymobile/gnirehtet/releases/download/v2.5/gnirehtet-java-v2.5.zip" sha256 "c65fc1a35e6b169ab6aa45e695c043e933f6fd650363aea7c2add0ecb0db27ca" end def install resource("java_bundle").stage { libexec.install "gnirehtet.apk" } system "cargo", "install", *std_cargo_args(root: libexec, path: "relay-rust") mv "#{libexec}/bin/gnirehtet", "#{libexec}/gnirehtet" (bin/"gnirehtet").write_env_script("#{libexec}/gnirehtet", GNIREHTET_APK: "#{libexec}/gnirehtet.apk") end def caveats <<~EOS At runtime, adb must be accessible from your PATH. You can install adb from Homebrew Cask: brew install --cask android-platform-tools EOS end test do gnirehtet_err = testpath/"gnirehtet.err" gnirehtet_out = testpath/"gnirehtet.out" port = free_port begin child_pid = fork do Process.setsid $stdout.reopen(gnirehtet_out, "w") $stderr.reopen(gnirehtet_err, "w") exec bin/"gnirehtet", "relay", "-p", port.to_s end sleep 3 system "socat", "-T", "1", "-", "TCP4:127.0.0.1:#{port}" ensure pgid = Process.getpgid(child_pid) Process.kill("HUP", -pgid) Process.detach(pgid) end assert_empty File.readlines(gnirehtet_err) output = File.readlines(gnirehtet_out) assert output.any? { |l| l["TunnelServer: Client #0 connected"] } assert output.any? { |l| l["TunnelServer: Client #0 disconnected"] } end end
0x07CB/linuxbrew-core
Formula/crispy-doom.rb
class CrispyDoom < Formula desc "Limit-removing enhanced-resolution Doom source port based on Chocolate Doom" homepage "https://github.com/fabiangreffrath/crispy-doom" url "https://github.com/fabiangreffrath/crispy-doom/archive/crispy-doom-5.10.3.tar.gz" sha256 "eef8dc26e8952b23717be3b20239fda4ee59842511328387766d1c8fe8252f6b" license "GPL-2.0-only" head "https://github.com/fabiangreffrath/crispy-doom.git", branch: "master" bottle do sha256 cellar: :any, arm64_big_sur: "6d9000bd5ee7e800eecf8748c419ea4f8d42dc1e5c78ec5e49e91ab095e34895" sha256 cellar: :any, big_sur: "cbd514df66ecb0eb170169ce1f099fedefafa17f79cdeb2dfe00120d7e2fa03a" sha256 cellar: :any, catalina: "07ab97bfe589f66a63007f32ab6f5a937aec221fb3528ab33259fc3c6652bb60" sha256 cellar: :any, mojave: "ae4f7e635129aa417d47826af76123678ae786c0889b4baad08c59b3c730c36a" end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "pkg-config" => :build depends_on "libpng" depends_on "libsamplerate" depends_on "sdl2" depends_on "sdl2_mixer" depends_on "sdl2_net" def install system "autoreconf", "-fiv" system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", "--disable-silent-rules", "--disable-sdltest" system "make", "install", "execgamesdir=#{bin}" end test do testdata = <<~EOS Inavlid IWAD file EOS (testpath/"test_invalid.wad").write testdata expected_output = "Wad file test_invalid.wad doesn't have IWAD or PWAD id" assert_match expected_output, shell_output("#{bin}/crispy-doom -nogui -iwad test_invalid.wad 2>&1", 255) end end
0x07CB/linuxbrew-core
Formula/wildmidi.rb
class Wildmidi < Formula desc "Simple software midi player" homepage "https://www.mindwerks.net/projects/wildmidi/" url "https://github.com/Mindwerks/wildmidi/archive/refs/tags/wildmidi-0.4.4.tar.gz" sha256 "6f267c8d331e9859906837e2c197093fddec31829d2ebf7b958cf6b7ae935430" license all_of: ["GPL-3.0-only", "LGPL-3.0-only"] bottle do sha256 cellar: :any, arm64_big_sur: "d3911b6c060df898e6e8e5358a956afaf9bb042083e05be6f7af4f255b80c8bf" sha256 cellar: :any, big_sur: "258eb43be9a818dd975315669930ac09bc3c4da1c349e4dfe3c03685dc2b26e4" sha256 cellar: :any, catalina: "ca98c79414e1efd3e398c658aa16ede8af301cb46bafede7a8d1cce56bd45f38" sha256 cellar: :any, mojave: "48432227a38bc4252423f60d1eb507057ef7212ae01ee27df2a2882de851d893" end depends_on "cmake" => :build def install cmake_args = std_cmake_args + %w[ -S . -B build ] system "cmake", *cmake_args system "cmake", "--build", "build" system "cmake", "--install", "build" end test do (testpath/"test.c").write <<~EOS #include <wildmidi_lib.h> #include <stdio.h> #include <assert.h> int main() { long version = WildMidi_GetVersion(); assert(version != 0); return 0; } EOS system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lWildMidi" system "./a.out" end end
0x07CB/linuxbrew-core
Formula/spot.rb
<filename>Formula/spot.rb class Spot < Formula desc "Platform for LTL and ω-automata manipulation" homepage "https://spot.lrde.epita.fr/" url "https://www.lrde.epita.fr/dload/spot/spot-2.9.8.tar.gz" sha256 "b7f404bb90a335a5914384ecc3fc3a2021ff22c57ee97a40c07bb2ab40e20cf9" license "GPL-3.0-or-later" livecheck do url "https://spot.lrde.epita.fr/install.html" regex(/href=.*?spot[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any, arm64_big_sur: "5dbf5d0dedb42c6b09a17138231dbb85de9af3ac848dd3a61f2aa46ac1e7fbf1" sha256 cellar: :any, big_sur: "398a47ee8ccc65155f9ab9074a1b7a8d1c4823c111de6fe0502e5d87f5e30d90" sha256 cellar: :any, catalina: "6cbe99616b0bde6a2f13f29b9bee34dc8e38a115a854aa9d73ed13e3c3f3e0d8" sha256 cellar: :any, mojave: "d0a079961910d2ed596521f43fbc9e05f881d69ef07ed10ceaa366d6de7d1618" sha256 cellar: :any_skip_relocation, x86_64_linux: "<KEY>" # linuxbrew-core end depends_on "python@3.9" => :build def install system "./configure", *std_configure_args, "--disable-silent-rules" system "make", "install" end test do system bin/"randltl -n20 a b c d | ltlcross 'ltl2tgba -H -D %f >%O' 'ltl2tgba -s %f >%O' 'ltl2tgba -DP %f >%O'" end end
0x07CB/linuxbrew-core
Formula/cloudformation-guard.rb
<gh_stars>100-1000 class CloudformationGuard < Formula desc "Checks CloudFormation templates for compliance using a declarative syntax" homepage "https://github.com/aws-cloudformation/cloudformation-guard" url "https://github.com/aws-cloudformation/cloudformation-guard/archive/2.0.3.tar.gz" sha256 "a3bcd94d679cef01db21a2daa6b7042f9fbb3dd56388318ea534103c14c96930" license "Apache-2.0" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "68ceb64498c4b499e1c5b9d8855a884a0ac4f389476d5bf6da0f151378c1ad4c" sha256 cellar: :any_skip_relocation, big_sur: "f8a125c4de3fc9e921df68c0ac957b785de73ea8e815d1fc0ea2cced5dfef881" sha256 cellar: :any_skip_relocation, catalina: "36b146ca21768e8aaef9c1b10d291488f5a776dabdb02a690107ab1d8383ce67" sha256 cellar: :any_skip_relocation, mojave: "c7e5b37de4696d225b5c550d2a82e9f48f1f726fce5d7af531a2d38f55eaad3e" sha256 cellar: :any_skip_relocation, x86_64_linux: "a0f959ba7ee09b1b22696d9cabffcbcca9dbdae4db0e773878875fb75fc217d5" # linuxbrew-core end depends_on "rust" => :build def install cd "guard" do system "cargo", "install", *std_cargo_args end doc.install "docs" doc.install "guard-examples" end test do (testpath/"test-template.yml").write <<~EOS --- AWSTemplateFormatVersion: '2010-09-09' Resources: # Helps tests map resource types Volume: Type: "AWS::EC2::Volume" Properties: Size : 99 Encrypted: true, AvailabilityZone : us-east-1b EOS (testpath/"test-ruleset").write <<~EOS rule migrated_rules { let aws_ec2_volume = Resources.*[ Type == "AWS::EC2::Volume" ] %aws_ec2_volume.Properties.Size == 99 } EOS system bin/"cfn-guard", "validate", "-r", "test-ruleset", "-d", "test-template.yml" end end
0x07CB/linuxbrew-core
Formula/gitbucket.rb
class Gitbucket < Formula desc "Git platform powered by Scala offering" homepage "https://github.com/gitbucket/gitbucket" url "https://github.com/gitbucket/gitbucket/releases/download/4.36.2/gitbucket.war" sha256 "d22089c0ba131c82c70c55bc9427b2ec095098815f96ca31f88edd7c2882d62d" license "Apache-2.0" bottle do sha256 cellar: :any_skip_relocation, x86_64_linux: "e36a21cee810ab68ae0fa938fbbf070262a8d2d0032725d8fa6cc0a8648fa1da" # linuxbrew-core end head do url "https://github.com/gitbucket/gitbucket.git", branch: "master" depends_on "sbt" => :build end depends_on "openjdk" def install if build.head? system "sbt", "executable" libexec.install "target/executable/gitbucket.war" else libexec.install "gitbucket.war" end end def caveats <<~EOS Note: When using `brew services` the port will be 8080. EOS end service do run [Formula["openjdk"].opt_bin/"java", "-Dmail.smtp.starttls.enable=true", "-jar", opt_libexec/"gitbucket.war", "--host=127.0.0.1", "--port=8080"] end test do java = Formula["openjdk"].opt_bin/"java" fork do $stdout.reopen(testpath/"output") exec "#{java} -jar #{libexec}/gitbucket.war --port=#{free_port}" end sleep 12 File.read("output") !~ /Exception/ end end
0x07CB/linuxbrew-core
Formula/procps.rb
class Procps < Formula desc "Utilities for browsing procfs" homepage "https://gitlab.com/procps-ng/procps" url "https://gitlab.com/procps-ng/procps/-/archive/v3.3.17/procps-v3.3.17.tar.gz" sha256 "efa6f6b4625a795f5c8a3d5bd630a121d270bc8573c5a0b6a6068e73611d6cd5" license "GPL-2.0-or-later" head "https://gitlab.com/procps-ng/procps.git", branch: "master" bottle do sha256 x86_64_linux: "11f662e9854db3017ac6b6f1ba3182088e4f8271ac29412d4e7914b5c240a094" # linuxbrew-core end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "gettext" => :build depends_on "libtool" => :build depends_on "pkg-config" => :build depends_on :linux depends_on "ncurses" def install system "./autogen.sh" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" system "make", "install" # kill and uptime are also provided by coreutils rm [bin/"kill", bin/"uptime", man1/"kill.1", man1/"uptime.1"] end test do system "#{bin}/ps", "--version" assert_match "grep homebrew", shell_output("ps aux | grep homebrew") end end
0x07CB/linuxbrew-core
Formula/makeself.rb
<filename>Formula/makeself.rb class Makeself < Formula desc "Generates a self-extracting compressed tar archive" homepage "https://makeself.io/" url "https://github.com/megastep/makeself/archive/release-2.4.5.tar.gz" sha256 "91deafdbfddf130abe67d7546f0c50be6af6711bb1c351b768043bd527bd6e45" license "GPL-2.0-or-later" head "https://github.com/megastep/makeself.git" bottle do rebuild 1 sha256 cellar: :any_skip_relocation, x86_64_linux: "f4662b6da2d3d6494554dabb44e7a21d13273a1283075689bf13d5056517b3c2" # linuxbrew-core end def install # Replace `/usr/local` references to make bottles uniform inreplace ["makeself-header.sh", "makeself.sh"], "/usr/local", HOMEBREW_PREFIX libexec.install "makeself-header.sh" # install makeself-header.sh to libexec so change its location in makeself.sh inreplace "makeself.sh", '`dirname "$0"`', libexec bin.install "makeself.sh" => "makeself" man1.install "makeself.1" end test do source = testpath/"source" source.mkdir (source/"foo").write "bar" (source/"script.sh").write <<~EOS #!/bin/sh echo 'Hello Homebrew!' EOS chmod 0755, source/"script.sh" system bin/"makeself", source, "testfile.run", "'A test file'", "./script.sh" assert_match "Hello Homebrew!", shell_output("./testfile.run --target output") assert_equal (source/"foo").read, (testpath/"output/foo").read end end
0x07CB/linuxbrew-core
Formula/rtmidi.rb
<filename>Formula/rtmidi.rb<gh_stars>100-1000 class Rtmidi < Formula desc "C++ classes that provide a common API for realtime MIDI input/output" homepage "https://www.music.mcgill.ca/~gary/rtmidi/" url "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz" sha256 "370cfe710f43fbeba8d2b8c8bc310f314338c519c2cf2865e2d2737b251526cd" revision 1 livecheck do url :homepage regex(/href=.*?rtmidi[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any, arm64_big_sur: "494faf5859eded9a849b50f8ce6ea813b7de240e0a555c5b62817e9225cc5c4e" sha256 cellar: :any, big_sur: "1a11b007b42c9e270354f47a2c97d42f20a4cea8f7a6b8976efd9535e6cfa077" sha256 cellar: :any, catalina: "f65ae764cc0d13549206e5c4d5a47285b412876e97a89a7ea7ec404e8565800a" sha256 cellar: :any, mojave: "9f8dfe0f1928c824e73d5e6d8f246db3abc8a2463fde613b7ac14fd3a6fc4602" end head do url "https://github.com/thestk/rtmidi.git", branch: "master" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end on_linux do depends_on "alsa-lib" depends_on "jack" end def install system "./autogen.sh", "--no-configure" if build.head? system "./configure", *std_configure_args system "make" system "make", "install" end test do (testpath/"test.cpp").write <<~EOS #include "RtMidi.h" int main(int argc, char **argv, char **env) { RtMidiIn midiin; RtMidiOut midiout; std::cout << "Input ports: " << midiin.getPortCount() << "\\n" << "Output ports: " << midiout.getPortCount() << "\\n"; } EOS system ENV.cxx, "test.cpp", "-I#{include}/rtmidi", "-L#{lib}", "-lrtmidi", "-o", "test" # Only run the test on macOS since ALSA initialization errors on Linux CI. # ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory system "./test" if OS.mac? end end
0x07CB/linuxbrew-core
Formula/docker-credential-helper-ecr.rb
class DockerCredentialHelperEcr < Formula desc "Docker Credential Helper for Amazon ECR" homepage "https://github.com/awslabs/amazon-ecr-credential-helper" url "https://github.com/awslabs/amazon-ecr-credential-helper.git", tag: "v0.5.0", revision: "b19192b6522b2da02d14ec394c331f3b1a70efe2" license "Apache-2.0" livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "0f76feceea1f591784fb2bb273950336675228c1d9e04d91af48d9bc6b700ddb" sha256 cellar: :any_skip_relocation, big_sur: "822e7f36e21c109c0228fd53858781f872a4176a712b591a775c38769edc5189" sha256 cellar: :any_skip_relocation, catalina: "8506b1954205b0ccc6622738219606deb595da298797455442f5e7590886a1d8" sha256 cellar: :any_skip_relocation, mojave: "ade7af932bef1787cd560cb2befcd2ce9dcaa4ee694cac37dbf4a86265186667" sha256 cellar: :any_skip_relocation, x86_64_linux: "8c5345f78dab1aa15d2df6fcd6d96139235e5d7fcaae0f6966d8c7c6aa39b009" # linuxbrew-core end depends_on "go" => :build def install ENV["GOPATH"] = buildpath dir = buildpath/"src/github.com/awslabs/amazon-ecr-credential-helper" dir.install buildpath.children - [buildpath/".brew_home"] cd dir do system "make", "build" bin.install "bin/local/docker-credential-ecr-login" prefix.install_metafiles end end test do output = shell_output("#{bin}/docker-credential-ecr-login", 1) assert_match %r{^Usage: .*/docker-credential-ecr-login.*}, output end end
0x07CB/linuxbrew-core
Formula/viu.rb
class Viu < Formula desc "Simple terminal image viewer written in Rust" homepage "https://github.com/atanunq/viu" url "https://github.com/atanunq/viu/archive/refs/tags/v1.3.0.tar.gz" sha256 "ee049c065945a528699799f18de4d82355d5b2f5509d2435b9f5332c8dd520c5" license "MIT" head "https://github.com/atanunq/viu.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "2522e8aca392e56f1517b092a8091bd3ba5c4ed45220fd92e4daa79240ee4182" sha256 cellar: :any_skip_relocation, big_sur: "572858e897b2e307b45e02d6814b4e562682554bfaab4c1a827cbb07b679ecf7" sha256 cellar: :any_skip_relocation, catalina: "0029a7093ea3cf9e65b8eaa168ace9a0c424dced8ca233bcb74a67139be10277" sha256 cellar: :any_skip_relocation, mojave: "051cee6ee32390448b48ba56e2e9d60be22c6d9b43687f3713482d9e3dfe6017" sha256 cellar: :any_skip_relocation, x86_64_linux: "06d513576fa431015bbc55fd6d118aff7be75a6fa468f5a42ee567439442cb16" # linuxbrew-core end depends_on "rust" => :build def install system "cargo", "install", *std_cargo_args end test do expected_output = "\e[0m\e[38;5;202m\e[48;5;202m▄\e[0m" output = shell_output("#{bin}/viu #{test_fixtures("test.jpg")}").chomp assert_equal expected_output, output end end
0x07CB/linuxbrew-core
Formula/sonar-scanner.rb
<reponame>0x07CB/linuxbrew-core class SonarScanner < Formula desc "Launcher to analyze a project with SonarQube" homepage "https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner" url "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472.zip" sha256 "344bfeff44b09a11082b4a4646b1ed14f213feb00a5cd6d01c86f3767cb32471" license "LGPL-3.0-or-later" revision 1 head "https://github.com/SonarSource/sonar-scanner-cli.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, x86_64_linux: "b0fa41c88f0c3b3be3927dc242eec30742239eaeea4b4e3c2b638f1037f7391a" # linuxbrew-core end depends_on "openjdk@11" def install rm_rf Dir["bin/*.bat"] libexec.install Dir["*"] bin.install libexec/"bin/sonar-scanner" etc.install libexec/"conf/sonar-scanner.properties" ln_s etc/"sonar-scanner.properties", libexec/"conf/sonar-scanner.properties" bin.env_script_all_files libexec/"bin/", SONAR_SCANNER_HOME: libexec, JAVA_HOME: Formula["openjdk@11"].opt_prefix end test do assert_match version.to_s, shell_output("#{bin}/sonar-scanner --version") end end
0x07CB/linuxbrew-core
Formula/snowpack.rb
<reponame>0x07CB/linuxbrew-core<gh_stars>100-1000 require "language/node" class Snowpack < Formula desc "Frontend build tool designed for the modern web" homepage "https://www.snowpack.dev" url "https://registry.npmjs.org/snowpack/-/snowpack-3.8.8.tgz" sha256 "0cf99f86955b29c3e40332131e488ff38f64045ef23ba649d0a20c2a7cd2d29e" license "MIT" bottle do sha256 arm64_big_sur: "424c198450962b4be8cf4314d570ff7e8febc23308b22430a47b8aaf0d4f3531" sha256 big_sur: "fb13d64f32a7d9bdc58cf4dfd6776bf1254b09029b2778c6b6ae8aa1f3af5897" sha256 catalina: "abed65f5debef77a9380822f5612b17933df211375766e800fb9e481f2829178" sha256 mojave: "76e0af8a4e5f7fbc2d2095e8c6524c80a8e03ac2c9f9cbc2b8b319fff3dd7056" sha256 cellar: :any_skip_relocation, x86_64_linux: "b8c912897f43849e159ca08aa5ee25c2e80068a41e00c2c90fa972df0de496e9" # linuxbrew-core end depends_on "node" def install system "npm", "install", *Language::Node.std_npm_install_args(libexec) bin.install_symlink Dir[libexec/"bin/*"] # Remove incompatible pre-built binaries os = OS.kernel_name.downcase arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s libexec.glob("lib/node_modules/snowpack/node_modules/{bufferutil,utf-8-validate}/prebuilds/*") .each { |dir| dir.rmtree if dir.basename.to_s != "#{os}-#{arch}" } # `rollup` < 2.38.3 uses x86_64-specific `fsevents`. Can remove when `rollup` is updated. (libexec/"lib/node_modules/snowpack/node_modules/rollup/node_modules/fsevents").rmtree if Hardware::CPU.arm? # Replace universal binaries with their native slices deuniversalize_machos end test do mkdir "work" do system "npm", "init", "-y" system bin/"snowpack", "init" assert_predicate testpath/"work/snowpack.config.js", :exist? inreplace testpath/"work/snowpack.config.js", " packageOptions: {\n /* ... */\n },", " packageOptions: {\n source: \"remote\"\n }," system bin/"snowpack", "add", "react" deps_contents = File.read testpath/"work/snowpack.deps.json" assert_match(/\s*"dependencies":\s*{\s*"react": ".*"\s*}/, deps_contents) assert_match "Build Complete", shell_output("#{bin}/snowpack build") end end end
0x07CB/linuxbrew-core
Formula/flif.rb
class Flif < Formula desc "Free Loseless Image Format" homepage "https://flif.info/" # When updating, please check if FLIF switched to CMake yet url "https://github.com/FLIF-hub/FLIF/archive/v0.3.tar.gz" sha256 "aa02a62974d78f8109cff21ecb6d805f1d23b05b2db7189cfdf1f0d97ff89498" license "LGPL-3.0" head "https://github.com/FLIF-hub/FLIF.git" bottle do sha256 cellar: :any, arm64_big_sur: "3562aa4e5c79586e5edd3908ae34bf87cd75d1d9ba35fe270166a0604c3dc6e8" sha256 cellar: :any, big_sur: "7c50517e175d15ba665f2ea5a138a762c017270c38636e55cf1ef1fb6c2d83d2" sha256 cellar: :any, catalina: "0c21811ef5a29e427952afbc57fb657ece17c91fc84e69eba7ab9f97fb439303" sha256 cellar: :any, mojave: "41d1a634a2442550395bd454b84606570cc9f670fa2df158d39fddb70de39367" sha256 cellar: :any, high_sierra: "40b85a93738e195a6eec2b3bf9bfe7b2831f74d464e1e5145681f9ec2c3cfe68" sha256 cellar: :any, sierra: "756f685e55f7c798743756723815fb3f39d82ef92f5cc78eb175d8cea52498a3" sha256 cellar: :any, el_capitan: "3fd4e69366470a6810815d111a8e0188c627fe7d50375cd93c0da00ad6617fb2" sha256 cellar: :any, yosemite: "bbd4e35f6947e3b304469031f42c3720a94c10d9fb7540eed9e7b08bef6ee319" sha256 cellar: :any, x86_64_linux: "3aa9b634a54ea22b761782b0d29bbc5a306dccbb1d194e67a26e3dfe92a01f5b" # linuxbrew-core end depends_on "pkg-config" => :build depends_on "libpng" depends_on "sdl2" resource "test_c" do url "https://raw.githubusercontent.com/FLIF-hub/FLIF/dcc2011/tools/test.c" sha256 "a20b625ba0efdb09ad21a8c1c9844f686f636656f0e9bd6c24ad441375223afe" end def install system "make", "PREFIX=#{prefix}", "install", "install-dev" doc.install "doc/flif.pdf" end test do testpath.install resource("test_c") system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lflif", "-o", "test" system "./test", "dummy.flif" system bin/"flif", "-i", "dummy.flif" system bin/"flif", "-I", test_fixtures("test.png"), "test.flif" system bin/"flif", "-d", "test.flif", "test.png" assert_predicate testpath/"test.png", :exist?, "Failed to decode test.flif" end end
0x07CB/linuxbrew-core
Formula/bzr-rewrite.rb
<filename>Formula/bzr-rewrite.rb class BzrRewrite < Formula desc "Bazaar plugin to support rewriting revisions and rebasing" homepage "https://launchpad.net/bzr-rewrite" url "https://launchpad.net/bzr-rewrite/trunk/0.6.3/+download/bzr-rewrite-0.6.3.tar.gz" sha256 "f4d0032a41a549a0bc3ac4248cd4599da859174ea33e56befcb095dd2c930794" depends_on "bazaar" def install (share/"bazaar/plugins/rewrite").install Dir["*"] end test do file_path1 = testpath/"foo/trunk/file1.txt" file_path2 = testpath/"foo/b1/file2.txt" system "bzr", "whoami", "Homebrew" system "bzr", "init-repo", "foo" cd "foo" do system "bzr", "init", "trunk" cd "trunk" do file_path1.write "change" system "bzr", "add" system "bzr", "commit", "-m", "trunk 1" end system "bzr", "branch", "trunk", "b1" cd "b1" do file_path2.write "change" system "bzr", "add" system "bzr", "commit", "-m", "branch 1" file_path2.append_lines "change" system "bzr", "commit", "-m", "branch 2" end cd "trunk" do file_path1.append_lines "change" system "bzr", "commit", "-m", "trunk 2" file_path1.append_lines "change" system "bzr", "commit", "-m", "trunk 3" end cd "b1" do system "bzr", "rebase", "../trunk" assert_match(/branch 2/, shell_output("bzr log -r5")) assert_match(/branch 1/, shell_output("bzr log -r4")) assert_match(/trunk 3/, shell_output("bzr log -r3")) assert_match(/trunk 2/, shell_output("bzr log -r2")) assert_match(/trunk 1/, shell_output("bzr log -r1")) end end end end
0x07CB/linuxbrew-core
Formula/xsel.rb
<gh_stars>100-1000 class Xsel < Formula desc "Command-line program for getting and setting the contents of the X selection" homepage "http://www.vergenet.net/~conrad/software/xsel/" license "MIT" # Stable block to apply Fedora patches as current release is from 2008. # Remove when a new release is available. stable do url "http://www.vergenet.net/~conrad/software/xsel/download/xsel-1.2.0.tar.gz" sha256 "b927ce08dc82f4c30140223959b90cf65e1076f000ce95e520419ec32f5b141c" # Fedora Patch 0: xsel-1.2.0-MAX_NUM_TARGETS.patch (using upstream commit) # Fix overflow of supported_targets array. patch do url "https://github.com/kfish/xsel/commit/26b2bf93ef72b2e53dac5a97de8551bbfcf22e80.patch?full_index=1" sha256 "1c40e4f282e1e5632f989937e993c6a331c4b84cb061798e9d77495c3e3a2803" end # Fedora Patch 1: xsel-1.2.0-fix-large-pastes.patch (using upstream commits) # Fix xsel not working when pasting large amounts of text. patch do url "https://github.com/kfish/xsel/commit/ba8656dc7c7e771c802fc957ce3dd128d4b6e3ae.patch?full_index=1" sha256 "9cddda04d7b56d0fd95ddd9bc3d9cbd8a9682a151c0fb29493505d6fba12544f" end patch do url "https://github.com/kfish/xsel/commit/5c95883fc06e3a98e51d02a9158f4009b75c724e.patch?full_index=1" sha256 "27b3fa207c79c211ea2f6d6b034cab38aa11cb9872b32cba8f0b18b3cc874bb8" end # Fedora Patch 2: xsel-1.2.0-fix-java-pasting.patch (using upstream commit) # Fix to make xsel compatible with Java programs. patch do url "https://github.com/kfish/xsel/commit/9674445d8ea9f60f4d1a154be6fdb12e7af8f0c6.patch?full_index=1" sha256 "4c2d63c2237805cd3fe59e0daac59d0033574d3f664081f6af5fb71b8e688b44" end # Fedora Patch 3: xsel-1.2.0-do-not-terminate-string.patch # Backport of https://github.com/kfish/xsel/pull/16 patch do url "https://src.fedoraproject.org/rpms/xsel/raw/6a957e9ee81b29c593124336be000b05eaa3d537/f/xsel-1.2.0-do-not-terminate-string.patch" sha256 "48f61ed4994bfb2e1691c7af92fb5364d2da8217fc7b01bf8ee63c3f3a81ddf3" end # Fedora Patch 4: xsel-1.2.0-send-correct-event.patch # Backport of https://github.com/kfish/xsel/pull/16 patch do url "https://src.fedoraproject.org/rpms/xsel/raw/6a957e9ee81b29c593124336be000b05eaa3d537/f/xsel-1.2.0-send-correct-event.patch" sha256 "d71fe4a979f41cab51c580dd2f83ee1da0ae3408f18769cc5f5eaf5654d3744f" end end bottle do sha256 cellar: :any, arm64_big_sur: "b32e829803d81ea7d09bb0911b31a20ac6c75fdbc67fa3c4c9184458e3d3ecb3" sha256 cellar: :any, big_sur: "f596d08cffadf2bff12804cc18fc61ddb4cdf47599f869d938c7ebd860e1950d" sha256 cellar: :any, catalina: "18f72e215611df386415475668dd769e37c6b715715e477ba39866f17a95c1f2" sha256 cellar: :any, mojave: "8fd34073cf958d18b31d51f0e3d05f7a93e0a71b00cc696bdf4d4018409b3c46" sha256 cellar: :any_skip_relocation, x86_64_linux: "<KEY>" # linuxbrew-core end head do url "https://github.com/kfish/xsel.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end depends_on "libxt" => :build depends_on "libx11" def install configure = build.head? ? "./autogen.sh" : "./configure" system configure, *std_configure_args system "make", "install" end test do assert_match "Usage: xsel [options]", shell_output("#{bin}/xsel --help") assert_match "xsel version #{version} ", shell_output("#{bin}/xsel --version") assert_match "xsel: Can't open display", shell_output("DISPLAY= #{bin}/xsel -o 2>&1", 1) end end
0x07CB/linuxbrew-core
Formula/zdelta.rb
<reponame>0x07CB/linuxbrew-core<gh_stars>100-1000 class Zdelta < Formula desc "Lossless delta compression library" homepage "https://web.archive.org/web/20150804051750/cis.poly.edu/zdelta/" url "https://web.archive.org/web/20150804051752/cis.poly.edu/zdelta/downloads/zdelta-2.1.tar.gz" sha256 "03e6beb2e1235f2091f0146d7f41dd535aefb6078a48912d7d11973d5306de4c" head "https://github.com/snej/zdelta.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, catalina: "c7d235578c62851ad7639ced736eb94ce833e9afb172fe65a37869bac1a80da4" sha256 cellar: :any_skip_relocation, mojave: "d98c1b4f7a6b63238bacd06d0a5640e7f0d07838bb4b3e15ac7dc9d699a5835a" sha256 cellar: :any_skip_relocation, high_sierra: "12c977074ebb388cb671b3a996cacda4c5c47fbf96100f73ffddcbf83976824d" sha256 cellar: :any_skip_relocation, sierra: "49b891fbf6b6f93796cb3080dcbefc1d873000e84d74a4bf2dd851b625e6a698" sha256 cellar: :any_skip_relocation, el_capitan: "3a186612374b9b2aca2e56f5dd68049c0b1ef952e4cb0b07263faf2ea62f136a" sha256 cellar: :any_skip_relocation, yosemite: "2ade2838217be1b9f6bc55be6bf05fa5046ae09a42d17b714b9f2a73f934c993" end disable! date: "2020-12-08", because: :unmaintained def install system "make" system "make", "install", "prefix=#{prefix}" bin.install "zdc", "zdu" end test do msg = "Hello this is Homebrew" (testpath/"ref").write "Hello I'm a ref file" compressed = pipe_output("#{bin}/zdc ref", msg, 0) assert_equal msg, pipe_output("#{bin}/zdu ref", compressed, 0) end end
0x07CB/linuxbrew-core
Formula/libowfat.rb
<reponame>0x07CB/linuxbrew-core 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-only" revision 1 head ":pserver:cvs:@cvs.fefe.de:/cvs", using: :cvs livecheck do url :homepage regex(/href=.*?libowfat[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "1f136abc75d88d46768041ce1e32344905a3cc66179734785011ed001acda8db" sha256 cellar: :any_skip_relocation, big_sur: "c5fcc5eed33299becabcd1144074b6971730d7edbacea54b22f0ed5c723a09bf" sha256 cellar: :any_skip_relocation, catalina: "9fd957c443aa34237004dbcce7254377b164262df39bb3ba7ea8a8f1d70f5f59" sha256 cellar: :any_skip_relocation, mojave: "2b1cffc2e679e98801f576358d42fb3b7217187f2551f5fe4460f5b29ffd485c" sha256 cellar: :any_skip_relocation, x86_64_linux: "886dee916014051fddad150440da21e5ddc6c7fc0fb06a6e4e0cd02206400d2d" # linuxbrew-core 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}" end test do (testpath/"test.c").write <<~EOS #include <libowfat/str.h> int main() { return str_diff("a", "a"); } EOS system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lowfat", "-o", "test" system "./test" end end
0x07CB/linuxbrew-core
Formula/srecord.rb
class Srecord < Formula desc "Tools for manipulating EPROM load files" homepage "https://srecord.sourceforge.io/" url "https://downloads.sourceforge.net/project/srecord/srecord/1.64/srecord-1.64.tar.gz" sha256 "49a4418733c508c03ad79a29e95acec9a2fbc4c7306131d2a8f5ef32012e67e2" license all_of: ["GPL-3.0-or-later", "LGPL-3.0-or-later"] bottle do sha256 cellar: :any, arm64_big_sur: "2531dde4b69ae50e0cb15b498b2729862e64d00b98be831e581989d9e907f36a" sha256 cellar: :any, big_sur: "5c5129ae228ef644b5ed2a26516295feabd198aea270eab03c5c6d3e418980b1" sha256 cellar: :any, catalina: "cc4e1e89835954876853f5f7bcccbfd172adbb5651c1f2790ea3da10e4347845" sha256 cellar: :any, mojave: "6b3b825b501d1ea1635d107fb62021dde713f6da375f53f1a1fdcb59070df63a" sha256 cellar: :any, high_sierra: "f6341ba9022e6cbc057c519fcdc7c7518247c850025777b80d2463341315d88c" sha256 cellar: :any, sierra: "0601896fc392a13f7ef861fc3840fadfc7ddc7313763c1d374555129f4301c0d" sha256 cellar: :any, el_capitan: "6a0df3e5fb40699d9b1198562b3b3a4e1745c3a0d12923c461246b7784b8324c" sha256 cellar: :any, yosemite: "c3c29b357c44bc3da2dbb8f23a6d83aeb637aa374fe0564eb9454e5e6b53d54c" end depends_on "boost" => :build depends_on "libtool" => :build depends_on "libgcrypt" uses_from_macos "groff" => :build # Use macOS's pstopdf on_macos do patch do url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/srecord/1.64.patch" sha256 "140e032d0ffe921c94b19145e5904538233423ab7dc03a9c3c90bf434de4dd03" end end on_linux do depends_on "ghostscript" => :build # for ps2pdf end def install system "./configure", "--prefix=#{prefix}", "LIBTOOL=glibtool" system "make", "install" end end
0x07CB/linuxbrew-core
Formula/graphql-cli.rb
<filename>Formula/graphql-cli.rb require "language/node" class GraphqlCli < Formula desc "Command-line tool for common GraphQL development workflows" homepage "https://github.com/Urigo/graphql-cli" url "https://registry.npmjs.org/graphql-cli/-/graphql-cli-4.1.0.tgz" sha256 "c52d62ac108d4a3f711dbead0939bd02e3e2d0c82f8480fd76fc28f285602f5c" license "MIT" # The Npm page is nearly 2 MB compressed (due to there being thousands # of pre-release versions of the package) and livecheck can time out, so we # check the Git tags in this instance. livecheck do url :homepage regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 arm64_big_sur: "2da205bbd5c76588be334a84b52dacfac9062045d605ed3f8298b7cb7b9b84a7" sha256 big_sur: "02d60908557d5dedf63fffe66a51f5829807abd910b5460a2ae44d7b8d208142" sha256 catalina: "5060d007d13a695709ff9afaa16a1492d8645e17ab78ec2b14650e0c7a305e55" sha256 mojave: "212bf2d20997a930838775736ca468dc25cbd3c3978c0189f8a435873a029286" sha256 high_sierra: "d8f266f129027b1fe731c12264f7b8679c271ecdb6418cef72dba0a730e99771" end depends_on "node" uses_from_macos "expect" => :test def install system "npm", "install", *Language::Node.std_npm_install_args(libexec) bin.install_symlink Dir["#{libexec}/bin/*"] # Avoid references to Homebrew shims rm_f "#{libexec}/lib/node_modules/graphql-cli/node_modules/websocket/builderror.log" end test do (testpath/"test.exp").write <<~EOS #!/usr/bin/env expect -f set timeout -1 spawn #{bin}/graphql init expect -exact "Select the best option for you" send -- "1\r" expect -exact "? What is the name of the project?" send -- "brew\r" expect -exact "? Choose a template to bootstrap" send -- "1\r" expect eof EOS system "expect", "-f", "test.exp" assert_predicate testpath/"brew", :exist? assert_match "Graphback runtime template with Apollo Server and PostgreSQL", File.read(testpath/"brew/package.json") end end
0x07CB/linuxbrew-core
Formula/spaceinvaders-go.rb
<reponame>0x07CB/linuxbrew-core<filename>Formula/spaceinvaders-go.rb class SpaceinvadersGo < Formula desc "Space Invaders in your terminal written in Go" homepage "https://github.com/asib/spaceinvaders" url "https://github.com/asib/spaceinvaders/archive/v1.2.1.tar.gz" sha256 "3fef982b94784d34ac2ae68c1d5dec12e260974907bce83528fe3c4132bed377" license "MIT" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "6843984a81fcb723c3b1487a77c44f2a186a8cb17f00b0531bc8c8259afa303c" sha256 cellar: :any_skip_relocation, big_sur: "c0ed01fe110f5d7d681d12883f58962ae5c0ea721b032e8d3ef0adee41956841" sha256 cellar: :any_skip_relocation, catalina: "1c4712409711d84aa1a7ce64214bb620e13660991f2afacd41681278ae0c3ba1" sha256 cellar: :any_skip_relocation, mojave: "596f084c8dad9588158ea9419e8a7ce4e33e8193d18b18e4095a6443b5e2fbbd" sha256 cellar: :any_skip_relocation, x86_64_linux: "0ab83f52840337da3a6ec2946cc44154055f4cb1f95959330c69e99553a61259" # linuxbrew-core end depends_on "go" => :build def install system "go", "build", *std_go_args, "-ldflags", "-s -w", "-o", bin/"spaceinvaders" end test do IO.popen("#{bin}/spaceinvaders", "r+") do |pipe| pipe.puts "q" pipe.close_write pipe.close end end end
0x07CB/linuxbrew-core
Formula/hcl2json.rb
<gh_stars>100-1000 class Hcl2json < Formula desc "Convert HCL2 to JSON" homepage "https://github.com/tmccombs/hcl2json" url "https://github.com/tmccombs/hcl2json/archive/v0.3.3.tar.gz" sha256 "e2aa5ef900cfe42ebd9454cfe61b8cf780b4a026dae22e4ef5fc779f34da4126" license "Apache-2.0" head "https://github.com/tmccombs/hcl2json.git", branch: "main" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "357414d0b2d4cfd38220d4e9d52b556fc431334f0fcd6d62d5fd3ff97b1b2f14" sha256 cellar: :any_skip_relocation, big_sur: "9b5fcea7928871e1f18fc048f103fc8be8e3564856c869155d16d41160a1515d" sha256 cellar: :any_skip_relocation, catalina: "9b5fcea7928871e1f18fc048f103fc8be8e3564856c869155d16d41160a1515d" sha256 cellar: :any_skip_relocation, mojave: "9b5fcea7928871e1f18fc048f103fc8be8e3564856c869155d16d41160a1515d" sha256 cellar: :any_skip_relocation, x86_64_linux: "b1b2da82eecafa95be718e656620b460e6a36bbb5acd8259bc66e41341b32ae0" # linuxbrew-core end depends_on "go" => :build def install system "go", "build", *std_go_args end test do test_hcl = <<~HCL resource "my_resource_type" "test_resource" { input = "magic_test_value" } HCL test_json = { resource: { my_resource_type: { test_resource: [ { input: "magic_test_value", }, ], }, }, }.to_json assert_equal test_json, pipe_output("#{bin}/hcl2json", test_hcl).gsub(/\s+/, "") assert_match "Failed to convert", pipe_output("#{bin}/hcl2json 2>&1", "Hello, Homebrew!", 1) end end
0x07CB/linuxbrew-core
Formula/png++.rb
<reponame>0x07CB/linuxbrew-core class Pngxx < Formula desc "C++ wrapper for libpng library" homepage "https://www.nongnu.org/pngpp/" url "https://download.savannah.gnu.org/releases/pngpp/png++-0.2.10.tar.gz" sha256 "998af216ab16ebb88543fbaa2dbb9175855e944775b66f2996fc945c8444eee1" livecheck do url "https://download.savannah.gnu.org/releases/pngpp/" regex(/href=.*?png\+\+[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "4ff35d41f1ad4d5cff20cc77fa72c905a6cab65f0102dfe898241082ffc53b24" sha256 cellar: :any_skip_relocation, big_sur: "536874bdcfa9f6b546f8a924bf4b72b8b6beba84883e6ee93645080632b51a2e" sha256 cellar: :any_skip_relocation, catalina: "c6377c5185e7ae53ff7ec9a133b8c12618a400f64d14b55ee751dc7c85cbc491" sha256 cellar: :any_skip_relocation, mojave: "536f9c2dd05cfd2ae8a4f7f5d0c5c38575cf91609498f98bd6c3f97c4de2c520" sha256 cellar: :any_skip_relocation, high_sierra: "536f9c2dd05cfd2ae8a4f7f5d0c5c38575cf91609498f98bd6c3f97c4de2c520" sha256 cellar: :any_skip_relocation, sierra: "cee110f568bae723e8e5172e8bab36c8f4c5adb8bf339a444926a572bfa13f89" sha256 cellar: :any_skip_relocation, x86_64_linux: "3705bec0c4e9ead00a245f3e173c7a2a6aedf4f886ec7aa4614900a217b4b7bf" # linuxbrew-core end depends_on "libpng" def install system "make", "PREFIX=#{prefix}", "install" end test do (testpath/"test.cpp").write <<~EOS #include <png++/png.hpp> int main() { png::image<png::rgb_pixel> image(200, 300); if (image.get_width() != 200) return 1; if (image.get_height() != 300) return 2; return 0; } EOS system ENV.cxx, "test.cpp", "-o", "test" system "./test" end end
0x07CB/linuxbrew-core
Formula/kafka.rb
class Kafka < Formula desc "Open-source distributed event streaming platform" homepage "https://kafka.apache.org/" url "https://www.apache.org/dyn/closer.lua?path=kafka/3.0.0/kafka_2.13-3.0.0.tgz" mirror "https://archive.apache.org/dist/kafka/3.0.0/kafka_2.13-3.0.0.tgz" sha256 "a82728166bbccf406009747a25e1fe52dbcb4d575e4a7a8616429b5818cd02d1" license "Apache-2.0" livecheck do url "https://kafka.apache.org/downloads" regex(/href=.*?kafka[._-]v?\d+(?:\.\d+)+-(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any_skip_relocation, big_sur: "186f5cb572ee3ab49ad0cbe67b21f14667eb68db025daa6000ee14cd042b6111" sha256 cellar: :any_skip_relocation, catalina: "186f5cb572ee3ab49ad0cbe67b21f14667eb68db025daa6000ee14cd042b6111" sha256 cellar: :any_skip_relocation, mojave: "186f5cb572ee3ab49ad0cbe67b21f14667eb68db025daa6000ee14cd042b6111" sha256 cellar: :any_skip_relocation, x86_64_linux: "9cb29956bab9e7280c3879a2510d12b9f9ce16ce08b7e1258c102b68efa35fac" # linuxbrew-core end depends_on "openjdk" depends_on "zookeeper" def install data = var/"lib" inreplace "config/server.properties", "log.dirs=/tmp/kafka-logs", "log.dirs=#{data}/kafka-logs" inreplace "config/zookeeper.properties", "dataDir=/tmp/zookeeper", "dataDir=#{data}/zookeeper" # remove Windows scripts rm_rf "bin/windows" libexec.install "libs" prefix.install "bin" bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env) Dir["#{bin}/*.sh"].each { |f| mv f, f.to_s.gsub(/.sh$/, "") } mv "config", "kafka" etc.install "kafka" libexec.install_symlink etc/"kafka" => "config" # create directory for kafka stdout+stderr output logs when run by launchd (var+"log/kafka").mkpath end service do run [opt_bin/"kafka-server-start", etc/"kafka/server.properties"] keep_alive true working_dir HOMEBREW_PREFIX log_path var/"log/kafka/kafka_output.log" error_log_path var/"log/kafka/kafka_output.log" end test do ENV["LOG_DIR"] = "#{testpath}/kafkalog" (testpath/"kafka").mkpath cp "#{etc}/kafka/zookeeper.properties", testpath/"kafka" cp "#{etc}/kafka/server.properties", testpath/"kafka" inreplace "#{testpath}/kafka/zookeeper.properties", "#{var}/lib", testpath inreplace "#{testpath}/kafka/server.properties", "#{var}/lib", testpath zk_port = free_port kafka_port = free_port inreplace "#{testpath}/kafka/zookeeper.properties", "clientPort=2181", "clientPort=#{zk_port}" inreplace "#{testpath}/kafka/server.properties" do |s| s.gsub! "zookeeper.connect=localhost:2181", "zookeeper.connect=localhost:#{zk_port}" s.gsub! "#listeners=PLAINTEXT://:9092", "listeners=PLAINTEXT://:#{kafka_port}" end begin fork do exec "#{bin}/zookeeper-server-start #{testpath}/kafka/zookeeper.properties " \ "> #{testpath}/test.zookeeper-server-start.log 2>&1" end sleep 15 fork do exec "#{bin}/kafka-server-start #{testpath}/kafka/server.properties " \ "> #{testpath}/test.kafka-server-start.log 2>&1" end sleep 30 system "#{bin}/kafka-topics --bootstrap-server localhost:#{kafka_port} --create --if-not-exists " \ "--replication-factor 1 --partitions 1 --topic test > #{testpath}/kafka/demo.out " \ "2>/dev/null" pipe_output "#{bin}/kafka-console-producer --bootstrap-server localhost:#{kafka_port} --topic test 2>/dev/null", "test message" system "#{bin}/kafka-console-consumer --bootstrap-server localhost:#{kafka_port} --topic test " \ "--from-beginning --max-messages 1 >> #{testpath}/kafka/demo.out 2>/dev/null" system "#{bin}/kafka-topics --bootstrap-server localhost:#{kafka_port} --delete --topic test " \ ">> #{testpath}/kafka/demo.out 2>/dev/null" ensure system "#{bin}/kafka-server-stop" system "#{bin}/zookeeper-server-stop" sleep 10 end assert_match(/test message/, File.read("#{testpath}/kafka/demo.out")) end end
0x07CB/linuxbrew-core
Formula/golang-migrate.rb
<reponame>0x07CB/linuxbrew-core class GolangMigrate < Formula desc "Database migrations CLI tool" homepage "https://github.com/golang-migrate/migrate" url "https://github.com/golang-migrate/migrate/archive/v4.15.1.tar.gz" sha256 "d426b0c55b3445210392fc61cbeefbe8410665bf2725eed9b1becb6c200ffe42" license "MIT" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "214004a79f09ced2ba15ed70dd171e3928701bc962234adf99c07364a73cc154" sha256 cellar: :any_skip_relocation, big_sur: "dfd17394b62ed5ae5dede0b439549e919f6411e0db22c43570b70539e6bd718e" sha256 cellar: :any_skip_relocation, catalina: "3d0f6356d4703cfd34b5d5e910a8e294af781ea2ba5efb932282934e41cf4f52" sha256 cellar: :any_skip_relocation, mojave: "9da66644a815cb772799c02e7b1933e57f799f656b1cd718b64ab1b76642e2a4" sha256 cellar: :any_skip_relocation, x86_64_linux: "fae803f32b00923357d18edac0fd2d10abc8cd152034106d2128a4f067951635" # linuxbrew-core end depends_on "go" => :build def install system "make", "VERSION=v#{version}" bin.install "migrate" end test do touch "0001_migtest.up.sql" output = shell_output("#{bin}/migrate -database stub: -path . up 2>&1") assert_match "1/u migtest", output end end
0x07CB/linuxbrew-core
Formula/apache-archiva.rb
class ApacheArchiva < Formula desc "Build Artifact Repository Manager" homepage "https://archiva.apache.org/" url "https://www.apache.org/dyn/closer.lua?path=archiva/2.2.5/binaries/apache-archiva-2.2.5-bin.tar.gz" mirror "https://archive.apache.org/dist/archiva/2.2.5/binaries/apache-archiva-2.2.5-bin.tar.gz" sha256 "01119af2d9950eacbcce0b7f8db5067b166ad26c1e1701bef829105441bb6e29" license "Apache-2.0" depends_on "openjdk" def install libexec.install Dir["*"] (bin/"archiva").write_env_script libexec/"bin/archiva", JAVA_HOME: Formula["openjdk"].opt_prefix end def post_install (var/"archiva/logs").mkpath (var/"archiva/data").mkpath (var/"archiva/temp").mkpath cp_r libexec/"conf", var/"archiva" end service do run [opt_bin/"archiva", "console"] environment_variables ARCHIVA_BASE: var/"archiva" log_path var/"archiva/logs/launchd.log" end test do assert_match "was not running.", shell_output("#{bin}/archiva stop") end end
0x07CB/linuxbrew-core
Formula/negfix8.rb
class Negfix8 < Formula desc "Turn scanned negative images into positives" homepage "https://sites.google.com/site/negfix" url "https://sites.google.com/site/negfix/downloads/negfix8.3.tgz" sha256 "2f360b0dd16ca986fbaebf5873ee55044cae591546b573bb17797cbf569515bd" livecheck do url "https://sites.google.com/site/negfix/downloads" regex(/href=.*?negfix[._-]?v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any_skip_relocation, x86_64_linux: "dc774cdde317803fe6a9f0b4d63531556e781467b1491407c94fc11509fa0997" # linuxbrew-core end depends_on "imagemagick" def install bin.install "negfix8" end test do (testpath/".negfix8/frameprofile").write "1 1 1 1 1 1 1" system "#{bin}/negfix8", "-u", "frameprofile", test_fixtures("test.tiff"), "#{testpath}/output.tiff" assert_predicate testpath/"output.tiff", :exist? end end
0x07CB/linuxbrew-core
Formula/cgit.rb
<gh_stars>100-1000 class Cgit < Formula desc "Hyperfast web frontend for Git repositories written in C" homepage "https://git.zx2c4.com/cgit/" url "https://git.zx2c4.com/cgit/snapshot/cgit-1.2.3.tar.xz" sha256 "5a5f12d2f66bd3629c8bc103ec8ec2301b292e97155d30a9a61884ea414a6da4" license "GPL-2.0-only" livecheck do url "https://git.zx2c4.com/cgit/refs/tags" regex(/href=.*?cgit[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 arm64_big_sur: "1d94a449229b9550a5d76b9d1f0140ea6b267fcd982539d6537fce21447aae12" sha256 big_sur: "43d5a3249276dc89f9b8730b775fab358f9a04adac63fc18dc1257cecb0de2a8" sha256 catalina: "c5317498aefba5a04343b14929249e42a9ecc1c5da227ae06728102418bf5e49" sha256 mojave: "261aa49e87d8d4147b0ec838e22d6149f0aa41ee27751df15277b1cdb1df8bd3" sha256 x86_64_linux: "27e5543ed8c84782d48241262c483a0bec68f27fa09534ff616cda09bfec7098" # linuxbrew-core end depends_on "gettext" depends_on "openssl@1.1" # git version is mandated by cgit: see GIT_VER variable in Makefile # https://git.zx2c4.com/cgit/tree/Makefile?h=v1.2#n17 resource "git" do url "https://www.kernel.org/pub/software/scm/git/git-2.25.1.tar.gz" sha256 "4999ae0ee6cc7dfb280d7051e39a82a5630b00c1d8cd54890f07b4b7193d25aa" end # cgit 1.2.2+ needs memrchr, for which macOS provides no implementation # https://lists.zx2c4.com/pipermail/cgit/2020-August/004510.html patch do url "https://raw.githubusercontent.com/Homebrew/formula-patches/5decb544ec505d0868ef79f03707fafb0e85e47c/cgit/memrchr-impl.patch" sha256 "3ab5044db3001b411b58309d70f00b0dee54df991ebc66da9406711ed4007f0f" end def install resource("git").stage(buildpath/"git") system "make", "prefix=#{prefix}", "CGIT_SCRIPT_PATH=#{pkgshare}", "CGIT_DATA_PATH=#{var}/www/htdocs/cgit", "CGIT_CONFIG=#{etc}/cgitrc", "CACHE_ROOT=#{var}/cache/cgit", "install" end test do (testpath/"cgitrc").write <<~EOS repo.url=test repo.path=#{testpath} repo.desc=the master foo repository repo.owner=<EMAIL> EOS ENV["CGIT_CONFIG"] = testpath/"cgitrc" # no "Status" line means 200 refute_match(/Status: .+/, shell_output("#{pkgshare}/cgit.cgi")) end end
0x07CB/linuxbrew-core
Formula/ragel.rb
<filename>Formula/ragel.rb class Ragel < Formula desc "State machine compiler" homepage "https://www.colm.net/open-source/ragel/" url "https://www.colm.net/files/ragel/ragel-6.10.tar.gz" sha256 "5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f" license "GPL-2.0" livecheck do url :homepage regex(/Stable.*?href=.*?ragel[._-]v?(\d+(?:\.\d+)+)\.t/im) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "858ef57e50114e0406d7afc3beb7c06462bc1b5ce2155948af84af0c41d739f1" sha256 cellar: :any_skip_relocation, big_sur: "712245a75110f6628e7c07130d2905577f1a533bf760692e0f4b3071df20cc40" sha256 cellar: :any_skip_relocation, catalina: "a402204e97c35c6a9487d2b0707e27766d9b39c9c2116d49e9c561e1d0bd54b7" sha256 cellar: :any_skip_relocation, mojave: "b9b1428abb19b6e6d8de2bccc58a059b75d7c08b38b73956bb40e764a9d0390f" sha256 cellar: :any_skip_relocation, high_sierra: "8dc6d7e1a3617cd31d9738c5ae595fd57ddb157266c1970646a7d5fbba85a6ae" sha256 cellar: :any_skip_relocation, sierra: "69d6d65c2ef3da7b829e3391fd17b1ef088b92c2baf64979707033e2a7dd8c01" sha256 cellar: :any_skip_relocation, el_capitan: "f4ea3a8c0476fd82000223fae69170ac9f266cd36334bd60d9d6cf4fab3273c1" sha256 cellar: :any_skip_relocation, yosemite: "dd8469ac3e08d5d8a257ce7fc7de05de398e8521abff83eceea0741099685b38" sha256 cellar: :any_skip_relocation, x86_64_linux: "f3663a760b85bb4beb623a7cbd3954a4cf18120c6aee5b9abdcd04974cd15621" # linuxbrew-core end resource "pdf" do url "https://www.colm.net/files/ragel/ragel-guide-6.10.pdf" sha256 "efa9cf3163640e1340157c497db03feb4bc67d918fc34bc5b28b32e57e5d3a4e" end def install system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" doc.install resource("pdf") end test do testfile = testpath/"rubytest.rl" testfile.write <<~EOS %%{ machine homebrew_test; main := ( 'h' @ { puts "homebrew" } | 't' @ { puts "test" } )*; }%% data = 'ht' %% write data; %% write init; %% write exec; EOS system bin/"ragel", "-Rs", testfile end end
0x07CB/linuxbrew-core
Formula/bbcolors.rb
<reponame>0x07CB/linuxbrew-core class Bbcolors < Formula desc "Save and load color schemes for BBEdit and TextWrangler" homepage "https://daringfireball.net/projects/bbcolors/" url "https://daringfireball.net/projects/downloads/bbcolors_1.0.1.zip" sha256 "6ea07b365af1eb5f7fb9e68e4648eec24a1ee32157eb8c4a51370597308ba085" bottle do sha256 cellar: :any_skip_relocation, catalina: "eccd746ed946749acadc63ef4e6ff652f2c1372459f1bf586acce1590729cc75" sha256 cellar: :any_skip_relocation, mojave: "3eb2e91111f491b315d5bb077dacdf9dd03fa74a585ba780c59bdc071c104fe2" sha256 cellar: :any_skip_relocation, high_sierra: "b54a89cbcfcb6a0fb0b3c1279884f1fa54196e2c22a19424ea95827f419030d9" sha256 cellar: :any_skip_relocation, sierra: "cdc81c86b829ba9e051d693bccdb821ed78a8dc3a5df644fc156bfcd700d5686" sha256 cellar: :any_skip_relocation, el_capitan: "2a713dae009e44685d1ef02b01d5202a24087129dab70366d2e30800b7dfb9cb" sha256 cellar: :any_skip_relocation, yosemite: "506d7f82fa38e1f694550be30a29554b8ecc8b303d47e9bb4fcadfc534ac55c7" end disable! date: "2020-12-08", because: :unmaintained def install bin.install "bbcolors" end test do (testpath/"Library/Application Support/BBColors").mkpath system "#{bin}/bbcolors", "-list" end end
0x07CB/linuxbrew-core
Formula/kepubify.rb
class Kepubify < Formula desc "Convert ebooks from epub to kepub" homepage "https://pgaskin.net/kepubify/" url "https://github.com/pgaskin/kepubify/archive/v4.0.1.tar.gz" sha256 "30e497e3a8490bcf571d01a7bb6cc2410689fccd7f9a516c31a166460d901aa8" license "MIT" head "https://github.com/pgaskin/kepubify.git" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "b6cd624dfcd004722ed211e192749443e2ca43117d499eb28929c420589978f5" sha256 cellar: :any_skip_relocation, big_sur: "d7b68d8c1c34a5fe214b38c88eb5a18c11bff5698026e57d440f6f77c8f29297" sha256 cellar: :any_skip_relocation, catalina: "c8f88fe65e8d02bd957a70630d43fd4007b2c5e8f65c65789353de8b138c765f" sha256 cellar: :any_skip_relocation, mojave: "e2fdeb917185ea975bb51d87f5e50d214d4d4c8d961b16ab3634ba32dc713eb0" sha256 cellar: :any_skip_relocation, x86_64_linux: "330ae960284d9b3c1e91bc0a7469e2af6a338f0f1361953590d4bd69c68071d3" # linuxbrew-core end depends_on "go" => :build def install ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" %w[ kepubify covergen seriesmeta ].each do |p| system "go", "build", "-o", bin/p, "-ldflags", "-s -w -X main.version=#{version}", "-tags", "zip117", "./cmd/#{p}" end end test do pdf = test_fixtures("test.pdf") output = shell_output("#{bin}/kepubify #{pdf} 2>&1", 1) assert_match "Error: invalid extension", output system bin/"kepubify", test_fixtures("test.epub") assert_predicate testpath/"test_converted.kepub.epub", :exist? end end
0x07CB/linuxbrew-core
Formula/shapelib.rb
class Shapelib < Formula desc "Library for reading and writing ArcView Shapefiles" homepage "http://shapelib.maptools.org/" url "https://download.osgeo.org/shapelib/shapelib-1.5.0.tar.gz" sha256 "1fc0a480982caef9e7b9423070b47750ba34cd0ba82668f2e638fab1d07adae1" license any_of: ["LGPL-2.0-or-later", "MIT"] livecheck do url "https://download.osgeo.org/shapelib/" regex(/href=.*?shapelib[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any, arm64_big_sur: "3f95046988d245291a4fb9973051b5c006500ba3ab0bf2842ae330c18936bdca" sha256 cellar: :any, big_sur: "dfae7491c46ca8ed8b587dd6dfa885b4ec6db8520095b1f1ae44becd28ca76d2" sha256 cellar: :any, catalina: "9800e87eaeeca3eca0d59c3bca555c0211df96f021735251964981ac2b16bd90" sha256 cellar: :any, mojave: "90f9b9b0ccadf93be027e515be356d0b92f4dfb33979f11df9fc7570c3249d0e" sha256 cellar: :any, high_sierra: "f1242aaf566b272f69331d16441171b12d0b4cef8396b56e0a8246fe7618ca68" sha256 cellar: :any, sierra: "0add799fff38395de6300f1b18102270bd269b5dc37714e7cac1873849b2ced7" sha256 cellar: :any, x86_64_linux: "bdb7d0db9d5bbb9d44cad1a102144620b3484c24e55cca719ab7200fbc609a2d" # linuxbrew-core end depends_on "cmake" => :build def install # shapelib's CMake scripts interpret `CMAKE_INSTALL_LIBDIR=lib` as relative # to the current directory, i.e. `CMAKE_INSTALL_LIBDIR:PATH=$(pwd)/lib` system "cmake", "-S", ".", "-B", "build", *std_cmake_args(install_libdir: lib) system "cmake", "--build", "build" system "cmake", "--install", "build" end test do assert_match "shp_file", shell_output("#{bin}/shptreedump", 1) end end
0x07CB/linuxbrew-core
Formula/cargo-audit.rb
class CargoAudit < Formula desc "Audit Cargo.lock files for crates with security vulnerabilities" homepage "https://rustsec.org/" url "https://github.com/RustSec/rustsec/archive/cargo-audit/v0.15.2.tar.gz" sha256 "ed330d33f86036acd27ab8f717903aa515c306d02217aa217c95e2a5fdab1f8e" license any_of: ["Apache-2.0", "MIT"] head "https://github.com/RustSec/rustsec.git", branch: "main" livecheck do url :stable regex(%r{^cargo-audit/v?(\d+(?:\.\d+)+)$}i) end bottle do sha256 cellar: :any, arm64_big_sur: "a7954b9aff8d7d2ddac189fbd800a5f38e91e6b6259a8c951df47dc11fe97337" sha256 cellar: :any, big_sur: "f6337c09242e9f1db0b2952e461558c79ae9b95caa7e76e1483d9027ddf67fb8" sha256 cellar: :any, catalina: "8383cf15d8e5f83890e46628786b5aa293453d00255a10e963d16567cdad44bf" sha256 cellar: :any, mojave: "3bc087889fb025d8bd59701e0882d11fec0d4d2678a3fb94a47030d97dc0097b" end depends_on "rust" => :build depends_on "openssl@1.1" uses_from_macos "zlib" on_linux do depends_on "pkg-config" => :build end def install cd "cargo-audit" do system "cargo", "install", *std_cargo_args # test cargo-audit pkgshare.install "tests/support" end end test do output = shell_output("#{bin}/cargo-audit audit 2>&1", 2) assert_predicate HOMEBREW_CACHE/"cargo_cache/advisory-db", :exist? assert_match "couldn't open Cargo.lock: No such file or directory", output cp_r "#{pkgshare}/support/base64_vuln/.", testpath assert_match "error: 1 vulnerability found!", shell_output("#{bin}/cargo-audit audit 2>&1", 1) end end
0x07CB/linuxbrew-core
Formula/vsts-cli.rb
<filename>Formula/vsts-cli.rb class VstsCli < Formula include Language::Python::Virtualenv desc "Manage and work with VSTS/TFS resources from the command-line" homepage "https://docs.microsoft.com/en-us/cli/vsts" url "https://files.pythonhosted.org/packages/f9/c2/3ed698480ab30d2807fc961eef152099589aeaec3f1407945a4e07275de5/vsts-cli-0.1.4.tar.gz" sha256 "27defe1d8aaa1fcbc3517274c0fdbd42b5ebe2c1c40edfc133d98fe4bb7114de" revision OS.mac? ? 4 : 6 bottle do sha256 cellar: :any, arm64_big_sur: "046a0a188502277cfefe4ac62665a654aa161e2e727382c182be93c47c72252f" sha256 cellar: :any, big_sur: "c3bdc4320322286d34f0030a787ae04059822d352fe5de2a136932b0d787b5cb" sha256 cellar: :any, catalina: "cabfe93b0a12cb130c8acc879f6858083d8e80bbfe727eb3e4f653410943cf5b" sha256 cellar: :any, mojave: "c6857c4daa283ec757a22d1bde0f628d5201e92d3b98c51aa6153537ad7bee31" sha256 cellar: :any_skip_relocation, x86_64_linux: "94b26c4499b2795ad46e154cf87fd363563f1ccca772dad139882f9ba215e883" # linuxbrew-core end # https://github.com/Azure/azure-devops-cli-extension/pull/219#issuecomment-456404611 deprecate! date: "2019-01-22", because: :unsupported depends_on "rust" => :build depends_on "python@3.9" uses_from_macos "libffi" on_linux do depends_on "pkg-config" => :build end resource "argcomplete" do url "https://files.pythonhosted.org/packages/cb/53/d2e3d11726367351b00c8f078a96dacb7f57aef2aca0d3b6c437afc56b55/argcomplete-1.12.2.tar.gz" sha256 "de0e1282330940d52ea92a80fea2e4b9e0da1932aaa570f84d268939d1897b04" end resource "certifi" do url "https://files.pythonhosted.org/packages/06/a9/cd1fd8ee13f73a4d4f491ee219deeeae20afefa914dfb4c130cfc9dc397a/certifi-2020.12.5.tar.gz" sha256 "1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c" end resource "cffi" do url "https://files.pythonhosted.org/packages/a8/20/025f59f929bbcaa579704f443a438135918484fffaacfaddba776b374563/cffi-1.14.5.tar.gz" sha256 "fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c" end resource "chardet" do url "https://files.pythonhosted.org/packages/ee/2d/9cdc2b527e127b4c9db64b86647d567985940ac3698eeabc7ffaccb4ea61/chardet-4.0.0.tar.gz" sha256 "0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa" end resource "colorama" do url "https://files.pythonhosted.org/packages/1f/bb/5d3246097ab77fa083a61bd8d3d527b7ae063c7d8e8671b1cf8c4ec10cbe/colorama-0.4.4.tar.gz" sha256 "5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b" end resource "cryptography" do url "https://files.pythonhosted.org/packages/fa/2d/2154d8cb773064570f48ec0b60258a4522490fcb115a6c7c9423482ca993/cryptography-3.4.6.tar.gz" sha256 "2d32223e5b0ee02943f32b19245b61a62db83a882f0e76cc564e1cec60d48f87" end resource "entrypoints" do url "https://files.pythonhosted.org/packages/b4/ef/063484f1f9ba3081e920ec9972c96664e2edb9fdc3d8669b0e3b8fc0ad7c/entrypoints-0.3.tar.gz" sha256 "c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451" end resource "humanfriendly" do url "https://files.pythonhosted.org/packages/0d/2d/8cb8583e4dc4e44932460c88dbe1d7fde907df60589452342bc242ac7da0/humanfriendly-4.7.tar.gz" sha256 "ee071c8f6c7457db53472ae9974aaf561c95fdbe072e1f2a3ba29aaa6ca51098" end resource "idna" do url "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" end resource "isodate" do url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" end resource "jeepney" do url "https://files.pythonhosted.org/packages/bb/4f/06017fbbe94eeaf1e7852c2dd7a065ca7d813e17b4500f4e842531d72593/jeepney-0.6.0.tar.gz" sha256 "7d59b6622675ca9e993a6bd38de845051d315f8b0c72cca3aef733a20b648657" end resource "jmespath" do url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" end resource "keyring" do url "https://files.pythonhosted.org/packages/a0/c9/c08bf10bd057293ff385abaef38e7e548549bbe81e95333157684e75ebc6/keyring-13.2.1.tar.gz" sha256 "6364bb8c233f28538df4928576f4e051229e0451651073ab20b315488da16a58" end resource "knack" do url "https://files.pythonhosted.org/packages/b5/58/2ba172d2ea8babae13a2a4d3fc0be810fd067429f990e850e4088f22494e/knack-0.4.1.tar.gz" sha256 "ba45fd69c2faf91fd3d6e95cec1c0ef7e0f4362e33c59bf5a260216ffcb859a0" end resource "msrest" do url "https://files.pythonhosted.org/packages/bb/2c/e8ac4f491efd412d097d42c9eaf79bcaad698ba17ab6572fd756eb6bd8f8/msrest-0.6.21.tar.gz" sha256 "72661bc7bedc2dc2040e8f170b6e9ef226ee6d3892e01affd4d26b06474d68d8" end resource "oauthlib" do url "https://files.pythonhosted.org/packages/fc/c7/829c73c64d3749da7811c06319458e47f3461944da9d98bb4df1cb1598c2/oauthlib-3.1.0.tar.gz" sha256 "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889" end resource "pycparser" do url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" end resource "Pygments" do url "https://files.pythonhosted.org/packages/15/9d/bc9047ca1eee944cc245f3649feea6eecde3f38011ee9b8a6a64fb7088cd/Pygments-2.8.1.tar.gz" sha256 "2656e1a6edcdabf4275f9a3640db59fd5de107d88e8663c5d4e9a0fa62f77f94" end resource "python-dateutil" do url "https://files.pythonhosted.org/packages/a0/b0/a4e3241d2dee665fea11baec21389aec6886655cd4db7647ddf96c3fad15/python-dateutil-2.7.3.tar.gz" sha256 "e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8" end resource "PyYAML" do url "https://files.pythonhosted.org/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz" sha256 "607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e" end resource "requests" do url "https://files.pythonhosted.org/packages/6b/47/c14abc08432ab22dc18b9892252efaf005ab44066de871e72a38d6af464b/requests-2.25.1.tar.gz" sha256 "27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804" end resource "requests-oauthlib" do url "https://files.pythonhosted.org/packages/23/eb/68fc8fa86e0f5789832f275c8289257d8dc44dbe93fce7ff819112b9df8f/requests-oauthlib-1.3.0.tar.gz" sha256 "b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a" end resource "SecretStorage" do url "https://files.pythonhosted.org/packages/cd/08/758aeb98db87547484728ea08b0292721f1b05ff9005f59b040d6203c009/SecretStorage-3.3.1.tar.gz" sha256 "fd666c51a6bf200643495a04abb261f83229dcb6fd8472ec393df7ffc8b6f195" end resource "six" do url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" end resource "tabulate" do url "https://files.pythonhosted.org/packages/ae/3d/9d7576d94007eaf3bb685acbaaec66ff4cdeb0b18f1bf1f17edbeebffb0a/tabulate-0.8.9.tar.gz" sha256 "eb1d13f25760052e8931f2ef80aaf6045a6cceb47514db8beab24cded16f13a7" end resource "urllib3" do url "https://files.pythonhosted.org/packages/d7/8d/7ee68c6b48e1ec8d41198f694ecdc15f7596356f2ff8e6b1420300cf5db3/urllib3-1.26.3.tar.gz" sha256 "de3eedaad74a2683334e282005cd8d7f22f4d55fa690a2a1020a416cb0a47e73" end resource "vsts" do url "https://files.pythonhosted.org/packages/ce/fa/4405cdb2a6b0476a94b24254cdfb1df7ff43138a91ccc79cd6fc877177af/vsts-0.1.25.tar.gz" sha256 "da179160121f5b38be061dbff29cd2b60d5d029b2207102454d77a7114e64f97" end resource "vsts-cli-admin" do url "https://files.pythonhosted.org/packages/96/15/501240b53c6de9c81ba7c2c57e4a7227cc68eacb776a7b034178d7ffb56d/vsts-cli-admin-0.1.4.tar.gz" sha256 "d8a56dd57112a91818557043a8c1e98e26b8d9e793a448ceaa9df0439972cfd5" end resource "vsts-cli-admin-common" do url "https://files.pythonhosted.org/packages/fa/bc/13802bc886316f41f39ee47e086e60d1d2bf00b03399afbcb07bb8d3abd9/vsts-cli-admin-common-0.1.4.tar.gz" sha256 "6794d7b6d016b93e66613b84c31f67a90c2b296675b29b2ea9bbf1566e996f8a" end resource "vsts-cli-build" do url "https://files.pythonhosted.org/packages/69/8b/0b03651a621a8a1f438cbdad2023a6cf1bf83f528452ba628a33d773983f/vsts-cli-build-0.1.4.tar.gz" sha256 "e4152ead1961506371e8a17656b18bc8797034411c2b2d355b73250c86b27052" end resource "vsts-cli-build-common" do url "https://files.pythonhosted.org/packages/d9/2e/294931be3d181742362feb138084f2dfef4632aa6f9762e89c8e14b2d8a7/vsts-cli-build-common-0.1.4.tar.gz" sha256 "64fe48b944a04f2ae7df0afa9bfcd37b281d786d3558bb66c597c990f0745f08" end resource "vsts-cli-code" do url "https://files.pythonhosted.org/packages/98/ce/d2edb9adcb403b5abb76efcf6a9ae3c5e1943215a4fb1fa20062e3094853/vsts-cli-code-0.1.4.tar.gz" sha256 "2154f0769cdb694110886ef7859dda86f19c02f67d037dc592ae21772a51b938" end resource "vsts-cli-code-common" do url "https://files.pythonhosted.org/packages/63/8a/1afd03644034f2f81e912864f6f8457b7da95580e3319b45fe6e17d4dbb0/vsts-cli-code-common-0.1.4.tar.gz" sha256 "ed41220313ceb67612d6dc30596ef53cd2bbf1f55df826ca8cecd364a8a92130" end resource "vsts-cli-common" do url "https://files.pythonhosted.org/packages/d4/4e/58e5b3a1a36e2db2f032d26d3be78ef227467d69ac280f9d69d1abc514e6/vsts-cli-common-0.1.4.tar.gz" sha256 "a031ad9748b9dbd8552357b42a92363a641572fe1035540c2542b05078aa9005" end resource "vsts-cli-package" do url "https://files.pythonhosted.org/packages/2e/25/4c36f9d006c06fe0cf91694ec04ec68171492b9854e8e6ab5492c9db50c2/vsts-cli-package-0.1.4.tar.gz" sha256 "74ab09d40b2e3572518e618d0e46d227bfa3f5db999e936a04f590a4fc6ed1ec" end resource "vsts-cli-package-common" do url "https://files.pythonhosted.org/packages/26/d2/16071a391735a1d71d121fe0fb0789baedcb14192cda597027bc7538453f/vsts-cli-package-common-0.1.4.tar.gz" sha256 "07cbe4e4f6602b6ef7168a24110925433dbb357135c269952457c8c071ff877c" end resource "vsts-cli-release" do url "https://files.pythonhosted.org/packages/24/8e/245b35fc07684290628ed4cfd4e3821c8401c47091ce12f67efdc0cf81d9/vsts-cli-release-0.1.4.tar.gz" sha256 "9b82ed707da696c4708285e5f1ea4ff0f72a010c90e7c6d070267a8fb9343ca5" end resource "vsts-cli-release-common" do url "https://files.pythonhosted.org/packages/e5/2d/889686657c3d82b7768d95989fde922dddf64339735a3159848c5468f7d7/vsts-cli-release-common-0.1.4.tar.gz" sha256 "619022dd2e9092db941b6bb6dbc6958d1f5f2e6c41c67f015e181325a562e859" end resource "vsts-cli-team" do url "https://files.pythonhosted.org/packages/ed/7b/f6178e31d666257a80fd9ec8281809a4eead3de0f61c3031c4fad38f0c3c/vsts-cli-team-0.1.4.tar.gz" sha256 "ca966527eff69441d89a7aaa5758d53ab31d5d527acc064d29d72270f1b913a2" end resource "vsts-cli-team-common" do url "https://files.pythonhosted.org/packages/c6/d4/0d0d9b15d22e1a2044760152864279fc0c4054f8a0254e86529dad3fae53/vsts-cli-team-common-0.1.4.tar.gz" sha256 "57aab81b472d76ef010036ed90f7bd11fffb66c79c1991d64b0694a8b2f47c08" end resource "vsts-cli-work" do url "https://files.pythonhosted.org/packages/68/2d/547a18affb25bd1f8be2fdcec64df2a75fb5fb4377a5edd2432b522b46f6/vsts-cli-work-0.1.4.tar.gz" sha256 "dca2324f5445765a3ff4d9178d9b37c985b75e22c20660741d43ef24ac72ec74" end resource "vsts-cli-work-common" do url "https://files.pythonhosted.org/packages/36/51/d4b7accf6b9e009875f4a2c05ceba7ddd8936f99c2dde5f4308a40edc360/vsts-cli-work-common-0.1.4.tar.gz" sha256 "ec023e69d88292024e6bd5ac34b9d5913aa92c4ce148751c33fdf9da13e0d522" end resource "pycparser" do on_linux do url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz#sha256=a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" end end resource "cffi" do on_linux do url "https://files.pythonhosted.org/packages/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz#sha256=599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346" sha256 "599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346" end end resource "cryptography" do on_linux do url "https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz#sha256=3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651" sha256 "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651" end end resource "jeepney" do on_linux do url "https://files.pythonhosted.org/packages/3a/b6/28c665d48e48b5b7e6a26853d6b4595c4031de7798a6c4985b14492ebd14/jeepney-0.4.1.tar.gz#sha256=13806f91a96e9b2623fd2a81b950d763ee471454aafd9eb6d75dbe7afce428fb" sha256 "13806f91a96e9b2623fd2a81b950d763ee471454aafd9eb6d75dbe7afce428fb" end end resource "secretstorage" do on_linux do url "https://files.pythonhosted.org/packages/a6/89/df343dbc2957a317127e7ff2983230dc5336273be34f2e1911519d85aeb5/SecretStorage-3.1.1.tar.gz#sha256=20c797ae48a4419f66f8d28fc221623f11fc45b6828f96bdb1ad9990acb59f92" sha256 "20c797ae48a4419f66f8d28fc221623f11fc45b6828f96bdb1ad9990acb59f92" end end def install virtualenv_install_with_resources bin.install_symlink "#{libexec}/bin/vsts" => "vsts" end test do system "#{bin}/vsts", "configure", "--help" output = shell_output("#{bin}/vsts logout 2>&1", 1) assert_equal "ERROR: The credential was not found", output.chomp output = shell_output("#{bin}/vsts work 2>&1", 2) assert_match "vsts work: error: the following arguments are required", output end end
0x07CB/linuxbrew-core
Formula/civl.rb
class Civl < Formula desc "Concurrency Intermediate Verification Language" homepage "https://vsl.cis.udel.edu/civl/" url "https://vsl.cis.udel.edu/lib/sw/civl/1.20/r5259/release/CIVL-1.20_5259.tgz" version "1.20-5259" sha256 "15bf63b3a92300e8432e95397284e29aaa5897e405db9fc2d56cd086f9e330d3" revision 1 livecheck do url "https://vsl.cis.udel.edu/lib/sw/civl/current/latest/release/" regex(/href=.*?CIVL[._-]v?(\d+(?:[._-]\d+)+)\.t/i) end depends_on "openjdk" depends_on "z3" def install underscored_version = version.to_s.tr("-", "_") libexec.install "lib/civl-#{underscored_version}.jar" bin.write_jar_script libexec/"civl-#{underscored_version}.jar", "civl" pkgshare.install "doc", "emacs", "examples", "licenses" end test do (testpath/".sarl").write <<~EOS prover { aliases = z3; kind = Z3; version = "#{Formula["z3"].version} - 64 bit"; path = "#{Formula["z3"].opt_bin}/z3"; timeout = 10.0; showQueries = false; showInconclusives = false; showErrors = true; } EOS # Test with example suggested in manual. example = pkgshare/"examples/concurrency/locksBad.cvl" assert_match "The program MAY NOT be correct.", shell_output("#{bin}/civl verify #{example}") assert_predicate testpath/"CIVLREP/locksBad_log.txt", :exist? end end
0x07CB/linuxbrew-core
Formula/vultr.rb
<filename>Formula/vultr.rb class Vultr < Formula desc "Command-line tool for Vultr" homepage "https://jamesclonk.github.io/vultr" url "https://github.com/JamesClonk/vultr/archive/v2.0.3.tar.gz" sha256 "6529d521a7fa006808cd07331f31256e91773ec7e1a0c7839cd14884034fb185" license "MIT" head "https://github.com/JamesClonk/vultr.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "d0d5bffa07a97813ca4eece9a0e396d8a0c76fdd738d5041ad5d82385cb05dda" sha256 cellar: :any_skip_relocation, big_sur: "e7a764a5516eaf4923bd134a85f2a6a9c4f2b9537ff7b585e8a32a6581975cab" sha256 cellar: :any_skip_relocation, catalina: "b3fb6e155013b41bd2b48202e70ef0236be3e24b3f87cf1f1234e7a09e2e7e97" sha256 cellar: :any_skip_relocation, mojave: "7348b1e615d088dc03781613b17b7187827e9cc98e743fa472c617876f6a543a" sha256 cellar: :any_skip_relocation, x86_64_linux: "<KEY>" # linuxbrew-core end depends_on "go" => :build def install system "go", "build", *std_go_args, "-ldflags", "-s -w" end test do system bin/"vultr", "version" end end
0x07CB/linuxbrew-core
Formula/pycodestyle.rb
<reponame>0x07CB/linuxbrew-core<filename>Formula/pycodestyle.rb class Pycodestyle < Formula desc "Simple Python style checker in one Python file" homepage "https://pycodestyle.pycqa.org/" url "https://github.com/PyCQA/pycodestyle/archive/2.7.0.tar.gz" sha256 "5651c4b981bb0620e6ffb6a94dd6a68ec7fdcbd88c3219e5a976424692700f56" license "MIT" head "https://github.com/PyCQA/pycodestyle.git", branch: "master" def install bin.install "pycodestyle.py" => "pycodestyle" end test do # test invocation on a file with no issues (testpath/"ok.py").write <<~EOS print(1) EOS assert_equal "", shell_output("#{bin}/pycodestyle ok.py") # test invocation on a file with a whitespace style issue (testpath/"ws.py").write <<~EOS print( 1) EOS assert_equal "ws.py:1:7: E201 whitespace after '('\n", shell_output("#{bin}/pycodestyle ws.py", 1) # test invocation on a file with an import not at top of file (testpath/"imp.py").write <<~EOS pass import sys EOS assert_equal "imp.py:2:1: E402 module level import not at top of file\n", shell_output("#{bin}/pycodestyle imp.py", 1) end end
0x07CB/linuxbrew-core
Formula/haproxy.rb
<filename>Formula/haproxy.rb<gh_stars>100-1000 class Haproxy < Formula desc "Reliable, high performance TCP/HTTP load balancer" homepage "https://www.haproxy.org/" url "https://www.haproxy.org/download/2.4/src/haproxy-2.4.4.tar.gz" sha256 "116b7329cebee5dab8ba47ad70feeabd0c91680d9ef68c28e41c34869920d1fe" license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } livecheck do url :homepage regex(/href=.*?haproxy[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any, arm64_big_sur: "e1e24392d118cd35036025eed2656a67a60d8186186223f1f905f2eff9dc28b1" sha256 cellar: :any, big_sur: "1c67308e8de1869bbe5c923e29ace14f32c28741086221a5853584be0438be21" sha256 cellar: :any, catalina: "94a4dfcd3c2b0cf50ca476ee6c3eefb09e603d9305bf4353b1589c0aa530a57b" sha256 cellar: :any, mojave: "3c51e2be80e2f57948ff6d23b8b954e7a32261b57d3da3e136b2367b5d2a760e" sha256 cellar: :any_skip_relocation, x86_64_linux: "d7c8dcf12200833be51a117599d05325d69a384646a31695cff659d43f2450f4" # linuxbrew-core end depends_on "openssl@1.1" depends_on "pcre" uses_from_macos "zlib" def install args = %w[ USE_POLL=1 USE_PCRE=1 USE_OPENSSL=1 USE_THREAD=1 USE_ZLIB=1 ADDLIB=-lcrypto ] if OS.mac? args << "TARGET=generic" # BSD only: args << "USE_KQUEUE=1" else args << "TARGET=linux-glibc" end # We build generic since the Makefile.osx doesn't appear to work system "make", *args man1.install "doc/haproxy.1" bin.install "haproxy" end service do run [opt_bin/"haproxy", "-f", etc/"haproxy.cfg"] keep_alive true log_path var/"log/haproxy.log" error_log_path var/"log/haproxy.log" end test do system bin/"haproxy", "-v" end end
0x07CB/linuxbrew-core
Formula/yasm.rb
<filename>Formula/yasm.rb class Yasm < Formula desc "Modular BSD reimplementation of NASM" homepage "https://yasm.tortall.net/" url "https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz" mirror "https://ftp.openbsd.org/pub/OpenBSD/distfiles/yasm-1.3.0.tar.gz" sha256 "3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f" revision 2 bottle do rebuild 1 sha256 cellar: :any_skip_relocation, arm64_big_sur: "398b7f3d8a22e43b5af2335fe2d39448a3e9cc7a769ef1faf60c25fda0873d50" sha256 cellar: :any_skip_relocation, big_sur: "ca95cb3c02508796ff4e60d54146b03016b93e80837916359912ebf737a37562" sha256 cellar: :any_skip_relocation, catalina: "9aa61930f25fe305dc5364e72f539b0a225702b5f1dc222a9dde1216e901f7ab" sha256 cellar: :any_skip_relocation, mojave: "0dc797b72ee3bad9c6a52276c871ac745207b5626722e805fa642d7a872847fc" sha256 cellar: :any_skip_relocation, high_sierra: "7f31deeff91c5929f2cd52eca6b636669f9c8966f6d4777e89fa4b04e541ad85" sha256 cellar: :any_skip_relocation, x86_64_linux: "150f48e9cf55d8bd0c2f37cdc792c35ea0bd14973b82e56ea93248dbbe0f7ff1" # linuxbrew-core end head do url "https://github.com/yasm/yasm.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "gettext" end def install args = %W[ --disable-debug --prefix=#{prefix} --disable-python ] # https://github.com/Homebrew/legacy-homebrew/pull/19593 ENV.deparallelize system "./autogen.sh" if build.head? system "./configure", *args system "make", "install" end test do (testpath/"foo.s").write <<~EOS mov eax, 0 mov ebx, 0 int 0x80 EOS system "#{bin}/yasm", "foo.s" code = File.open("foo", "rb") { |f| f.read.unpack("C*") } expected = [0x66, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x66, 0xbb, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x80] assert_equal expected, code on_macos do (testpath/"test.asm").write <<~EOS global start section .text start: mov rax, 0x2000004 ; write mov rdi, 1 ; stdout mov rsi, qword msg mov rdx, msg.len syscall mov rax, 0x2000001 ; exit mov rdi, 0 syscall section .data msg: db "Hello, world!", 10 .len: equ $ - msg EOS system "#{bin}/yasm", "-f", "macho64", "test.asm" system "/usr/bin/ld", "-macosx_version_min", "10.8.0", "-static", "-o", "test", "test.o" end on_linux do (testpath/"test.asm").write <<~EOS global _start section .text _start: mov rax, 1 mov rdi, 1 mov rsi, msg mov rdx, msg.len syscall mov rax, 60 mov rdi, 0 syscall section .data msg: db "Hello, world!", 10 .len: equ $ - msg EOS system "#{bin}/yasm", "-f", "elf64", "test.asm" system "/usr/bin/ld", "-static", "-o", "test", "test.o" end assert_equal "Hello, world!\n", shell_output("./test") end end
0x07CB/linuxbrew-core
Formula/fann.rb
class Fann < Formula desc "Fast artificial neural network library" homepage "https://sourceforge.net/projects/fann" url "https://downloads.sourceforge.net/project/fann/fann/2.2.0/FANN-2.2.0-Source.tar.gz" sha256 "3d6ee056dab91f3b34a3f233de6a15331737848a4cbdb4e0552123d95eed4485" license "LGPL-2.1-or-later" bottle do sha256 cellar: :any, arm64_big_sur: "2fc8447731fd2a1c7f4957b55e3906041796fd5c9c528c611048f48558e644fc" sha256 cellar: :any, big_sur: "4d7d975ad6d820ce4938ba6235881b11cfebb93ad8f5ac4cb5dabf2356f2ffa0" sha256 cellar: :any, catalina: "61d506a68652f81b0f93120b7ed1fb049510f18381e35a52abe52f0170e589a6" sha256 cellar: :any, mojave: "f4ff7eaa67aad30f4c544b3c9e20d4b4f9204807d97b900004ec65a27a2b6175" sha256 cellar: :any_skip_relocation, x86_64_linux: "1596e86f9b80da14fc97d5841253dc22c3ffe2e47991ef0c161d4512ef72f65d" # linuxbrew-core end depends_on "cmake" => :build def install system "cmake", "-S", ".", "-B", "build", *std_cmake_args system "cmake", "--build", "build" system "cmake", "--install", "build" end test do (testpath/"xor.data").write <<~EOS 4 2 1 -1 -1 -1 -1 1 1 1 -1 1 1 1 -1 EOS desired_error = 0.001 max_epochs = 500000 (testpath/"test.c").write <<~EOS #include <fann.h> int main() { const unsigned int num_input = 2; const unsigned int num_output = 1; const unsigned int num_layers = 3; const unsigned int num_neurons_hidden = 3; const float desired_error = (const float) #{desired_error}; const unsigned int max_epochs = #{max_epochs}; const unsigned int epochs_between_reports = 1000; struct fann *ann = fann_create_standard(num_layers, num_input, num_neurons_hidden, num_output); fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC); fann_set_activation_function_output(ann, FANN_SIGMOID_SYMMETRIC); fann_train_on_file(ann, "xor.data", max_epochs, epochs_between_reports, desired_error); fann_save(ann, "xor_float.net"); fann_destroy(ann); return 0; } EOS system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lfann", "-lm", "-o", "test" output = shell_output(testpath/"test") epoch, error = output.lines.last.match(/Epochs\s+(\d+)\.\s+Current error:\s+(\d+\.\d+)\. Bit fail 0\./).captures assert epoch.to_i <= max_epochs assert error.to_f <= desired_error assert_predicate testpath/"xor_float.net", :exist? end end
0x07CB/linuxbrew-core
Formula/unyaffs.rb
class Unyaffs < Formula desc "Extract files from a YAFFS2 filesystem image" homepage "https://www.b-ehlers.de/projects/unyaffs.html" url "https://git.b-ehlers.de/ehlers/unyaffs/archive/0.9.7.tar.gz" sha256 "792d18c3866910e25026aaa9dcfdec4b67bca7453ce5b2474d1ce8e9d31b2c69" license "GPL-2.0-only" head "https://git.b-ehlers.de/ehlers/unyaffs.git" bottle do rebuild 3 sha256 cellar: :any_skip_relocation, arm64_big_sur: "d5516a71d691f78f1efb0d7f12f2a8ab2b4500ad2a9c1e1ccd5ace316111a1a1" sha256 cellar: :any_skip_relocation, big_sur: "54982f10cb8c866e7370886765744c109f3566717f7af6f397e8a83a7ca65520" sha256 cellar: :any_skip_relocation, catalina: "0319fb2b8ee918808e30a0bb5deef42abaf7d4afe35cff538b4ed513f06de16e" sha256 cellar: :any_skip_relocation, mojave: "1c3b921af84a9fee0bb8faf7d420ff2a3d6e6a4e42aeec235d8587a8ccd5da61" sha256 cellar: :any_skip_relocation, x86_64_linux: "87fe812b32d400d209db224005c40e7dd5f0c43d6147f4800b415a19f128a1ea" # linuxbrew-core end def install system "make" bin.install "unyaffs" end test do assert_match version.to_s, shell_output("#{bin}/unyaffs -V") end end
0x07CB/linuxbrew-core
Formula/emacs-dracula.rb
<reponame>0x07CB/linuxbrew-core class EmacsDracula < Formula desc "Dark color theme available for a number of editors" homepage "https://github.com/dracula/emacs" url "https://github.com/dracula/emacs/archive/v1.7.0.tar.gz" sha256 "dbbcc968cf8187a8ada9f040137ba03dc0e51b285e96e128d26cea05cf470330" license "MIT" head "https://github.com/dracula/emacs.git" depends_on "emacs" def install elisp.install "dracula-theme.el" end test do system "emacs", "--batch", "--debug-init", "-l", "#{share}/emacs/site-lisp/emacs-dracula/dracula-theme.el" end end
0x07CB/linuxbrew-core
Formula/sgrep.rb
<reponame>0x07CB/linuxbrew-core<filename>Formula/sgrep.rb class Sgrep < Formula desc "Search SGML, XML, and HTML" homepage "https://www.cs.helsinki.fi/u/jjaakkol/sgrep.html" url "https://www.cs.helsinki.fi/pub/Software/Local/Sgrep/sgrep-1.94a.tar.gz" mirror "https://fossies.org/linux/misc/old/sgrep-1.94a.tar.gz" sha256 "d5b16478e3ab44735e24283d2d895d2c9c80139c95228df3bdb2ac446395faf9" # The current formula version (1.94a) is an alpha version, so this regex # has to allow for unstable versions. If/when a new stable version after 0.99 # ever appears, the optional `[a-z]?` part of this regex should be removed, # so it will only match stable versions. livecheck do url "https://www.cs.helsinki.fi/pub/Software/Local/Sgrep/" regex(/href=.*?sgrep[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) end bottle do rebuild 1 sha256 cellar: :any_skip_relocation, big_sur: "fedcff86ec032617015882c5729298bbe1f1fcbda14cdde6167b00ae2af586b8" sha256 cellar: :any_skip_relocation, catalina: "29e528a52ae36131ded52bb08d9cf9b12b1455fbc715f7b7bbd3b97f637862e5" sha256 cellar: :any_skip_relocation, mojave: "bfb1f484dd474727fec463b1b90ffe7250f5c82e0e65bec96903e38f6e0a8e48" sha256 cellar: :any_skip_relocation, high_sierra: "a243589e79a4cde4f7bba21ec618e3c323c049589707bde6e2c20c4bf1014464" sha256 cellar: :any_skip_relocation, x86_64_linux: "ff024211da0c2b68e6f037a286c40c812d040aeb1c1bd1fda04791576d1f980e" # linuxbrew-core end uses_from_macos "m4" def install system "./configure", "--prefix=#{prefix}", "--mandir=#{man}", "--datadir=#{pkgshare}" system "make", "install" end test do input = test_fixtures("test.eps") assert_equal "2", shell_output("#{bin}/sgrep -c '\"mark\"' #{input}").strip end end
0x07CB/linuxbrew-core
Formula/apache-opennlp.rb
class ApacheOpennlp < Formula desc "Machine learning toolkit for processing natural language text" homepage "https://opennlp.apache.org/" url "https://www.apache.org/dyn/closer.lua?path=opennlp/opennlp-1.9.3/apache-opennlp-1.9.3-bin.tar.gz" mirror "https://archive.apache.org/dist/opennlp/opennlp-1.9.3/apache-opennlp-1.9.3-bin.tar.gz" sha256 "935eb148e3b5c5d60f80fe27d9b9de5640d385bbe2c59b046ab669375ccc4350" license "Apache-2.0" depends_on "openjdk" def install libexec.install Dir["*"] (bin/"opennlp").write_env_script libexec/"bin/opennlp", JAVA_HOME: Formula["openjdk"].opt_prefix end test do assert_equal "Hello , friends", pipe_output("#{bin}/opennlp SimpleTokenizer", "Hello, friends").lines.first.chomp end end
0x07CB/linuxbrew-core
Formula/g2o.rb
<reponame>0x07CB/linuxbrew-core class G2o < Formula desc "General framework for graph optimization" homepage "https://openslam-org.github.io/g2o.html" url "https://github.com/RainerKuemmerle/g2o/archive/refs/tags/20201223_git.tar.gz" version "20201223" sha256 "20af80edf8fd237e29bd21859b8fc734e615680e8838824e8b3f120c5f4c1672" license "BSD-2-Clause" bottle do sha256 cellar: :any, arm64_big_sur: "161de612759ffe32652d1eac931b72f8f3c7d1a9807acd9e7215459430df3eec" sha256 cellar: :any, big_sur: "b99527b4e0670ced76af5ad443df1b83d3c3a16a84b9a834be849336e76d99fc" sha256 cellar: :any, catalina: "8d8d1b729449d5f6e5afd9ef70aa2531e75e60f2a3208dcfdf00ca3097e146c4" sha256 cellar: :any, mojave: "92c77224cffd95acface4d59aeb65a8e4330059c7c183ca4cd8df7fb90be9ffd" end depends_on "cmake" => :build depends_on "eigen" resource "testdata" do url "https://raw.githubusercontent.com/OpenSLAM-org/openslam_g2o/2362b9e1e9dab318625cd0af9ba314c47ba8de48/data/2d/intel/intel.g2o" sha256 "4d87aaf96e1e04e47c723c371386b15358c71e98c05dad16b786d585f9fd70ff" end def install cmake_args = std_cmake_args + %w[-DG2O_BUILD_EXAMPLES=OFF] # For Intel: manually set desired SSE features to enable support for older machines. # See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html for supported CPU features if Hardware::CPU.intel? cmake_args << "-DDO_SSE_AUTODETECT=OFF" case Hardware.oldest_cpu when :nehalem cmake_args += %w[-DDISABLE_SSE4_A=ON] when :core2 cmake_args += %w[-DDISABLE_SSE4_1=ON -DDISABLE_SSE4_2=ON -DDISABLE_SSE4_A=ON] else odie "Unexpected oldest supported CPU \"#{Hardware.oldest_cpu}\"" end end system "cmake", "-S", ".", "-B", "build", *cmake_args # Avoid references to Homebrew shims inreplace "build/g2o/config.h", Superenv.shims_path/ENV.cxx, ENV.cxx system "cmake", "--build", "build" system "cmake", "--install", "build" (pkgshare/"examples").install "g2o/examples/simple_optimize" end test do cp_r pkgshare/"examples/simple_optimize", testpath/"src" libs = %w[-lg2o_core -lg2o_solver_eigen -lg2o_stuff -lg2o_types_slam2d -lg2o_types_slam3d] cd "src" do system ENV.cxx, "simple_optimize.cpp", "-I#{opt_include}", "-I#{Formula["eigen"].opt_include}/eigen3", "-L#{opt_lib}", *libs, "-std=c++11", "-o", testpath/"simple_optimize" end resource("testdata").stage do last_output = shell_output(testpath/"simple_optimize intel.g2o 2>&1").lines.last assert_match("edges= 1837", last_output) end end end
0x07CB/linuxbrew-core
Formula/slacknimate.rb
<gh_stars>100-1000 class Slacknimate < Formula desc "Text animation for Slack messages" homepage "https://github.com/mroth/slacknimate" url "https://github.com/mroth/slacknimate/archive/v1.1.0.tar.gz" sha256 "71c7a65192c8bbb790201787fabbb757de87f8412e0d41fe386c6b4343cb845c" license "MPL-2.0" head "https://github.com/mroth/slacknimate.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "35f24a47ca03293bec53b2b622cc1c6f0a012b5c674c0fea83a79795474caefb" sha256 cellar: :any_skip_relocation, big_sur: "d8120fd0cedd32b5be89ff29f2eed08d060a810820cfc23f6f74e1c7201ff5ad" sha256 cellar: :any_skip_relocation, catalina: "52bd6b01115cb8e84d3479ff6dea669a98b17b60cc6090b3384ac44fdcbdd93a" sha256 cellar: :any_skip_relocation, mojave: "28f1871e38987c5b06e0666f172d0eefb9e6895ea8207a0ad171d467a2df7f7a" sha256 cellar: :any_skip_relocation, high_sierra: "6849d5acbe802d8fb69007f144bba62a9c259a9093ccc920fb9a200edc9368fa" sha256 cellar: :any_skip_relocation, x86_64_linux: "b49bd7127b239f51b2ce97cf4eb42979555f3251e0218fd1e9234128ed9b9e9c" # linuxbrew-core end depends_on "go" => :build def install system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", *std_go_args, "./cmd/slacknimate" end test do system "#{bin}/slacknimate", "--version" system "#{bin}/slacknimate", "--help" end end
0x07CB/linuxbrew-core
Formula/libfreenect.rb
class Libfreenect < Formula desc "Drivers and libraries for the Xbox Kinect device" homepage "https://openkinect.org/" url "https://github.com/OpenKinect/libfreenect/archive/v0.6.2.tar.gz" sha256 "e135f5e60ae290bf1aa403556211f0a62856a9e34f12f12400ec593620a36bfa" license any_of: ["Apache-2.0", "GPL-2.0-only"] head "https://github.com/OpenKinect/libfreenect.git" bottle do sha256 cellar: :any, arm64_big_sur: "30cae9ff39f3c3416e157532e50781a61c576b2efe2f30c30f7f7cd02d458d93" sha256 cellar: :any, big_sur: "7e7be2792089b91924578ffa29711185ab7ae4b20e3d9489fe6c39bb97436867" sha256 cellar: :any, catalina: "cdf0630222750f1a4281159cbc161601eb5d02487632b647940af4503e557ebb" sha256 cellar: :any, mojave: "5c5d2b1b69179658fec4c9a0e65b3132e69b32f0214ad4a09a75cbf7db1ed9f3" sha256 cellar: :any_skip_relocation, x86_64_linux: "977d12eb32c3e68f43e6c0ef625e2ed62814ba9b4eaf2f06af7cfb2abb18bd0d" # linuxbrew-core end depends_on "cmake" => :build depends_on "libusb" def install mkdir "build" do system "cmake", "..", *std_cmake_args, "-DBUILD_OPENNI2_DRIVER=ON" system "make", "install" end end test do system bin/"fakenect-record", "-h" end end
0x07CB/linuxbrew-core
Formula/cf.rb
<gh_stars>100-1000 class Cf < Formula desc "Filter to replace numeric timestamps with a formatted date time" homepage "https://ee.lbl.gov/" url "https://ee.lbl.gov/downloads/cf/cf-1.2.5.tar.gz" sha256 "ef65e9eb57c56456dfd897fec12da8617c775e986c23c0b9cbfab173b34e5509" livecheck do url "https://ee.lbl.gov/downloads/cf/" regex(/href=.*?cf[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "0ef3f980b358bb74cba8de7e264897d61e16f5e2cda94ca9c4219dcbb8c9307d" sha256 cellar: :any_skip_relocation, big_sur: "3919568fde666b68d1504741a9c4436bcd60f171fd445e378a718534889b98af" sha256 cellar: :any_skip_relocation, catalina: "14a240b51f627599ebd4cbbffc27c52d40790c6537f91f20d978d6054e62571b" sha256 cellar: :any_skip_relocation, mojave: "0cbd888d1a69516d55ce6572208b6adbdcbe9df7195199ac5d6e678e3e794f85" sha256 cellar: :any_skip_relocation, high_sierra: "b94cceb52c7da6995ed4acd014350e6d9b1dbeb7d03b0c8f2256a12e7f520b01" sha256 cellar: :any_skip_relocation, sierra: "5f37fd5ff05bdc66d21e9006f8907f1d19c92743bdffc2a5463251f6f681bd20" sha256 cellar: :any_skip_relocation, el_capitan: "658dbcf6f4868922582db207b8713c8a9009bc99d3d976866ecfacbb9f95dfd5" sha256 cellar: :any_skip_relocation, yosemite: "4b4d294a9bd632f4daa07e643f7e33e3ffcf419d4df76c6656d2c688795f0d3c" sha256 cellar: :any_skip_relocation, x86_64_linux: "3b47e2cebacba554b75bfe7e7caecd4068b25306d27032e8505e20f664c7289c" # linuxbrew-core end def install system "./configure", "--prefix=#{prefix}" system "make" bin.mkpath man1.mkpath system "make", "install" system "make", "install-man" end test do assert_match "Jan 20 00:35:44", shell_output("echo 1074558944 | #{bin}/cf -u") end end
0x07CB/linuxbrew-core
Formula/nbdime.rb
<gh_stars>100-1000 class Nbdime < Formula include Language::Python::Virtualenv desc "Jupyter Notebook Diff and Merge tools" homepage "https://nbdime.readthedocs.io" url "https://files.pythonhosted.org/packages/b5/22/28dc0e5e34255d17a47f3050d9a02ce783ab72b32db0b6c9cb5a38c367de/nbdime-3.1.0.tar.gz" sha256 "12dc4390b355b26d07ac8d11d50efbcb54bae0ad5842b817131babd2f4567963" license "BSD-3-Clause" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "4b4bee1948bc2e4764831da2c9357c88b032b4c0cc53b43e7d0e131a47dfac86" sha256 cellar: :any_skip_relocation, big_sur: "0c6fc1c5b6e79e43fa19c7e6c3a474521ad18002f9935c5b167fca9e3ca13df8" sha256 cellar: :any_skip_relocation, catalina: "4456f9f5bd2767f91ab6d90f972f53764aa4067a9c3aced8909050e0ee34dbfe" sha256 cellar: :any_skip_relocation, mojave: "65156cbffc95dcf2c13ce2e75012cd38fa1e00abacee28631112eb01b2adc426" sha256 cellar: :any_skip_relocation, x86_64_linux: "803d59894aa9bd319a1df1263888eaee824942854b3c71d026ec739594e085ac" # linuxbrew-core end depends_on "python@3.9" on_macos do resource "appnope" do url "https://files.pythonhosted.org/packages/26/34/0f3a5efac31f27fabce64645f8c609de9d925fe2915304d1a40f544cff0e/appnope-0.1.0.tar.gz" sha256 "8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71" end end resource "anyio" do url "https://files.pythonhosted.org/packages/58/92/29df8cc2d38a54c1db0074bc745109b30edbcccf3ebac7c3c82c63cd692c/anyio-3.3.0.tar.gz" sha256 "ae57a67583e5ff8b4af47666ff5651c3732d45fd26c929253748e796af860374" end resource "argon2-cffi" do url "https://files.pythonhosted.org/packages/74/fd/d78e003a79c453e8454197092fce9d1c6099445b7e7da0b04eb4fe1dbab7/argon2-cffi-20.1.0.tar.gz" sha256 "d8029b2d3e4b4cea770e9e5a0104dd8fa185c1724a0f01528ae4826a6d25f97d" end resource "async_generator" do url "https://files.pythonhosted.org/packages/ce/b6/6fa6b3b598a03cba5e80f829e0dadbb49d7645f523d209b2fb7ea0bbb02a/async_generator-1.10.tar.gz" sha256 "6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144" end resource "attrs" do url "https://files.pythonhosted.org/packages/ed/d6/3ebca4ca65157c12bd08a63e20ac0bdc21ac7f3694040711f9fd073c0ffb/attrs-21.2.0.tar.gz" sha256 "ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb" end resource "bleach" do url "https://files.pythonhosted.org/packages/ed/0c/0acbc89b1c229f5bb1b89b63af4ad60a49603a7933e2939f4e6cdbe00e14/bleach-4.0.0.tar.gz" sha256 "ffa9221c6ac29399cc50fcc33473366edd0cf8d5e2cbbbb63296dc327fb67cc8" end resource "certifi" do url "https://files.pythonhosted.org/packages/6d/78/f8db8d57f520a54f0b8a438319c342c61c22759d8f9a1cd2e2180b5e5ea9/certifi-2021.5.30.tar.gz" sha256 "2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee" end resource "cffi" do url "https://files.pythonhosted.org/packages/2e/92/87bb61538d7e60da8a7ec247dc048f7671afe17016cd0008b3b710012804/cffi-1.14.6.tar.gz" sha256 "c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd" end resource "charset-normalizer" do url "https://files.pythonhosted.org/packages/e7/4e/2af0238001648ded297fb54ceb425ca26faa15b341b4fac5371d3938666e/charset-normalizer-2.0.4.tar.gz" sha256 "f23667ebe1084be45f6ae0538e4a5a865206544097e4e8bbcacf42cd02a348f3" end resource "colorama" do url "https://files.pythonhosted.org/packages/1f/bb/5d3246097ab77fa083a61bd8d3d527b7ae063c7d8e8671b1cf8c4ec10cbe/colorama-0.4.4.tar.gz" sha256 "5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b" end resource "defusedxml" do url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" end resource "entrypoints" do url "https://files.pythonhosted.org/packages/b4/ef/063484f1f9ba3081e920ec9972c96664e2edb9fdc3d8669b0e3b8fc0ad7c/entrypoints-0.3.tar.gz" sha256 "c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451" end resource "gitdb" do url "https://files.pythonhosted.org/packages/34/fe/9265459642ab6e29afe734479f94385870e8702e7f892270ed6e52dd15bf/gitdb-4.0.7.tar.gz" sha256 "96bf5c08b157a666fec41129e6d327235284cca4c81e92109260f353ba138005" end resource "GitPython" do url "https://files.pythonhosted.org/packages/ed/6a/c45c610dab3259d7059f028e34e1e708d5fe2bda886dc1f1564083339316/GitPython-3.1.20.tar.gz" sha256 "df0e072a200703a65387b0cfdf0466e3bab729c0458cf6b7349d0e9877636519" end resource "idna" do url "https://files.pythonhosted.org/packages/cb/38/4c4d00ddfa48abe616d7e572e02a04273603db446975ab46bbcd36552005/idna-3.2.tar.gz" sha256 "467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3" end resource "ipython_genutils" do url "https://files.pythonhosted.org/packages/e8/69/fbeffffc05236398ebfcfb512b6d2511c622871dca1746361006da310399/ipython_genutils-0.2.0.tar.gz" sha256 "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" end resource "Jinja2" do url "https://files.pythonhosted.org/packages/39/11/8076571afd97303dfeb6e466f27187ca4970918d4b36d5326725514d3ed3/Jinja2-3.0.1.tar.gz" sha256 "703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4" end resource "jsonschema" do url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" end resource "jupyter-client" do url "https://files.pythonhosted.org/packages/11/ef/d93cd8446f240fe9f332963eaf0766ea366d5536f8d7b50cd54bc4f39402/jupyter_client-6.2.0.tar.gz" sha256 "e2ab61d79fbf8b56734a4c2499f19830fbd7f6fefb3e87868ef0545cb3c17eb9" end resource "jupyter-core" do url "https://files.pythonhosted.org/packages/24/9a/0ca76ccc95eeb3ee376c671e81bda2c61d148c7627443004d1ba0d085b80/jupyter_core-4.7.1.tar.gz" sha256 "79025cb3225efcd36847d0840f3fc672c0abd7afd0de83ba8a1d3837619122b4" end resource "jupyter-server" do url "https://files.pythonhosted.org/packages/93/13/fbcf7e678b9eeedda0899a9b77bb93ad49b96cf05065cf3a1f3b312927ab/jupyter_server-1.10.2.tar.gz" sha256 "d3a3b68ebc6d7bfee1097f1712cf7709ee39c92379da2cc08724515bb85e72bf" end resource "jupyter-server-mathjax" do url "https://files.pythonhosted.org/packages/f1/6f/aaa531dfcfd5b2179184beccf246401db7fe6d860a77993daf471fc14594/jupyter_server_mathjax-0.2.3.tar.gz" sha256 "564e8d1272019c6771208f577b5f9f2b3afb02b9e2bff3b34c042cef8ed84451" end resource "jupyterlab-pygments" do url "https://files.pythonhosted.org/packages/d1/79/3677d138eeacbba7cf6d0e51e6b8c094448329f7b8a523a5d2599bc898e7/jupyterlab_pygments-0.1.2.tar.gz" sha256 "cfcda0873626150932f438eccf0f8bf22bfa92345b814890ab360d666b254146" end resource "MarkupSafe" do url "https://files.pythonhosted.org/packages/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e/MarkupSafe-2.0.1.tar.gz" sha256 "594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a" end resource "mistune" do url "https://files.pythonhosted.org/packages/2d/a4/509f6e7783ddd35482feda27bc7f72e65b5e7dc910eca4ab2164daf9c577/mistune-0.8.4.tar.gz" sha256 "59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e" end resource "nbclient" do url "https://files.pythonhosted.org/packages/11/95/894f0f5e1671ffce42d22400717058c0a5e37d288a55427ef6ec605f1db6/nbclient-0.5.3.tar.gz" sha256 "db17271330c68c8c88d46d72349e24c147bb6f34ec82d8481a8f025c4d26589c" end resource "nbconvert" do url "https://files.pythonhosted.org/packages/ad/4f/8c5575d08ef16d8fc02caf2ef940ef6ca5f5eedf48a14bcb97f507d52b87/nbconvert-6.1.0.tar.gz" sha256 "d22a8ff202644d31db254d24d52c3a96c82156623fcd7c7f987bba2612303ec9" end resource "nbformat" do url "https://files.pythonhosted.org/packages/e5/bd/847367dcc514b198936a3de8bfaeda1935e67ce369bf0b3e7f3ed4616ae8/nbformat-5.1.3.tar.gz" sha256 "b516788ad70771c6250977c1374fcca6edebe6126fd2adb5a69aa5c2356fd1c8" end resource "nest-asyncio" do url "https://files.pythonhosted.org/packages/ad/82/2fdf6a92eed4ddf5e9d9a735d019af1ef3a56f084d9549972b2527a43a48/nest_asyncio-1.5.1.tar.gz" sha256 "afc5a1c515210a23c461932765691ad39e8eba6551c055ac8d5546e69250d0aa" end resource "packaging" do url "https://files.pythonhosted.org/packages/df/86/aef78bab3afd461faecf9955a6501c4999933a48394e90f03cd512aad844/packaging-21.0.tar.gz" sha256 "7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7" end resource "pandocfilters" do url "https://files.pythonhosted.org/packages/28/78/bd59a9adb72fa139b1c9c186e6f65aebee52375a747e4b6a6dcf0880956f/pandocfilters-1.4.3.tar.gz" sha256 "bc63fbb50534b4b1f8ebe1860889289e8af94a23bff7445259592df25a3906eb" end resource "prometheus-client" do url "https://files.pythonhosted.org/packages/a1/90/7f1a14c2d0638e1a6981612171881733ef015cbabbded709ac3ab3d2920a/prometheus_client-0.11.0.tar.gz" sha256 "3a8baade6cb80bcfe43297e33e7623f3118d660d41387593758e2fb1ea173a86" end resource "ptyprocess" do url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" end resource "pycparser" do url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" end resource "Pygments" do url "https://files.pythonhosted.org/packages/ba/6e/7a7c13c21d8a4a7f82ccbfe257a045890d4dbf18c023f985f565f97393e3/Pygments-2.9.0.tar.gz" sha256 "a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f" end resource "pyparsing" do url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" end resource "pyrsistent" do url "https://files.pythonhosted.org/packages/f4/d7/0fa558c4fb00f15aabc6d42d365fcca7a15fcc1091cd0f5784a14f390b7f/pyrsistent-0.18.0.tar.gz" sha256 "773c781216f8c2900b42a7b638d5b517bb134ae1acbebe4d1e8f1f41ea60eb4b" end resource "python-dateutil" do url "https://files.pythonhosted.org/packages/4c/c4/13b4776ea2d76c115c1d1b84579f3764ee6d57204f6be27119f13a61d0a9/python-dateutil-2.8.2.tar.gz" sha256 "0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86" end resource "pyzmq" do url "https://files.pythonhosted.org/packages/d6/67/98d0d6ac5c784190a0f9728410902471552cffc78cef37830cd86b9cd70d/pyzmq-22.2.1.tar.gz" sha256 "6d18c76676771fd891ca8e0e68da0bbfb88e30129835c0ade748016adb3b6242" end resource "requests" do url "https://files.pythonhosted.org/packages/e7/01/3569e0b535fb2e4a6c384bdbed00c55b9d78b5084e0fb7f4d0bf523d7670/requests-2.26.0.tar.gz" sha256 "b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7" end resource "requests-unixsocket" do url "https://files.pythonhosted.org/packages/4d/ce/78b651fe0adbd4227578fa432d1bde03b4f4945a70c81e252a2b6a2d895f/requests-unixsocket-0.2.0.tar.gz" sha256 "9e5c1a20afc3cf786197ae59c79bcdb0e7565f218f27df5f891307ee8817c1ea" end resource "Send2Trash" do url "https://files.pythonhosted.org/packages/49/2c/d990b8d5a7378dde856f5a82e36ed9d6061b5f2d00f39dc4317acd9538b4/Send2Trash-1.8.0.tar.gz" sha256 "d2c24762fd3759860a0aff155e45871447ea58d2be6bdd39b5c8f966a0c99c2d" end resource "six" do url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" end resource "smmap" do url "https://files.pythonhosted.org/packages/dd/d4/2b4f196171674109f0fbb3951b8beab06cd0453c1b247ec0c4556d06648d/smmap-4.0.0.tar.gz" sha256 "7e65386bd122d45405ddf795637b7f7d2b532e7e401d46bbe3fb49b9986d5182" end resource "sniffio" do url "https://files.pythonhosted.org/packages/a6/ae/44ed7978bcb1f6337a3e2bef19c941de750d73243fc9389140d62853b686/sniffio-1.2.0.tar.gz" sha256 "c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de" end resource "terminado" do url "https://files.pythonhosted.org/packages/79/ef/f2c8152a845278b84284fbbeb8a3bef0d8eb4b12ab211e3fec327132ef56/terminado-0.11.0.tar.gz" sha256 "1e01183885f64c1bba3cf89a5a995ad4acfed4e5f00aebcce1bf7f089b0825a1" end resource "testpath" do url "https://files.pythonhosted.org/packages/dd/bf/245f32010f761aaeff132278e91e0d0ae1c360d6f3708a11790fdc1410d2/testpath-0.5.0.tar.gz" sha256 "1acf7a0bcd3004ae8357409fc33751e16d37ccc650921da1094a86581ad1e417" end resource "tornado" do url "https://files.pythonhosted.org/packages/cf/44/cc9590db23758ee7906d40cacff06c02a21c2a6166602e095a56cbf2f6f6/tornado-6.1.tar.gz" sha256 "33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791" end resource "traitlets" do url "https://files.pythonhosted.org/packages/b8/24/e6dfe45ecfc4c2b0d6774565e631dc1b9e50de2c3536625d377963d56cae/traitlets-5.0.5.tar.gz" sha256 "178f4ce988f69189f7e523337a3e11d91c786ded9360174a3d9ca83e79bc5396" end resource "typing-extensions" do url "https://files.pythonhosted.org/packages/aa/55/62e2d4934c282a60b4243a950c9dbfa01ae7cac0e8d6c0b5315b87432c81/typing_extensions-3.10.0.0.tar.gz" sha256 "50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342" end resource "urllib3" do url "https://files.pythonhosted.org/packages/4f/5a/597ef5911cb8919efe4d86206aa8b2658616d676a7088f0825ca08bd7cb8/urllib3-1.26.6.tar.gz" sha256 "f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f" end resource "webencodings" do url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" end resource "websocket-client" do url "https://files.pythonhosted.org/packages/0a/ce/971e8be0efe35d7bc2b0a5676ae8fa3c076fe269749d1d8671baa6d69730/websocket-client-1.2.0.tar.gz" sha256 "7665ba6c645989b28b61670874ab753e6929179e9fc90565ace6ac090f59c559" end def install virtualenv_install_with_resources end test do (testpath/"old.ipynb").write <<~EOS { "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(\\\"Hello World!\\\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.10" } }, "nbformat": 4, "nbformat_minor": 1 } EOS (testpath/"new.ipynb").write <<~EOS { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Hello World!\\n" ] } ], "source": [ "print(\\\"Hello World!\\\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.10" } }, "nbformat": 4, "nbformat_minor": 1 } EOS # sadly no special exit code if files are the same diff_output = shell_output("#{bin}/nbdiff --no-color old.ipynb new.ipynb") assert_match "nbdiff old.ipynb new.ipynb", diff_output assert_match(/--- old.ipynb \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{6}/, diff_output) assert_match(/\+\+\+ new.ipynb \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{6}/, diff_output) end end
0x07CB/linuxbrew-core
Formula/clac.rb
class Clac < Formula desc "Command-line, stack-based calculator with postfix notation" homepage "https://github.com/soveran/clac" url "https://github.com/soveran/clac/archive/0.3.3.tar.gz" sha256 "e751e31bd2d3cdf6daa80da0ea7761630767aa22df6954df35997d1fcc5fa8ae" license "BSD-2-Clause" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "5579baf3a429639b0cab2098d4dd5711fef715b6599a34b4b5ce11c383e8dbd6" sha256 cellar: :any_skip_relocation, big_sur: "8582b92bdb32ca857fc3b8a5a33d0f19797edc1d1331ef79ffd9dc86ced96303" sha256 cellar: :any_skip_relocation, catalina: "afa69f51c57695ae2e01a3ad9a44690fa746e925129ab2809550811cafe0fb3f" sha256 cellar: :any_skip_relocation, mojave: "af0e4194b84f969e0a701f32c102dd64a432f6f675e6913716b81b96e548d451" sha256 cellar: :any_skip_relocation, high_sierra: "5be5ed82ad0b8669aef16942e39e9d60341ab6201ee019b9b997ab5ee4ea76b1" sha256 cellar: :any_skip_relocation, x86_64_linux: "702df9f7e39ddc26efbd1fc951822cb2b8349cda6e6da962639f65a6ac566b97" # linuxbrew-core end def install system "make", "PREFIX=#{prefix}", "install" end test do assert_equal "7", shell_output("#{bin}/clac '3 4 +'").strip end end
0x07CB/linuxbrew-core
Formula/ohcount.rb
<gh_stars>100-1000 class Ohcount < Formula desc "Source code line counter" homepage "https://github.com/blackducksoftware/ohcount" url "https://github.com/blackducksoftware/ohcount/archive/4.0.0.tar.gz" sha256 "d71f69fd025f5bae58040988108f0d8d84f7204edda1247013cae555bfdae1b9" license "GPL-2.0" head "https://github.com/blackducksoftware/ohcount.git", branch: "master" bottle do sha256 cellar: :any, arm64_big_sur: "43a0bac3974271a961f6cbb035aeb37e0f63e6fc05200bdf8b28064ca7faf128" sha256 cellar: :any, big_sur: "4c6dbf352f569f3976b9c3992376f9afbd4cc05ceb1bbf129b4e462628dbe618" sha256 cellar: :any, catalina: "49de65862c42d1e653b84aa09a3ca9015de5afa40d9c1069d5a7f5a4e35060e5" sha256 cellar: :any, mojave: "b93054a4459a246895a524de21559fc1387e8cc6436d83481c7d85afc10be9e8" sha256 cellar: :any, high_sierra: "2bcddb3687af78d9317be143579afe692f8a3034c51b1e7e07ddd53491792365" sha256 cellar: :any, sierra: "716a64cf45acdb062651994384e88e74e5bf258a1b70b9b29cf09c5c115084e5" sha256 cellar: :any, x86_64_linux: "91e2bfd24a6dc5025bf70842f73ecf1635663a380786a39f4e0f9749e3f42f31" # linuxbrew-core end depends_on "gperf" => :build depends_on "libmagic" depends_on "pcre" depends_on "ragel" def install system "./build", "ohcount" bin.install "bin/ohcount" end test do (testpath/"test.rb").write <<~EOS # comment puts puts EOS stats = shell_output("#{bin}/ohcount -i test.rb").lines.last assert_equal ["ruby", "2", "1", "33.3%"], stats.split[0..3] end end
0x07CB/linuxbrew-core
Formula/gox.rb
<reponame>0x07CB/linuxbrew-core class Gox < Formula desc "Go cross compile tool" homepage "https://github.com/mitchellh/gox" url "https://github.com/mitchellh/gox/archive/v1.0.1.tar.gz" sha256 "25aab55a4ba75653931be2a2b95e29216b54bd8fecc7931bd416efe49a388229" license "MPL-2.0" head "https://github.com/mitchellh/gox.git" bottle do rebuild 2 sha256 cellar: :any_skip_relocation, arm64_big_sur: "943375b71098b9de0d440507638f5e514cd09ec8a4b99d628f2a7d687786f3a9" sha256 cellar: :any_skip_relocation, big_sur: "0a1967d492f5b586399d6fa9fa0b9f461e1178563625c1ea23e62fefbf384d36" sha256 cellar: :any_skip_relocation, catalina: "3cd12726dcdcf4e41a87d00825f7e5a915252e12c13dfe7a88efecba63a2dc6d" sha256 cellar: :any_skip_relocation, mojave: "79355b0248170797677b7e202fb6a071fc59fa087eef025c3aa4868e65edd6be" sha256 cellar: :any_skip_relocation, x86_64_linux: "8166c50b3a641d4302adae3676ab62b89bd1be52de0964bf7a77f2181fde3b47" # linuxbrew-core end depends_on "go" resource "iochan" do url "https://github.com/mitchellh/iochan.git", revision: "87b45ffd0e9581375c491fef3d32130bb15c5bd7" end # This resource is for the test so doesn't really need to be updated. resource "pup" do url "https://github.com/ericchiang/pup/archive/v0.4.0.tar.gz" sha256 "0d546ab78588e07e1601007772d83795495aa329b19bd1c3cde589ddb1c538b0" end def install system "go", "build", *std_go_args end test do ENV["GOPATH"] = testpath ENV["GO111MODULE"] = "auto" (testpath/"src/github.com/ericchiang/pup").install resource("pup") cd "src/github.com/ericchiang/pup" do output = shell_output("#{bin}/gox -arch amd64 -os darwin -os freebsd") assert_match "parallel", output assert_predicate Pathname.pwd/"pup_darwin_amd64", :executable? assert_predicate Pathname.pwd/"pup_freebsd_amd64", :executable? refute_predicate Pathname.pwd/"pup_linux_amd64", :exist? end end end
0x07CB/linuxbrew-core
Formula/sqlite-utils.rb
<reponame>0x07CB/linuxbrew-core class SqliteUtils < Formula include Language::Python::Virtualenv desc "CLI utility for manipulating SQLite databases" homepage "https://sqlite-utils.datasette.io/" url "https://files.pythonhosted.org/packages/98/c4/6a7eb6087cc77ff9c44f341967f97ec36a2181fe1796bb4f2cd61608f255/sqlite-utils-3.17.1.tar.gz" sha256 "0cfde0c46a2d4c09d6df8609fe53642bc3ab443bcef3106d8f1eabeb3fccbe3d" license "Apache-2.0" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "80ca20fc8e828fe2a303d934a706e55f42ea18692f12d5f378fb88895b3d3fb3" sha256 cellar: :any_skip_relocation, big_sur: "89adb3623815c841261f89d741efb244a12e4b48d155b5fb8b8dd2dd7d4ed01a" sha256 cellar: :any_skip_relocation, catalina: "ab74fd5336ddf14a00ee6203d465e284d2bda2917bf7fad3f2bb502a94387bf1" sha256 cellar: :any_skip_relocation, mojave: "fbbde2ddbf4f2cc628f518ec29f3a879168b93e0f1587936cc6e1623e5078011" sha256 cellar: :any_skip_relocation, x86_64_linux: "223f9af34d4106fa9e611bf99acbc040c3a25ed0b76f5528eeca0e1f985885e4" # linuxbrew-core end depends_on "python-tabulate" depends_on "python@3.9" depends_on "six" resource "click" do url "https://files.pythonhosted.org/packages/21/83/308a74ca1104fe1e3197d31693a7a2db67c2d4e668f20f43a2fca491f9f7/click-8.0.1.tar.gz" sha256 "8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a" end resource "click-default-group" do url "https://files.pythonhosted.org/packages/22/3a/e9feb3435bd4b002d183fcb9ee08fb369a7e570831ab1407bc73f079948f/click-default-group-1.2.2.tar.gz" sha256 "d9560e8e8dfa44b3562fbc9425042a0fd6d21956fcc2db0077f63f34253ab904" end resource "dateutils" do url "https://files.pythonhosted.org/packages/70/2e/a2d1337ac0ebb32b3b4ad921d9621f8b2f6bb20de0da47ec5d3734f08ce2/dateutils-0.6.12.tar.gz" sha256 "03dd90bcb21541bd4eb4b013637e4f1b5f944881c46cc6e4b67a6059e370e3f1" end resource "python-dateutil" do url "https://files.pythonhosted.org/packages/4c/c4/13b4776ea2d76c115c1d1b84579f3764ee6d57204f6be27119f13a61d0a9/python-dateutil-2.8.2.tar.gz" sha256 "0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86" end resource "pytz" do url "https://files.pythonhosted.org/packages/b0/61/eddc6eb2c682ea6fd97a7e1018a6294be80dba08fa28e7a3570148b4612d/pytz-2021.1.tar.gz" sha256 "83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da" end resource "sqlite-fts4" do url "https://files.pythonhosted.org/packages/62/30/63e64b7b8fa69aabf97b14cbc204cb9525eb2132545f82231c04a6d40d5c/sqlite-fts4-1.0.1.tar.gz" sha256 "b2d4f536a28181dc4ced293b602282dd982cc04f506cf3fc491d18b824c2f613" end def install virtualenv_install_with_resources end test do assert_match "15", shell_output("#{bin}/sqlite-utils :memory: 'select 3 * 5'") end end
0x07CB/linuxbrew-core
Formula/stress.rb
class Stress < Formula desc "Tool to impose load on and stress test a computer system" homepage "https://web.archive.org/web/20190702093856/https://people.seas.harvard.edu/~apw/stress/" url "https://deb.debian.org/debian/pool/main/s/stress/stress_1.0.5.orig.tar.gz" sha256 "1798e49ca365d928fb194ba1b8e8d1e09963b49e9edb0a78bcbba15750bb5027" license "GPL-2.0-or-later" livecheck do url "https://deb.debian.org/debian/pool/main/s/stress/" regex(/href=.*?stress[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "3dc5c125c3eb8cf95cb21bf4ae2efaf114b9b47677747026ba92a5c9eb09ad6e" sha256 cellar: :any_skip_relocation, big_sur: "00d9ed736381a3967b8eaf0b709328ccb0263640fdc856fe5c2e8f2164ea705d" sha256 cellar: :any_skip_relocation, catalina: "2fb692ddaa54337dfe07eb71ee647e167bbe41db054556c32d7507cba38caa43" sha256 cellar: :any_skip_relocation, mojave: "6220e38d281aa1f7933c582711083d2e33bc36071e32776a55a6c8441e3de209" sha256 cellar: :any_skip_relocation, x86_64_linux: "b303854895396f0b6b5a75e654b5315ae4eccd5d4c7de451d7d1997edb0a7e7a" # linuxbrew-core end depends_on "autoconf" => :build depends_on "automake" => :build def install system "./autogen.sh" system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end test do system bin/"stress", "--cpu", "2", "--io", "1", "--vm", "1", "--vm-bytes", "128M", "--timeout", "1s", "--verbose" end end
0x07CB/linuxbrew-core
Formula/liblqr.rb
class Liblqr < Formula desc "C/C++ seam carving library" homepage "https://liblqr.wikidot.com/" url "https://github.com/carlobaldassi/liblqr/archive/v0.4.2.tar.gz" sha256 "1019a2d91f3935f1f817eb204a51ec977a060d39704c6dafa183b110fd6280b0" license "LGPL-3.0" revision 1 head "https://github.com/carlobaldassi/liblqr.git" bottle do rebuild 1 sha256 cellar: :any, arm64_big_sur: "5b55b5517f358ea17c882c7afcb02ef538fe032854a6a9e1f54785a35862adde" sha256 cellar: :any, big_sur: "94977eaf2a6b9c9d52f178267ba034bb2515cb2ba0a643006c10f83ab6a532b9" sha256 cellar: :any, catalina: "18803ed552ae07c1998c87ba6c4ebaee1ec5eaab843c2cfa2cc3775f0b55da23" sha256 cellar: :any, mojave: "83054ddb4fffb94ea12f609a90082220a451bfdc793284d104f1fdeaf4aa8fd6" sha256 cellar: :any, high_sierra: "43e9b4f518364d436b53c89b1ac42e2cfdcafc47fad1ba711bd6456122e47d62" sha256 cellar: :any, x86_64_linux: "d316f7e59d5f1f3743dd483005ad7137e4becc0f756f00221429da8c4efbbd97" # linuxbrew-core end depends_on "pkg-config" => :build depends_on "glib" def install system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end end
0x07CB/linuxbrew-core
Formula/colormake.rb
class Colormake < Formula desc "Wrapper around make to colorize the output" homepage "https://github.com/pagekite/Colormake" url "https://github.com/pagekite/Colormake/archive/0.9.20140503.tar.gz" sha256 "a3f9fae9a455ac96be1cce0371b28bda33a9af73b06fa8e4329aa2f693d68d22" license "GPL-2.0" head "https://github.com/pagekite/Colormake.git", branch: "master" def install inreplace "colormake", "colormake.pl", "#{libexec}/colormake.pl" # Prefers symlinks than the original duplicate files File.unlink "colormake-short", "clmake", "clmake-short" File.symlink "colormake", "colormake-short" File.symlink "colormake", "clmake" File.symlink "colormake", "clmake-short" # Adds missing clmake.1 referenced in colormake.1 itself File.symlink "colormake.1", "clmake.1" # Installs auxiliary script, commands and mans libexec.install "colormake.pl" bin.install "colormake", "clmake", "colormake-short", "clmake-short" man1.install "colormake.1", "clmake.1" end test do (testpath/"Makefile").write("all:\n\techo Hello World!\n") assert_match "Hello World!", shell_output("#{bin}/colormake") end end
0x07CB/linuxbrew-core
Formula/tmux-xpanes.rb
<filename>Formula/tmux-xpanes.rb class TmuxXpanes < Formula desc "Ultimate terminal divider powered by tmux" homepage "https://github.com/greymd/tmux-xpanes" url "https://github.com/greymd/tmux-xpanes/archive/v4.1.3.tar.gz" sha256 "d6c6ce10bb1a487c6455474fe2274eb56ff0a8a87ee9d5cae7dae676d13c19b2" license "MIT" depends_on "tmux" def install system "./install.sh", prefix end test do # Check options with valid combination pipe_output("#{bin}/xpanes --dry-run -c echo", "hello", 0) # Check options with invalid combination (-n requires number) pipe_output("#{bin}/xpanes --dry-run -n foo -c echo 2>&1", "hello", 4) end end
0x07CB/linuxbrew-core
Formula/finatra.rb
<reponame>0x07CB/linuxbrew-core class Finatra < Formula desc "Scala web framework inspired by Sinatra" homepage "http://finatra.info/" url "https://github.com/twitter/finatra/archive/1.5.3.tar.gz" sha256 "aa4fab5ccdc012da9edf4650addf54b6ba64eb7e6a5e88d8c76e68e4d89216de" license "Apache-2.0" def install libexec.install Dir["*"] bin.install_symlink libexec/"finatra" end test do system bin/"finatra" end end
0x07CB/linuxbrew-core
Formula/camlp5.rb
class Camlp5 < Formula desc "Preprocessor and pretty-printer for OCaml" homepage "https://camlp5.github.io/" url "https://github.com/camlp5/camlp5/archive/rel8.00.tar.gz" sha256 "906d5325798cd0985a634e9b6b5c76c6810f3f3b8e98b80a7c30b899082c2332" license "BSD-3-Clause" revision 1 head "https://github.com/camlp5/camlp5.git", branch: "master" livecheck do url :homepage regex(%r{The current distributed version is <b>v?(\d+(?:\.\d+)+)</b>}i) end bottle do sha256 arm64_big_sur: "549ee3a8bfbc3b3d6f466087562d15fd1e1b1b092786c488ae3109c19b1ca50d" sha256 big_sur: "a01dea02114f9eb35e8d151ea3b61c34c7fcf5c2db09583cc3480a010211e7b3" sha256 catalina: "14d9affdc0d1aaeef2a2e122523acba47d3b271f7002c66e407e02387f48b1fe" sha256 mojave: "6b753cfd90a18e4d813cfc9ce3d3345547a0424527c15d51304621c9f6689b14" sha256 x86_64_linux: "468f1a1341113efc399641b3b2c5d0390a9e8294e5f3b9a18c1a6150464aa744" # linuxbrew-core end depends_on "ocaml" def install system "./configure", "--prefix", prefix, "--mandir", man system "make", "world.opt" system "make", "install" (lib/"ocaml/camlp5").install "etc/META" end test do ocaml = Formula["ocaml"] (testpath/"hi.ml").write "print_endline \"Hi!\";;" assert_equal "let _ = print_endline \"Hi!\"", # The purpose of linking with the file "bigarray.cma" is to ensure that the # ocaml files are in sync with the camlp5 files. If camlp5 has been # compiled with an older version of the ocaml compiler, then an error # "interface mismatch" will occur. shell_output("#{bin}/camlp5 #{lib}/ocaml/camlp5/pa_o.cmo #{lib}/ocaml/camlp5/pr_o.cmo " \ "#{ocaml.opt_lib}/ocaml/bigarray.cma hi.ml") end end
0x07CB/linuxbrew-core
Formula/dnstracer.rb
<reponame>0x07CB/linuxbrew-core class Dnstracer < Formula desc "Trace a chain of DNS servers to the source" homepage "https://www.mavetju.org/unix/dnstracer.php" url "https://www.mavetju.org/download/dnstracer-1.9.tar.gz" mirror "https://deb.debian.org/debian/pool/main/d/dnstracer/dnstracer_1.9.orig.tar.gz" sha256 "2ebc08af9693ba2d9fa0628416f2d8319ca1627e41d64553875d605b352afe9c" license "BSD-2-Clause" # It's necessary to check the `/unix/general.php` page, instead of # `/download/`, until a real 1.10 version exists. The file name for version # 1.1 on the `/download/` page is given as 1.10 and this is erroneously # treated as newer than 1.9. livecheck do url "https://www.mavetju.org/unix/general.php" regex(/href=.*?dnstracer[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "dc60fdb473c11615a27f62abb5aba5ae0a270c4b3d33001c07668266254c7486" sha256 cellar: :any_skip_relocation, big_sur: "c6e0d89127fbc47d2b30cd7d2918279f858a79d87b2e32e63cccfcc4f92f3495" sha256 cellar: :any_skip_relocation, catalina: "953752b2c3a012b0e92cd6fc78ef47d7b585e9a3034ef667a9ce3d353c4bb1db" sha256 cellar: :any_skip_relocation, mojave: "8fceeded94f224e8204c253197d742e5d2f94a83684b5ca0613f50841bd0ebe6" sha256 cellar: :any_skip_relocation, high_sierra: "29086b127a2967e8e481c60e397fe803165be2d1ad46be7176642567d8844cc0" sha256 cellar: :any_skip_relocation, sierra: "4d89811df14c8564d1ad2dae5a2f45f5e11a51f7b7ecb5f75f692b9507451b7b" sha256 cellar: :any_skip_relocation, el_capitan: "d90b34cfc2d03af3c80ef6118484ddff05863a0e4d9a7a5db8bcf3801bcb3414" sha256 cellar: :any_skip_relocation, yosemite: "13eaef32eb5d1dd11e71adeb6abe9bd43200a219951648d0d4eb707ea935c542" sha256 cellar: :any_skip_relocation, x86_64_linux: "a3836dc785877eeedff6c9a03d6df3271ade3559c634524d1ecca93d72b4fadb" # linuxbrew-core end def install ENV.append "LDFLAGS", "-lresolv" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--mandir=#{man}" system "make", "install" end test do system bin/"dnstracer", "-4", "brew.sh" end end
0x07CB/linuxbrew-core
Formula/flow-tools.rb
class FlowTools < Formula desc "Collect, send, process, and generate NetFlow data reports" homepage "https://code.google.com/archive/p/flow-tools/" url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/flow-tools/flow-tools-0.68.5.1.tar.bz2" sha256 "80bbd3791b59198f0d20184761d96ba500386b0a71ea613c214a50aa017a1f67" bottle do sha256 arm64_big_sur: "81f57d2bc6154643b3836e02200b77573cfda8f16abe9d6c7575f24f35c74048" sha256 big_sur: "9884c67cdf4c5aedd39ce946d68bcc8a090e01793fac68b89f6dd7933d55c945" sha256 catalina: "b2cf9a7d6690c11dd5894bac2e38175d599341ee18dcd99a3e1185f8d8cd8995" sha256 mojave: "6246a56252302b21018488ffe774cf5a203c373b1b5a4876a2d70d7d6b0cba20" sha256 high_sierra: "be6a9b7233b78e61df362ab06916a1912b1ac197f39849081cd3d9ca4cda5c31" sha256 sierra: "47ae55656be935936a5d3aa505f510c337818bd3c9d1a7fb028044523382dd8b" sha256 el_capitan: "2b41c1415b50e7123c5268dce7c656aba825a16c061691ee8eaf06e39d622cec" sha256 yosemite: "0d3814f50d6bc8d06c808176bc0b6f725f429b231a21eabe49fadf6729a7d27b" sha256 x86_64_linux: "770f9937b332e71c017cccc37968ce979eeb90a20177d0a091187b0c55d1a344" # linuxbrew-core end uses_from_macos "zlib" def install system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end test do # Generate test flow data with 1000 flows data = shell_output("#{bin}/flow-gen") # Test that the test flows work with some flow- programs pipe_output("#{bin}/flow-cat", data, 0) pipe_output("#{bin}/flow-print", data, 0) pipe_output("#{bin}/flow-stat", data, 0) end end
0x07CB/linuxbrew-core
Formula/h2c.rb
<filename>Formula/h2c.rb class H2c < Formula desc "Headers 2 curl" homepage "https://curl.se/h2c/" url "https://github.com/curl/h2c/archive/refs/tags/1.0.tar.gz" sha256 "1c5e4d76131abb5151c89cc54945256509dad9d12cab36205aa5bcd7f8a311af" license "MIT" def install bin.install "h2c" end test do assert_match "h2c.pl [options] < file", shell_output("h2c --help") # test if h2c can convert HTTP headers to curl options. assert_match "curl --head --http1.1 --header Accept: --header \"Shoesize: 12\" --user-agent \"moo\" https://example.com/", shell_output("echo 'HEAD / HTTP/1.1\nHost: example.com\nUser-Agent: moo\nShoesize: 12' | h2c") end end
0x07CB/linuxbrew-core
Formula/sloc.rb
require "language/node" class Sloc < Formula desc "Simple tool to count source lines of code" homepage "https://github.com/flosse/sloc#readme" url "https://registry.npmjs.org/sloc/-/sloc-0.2.1.tgz" sha256 "fb56f1763b7dadfd0566f819665efc0725ba8dfbec13c75da3839edf309596e6" license "MIT" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "ebd1c159ad1f9f263528431a12b45bea9bffb4e0bf28393da414e9ccb62f9942" sha256 cellar: :any_skip_relocation, big_sur: "28fb222768fc7ca90e6a9fa29c97d5f79f11bd9a928024ae84aabe8dfb8f0ff9" sha256 cellar: :any_skip_relocation, catalina: "91254bb1e206f528b6b7d7a9afbdeec8390cfc54ad13d0850cc202d6242e08d0" sha256 cellar: :any_skip_relocation, mojave: "f241a7bf03cb7bb97bb061f5f46442d7a40de893697a5335c821049d471e9466" sha256 cellar: :any_skip_relocation, high_sierra: "345308d671b83edb390c143554c64958135cf37bc7cd365ce613011da682a8b7" sha256 cellar: :any_skip_relocation, sierra: "1386a024efebe74829d85c8d75d07ae9f09f8c8a8104aa41424a5ea8c425fca5" sha256 cellar: :any_skip_relocation, x86_64_linux: "dd4e6910fdca3cfee695f4f3e67e1e32ed04122fd50c6409fd3aec6dc2efafde" # linuxbrew-core end depends_on "node" def install system "npm", "install", *Language::Node.std_npm_install_args(libexec) bin.install_symlink Dir["#{libexec}/bin/*"] end test do (testpath/"test.c").write <<~EOS #include <stdio.h> int main(void) { return 0; } EOS std_output = <<~EOS Path,Physical,Source,Comment,Single-line comment,Block comment,Mixed,Empty block comment,Empty,To Do Total,4,4,0,0,0,0,0,0,0 EOS assert_match std_output, shell_output("#{bin}/sloc --format=csv .") end end
0x07CB/linuxbrew-core
Formula/libassuan.rb
class Libassuan < Formula desc "Assuan IPC Library" homepage "https://www.gnupg.org/related_software/libassuan/" url "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2" mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libassuan/libassuan-2.5.5.tar.bz2" sha256 "8e8c2fcc982f9ca67dcbb1d95e2dc746b1739a4668bc20b3a3c5be632edb34e4" license "GPL-3.0-only" livecheck do url "https://gnupg.org/ftp/gcrypt/libassuan/" regex(/href=.*?libassuan[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any, arm64_big_sur: "3120a9c83de1631e86002b899ce823abccfd8bcaf90a6f54cbc7cd9ae1fd1fa4" sha256 cellar: :any, big_sur: "3d14f187ed48aa40987fa5fdf3ed9cbc52ddf8d079c7e97553efe510e4a084a0" sha256 cellar: :any, catalina: "75a37cd9a2f103b1f552349ba537cec0bd2ecbb222583b35e237aa6ad90b84c5" sha256 cellar: :any, mojave: "81119eac40ec7e6cfd997631f8d5ed1b6a3646c0b3481acd1c6b98492a187d25" sha256 cellar: :any_skip_relocation, x86_64_linux: "99bc4500dfb1c4a606bf2197d9a99b7de82143732238bd5b1bc4460a6763e42d" # linuxbrew-core end depends_on "libgpg-error" def install system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}", "--enable-static" system "make", "install" # avoid triggering mandatory rebuilds of software that hard-codes this path inreplace bin/"libassuan-config", prefix, opt_prefix end test do system bin/"libassuan-config", "--version" end end
0x07CB/linuxbrew-core
Formula/cppunit.rb
class Cppunit < Formula desc "Unit testing framework for C++" homepage "https://wiki.freedesktop.org/www/Software/cppunit/" url "https://dev-www.libreoffice.org/src/cppunit-1.15.1.tar.gz" sha256 "89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7" license "LGPL-2.1" livecheck do url "https://dev-www.libreoffice.org/src/" regex(/href=["']?cppunit[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any, arm64_big_sur: "42291951a34e6fae578a9c25d2a5c399dc1e13ec3f700c017f96d7576acabbf1" sha256 cellar: :any, big_sur: "8890cb5c9b85681b735c3756d301df29beb98e2c0d0b10f2fad073e6f1870101" sha256 cellar: :any, catalina: "3e194b84577c733e5641f305a1cb5cc76355f13037898afc56c3096f98bb78fe" sha256 cellar: :any, mojave: "1c107efb84d656dd5327aa8cf13e6cbce8db7542aacba98ae98a2b05940b16ff" sha256 cellar: :any, high_sierra: "08a339bc38db169bce2f5eb0fc0b940bc82562c37274aa770668f681aeca4386" sha256 cellar: :any, x86_64_linux: "4a7ea94b2d798f84044519d25ed5655e364629b67fd509a86c1ff9ff216a5ee8" # linuxbrew-core end def install system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end test do assert_match "Usage", shell_output("#{bin}/DllPlugInTester", 2) end end
0x07CB/linuxbrew-core
Formula/idris2.rb
<reponame>0x07CB/linuxbrew-core class Idris2 < Formula desc "Pure functional programming language with dependent types" homepage "https://www.idris-lang.org/" url "https://github.com/idris-lang/Idris2/archive/v0.5.1.tar.gz" sha256 "da44154f6eba5e22ec5ac64c6ba2c28d2df0a57cf620c5b00c11adb51dbda399" license "BSD-3-Clause" head "https://github.com/idris-lang/Idris2.git" bottle do sha256 cellar: :any, big_sur: "bdfd0d5b4d48cc19c8e461aab87b3a1e5f905f045e4e7c7d72cbee9a63c72ddc" sha256 cellar: :any, catalina: "83ecdfb8924bbe5adbf4c2cd77157445751f76aafe7881a64fa668f3e0bcf941" sha256 cellar: :any, mojave: "be86b55b7c0b1b27f4b6e79ba7d8da3e5341192a7d0cc623e3f455d4373ff227" sha256 cellar: :any_skip_relocation, x86_64_linux: "08268e51314a58e2594f360c88d6ec9f9f216fed00b3ec51ab1e5b748f95b398" # linuxbrew-core end depends_on "coreutils" => :build depends_on "gmp" => :build depends_on "chezscheme" uses_from_macos "zsh" => :build, since: :mojave def install ENV.deparallelize scheme = Formula["chezscheme"].bin/"chez" system "make", "bootstrap", "SCHEME=#{scheme}", "PREFIX=#{libexec}" system "make", "install", "PREFIX=#{libexec}" bin.install_symlink libexec/"bin/idris2" lib.install_symlink Dir["#{libexec}/lib/#{shared_library("*")}"] (bash_completion/"idris2").write Utils.safe_popen_read(bin/"idris2", "--bash-completion-script", "idris2") end test do (testpath/"hello.idr").write <<~EOS module Main main : IO () main = let myBigNumber = (the Integer 18446744073709551615 + 1) in putStrLn $ "Hello, Homebrew! This is a big number: " ++ ( show $ myBigNumber ) EOS system bin/"idris2", "hello.idr", "-o", "hello" assert_equal "Hello, Homebrew! This is a big number: 18446744073709551616", shell_output("./build/exec/hello").chomp end end
0x07CB/linuxbrew-core
Formula/color-code.rb
class ColorCode < Formula desc "Free advanced MasterMind clone" homepage "http://colorcode.laebisch.com/" url "http://colorcode.laebisch.com/download/ColorCode-0.8.5.tar.gz" sha256 "7c128db12af6ab11439eb710091b4a448100553a4d11d3a7c8dafdfbc57c1a85" license "GPL-3.0-or-later" revision 2 livecheck do url "http://colorcode.laebisch.com/download" regex(/href=.*?ColorCode[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any, arm64_big_sur: "8e7c81eca9f900ce20df5013b24120a39732113506ca72db063c52dec64fb028" sha256 cellar: :any, big_sur: "9aac69e2526ff08545f2f601fb6847ea1b131fa30fee2f56f2003bafdd163cc0" sha256 cellar: :any, catalina: "29407731a7c5e10b3812346227ef3ba75ce4b16bf48e603036442140691e0f8e" sha256 cellar: :any, mojave: "f8f2e6a8f4aac3307568cccaa8eb202c3be01d653396e1cd8bb9ccf76d24f6db" end depends_on "qt@5" on_linux do depends_on "gcc" end fails_with gcc: "5" def install qt5 = Formula["qt@5"].opt_prefix system "#{qt5}/bin/qmake" system "make" if OS.mac? prefix.install "ColorCode.app" bin.write_exec_script "#{prefix}/ColorCode.app/Contents/MacOS/colorcode" else bin.install "colorcode" end end test do system "#{bin}/colorcode", "-h" end end
0x07CB/linuxbrew-core
Formula/vde.rb
class Vde < Formula desc "Ethernet compliant virtual network" homepage "https://vde.sourceforge.io/" url "https://downloads.sourceforge.net/project/vde/vde2/2.3.2/vde2-2.3.2.tar.gz" sha256 "22df546a63dac88320d35d61b7833bbbcbef13529ad009c7ce3c5cb32250af93" license "GPL-2.0" revision 1 livecheck do url :stable regex(%r{url=.*?/vde\d*?[._-]v?(\d+(?:\.\d+)+)\.t}i) end bottle do sha256 arm64_big_sur: "d504166629275fb173304ee78b134a6c5b5eabba65c054f2fede1949204382dd" sha256 big_sur: "f634d3558c44876138a229f06554ab603b31e412a03c049d96f6c3616e579729" sha256 catalina: "711f5b171e033b92505178b35a324a5c21e806ed5054a92ef02f26b3a38a760e" sha256 mojave: "4f880ec345fe86fdfcfc53468c7c24d160261a17ee71a289ea3357a47b71416c" sha256 high_sierra: "79ee1bbcca1f873e3740db401c1f8735f2366e785b56fcf6e0e4140e9048333b" sha256 x86_64_linux: "179806e2e53ea922669aef55c8f21c192958b8b4b674d778377d5830ba5869e9" # linuxbrew-core end def install system "./configure", "--prefix=#{prefix}", "--disable-python" # 2.3.1 built in parallel but 2.3.2 does not. See: # https://sourceforge.net/p/vde/bugs/54/ ENV.deparallelize system "make", "install" end end
0x07CB/linuxbrew-core
Formula/convmv.rb
class Convmv < Formula desc "Filename encoding conversion tool" homepage "https://www.j3e.de/linux/convmv/" url "https://www.j3e.de/linux/convmv/convmv-2.05.tar.gz" sha256 "53b6ac8ae4f9beaee5bc5628f6a5382bfd14f42a5bed3d881b829d7b52d81ca6" livecheck do url :homepage regex(/href=.*?convmv[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "3b5226bc4a647dfcfacba43b505e94cd1c2ad5037f04660b267fe4d2f1a2158a" sha256 cellar: :any_skip_relocation, big_sur: "20517059aabe3b68553cc8a756331db3692732cddd5f3cf10905189f1494ddef" sha256 cellar: :any_skip_relocation, catalina: "203e34d5e76b55fabbf8548b93f749cd044ad843ca9062a916026e548332f7b0" sha256 cellar: :any_skip_relocation, mojave: "8e5a0c8207cb0c57f1640c5a8c9a4a05cd9c8ffc68d922774cae4bfa56b691e6" sha256 cellar: :any_skip_relocation, high_sierra: "856021a73afb22052e496ced9eb1a7386d810a6d75903aac99feb98298801ea8" sha256 cellar: :any_skip_relocation, sierra: "cc6cf7ff9cfd8909a76e29dd6ddbdddc9ad95638e154b72a36fe6c255e3a367d" sha256 cellar: :any_skip_relocation, el_capitan: "43278a7c7ef7720e20fed3179ff8519230678d3fd4e98f4b0e8e796b5fdb40ac" sha256 cellar: :any_skip_relocation, x86_64_linux: "a13979825940c67173e3fe04fffe23c4e1239b1a808cf365ce7a667eeaaf5bd5" # linuxbrew-core end def install system "make", "install", "PREFIX=#{prefix}" end test do system "#{bin}/convmv", "--list" end end
0x07CB/linuxbrew-core
Formula/nsq.rb
class Nsq < Formula desc "Realtime distributed messaging platform" homepage "https://nsq.io/" url "https://github.com/nsqio/nsq/archive/v1.2.1.tar.gz" sha256 "5fd252be4e9bf5bc0962e5b67ef5ec840895e73b1748fd0c1610fa4950cb9ee1" license "MIT" head "https://github.com/nsqio/nsq.git", branch: "master" bottle do rebuild 1 sha256 cellar: :any_skip_relocation, arm64_big_sur: "30543659d3c5990aa86f08346feea09adc2c7f5a388418f0c8eaff486cf388ec" sha256 cellar: :any_skip_relocation, big_sur: "daaf9729cff4ae0e02895d2c1fd398c592ee89f25b195be732c71a4b33f4a617" sha256 cellar: :any_skip_relocation, catalina: "533d1087999114a2a426dd589f4417d2b8cdb5a11b399a6004bca83f572aeb50" sha256 cellar: :any_skip_relocation, mojave: "154ac16069cd16a07ae6ca9ae2e432b26f52b2f2e79b5041322cbd726f3d7462" sha256 cellar: :any_skip_relocation, x86_64_linux: "0d640f7699017caa8f352890919bafe4eeceedba777e18368f0a4b8fbc98b54d" # linuxbrew-core end depends_on "go" => :build def install system "make", "DESTDIR=#{prefix}", "PREFIX=", "install" prefix.install_metafiles end def post_install (var/"log").mkpath (var/"nsq").mkpath end service do run [bin/"nsqd", "-data-path=#{var}/nsq"] keep_alive true working_dir var/"nsq" log_path var/"log/nsqd.log" error_log_path var/"log/nsqd.error.log" end test do lookupd = fork do exec bin/"nsqlookupd" end sleep 2 d = fork do exec bin/"nsqd", "--lookupd-tcp-address=127.0.0.1:4160" end sleep 2 admin = fork do exec bin/"nsqadmin", "--lookupd-http-address=127.0.0.1:4161" end sleep 2 to_file = fork do exec bin/"nsq_to_file", "--lookupd-http-address=127.0.0.1:4161", "--output-dir=#{testpath}", "--topic=test" end sleep 2 system "curl", "-d", "hello", "http://127.0.0.1:4151/pub?topic=test" sleep 2 dat = File.read(Dir["*.dat"].first) assert_match "test", dat assert_match version.to_s, dat ensure Process.kill(15, lookupd) Process.kill(15, d) Process.kill(15, admin) Process.kill(15, to_file) Process.wait lookupd Process.wait d Process.wait admin Process.wait to_file end end
0x07CB/linuxbrew-core
Formula/virtualhost.sh.rb
<reponame>0x07CB/linuxbrew-core class VirtualhostSh < Formula desc "Script for macOS to create Apache virtual hosts" homepage "https://github.com/virtualhost/virtualhost.sh" url "https://github.com/virtualhost/virtualhost.sh/archive/1.35.tar.gz" sha256 "75d34b807e71acd253876c6a99cdbc11ce31ffb159155373c83a99af862fffcc" head "https://github.com/virtualhost/virtualhost.sh.git", branch: "master" def install bin.install "virtualhost.sh" end end
0x07CB/linuxbrew-core
Formula/apm-bash-completion.rb
<reponame>0x07CB/linuxbrew-core class ApmBashCompletion < Formula desc "Completion for Atom Package Manager" homepage "https://github.com/vigo/apm-bash-completion" url "https://github.com/vigo/apm-bash-completion/archive/1.0.0.tar.gz" sha256 "1043a7f19eabe69316ea483830fb9f78d6c90853aaf4dd7ed60007af7f0d6e9d" license "MIT" def install bash_completion.install "apm" end test do assert_match "-F __apm", shell_output("source #{bash_completion}/apm && complete -p apm") end end
0x07CB/linuxbrew-core
Formula/tinc.rb
<filename>Formula/tinc.rb class Tinc < Formula desc "Virtual Private Network (VPN) tool" homepage "https://www.tinc-vpn.org/" url "https://tinc-vpn.org/packages/tinc-1.0.36.tar.gz" sha256 "40f73bb3facc480effe0e771442a706ff0488edea7a5f2505d4ccb2aa8163108" license "GPL-2.0-or-later" livecheck do url "https://www.tinc-vpn.org/download/" regex(/href=.*?tinc[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 cellar: :any, arm64_big_sur: "697c1a6266c837ae6f32ef0509b6d5770c7f723e5791b3263693fc8429baeb25" sha256 cellar: :any, big_sur: "5059a3bb30eaf4d339742ade7272a838008786010e709781bdf28856131229d5" sha256 cellar: :any, catalina: "fcaaca6b5abf4f30a55149f41871a7c4ec99fe8a9dc87ddb68ea735c03569a66" sha256 cellar: :any, mojave: "ba34dc41517f617c4d61d61e2f76cbafd9b75aa5edacc894e5b24e97cfb269f5" sha256 cellar: :any, high_sierra: "a5ec2ae5f1e6252f80f33158bb0a1140e29764ed1f2e8754dcedf50e4fb49290" sha256 cellar: :any, sierra: "923b15d1dcd7aafbb566f83edc9cced61b13379e857243bbe28b2755270b542d" sha256 cellar: :any, x86_64_linux: "c17497ed44d3cfaebba6f45742d70897443bf6fe761687477e3a1d03be073d65" # linuxbrew-core end depends_on "lzo" depends_on "openssl@1.1" uses_from_macos "zlib" def install system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}", "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}" system "make", "install" end test do assert_match version.to_s, shell_output("#{sbin}/tincd --version") end end
0x07CB/linuxbrew-core
Formula/bundler-completion.rb
class BundlerCompletion < Formula desc "Bash completion for Bundler" homepage "https://github.com/mernen/completion-ruby" url "https://github.com/mernen/completion-ruby.git", revision: "f3e4345042b0cc48317e45b673dfd3d23904b9a7" version "2" license "MIT" head "https://github.com/mernen/completion-ruby.git", branch: "main" livecheck do formula "ruby-completion" end def install bash_completion.install "completion-bundle" => "bundler" end test do assert_match "-F __bundle", shell_output("source #{bash_completion}/bundler && complete -p bundle") end end
bennofs/autoconf2nix
examples/armagetronad-0.2.8.3.3/MacOS/build_tools/process_files.rb
# Author: <NAME> # # Purpose: # Replace tags and move *.in files require 'yaml' require 'fileutils' # :file is the file we would like to process # :tags is a string or array of tags we would like to replace. ex: @version@ # :in moves the file from :file to :file minus the ".in" extension files = [ { :file => "/src/macosx/config_common.h.in", :tags => "version", :in => true }, { :file => "/src/macosx/English.lproj/InfoPlist.strings.in", :tags => ["version","year"], :in => true }, { :file => "/config/aiplayers.cfg.in", :in => true }, { :file => "/language/languages.txt.in", :tags => "progtitle", :in => true } ] module BuildTools class ProcessFiles attr_reader :build_information TOP_LEVEL = ".." MAJOR_VERSION_FILE = "#{TOP_LEVEL}/major_version" MINOR_VERSION_FILE = "#{TOP_LEVEL}/minor_version" BUILD_INFORMATION_FILE = "#{TOP_LEVEL}/macosx_build_information.yml" def initialize(files) @files = [] #! Files, and what actions we need to preform on them @build_information = {} #! Generated build information, such as version and kind @build_information[:progtitle] = "Armagetron Advanced" # Append TOP_LEVEL to filenames files.each do |info| info[:file] = TOP_LEVEL + info[:file] @files << info end yield self if block_given? end # Helper method to generate everything we need to know about this build def generate_build_information self.determine_source_kind self.generate_version self.generate_year self.serialize_build_information end def generate_version game_version = if @build_information[:kind] == "CVS" %x("#{TOP_LEVEL}/batch/make/version" "#{TOP_LEVEL}").chomp else File.read("#{TOP_LEVEL}/src/macosx/config_common.h.in").scan(/#define VERSION "(.*)"/)[0][0] end @build_information[:version] = game_version end # Delete this file if you would like to generate new information. Also be sure to put the tags back in the files ( @version@, etc... ) def generated_build_information_already? File.exists?(BUILD_INFORMATION_FILE) end def generate_year @build_information[:year] = Time.now.strftime("%Y") end # Determine if the source is checked out from CVS or it is a Release source def determine_source_kind if FileTest.directory?("#{TOP_LEVEL}/.svn") || FileTest.directory?("#{TOP_LEVEL}/.bzr") @build_information[:kind] = "CVS" else @build_information[:kind] = "Release" end end # Save the generated build information. def serialize_build_information open(BUILD_INFORMATION_FILE,'w') { |f| f.print(YAML.dump(@build_information)) } end # Deserialize the generated build information. This assumes +BUILD_INFORMATION_FILE+ exists. def deserialize_build_information @build_information = YAML.load_file(BUILD_INFORMATION_FILE) end # Replace a tag, ex. @tag@, with replace_with in a given file def replace_tag(file, tag, replace_with) replace_with = "\"#{replace_with}\"" if file =~ /config_common.h/ && tag == "version" open(file,'r+') do |f| text = f.read # Only mess with the file if we modified it (so we do not have to recompile the whole project) if text.gsub!(/\@#{tag}\@/, replace_with.to_s) f.pos = 0 f.print(text) f.truncate(f.pos) end end end # Copy the .in file to +new_file+, and process +new_file+ def process_in_file(file) new_name = file[0..-4] FileUtils.cp(file, new_name) return new_name end # Do what we need to do to each file def process_files @files.each do |file| puts "Processing #{file[:file]}" file[:file] = self.process_in_file(file[:file]) if file.has_key?(:in) and file[:in] file[:tags].each { |tag| self.replace_tag(file[:file], tag, @build_information[tag.to_sym]) } if file.has_key?(:tags) end end end end if __FILE__ == $0 # Delete the generated build information file to redo all the processing BuildTools::ProcessFiles.new(files) do |process| unless process.generated_build_information_already? puts "#{$0} Starting..." process.generate_build_information process.process_files end end end
thamilton2014/chef-repo
cookbooks/phpcs/metadata.rb
name "phpcs" maintainer "Escape Studios" maintainer_email "<EMAIL>" license "MIT" description "Installs/Configures phpcs" long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version "0.0.6" %w{ debian ubuntu redhat centos fedora scientific amazon }.each do |os| supports os end depends "php" depends "composer" depends "git" recipe "phpcs", "Installs phpcs." recipe "phpcs::composer", "Installs phpcs using composer." recipe "phpcs::pear", "Installs phpcs using pear." recipe "phpcs::coding-standard", "Installs additional coding standard(s)."
thamilton2014/chef-repo
cookbooks/phpcs/attributes/default.rb
<filename>cookbooks/phpcs/attributes/default.rb # # Cookbook Name:: phpcs # Attributes:: default # # Copyright 2013-2014, Escape Studios # default['phpcs']['install_method'] = "pear" default['phpcs']['version'] = "latest"
thamilton2014/chef-repo
cookbooks/pdepend/attributes/phar.rb
# # Cookbook Name:: pdepend # Attributes:: phar # # Copyright 2013, Escape Studios # default[:pdepend][:phar_url] = "http://static.pdepend.org/php/latest/pdepend.phar" default[:pdepend][:install_dir] = ""
thamilton2014/chef-repo
roles/test.rb
<filename>roles/test.rb<gh_stars>0 name 'test' description 'test server role' all_env = [ 'role[base]', 'recipe[myairwatch-install-user]' ] run_list(all_env) env_run_lists( '_default' => all_env, 'test' => all_env )
thamilton2014/chef-repo
roles/webserver.rb
name 'webserver' description 'Web server role' all_env = [ 'role[base]', 'recipe[php]', 'recipe[php::module_mysql]', 'recipe[apache2]', 'recipe[apache2::mod_php5]', 'recipe[apache2::mod_rewrite]', 'recipe[myairwatch]' ] run_list(all_env) env_run_lists( '_default' => all_env, 'prod' => all_env, #"dev" => all_env + ["recipe[php:module_xdebug]"], 'dev' => all_env, )
thamilton2014/chef-repo
cookbooks/pdepend/attributes/default.rb
<reponame>thamilton2014/chef-repo<gh_stars>0 # # Cookbook Name:: pdepend # Attributes:: default # # Copyright 2013, Escape Studios # default[:pdepend][:install_method] = "pear" default[:pdepend][:version] = "latest"
thamilton2014/chef-repo
cookbooks/myairwatch-php/recipes/default.rb
# # Cookbook Name:: myairwatch-php # Recipe:: default # # Copyright 2015, YOUR_COMPANY_NAME # # All rights reserved - Do Not Redistribute # install_dir = '/opt/installation' latest_php = 'http://php.net/get/php-5.6.4.tar.gz/from/this/mirror' php_tar = 'php-5.6.4.tar.gz' php_ver = 'php-5.6.4' directory install_dir do owner 'root' group 'root' mode '0755' action :create end # do a check for curl bash 'Install curl' do user 'root' group 'root' cwd install_dir code <<-EOH yum install curl -y EOH end # do a check for php bash 'Install php' do user 'root' group 'root' cwd install_dir code <<-EOH yum install php -y EOH end # Maybe check for curl installation bash 'Download composer' do user 'root' group 'root' cwd install_dir code <<-EOH curl -sS https://getcomposer.org/installer | php EOH end # do a check for composer installation bash 'Install composer globally' do user 'root' group 'root' cwd install_dir code <<-EOH mv composer.phar /usr/local/bin/composer EOH end bash 'Download phpunit' do user 'root' group 'root' cwd install_dir code <<-EOH wget https://phar.phpunit.de/phpunit.phar EOH end # do a check for phpunit installation bash 'Install phpunit' do user 'root' group 'root' cwd install_dir code <<-EOH chmod +x phpunit.phar sudo mv phpunit.phar /usr/local/bin/phpunit phpunit --version EOH end
thamilton2014/chef-repo
cookbooks/phpcs/recipes/coding-standard.rb
<reponame>thamilton2014/chef-repo # # Cookbook Name:: phpcs # Recipe:: coding-standard # # Copyright 2013-2014, Escape Studios # include_recipe "git" php_dir = `pear config-show | grep php_dir | awk 'NR==1 {print $(NF)}'`.strip standards_dir = "#{php_dir}/PHP/CodeSniffer/Standards" directory standards_dir do recursive true action :create end coding_standards = node['phpcs']['coding_standards'] unless coding_standards.nil? coding_standards.keys.each do |key| git "#{standards_dir}/#{key}" do repository coding_standards[key]['repository'] reference coding_standards[key]['reference'] action :sync end end end
thamilton2014/chef-repo
cookbooks/composer/recipes/default.rb
<reponame>thamilton2014/chef-repo # # Cookbook Name:: composer # Recipe:: default # # Copyright 2012-2014, Escape Studios # include_recipe 'composer::install' if node['composer']['install_globally'] include_recipe 'composer::global_configs' end
thamilton2014/chef-repo
cookbooks/pdepend/recipes/default.rb
<gh_stars>0 # # Cookbook Name:: pdepend # Recipe:: default # # Copyright 2013, Escape Studios # case node[:pdepend][:install_method] when "pear" include_recipe "pdepend::pear" when "composer" include_recipe "pdepend::composer" when "phar" include_recipe "pdepend::phar" end
thamilton2014/chef-repo
cookbooks/pdepend/attributes/composer.rb
<filename>cookbooks/pdepend/attributes/composer.rb # # Cookbook Name:: pdepend # Attributes:: composer # # Copyright 2013, Escape Studios # default[:pdepend][:prefix] = "/usr/bin"
thamilton2014/chef-repo
cookbooks/phpcs/recipes/composer.rb
# # Cookbook Name:: phpcs # Recipe:: composer # # Copyright 2013-2014, Escape Studios # include_recipe "composer" phpcs_dir = "#{Chef::Config['file_cache_path']}/phpcs" directory "#{phpcs_dir}" do owner "root" group "root" mode "0755" action :create end #figure out what version to install if node['phpcs']['version'] != "latest" version = node['phpcs']['version'] else version = "*.*.*" end #composer.json template "#{phpcs_dir}/composer.json" do source "composer.json.erb" owner "root" group "root" mode 0600 variables( :version => version, :bindir => node['phpcs']['prefix'] ) end #composer update execute "phpcs-composer" do user "root" cwd phpcs_dir command "composer update" action :run end
thamilton2014/chef-repo
environments/node.rb
name "node" description "The selenium node environment"
thamilton2014/chef-repo
cookbooks/composer/recipes/self_update.rb
# # Cookbook Name:: composer # Recipe:: self_update # # Copyright 2012-2014, Escape Studios # include_recipe 'composer::install' execute 'composer-self_update' do cwd node['composer']['install_dir'] command 'composer self-update' environment 'COMPOSER_HOME' => Composer.home_dir(node) action :run ignore_failure true end