Skip to content

Commit

Permalink
Update formulaes to 13.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Sep 23, 2024
1 parent 13bcbe2 commit b92cedc
Show file tree
Hide file tree
Showing 14 changed files with 172 additions and 76 deletions.
12 changes: 6 additions & 6 deletions aarch64-unknown-linux-gnu.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class Aarch64UnknownLinuxGnu < Formula
desc "aarch64 Linux GNU Toolchain"
desc "aarch64-unknown-linux-gnu Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/aarch64-unknown-linux-gnu-aarch64-darwin.tar.gz"
sha256 "a87669a9df908d8d8859849a0f9fc0fb287561a4e449c21dade10663d42d2ccb"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/aarch64-unknown-linux-gnu-aarch64-darwin.tar.gz"
sha256 "5092abd7f9f318672e833a8ad99a88d3d9044afc6e7152b26740d18b29949141"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/aarch64-unknown-linux-gnu-x86_64-darwin.tar.gz"
sha256 "6979291e34064583ac8b12a8b6b99ec6829caf22f47bcb68b646365ec9e24690"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/aarch64-unknown-linux-gnu-x86_64-darwin.tar.gz"
sha256 "b138ca4384313687a87eb9c25203aa57ddd36f440b8de1830af2fdd2019e1581"
end

def install
Expand Down
12 changes: 6 additions & 6 deletions aarch64-unknown-linux-musl.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class Aarch64UnknownLinuxMusl < Formula
desc "aarch64 Linux MUSL Toolchain"
desc "aarch64-unknown-linux-musl Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/aarch64-unknown-linux-musl-aarch64-darwin.tar.gz"
sha256 "3f60dbda3b2934857cc63b27e1e680e36b181f3df9bbae9ec207989f47b0e7aa"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/aarch64-unknown-linux-musl-aarch64-darwin.tar.gz"
sha256 "7eee015d2536ccc2e8b263554d3477e16d1e9d78284bddcfe303db170b1bbea6"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/aarch64-unknown-linux-musl-x86_64-darwin.tar.gz"
sha256 "15a7166de1b364e591d6b0206d127b67d15e88555f314170088f5e9ccf0ab068"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/aarch64-unknown-linux-musl-x86_64-darwin.tar.gz"
sha256 "2deb4f7315cd2bc44f2b5da6ee0f8f4212ef23656ded84fdc269edf7f737b9e5"
end

def install
Expand Down
12 changes: 6 additions & 6 deletions arm-unknown-linux-gnueabi.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class ArmUnknownLinuxGnueabi < Formula
desc "arm Linux GNU eabi Toolchain"
desc "arm-unknown-linux-gnueabi Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/arm-unknown-linux-gnueabi-aarch64-darwin.tar.gz"
sha256 "ee6265fab91e120afe4bb48fc86984c8edb500fd02f456275f9a445a9051e1fa"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/arm-unknown-linux-gnueabi-aarch64-darwin.tar.gz"
sha256 "7167c4c5adffad5fc6681e4a810868251aba005bc8989f3e7a6d1ee0d4c9099b"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/arm-unknown-linux-gnueabi-x86_64-darwin.tar.gz"
sha256 "88a49bcdb1addcc9ffee6f844dc44bca412b8156c47f6f5cd0ab2d27a19f50dd"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/arm-unknown-linux-gnueabi-x86_64-darwin.tar.gz"
sha256 "bf7cd8ecdafb5a451aab20ab4871fedcfdd275a5aa7c398f26f975de73f1b235"
end

def install
Expand Down
12 changes: 6 additions & 6 deletions arm-unknown-linux-gnueabihf.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class ArmUnknownLinuxGnueabihf < Formula
desc "arm Linux GNU eabihf Toolchain"
desc "arm-unknown-linux-gnueabihf Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/arm-unknown-linux-gnueabihf-aarch64-darwin.tar.gz"
sha256 "84fe0ca9f2eb80103565065ea672568267b4405e0ececc69cedd31682f3cece1"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/arm-unknown-linux-gnueabihf-aarch64-darwin.tar.gz"
sha256 "a233bd74dec09ccb00b9c3dea19f3fe0a7b7df5c43bb850ae2b5f1ab30466d46"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/arm-unknown-linux-gnueabihf-x86_64-darwin.tar.gz"
sha256 "d724a44b03c3f51469c938170820c597ce8b625d3def17a29d1d50560c859f6c"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/arm-unknown-linux-gnueabihf-x86_64-darwin.tar.gz"
sha256 "38648dbd071322bbd44cd1eca0524d2a40af10e52512f18d1ff414b37988e468"
end

def install
Expand Down
12 changes: 6 additions & 6 deletions arm-unknown-linux-musleabihf.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class ArmUnknownLinuxMusleabihf < Formula
desc "arm Linux MUSL eabihf Toolchain"
desc "arm-unknown-linux-musleabihf Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/arm-unknown-linux-musleabihf-aarch64-darwin.tar.gz"
sha256 "5ab3b707f968e977e62332ec9cdb17689aa150688aafa65f36998ea5c1b5141c"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/arm-unknown-linux-musleabihf-aarch64-darwin.tar.gz"
sha256 "ebb0c62c71ba216602f5e59b1404451a2427eaa48276a1b4845be49fdfe3a6fb"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/arm-unknown-linux-musleabihf-x86_64-darwin.tar.gz"
sha256 "cdb9928329aa0e3eb4ac5958e4192a31b2bc0611a7ad076028bac4ed48974680"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/arm-unknown-linux-musleabihf-x86_64-darwin.tar.gz"
sha256 "f8a7ca39b96260f030d0a823a5d71c1ddc9139381c5cdbb0bb85d1ab665e0878"
end

def install
Expand Down
12 changes: 6 additions & 6 deletions armv7-unknown-linux-gnueabihf.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class Armv7UnknownLinuxGnueabihf < Formula
desc "armv7 Linux GNU eabihf Toolchain"
desc "armv7-unknown-linux-gnueabihf Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/armv7-unknown-linux-gnueabihf-aarch64-darwin.tar.gz"
sha256 "3d6f308e408fc769e2c8c5a90eda74ad8c6f4f4c1c786d4419480a37bc8e2ed1"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/armv7-unknown-linux-gnueabihf-aarch64-darwin.tar.gz"
sha256 "b31019869d76f35c0e190a581c9a8bf0c7a117d1e8aa204e018ada9abd239a36"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/armv7-unknown-linux-gnueabihf-x86_64-darwin.tar.gz"
sha256 "e1b4a0dafce3df7287b813a84d373e3edd7f122054f39accfbcdfaa4a31f9598"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/armv7-unknown-linux-gnueabihf-x86_64-darwin.tar.gz"
sha256 "29486e75b6a1f6ac652332bfcfdc02ae8647dffcc57c2f6b64ee5fdef209327b"
end

def install
Expand Down
12 changes: 6 additions & 6 deletions armv7-unknown-linux-musleabihf.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class Armv7UnknownLinuxMusleabihf < Formula
desc "armv7 Linux MUSL eabihf Toolchain"
desc "armv7-unknown-linux-musleabihf Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/armv7-unknown-linux-musleabihf-aarch64-darwin.tar.gz"
sha256 "f88a2d4c8cc1a7e26f9373b0f9ef7eda918690156cdd5c8a9b123a6a0b55199e"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/armv7-unknown-linux-musleabihf-aarch64-darwin.tar.gz"
sha256 "92d9829dcd2bfa3fe895ae6a3c74436e5caf272dfafe406e17a090fd163feb38"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/armv7-unknown-linux-musleabihf-x86_64-darwin.tar.gz"
sha256 "ef2d1dadaf29fa2e00afe5fdd07a27e5fdd956a82173b0ce67998034e9a727b5"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/armv7-unknown-linux-musleabihf-x86_64-darwin.tar.gz"
sha256 "684a6a2b99f8462c73119b0b36309e4c384fbd303d06adbb9a2ddb53ea5cdbc0"
end

def install
Expand Down
24 changes: 24 additions & 0 deletions formula.rb.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class {{ name }} < Formula
desc "{{ description }}"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "{{ version }}"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v{{ version }}/{{ aarch64_artifact_name }}"
sha256 "{{ aarch64_sha256 }}"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v{{ version }}/{{ x86_64_artifact_name }}"
sha256 "{{ x86_64_sha256 }}"
end

def install
(prefix/"toolchain").install Dir["./*"]
Dir.glob(prefix/"toolchain/bin/*") {|file| bin.install_symlink file}
end
end
12 changes: 6 additions & 6 deletions i686-unknown-linux-gnu.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class I686UnknownLinuxGnu < Formula
desc "i686 Linux GNU Toolchain"
desc "i686-unknown-linux-gnu Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/i686-unknown-linux-gnu-aarch64-darwin.tar.gz"
sha256 "96f9285b10d81c8c2f5bbb3364b5fe1472082e6c74fdd18522d5d3b09a8c0128"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/i686-unknown-linux-gnu-aarch64-darwin.tar.gz"
sha256 "2be86c0ccb93f8167ff50f851375e62792c600c6d3e6d4bf1619a65094e534c6"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/i686-unknown-linux-gnu-x86_64-darwin.tar.gz"
sha256 "ef232d85d05286bea61863ae47c48d5aa2c5adf8711d6c6fb85373150cbb335d"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/i686-unknown-linux-gnu-x86_64-darwin.tar.gz"
sha256 "12c30a5c0a52f611ba8ccc747e75f2fbe8b8fceddf98cb593ba28a04ec7a139c"
end

def install
Expand Down
12 changes: 6 additions & 6 deletions i686-unknown-linux-musl.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class I686UnknownLinuxMusl < Formula
desc "i686 Linux MUSL Toolchain"
desc "i686-unknown-linux-musl Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/i686-unknown-linux-musl-aarch64-darwin.tar.gz"
sha256 "774c58d86877cb8a9f21705418137f2564b0c7bdc60db3d9461781c12803917d"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/i686-unknown-linux-musl-aarch64-darwin.tar.gz"
sha256 "af39edc473382a0a1fa583ee28d21c2bf20c3aea55129e3a5bad3f614ba85019"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/i686-unknown-linux-musl-x86_64-darwin.tar.gz"
sha256 "0c56ec34be51295a3da5b9c890ebe77a209ca707ff163ec377ba3b3f11bd5703"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/i686-unknown-linux-musl-x86_64-darwin.tar.gz"
sha256 "0969c1b83bfc177774edf616f74b953e2239693c19d2b419485b29ff90608f58"
end

def install
Expand Down
15 changes: 7 additions & 8 deletions mipsel-unknown-linux-gnu.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
class MipselUnknownLinuxGnu < Formula
desc "mipsel Linux GNU Toolchain"
desc "mipsel-unknown-linux-gnu Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
depends_on "[email protected]"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/mipsel-unknown-linux-gnu-aarch64-darwin.tar.gz"
sha256 "b4e521bb7c28ed2b66f94f6a1bb6e840066fcbe1e4efde01528921cda3a07e99"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/mipsel-unknown-linux-gnu-aarch64-darwin.tar.gz"
sha256 "b1a85172d6db74c210908ac1b8e636533c9ebaa4cf3a21e59b2b11c3a6ca11b8"
else
depends_on "[email protected]"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/mipsel-unknown-linux-gnu-x86_64-darwin.tar.gz"
sha256 "5585d3890d5b978f67e39812203667b1ddf1719ff3e0b6ce06d9bdce8e7a0903"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/mipsel-unknown-linux-gnu-x86_64-darwin.tar.gz"
sha256 "958e3b87d4937f975e38a2b9bd5a508fbf180b141a418fbcce96affbe3f9845c"
end

def install
Expand Down
73 changes: 73 additions & 0 deletions update_formulaes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/usr/bin/env python3
from __future__ import annotations

import os
import sys

import requests
from jinja2 import Environment, DictLoader, select_autoescape

REPO = os.getenv("REPOSITORY", "messense/homebrew-macos-cross-toolchains")
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")

session = requests.Session()


def fetch_targets_from_latest_release():
headers = {"Accept": "application/vnd.github.v3+json"}
if GITHUB_TOKEN:
headers["Authorization"] = f"token {GITHUB_TOKEN}"
res = session.get(
f"https://api.github.com/repos/{REPO}/releases/latest",
headers=headers,
)
res.raise_for_status()
release = res.json()
version = release["tag_name"].removeprefix("v")
targets = {}
for asset in release["assets"]:
filename = asset["name"]
if filename.endswith(".sha256"):
sha256_res = session.get(asset["browser_download_url"]).text
sha256, artifact_name = sha256_res.split()
if "aarch64-darwin" in artifact_name:
arch = "aarch64"
target = artifact_name.removesuffix("-aarch64-darwin.tar.gz")
elif "x86_64-darwin" in artifact_name:
arch = "x86_64"
target = artifact_name.removesuffix("-x86_64-darwin.tar.gz")
else:
raise ValueError("unknown architecture")
if target not in targets:
targets[target] = {
"version": version,
"name": target.title().replace("-", ""),
"description": f"{target} Toolchain",
}
if arch == "aarch64":
targets[target]["aarch64_sha256"] = sha256
targets[target]["aarch64_artifact_name"] = artifact_name
elif arch == "x86_64":
targets[target]["x86_64_sha256"] = sha256
targets[target]["x86_64_artifact_name"] = artifact_name
return targets


def main():
targets = fetch_targets_from_latest_release()
with open("formula.rb.j2") as f:
env = Environment(
loader=DictLoader({"formula": f.read()}),
autoescape=select_autoescape(),
)
template = env.get_template("formula")
for target, context in targets.items():
rendered = template.render(**context)
with open(f"{target}.rb", "w") as f:
f.write(rendered)
f.write("\n")
return 0


if __name__ == "__main__":
sys.exit(main())
14 changes: 7 additions & 7 deletions x86_64-unknown-linux-gnu.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class X8664UnknownLinuxGnu < Formula
desc "x86_64 Linux GNU Toolchain"
class X86_64UnknownLinuxGnu < Formula
desc "x86_64-unknown-linux-gnu Toolchain"
homepage "https://github.com/messense/homebrew-macos-cross-toolchains"
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
version "13.2.0"
version "13.3.0"

depends_on "bdw-gc"
depends_on "guile"
depends_on "zstd"
depends_on "[email protected]"

if Hardware::CPU.arm?
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/x86_64-unknown-linux-gnu-aarch64-darwin.tar.gz"
sha256 "bb59598afd84b4d850c32031a4fa64c928fb41f8ece4401553b6c23714efbc47"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/x86_64-unknown-linux-gnu-aarch64-darwin.tar.gz"
sha256 "e0be7e6f753841450245e26b6d68a07dc6a48a74abdb36d44b118e799ff4cb8d"
else
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.2.0/x86_64-unknown-linux-gnu-x86_64-darwin.tar.gz"
sha256 "86e28c979e5ca6d0d1019c9b991283f2ab430f65cee4dc1e4bdf85170ff7c4f2"
url "https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v13.3.0/x86_64-unknown-linux-gnu-x86_64-darwin.tar.gz"
sha256 "4ee0ea09445c02c75290086abc669a76986cfd1949b94fd1310fff225472b48f"
end

def install
Expand Down
Loading

0 comments on commit b92cedc

Please sign in to comment.