From ba9eb20d8fb8a2a63c91c593d154904662b97d14 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Mon, 7 Jul 2025 10:47:30 +0200 Subject: [PATCH 1/2] avr-gcc@11 - bump avr-libc to v2.2.1 --- Formula/avr-gcc@11.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Formula/avr-gcc@11.rb b/Formula/avr-gcc@11.rb index bac0263..2b44e4c 100644 --- a/Formula/avr-gcc@11.rb +++ b/Formula/avr-gcc@11.rb @@ -47,16 +47,8 @@ class AvrGccAT11 < Formula current_build = build resource "avr-libc" do - url "https://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2" - mirror "https://download-mirror.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2" - sha256 "b2dd7fd2eefd8d8646ef6a325f6f0665537e2f604ed02828ced748d49dc85b97" - - if current_build.with? "ATMega168pbSupport" - patch do - url "https://raw.githubusercontent.com/osx-cross/homebrew-avr/d2e2566b06b90355952ed996707a0a1a24673cd3/Patch/avr-libc-add-mcu-atmega168pb.patch" - sha256 "7a2bf2e11cfd9335e8e143eecb94480b4871e8e1ac54392c2ee2d89010b43711" - end - end + url "https://github.com/avrdudes/avr-libc/releases/download/avr-libc-2_2_1-release/avr-libc-2.2.1.tar.bz2" + sha256 "006a6306cbbc938c3bdb583ac54f93fe7d7c8cf97f9cde91f91c6fb0273ab465" end # Branch from the Darwin maintainer of GCC, with a few generic fixes and From 636143da23e02a779d44462180e9e3b3c028b996 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Mon, 7 Jul 2025 11:01:40 +0200 Subject: [PATCH 2/2] fix errors --- Formula/avr-gcc@11.rb | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Formula/avr-gcc@11.rb b/Formula/avr-gcc@11.rb index 2b44e4c..8a795a0 100644 --- a/Formula/avr-gcc@11.rb +++ b/Formula/avr-gcc@11.rb @@ -7,17 +7,9 @@ class AvrGccAT11 < Formula sha256 "b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39" license "GPL-3.0-or-later" => { with: "GCC-exception-3.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_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 # out of the box on Xcode-only systems due to an incorrect sysroot. pour_bottle? only_if: :clt_installed @@ -26,8 +18,6 @@ class AvrGccAT11 < Formula "This is useful if you want to have multiple version of avr-gcc\n" \ "installed on the same machine" - option "with-ATMega168pbSupport", "Add ATMega168pb Support to avr-gcc" - # automake & autoconf are needed to build from source # with the ATMega168pbSupport option. depends_on "autoconf" => :build @@ -44,8 +34,6 @@ class AvrGccAT11 < Formula # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib cxxstdlib_check :skip - current_build = build - resource "avr-libc" do url "https://github.com/avrdudes/avr-libc/releases/download/avr-libc-2_2_1-release/avr-libc-2.2.1.tar.bz2" sha256 "006a6306cbbc938c3bdb583ac54f93fe7d7c8cf97f9cde91f91c6fb0273ab465" @@ -130,8 +118,6 @@ def install rm_r(info) rm_r(man7) - current_build = build - resource("avr-libc").stage do ENV.prepend_path "PATH", bin @@ -148,7 +134,6 @@ def install puts "Forcing build system to aarch64-apple-darwin." end - system "./bootstrap" if current_build.with? "ATMega168pbSupport" system "./configure", "--prefix=#{prefix}", "--host=avr" system "make", "install" end