Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

test rust 1.49 failures #26

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
class AsukaAT081 < Formula
desc "Gemini Project client written in Rust with NCurses"
homepage "https://git.sr.ht/~julienxx/asuka"
url "https://git.sr.ht/~julienxx/asuka/archive/0.8.1.tar.gz"
sha256 "06b03e9595b5b84e46e860ea2cf1103b244b3908fabf30337fcdf1db2a06281e"
license "MIT"

livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end

depends_on "rust" => :build

uses_from_macos "ncurses"

on_linux do
depends_on "pkg-config" => :build
depends_on "[email protected]"
end

def install
system "cargo", "install", *std_cargo_args
end

test do
input, _, wait_thr = Open3.popen2 "script -q screenlog.txt"
input.puts "stty rows 80 cols 43"
input.puts "env LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 TERM=xterm #{bin}/asuka"
sleep 1
input.putc "g"
sleep 1
input.puts "gemini://gemini.circumlunar.space"
sleep 10
input.putc "q"
input.puts "exit"

screenlog = (testpath/"screenlog.txt").read
assert_match /# Project Gemini/, screenlog
assert_match /Gemini is a new internet protocol/, screenlog
ensure
Process.kill("TERM", wait_thr.pid)
end
end
53 changes: 53 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
class DartsimAT695 < Formula
desc "Dynamic Animation and Robotics Toolkit"
homepage "https://dartsim.github.io/"
url "https://github.com/dartsim/dart/archive/v6.9.5.tar.gz"
sha256 "624c00b65e3a753cba50de038620860c86e2ac47b1793ae51f9427a4bcb14c32"
license "BSD-2-Clause"
revision 3

depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "assimp"
depends_on "boost"
depends_on "bullet"
depends_on "eigen"
depends_on "fcl"
depends_on "flann"
depends_on "ipopt"
depends_on "libccd"
depends_on "nlopt"
depends_on "ode"
depends_on "open-scene-graph"
depends_on "tinyxml2"
depends_on "urdfdom"

def install
ENV.cxx11

# Force to link to system GLUT (see: https://cmake.org/Bug/view.php?id=16045)
system "cmake", ".", "-DGLUT_glut_LIBRARY=/System/Library/Frameworks/GLUT.framework",
*std_cmake_args
system "make", "install"

# Clean up the build file garbage that has been installed.
rm_r Dir["#{share}/doc/dart/**/CMakeFiles/"]
end

test do
(testpath/"test.cpp").write <<~EOS
#include <dart/dart.hpp>
int main() {
auto world = std::make_shared<dart::simulation::World>();
assert(world != nullptr);
return 0;
}
EOS
system ENV.cxx, "test.cpp", "-I#{Formula["eigen"].include}/eigen3",
"-I#{include}", "-L#{lib}", "-ldart",
"-L#{Formula["assimp"].opt_lib}", "-lassimp",
"-L#{Formula["boost"].opt_lib}", "-lboost_system",
"-std=c++14", "-o", "test"
system "./test"
end
end
53 changes: 53 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
class DenoAT160 < Formula
desc "Secure runtime for JavaScript and TypeScript"
homepage "https://deno.land/"
url "https://github.com/denoland/deno/releases/download/v1.6.0/deno_src.tar.gz"
sha256 "60491d842e04ce162face61bb8857bf18a41726afbcbcd9fa532055ace7431ae"
license "MIT"

depends_on "llvm" => :build
depends_on "rust" => :build
depends_on xcode: ["10.0", :build] # required by v8 7.9+
depends_on :macos # Due to Python 2 (see https://github.com/denoland/deno/issues/2893)

uses_from_macos "xz"

# Remove at next version bump. Check that new release includes:
# https://github.com/denoland/deno/pull/8718
patch do
url "https://github.com/denoland/deno/commit/cea42bec3272a8020f1d94afcf1a4cd7e3985553.patch?full_index=1"
sha256 "640ece7aab8e7486ea0ec4bfd29ac7e980822a57d12123e802d022bdc7bbaed7"
end

def install
# env args for building a release build with our clang, ninja and gn
ENV["GN"] = buildpath/"gn/out/gn"
# build rusty_v8 from source
ENV["V8_FROM_SOURCE"] = "1"
# overwrite Chromium minimum sdk version of 10.15
ENV["FORCE_MAC_SDK_MIN"] = "10.13"
# build with llvm and link against system libc++ (no runtime dep)
ENV["CLANG_BASE_PATH"] = Formula["llvm"].prefix
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib

cd "cli" do
system "cargo", "install", "-vv", *std_cargo_args
end

# Install bash and zsh completion
output = Utils.safe_popen_read("#{bin}/deno", "completions", "bash")
(bash_completion/"deno").write output
output = Utils.safe_popen_read("#{bin}/deno", "completions", "zsh")
(zsh_completion/"_deno").write output
end

test do
(testpath/"hello.ts").write <<~EOS
console.log("hello", "deno");
EOS
assert_match "hello deno", shell_output("#{bin}/deno run hello.ts")
assert_match "console.log",
shell_output("#{bin}/deno run --allow-read=#{testpath} https://deno.land/[email protected]/examples/cat.ts " \
"#{testpath}/hello.ts")
end
end
23 changes: 23 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class EchoprintCodegenAT412 < Formula
desc "Codegen for Echoprint"
homepage "https://github.com/spotify/echoprint-codegen"
url "https://github.com/echonest/echoprint-codegen/archive/v4.12.tar.gz"
sha256 "dc80133839195838975757c5f6cada01d8e09d0aac622a8a4aa23755a5a9ae6d"
license "MIT"
revision 2
head "https://github.com/echonest/echoprint-codegen.git"

depends_on "boost"
depends_on "ffmpeg"
depends_on "taglib"

# Removes unnecessary -framework vecLib; can be removed in the next release
patch do
url "https://github.com/echonest/echoprint-codegen/commit/5ac72c40ae920f507f3f4da8b8875533bccf5e02.patch?full_index=1"
sha256 "1c7ffdfa498bde0da8b1b20ace5c67238338648175a067f1b129d2c726ab0fd1"
end

def install
system "make", "-C", "src", "install", "PREFIX=#{prefix}"
end
end
130 changes: 130 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
class GjsAT1661 < Formula
desc "JavaScript Bindings for GNOME"
homepage "https://gitlab.gnome.org/GNOME/gjs/wikis/Home"
url "https://download.gnome.org/sources/gjs/1.66/gjs-1.66.1.tar.xz"
sha256 "8d4240455eff642c8bf6d9805077e33e0a60cb2ea13f77a55f7f30c29668344c"
license all_of: ["LGPL-2.0-or-later", "MIT"]

livecheck do
url :stable
end

depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "[email protected]" => :build
depends_on "rust" => :build
depends_on "gobject-introspection"
depends_on "gtk+3"
depends_on "llvm"
depends_on "nspr"
depends_on "readline"

resource "autoconf@213" do
url "https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz"
mirror "https://ftpmirror.gnu.org/autoconf/autoconf-2.13.tar.gz"
sha256 "f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e"
end

resource "six" do
url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz"
sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"
end

resource "mozjs78" do
url "https://archive.mozilla.org/pub/firefox/releases/78.2.0esr/source/firefox-78.2.0esr.source.tar.xz"
sha256 "965ccfcbb8c0aa97639911997c54be0fcf896fd388b03138952089af675ea918"
end

def install
ENV.cxx11

resource("autoconf@213").stage do
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--program-suffix=213",
"--prefix=#{buildpath}/autoconf",
"--infodir=#{buildpath}/autoconf/share/info",
"--datadir=#{buildpath}/autoconf/share"
system "make", "install"
end

resource("six").stage do
system Formula["[email protected]"].opt_bin/"python3", *Language::Python.setup_install_args(buildpath/"vendor")
end

resource("mozjs78").stage do
inreplace "build/moz.configure/toolchain.configure",
"sdk_max_version = Version('10.15.4')",
"sdk_max_version = Version('11.0')"
inreplace "config/rules.mk",
"-install_name $(_LOADER_PATH)/$(SHARED_LIBRARY) ",
"-install_name #{lib}/$(SHARED_LIBRARY) "
inreplace "old-configure", "-Wl,-executable_path,${DIST}/bin", ""

mkdir("build") do
xy = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages"
ENV["PYTHON"] = Formula["[email protected]"].opt_bin/"python3"
ENV["_MACOSX_DEPLOYMENT_TARGET"] = ENV["MACOSX_DEPLOYMENT_TARGET"]
ENV["CC"] = Formula["llvm"].opt_bin/"clang"
ENV["CXX"] = Formula["llvm"].opt_bin/"clang++"
ENV.prepend_path "PATH", buildpath/"autoconf/bin"
system "../js/src/configure", "--prefix=#{prefix}",
"--with-system-nspr",
"--with-system-zlib",
"--with-system-icu",
"--enable-readline",
"--enable-shared-js",
"--enable-optimize",
"--enable-release",
"--with-intl-api",
"--disable-jemalloc"
system "make"
system "make", "install"
rm Dir["#{bin}/*"]
end
# headers were installed as softlinks, which is not acceptable
cd(include.to_s) do
`find . -type l`.chomp.split.each do |link|
header = File.readlink(link)
rm link
cp header, link
end
end
ENV.append_path "PKG_CONFIG_PATH", "#{lib}/pkgconfig"
rm "#{lib}/libjs_static.ajs"
end

# ensure that we don't run the meson post install script
ENV["DESTDIR"] = "/"

args = std_meson_args + %w[
-Dprofiler=disabled
-Dinstalled_tests=false
-Dbsymbolic_functions=false
-Dskip_dbus_tests=true
-Dskip_gtk_tests=true
]

mkdir "build" do
system "meson", *args, ".."
system "ninja", "-v"
system "ninja", "install", "-v"
end
end

def post_install
system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
end

test do
(testpath/"test.js").write <<~EOS
#!/usr/bin/env gjs
const GLib = imports.gi.GLib;
if (31 != GLib.Date.get_days_in_month(GLib.DateMonth.JANUARY, 2000))
imports.system.exit(1)
EOS
system "#{bin}/gjs", "test.js"
end
end
42 changes: 42 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
class KtmplAT090 < Formula
desc "Parameterized templates for Kubernetes manifests"
homepage "https://github.com/jimmycuadra/ktmpl"
url "https://github.com/jimmycuadra/ktmpl/archive/0.9.0.tar.gz"
sha256 "b2f05ae4b36f31f6801f4dcd2f5aec31d7b53b8b6dea6ddf974b22c88d8bc62b"
license "MIT"
head "https://github.com/jimmycuadra/ktmpl.git"

depends_on "rust" => :build

def install
system "cargo", "install", *std_cargo_args
end

test do
(testpath/"test.yml").write <<~EOS
---
kind: "Template"
apiVersion: "v1"
metadata:
name: "test"
objects:
- kind: "Service"
apiVersion: "v1"
metadata:
name: "test"
spec:
ports:
- name: "test"
protocol: "TCP"
targetPort: "$((PORT))"
selector:
app: "test"
parameters:
- name: "PORT"
description: "The port the service should run on"
required: true
parameterType: "int"
EOS
system bin/"ktmpl", "test.yml", "-p", "PORT", "8080"
end
end
Loading