Created
May 1, 2020 21:06
-
-
Save iMichka/15a32a89ccc93d200e2caf692b074786 to your computer and use it in GitHub Desktop.
crystal2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Crystal < Formula | |
desc "Fast and statically typed, compiled language with Ruby-like syntax" | |
homepage "https://crystal-lang.org/" | |
on_macos do | |
stable do | |
url "https://github.com/crystal-lang/crystal/archive/mac-0.34.0.tar.gz" | |
sha256 "973293ffbcfa4fb073f6a2f833b0ce5b82b72f7899427f39d7e5610ffc9029c8" | |
resource "shards" do | |
url "https://github.com/crystal-lang/shards/archive/v0.10.0.tar.gz" | |
sha256 "3aea420df959552d1866d473c878ab1ed0b58489c4c9881ef40a170cfb775459" | |
end | |
end | |
end | |
on_linux do | |
stable do | |
url "https://github.com/crystal-lang/crystal/archive/linux-0.34.0.tar.gz" | |
sha256 "973293ffbcfa4fb073f6a2f833b0ce5b82b72f7899427f39d7e5610ffc9029c8" | |
resource "shards" do | |
url "https://github.com/crystal-lang/shards/archive/v0.10.0.tar.gz" | |
sha256 "3aea420df959552d1866d473c878ab1ed0b58489c4c9881ef40a170cfb775459" | |
end | |
end | |
end | |
bottle do | |
sha256 "7f6f09fefecbeab7ff11bcd35b501339f99aa2b4409c8612e1eae2c4ad0a206c" => :catalina | |
sha256 "a2a5055a9abe2db444e2a165133703a1c203d692f66c0e1fb326c97a28c8ef80" => :mojave | |
sha256 "c37811acb4753d689d8d7455b0ddfd64bf9530c430240563608e05b6bed8cedd" => :high_sierra | |
end | |
head do | |
url "https://github.com/crystal-lang/crystal.git" | |
resource "shards" do | |
url "https://github.com/crystal-lang/shards.git" | |
end | |
end | |
depends_on "pkg-config" | |
uses_from_macos "zlib" | |
on_linux do | |
depends_on "perl" | |
end | |
# Crystal uses an extended version of bdw-gc to handle multi-threading | |
resource "bdw-gc" do | |
url "https://github.com/ivmai/bdwgc/releases/download/v8.0.4/gc-8.0.4.tar.gz" | |
sha256 "436a0ddc67b1ac0b0405b61a9675bca9e075c8156f4debd1d06f3a56c7cd289d" | |
# extension to handle multi-threading | |
patch :p1 do | |
url "https://github.com/ivmai/bdwgc/commit/5668de71107022a316ee967162bc16c10754b9ce.patch?full_index=1" | |
sha256 "5c42d4b37cf4997bb6af3f9b00f5513644e1287c322607dc980a1955a09246e3" | |
end | |
end | |
on_macos do | |
resource "boot" do | |
url "https://github.com/crystal-lang/crystal/releases/download/0.33.0/crystal-0.33.0-1-darwin-x86_64.tar.gz" | |
version "0.33.0-1" | |
sha256 "edb48d4d8276fc5e689fb95c5dc669d115ad3d1bf22485dad77d44a370e585fd" | |
end | |
end | |
on_linux do | |
resource "boot" do | |
url "https://github.com/crystal-lang/crystal/releases/download/0.33.0/crystal-0.33.0-1-linux-x86_64.tar.gz" | |
version "0.33.0-1" | |
sha256 "9b9e078e9ba24fb97ee591d5f0a57c88cd018bd85ed6bdde9a30e5834b158128" | |
end | |
# special linux only resource | |
resource "res" do | |
url "https://github.com/ivmai/bdwgc/releases/download/v8.0.4/linux-resource-8.0.4.tar.gz" | |
sha256 "436a0ddc67b1ac0b0405b61a9675bca9e075c8156f4debd1d06f3a56c7cd289d" | |
end | |
end | |
on_linux do | |
# special linux patch | |
patch :p1 do | |
b9ce.patch?full_index=1" | |
sha256 "5c42d4b37cf4997bb6af3f9b00f5513644e1287c322607dc980a1955a09246e3" | |
end | |
end | |
def install | |
... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment