Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: osx-cross/homebrew-avr
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: avr-gcc@8-8.5.0_1
Choose a base ref
...
head repository: osx-cross/homebrew-avr
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
21 changes: 11 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -9,24 +9,27 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.OSX_CROSS_AVR_HOMEBREW_GITHUB_API_TOKEN }}
PULL_REQUEST: ${{ github.event.pull_request.number }}
BRANCH: ${{ github.event.pull_request.head.ref }}

jobs:
pr-pull:
if: contains(github.event.pull_request.labels.*.name, 'pr-pull')
runs-on: macos-latest
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Set up git
uses: Homebrew/actions/git-user-config@master
run: |
git config --global user.name "osxCrossTestBot"
git config --global user.email "osxCrossTestBot@leka.io"
- name: Pull bottles
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.OSX_CROSS_AVR_HOMEBREW_GITHUB_API_TOKEN }}
HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ secrets.OSX_CROSS_AVR_HOMEBREW_GITHUB_API_TOKEN }}
HOMEBREW_GITHUB_PACKAGES_USER: osxCrossTestBot
PULL_REQUEST: ${{ github.event.pull_request.number }}
run: brew pr-pull --debug --tap=$GITHUB_REPOSITORY $PULL_REQUEST
run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST"

- name: Push commits
uses: Homebrew/actions/git-try-push@master
@@ -36,6 +39,4 @@ jobs:

- name: Delete branch
if: github.event.pull_request.head.repo.fork == false
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
run: git push --delete origin $BRANCH
run: git push --delete origin "$BRANCH"
21 changes: 7 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -18,26 +18,19 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11, macos-12, macos-13]

os: [macos-13, macos-14, macos-15]
runs-on: ${{ matrix.os }}

steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems
key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ matrix.os }}-rubygems-

- run: brew test-bot --only-cleanup-before

@@ -50,7 +43,7 @@ jobs:

- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@main
uses: actions/upload-artifact@v4
with:
name: bottles
path: "*.bottle.*"
name: bottles_${{ matrix.os }}
path: '*.bottle.*'
2 changes: 1 addition & 1 deletion Formula/avarice.rb
Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@ class Avarice < Formula
end

depends_on "automake"
depends_on "avr-binutils"
depends_on "hidapi"
depends_on "libusb-compat"
depends_on "osx-cross/avr/avr-binutils"

def install
system "./Bootstrap" if build.head?
30 changes: 11 additions & 19 deletions Formula/avr-binutils.rb
Original file line number Diff line number Diff line change
@@ -2,21 +2,21 @@ class AvrBinutils < Formula
desc "GNU Binutils for the AVR target"
homepage "https://www.gnu.org/software/binutils"

url "https://ftp.gnu.org/gnu/binutils/binutils-2.40.tar.xz"
mirror "https://ftpmirror.gnu.org/binutils/binutils-2.40.tar.xz"
sha256 "0f8a4c272d7f17f369ded10a4aca28b8e304828e95526da482b0ccc4dfc9d8e1"
revision 2
url "https://ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.bz2"
mirror "https://ftpmirror.gnu.org/binutils/binutils-2.43.1.tar.bz2"
sha256 "becaac5d295e037587b63a42fad57fe3d9d7b83f478eb24b67f9eec5d0f1872f"
license all_of: ["GPL-2.0-or-later", "GPL-3.0-or-later", "LGPL-2.0-or-later", "LGPL-3.0-only"]

bottle do
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/avr-binutils-2.40_2"
sha256 ventura: "0cbf66965ef6bead0daf5cb51d65b7d72ec35c2ae9044ad1c45d132ec5f2ce51"
sha256 monterey: "375a2f6f0a01fb48aa4e963030bbc2110155de608252ee485217c97f3a64b1ce"
sha256 big_sur: "b93981eb46acbeaab597fd18247cb033e7388f79eb2408c9464d4420ce0fb515"
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/avr-binutils-2.43.1"
sha256 arm64_sequoia: "2d743962b338269f170aabf4ae2e65a0d49328ad94bccfabb8a00be26837a061"
sha256 arm64_sonoma: "468910d458b982e5a8e20c8401cb6c19e7128ae645042b1b6fbc9d16bbdfda66"
sha256 ventura: "aed052952cc2b4413b8b54aed25eaaa3997c7ea2be002931c278efff9061ae15"
end

uses_from_macos "zlib"

on_ventura do
on_ventura :or_newer do
depends_on "texinfo" => :build
end

@@ -59,19 +59,11 @@ def install
system "make", "install"
end

info.rmtree # info files conflict with native binutils
end

def caveats
<<~EOS
For Mac computers with Apple silicon, avr-binutils might need Rosetta 2 to work properly.
You can learn more about Rosetta 2 here:
> https://support.apple.com/en-us/HT211861
EOS
rm_r(info) # info files conflict with native binutils
end

test do
version_output = "GNU ld (GNU Binutils) 2.40\n"
version_output = "GNU ld (GNU Binutils) 2.43.1\n"
assert_equal `avr-ld -v`, version_output
end
end
19 changes: 10 additions & 9 deletions Formula/avr-gcc@10.rb
Original file line number Diff line number Diff line change
@@ -8,13 +8,15 @@ class AvrGccAT10 < Formula

license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }

revision 2
revision 3

head "https://gcc.gnu.org/git/gcc.git", branch: "releases/gcc-10"

bottle do
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/avr-gcc@10-10.3.0_2"
sha256 big_sur: "bf15f02244c3ee082330690a5a8257a8bcbbc73c83a83a42b58bbaa19f4abf2b"
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/avr-gcc@10-10.3.0_3"
sha256 arm64_sonoma: "a3389faf9a2ddfb9f2177300f2ac016f845105de60fecdadee1f59392ee4d034"
sha256 ventura: "e84948abf83aaac9733d6ddde8d295e41abdcf42e2bb4c7d5ec66f016c5ecca1"
sha256 monterey: "8d3975f45f96600e3a5fa44c5aafa361d6a9cf87f383ea8abbcc884cb896d7c0"
end

# The bottles are built on systems with the CLT installed, and do not work
@@ -32,12 +34,11 @@ class AvrGccAT10 < Formula
depends_on "autoconf" => :build
depends_on "automake" => :build

depends_on "avr-binutils"

depends_on "gmp"
depends_on "isl"
depends_on "libmpc"
depends_on "mpfr"
depends_on "osx-cross/avr/avr-binutils"

uses_from_macos "zlib"

@@ -121,8 +122,8 @@ def install
end

# info and man7 files conflict with native gcc
info.rmtree
man7.rmtree
rm_r(info)
rm_r(man7)

current_build = build

@@ -171,7 +172,7 @@ def install
:00000001FF
EOS

hello_c_hex.gsub!(/\n/, "\r\n")
hello_c_hex.gsub!("\n", "\r\n")

(testpath/"hello.c").write(hello_c)

@@ -214,7 +215,7 @@ def install
:00000001FF
EOS

hello_cpp_hex.gsub!(/\n/, "\r\n")
hello_cpp_hex.gsub!("\n", "\r\n")

(testpath/"hello.cpp").write(hello_cpp)

19 changes: 10 additions & 9 deletions Formula/avr-gcc@11.rb
Original file line number Diff line number Diff line change
@@ -7,13 +7,15 @@ class AvrGccAT11 < Formula
sha256 "b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39"

license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
revision 1
revision 2

head "https://gcc.gnu.org/git/gcc.git", branch: "releases/gcc-11"

bottle do
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/avr-gcc@11-11.3.0_1"
sha256 big_sur: "410844f9bcfa63e32564c56b5487ce94e07695ea44e2ea20c08c1815d43bb733"
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/avr-gcc@11-11.3.0_2"
sha256 arm64_sonoma: "33ac86d868a1cb875e94a9d33a51269a75f94c7e54c106c549e58571e4f1ccef"
sha256 ventura: "c368474e738577d7e0267d55b395ae0462cc2c09c5bea6438f4f63d7b0a774c2"
sha256 monterey: "40318710c03906b08c7d68965d05faf9bc82e896723cc815cdcb2e443429d479"
end

# The bottles are built on systems with the CLT installed, and do not work
@@ -31,12 +33,11 @@ class AvrGccAT11 < Formula
depends_on "autoconf" => :build
depends_on "automake" => :build

depends_on "avr-binutils"

depends_on "gmp"
depends_on "isl"
depends_on "libmpc"
depends_on "mpfr"
depends_on "osx-cross/avr/avr-binutils"

uses_from_macos "zlib"

@@ -134,8 +135,8 @@ def install
end

# info and man7 files conflict with native gcc
info.rmtree
man7.rmtree
rm_r(info)
rm_r(man7)

current_build = build

@@ -184,7 +185,7 @@ def install
:00000001FF
EOS

hello_c_hex.gsub!(/\n/, "\r\n")
hello_c_hex.gsub!("\n", "\r\n")

(testpath/"hello.c").write(hello_c)

@@ -227,7 +228,7 @@ def install
:00000001FF
EOS

hello_cpp_hex.gsub!(/\n/, "\r\n")
hello_cpp_hex.gsub!("\n", "\r\n")

(testpath/"hello.cpp").write(hello_cpp)

43 changes: 22 additions & 21 deletions Formula/avr-gcc@12.rb
Original file line number Diff line number Diff line change
@@ -7,15 +7,15 @@ class AvrGccAT12 < Formula
sha256 "e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff"

license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
revision 2
revision 3

head "https://gcc.gnu.org/git/gcc.git", branch: "master"

bottle do
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/avr-gcc@12-12.2.0_2"
sha256 ventura: "8bbdd19dc3a9e3774ec9e7e373c5f61369bcc54233129a3abfbe096b4962a1c9"
sha256 monterey: "47625683110b51738d9436fc547d74332d8a1f7cd53ca690307ae30ce706ab15"
sha256 big_sur: "057902f378d287557d49500d7fdcc9ebaffc62ec485432721476cb6a136a2599"
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/avr-gcc@12-12.2.0_3"
sha256 arm64_sonoma: "ba0c8596203f126e5acb5795fe14180799b192920abd77c3c4f3962296e380dd"
sha256 ventura: "b87620c6e9d5fc0dc5b39e0ed0342e012b3a88a44c801c3be4ae11d918c4382f"
sha256 monterey: "484339713793087bd20767adb522fba3848423b3c407fd6ae8ae67e1afe63653"
end

# The bottles are built on systems with the CLT installed, and do not work
@@ -33,15 +33,27 @@ class AvrGccAT12 < Formula
depends_on "autoconf" => :build
depends_on "automake" => :build

depends_on "avr-binutils"

depends_on "gmp"
depends_on "isl"
depends_on "libmpc"
depends_on "mpfr"
depends_on "osx-cross/avr/avr-binutils"

uses_from_macos "zlib"

# Branch from the Darwin maintainer of GCC, with a few generic fixes and
# Apple Silicon support, located at https://github.com/iains/gcc-12-branch
# macOS 13 with CLT 14.2 installed will fail due to missing support for
# -nodefaultrpath in clang. The patch seems to not be needed however.
on_macos do
if Hardware::CPU.arm? && (MacOS.version < :ventura)
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/1d184289/gcc/gcc-12.2.0-arm.diff"
sha256 "a7843b5c6bf1401e40c20c72af69c8f6fc9754ae980bb4a5f0540220b3dcb62d"
end
end
end

# GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib
cxxstdlib_check :skip

@@ -60,17 +72,6 @@ class AvrGccAT12 < Formula
end
end

# Branch from the Darwin maintainer of GCC, with a few generic fixes and
# Apple Silicon support, located at https://github.com/iains/gcc-12-branch
# macOS 13 with CLT 14.2 installed will fail due to missing support for
# -nodefaultrpath in clang. The patch seems to not be needed however.
if OS.mac? && Hardware::CPU.arm? && MacOS.version < :ventura
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/1d184289/gcc/gcc-12.2.0-arm.diff"
sha256 "a7843b5c6bf1401e40c20c72af69c8f6fc9754ae980bb4a5f0540220b3dcb62d"
end
end

def version_suffix
if build.head?
"HEAD"
@@ -132,8 +133,8 @@ def install
end

# info and man7 files conflict with native gcc
info.rmtree
man7.rmtree
rm_r(info)
rm_r(man7)

current_build = build

@@ -182,7 +183,7 @@ def install
:00000001FF
EOS

hello_c_hex.gsub!(/\n/, "\r\n")
hello_c_hex.gsub!("\n", "\r\n")

(testpath/"hello.c").write(hello_c)

Loading