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

ladislas/feature/fix style #327

Merged
merged 2 commits into from
Mar 11, 2024
Merged
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
4 changes: 2 additions & 2 deletions Formula/avr-gcc@10.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,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)

Expand Down Expand Up @@ -214,7 +214,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)

Expand Down
4 changes: 2 additions & 2 deletions Formula/avr-gcc@11.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,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)

Expand Down Expand Up @@ -227,7 +227,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)

Expand Down
26 changes: 14 additions & 12 deletions Formula/avr-gcc@12.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ class AvrGccAT12 < Formula

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

Expand All @@ -60,17 +73,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"
Expand Down Expand Up @@ -182,7 +184,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)

Expand Down
10 changes: 6 additions & 4 deletions Formula/avr-gcc@5.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
# 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? do
reason "The bottle needs the Xcode CLT to be installed."
satisfy { MacOS::CLT.installed? }
on_macos do
reason "The bottle needs the Xcode CLT to be installed."
satisfy { MacOS::CLT.installed? }
end
end

keg_only "it might interfere with other version of avr-gcc.\n" \
Expand Down Expand Up @@ -54,7 +56,7 @@
sha256 "c4e9df9802772ddecb71aa675bb9403ad34c085d1359cb0e45b308ab6db551c6"
end

def install

Check warning on line 59 in Formula/avr-gcc@5.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-12)

`brew install --verbose --build-bottle osx-cross/avr/avr-gcc@5` failed on macOS Monterey (12)!

==> Fetching dependencies for osx-cross/avr/avr-gcc@5: m4, autoconf, automake, osx-cross/avr/avr-binutils, gmp, isl@0.18, mpfr and libmpc ==> Fetching m4 ==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/5b2a7f715487b7377e409e8ca58569040cd89f33859f691210c58d94410fd33b--m4-1.4.19.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/m4/blobs/sha256:8a17c921e5135206c382fc67ae53ba8835684dac5bfe7eb2bcdfa79df4d2731d Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/8709821aa91bb210bfc23c3e40aacd48cfc0086675fcda08d0ea5caef420cce9--m4--1.4.19.monterey.bottle.tar.gz ==> Verifying checksum for '8709821aa91bb210bfc23c3e40aacd48cfc0086675fcda08d0ea5caef420cce9--m4--1.4.19.monterey.bottle.tar.gz' ==> Fetching autoconf ==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.72 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/b73cdb320c4261bbf8d02d03e50dc755c869c5859c1d4e93616898fc7cd939ff--autoconf-2.72.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/blobs/sha256:12368e33b89d221550ba9e261b0c6ece0b0e89250fb4c95169d09081e0ebb2dd Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/2757d5a05e0182c42ae980efbaac407b618c087aadc3c98e59b50352dae28e0c--autoconf--2.72.monterey.bottle.tar.gz ==> Verifying checksum for '2757d5a05e0182c42ae980efbaac407b618c087aadc3c98e59b50352dae28e0c--autoconf--2.72.monterey.bottle.tar.gz' ==> Fetching automake ==> Downloading https://ghcr.io/v2/homebrew/core/automake/manifests/1.16.5 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/6863d3ffa73c5a5cbf1f1ea9e47b60784d09b232ac9e56149c1b931d9ec44d8b--automake-1.16.5.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/automake/blobs/sha256:ae77a247a13ea860236a29b02769f5327395f712413f694d8a8d20cb6c21332d Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/25e6690671ae9c3741dac14ff17e9904701143701ad52a24789d60a14dce5077--automake--1.16.5.monterey.bottle.tar.gz ==> Verifying checksum for '25e6690671ae9c3741dac14ff17e9904701143701ad52a24789d60a14dce5077--automake--1.16.5.monterey.bottle.tar.gz' ==> Fetching osx-cross/avr/avr-binutils ==> Downloading https://github.com/osx-cross/homebrew-avr/releases/download/avr-binutils-2.40_2/avr-binutils-2.40_2.monterey.bottle.1.tar.gz Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/e0ab28da955ad53da9d9755cc79333efb685aaa9041f65fba05481bd4c12388d--avr-binutils-2.40_2.monterey.bottle.1.tar.gz ==> Verifying checksum for 'e0ab28da955ad53da9d9755cc79333efb685aaa9041f65fba05481bd4c12388d--avr-binutils-2.40_2.monterey.bottle.1.tar.gz' ==> Fetching gmp ==> Downloading https://ghcr.io/v2/homebrew/core/gmp/manifests/6.3.0 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/70a72a71216843d66a953c06ff6337445ce9bc94fae9f0e301e2f59005274a8e--gmp-6.3.0.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/gmp/blobs/sha256:b04023f65b8c79c45798a4bfd97fdbeb10f1bf9e8416e22e8eeedbd9b2a8c102 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/6b369e4550006717f23e1b79c653f4edbf461bc475582ea8525174d7e1f6a95a--gmp--6.3.0.monterey.bottle.tar.gz ==> Verifying checksum for '6b369e4550006717f23e1b79c653f4edbf461bc475582ea8525174d7e1f6a95a--gmp--6.3.0.monterey.bottle.tar.gz' Error: isl@0.18 has been disabled because it is a versioned formula!

Check warning on line 59 in Formula/avr-gcc@5.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

`brew install --verbose --build-bottle osx-cross/avr/avr-gcc@5` failed on macOS Ventura (13)!

==> Fetching dependencies for osx-cross/avr/avr-gcc@5: m4, autoconf, automake, osx-cross/avr/avr-binutils, gmp, isl@0.18, mpfr and libmpc ==> Fetching m4 ==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/5b2a7f715487b7377e409e8ca58569040cd89f33859f691210c58d94410fd33b--m4-1.4.19.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/m4/blobs/sha256:0c7707d23c005fb7cfae158c696f3173698feca3a535d8f22959df18b9659575 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/efb05b7dcf1d5e7fdc5f56e076118d89b637ec68d212b573b48efe76ef993be1--m4--1.4.19.ventura.bottle.tar.gz ==> Verifying checksum for 'efb05b7dcf1d5e7fdc5f56e076118d89b637ec68d212b573b48efe76ef993be1--m4--1.4.19.ventura.bottle.tar.gz' ==> Fetching autoconf ==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.72 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/b73cdb320c4261bbf8d02d03e50dc755c869c5859c1d4e93616898fc7cd939ff--autoconf-2.72.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/blobs/sha256:12368e33b89d221550ba9e261b0c6ece0b0e89250fb4c95169d09081e0ebb2dd Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/2757d5a05e0182c42ae980efbaac407b618c087aadc3c98e59b50352dae28e0c--autoconf--2.72.ventura.bottle.tar.gz ==> Verifying checksum for '2757d5a05e0182c42ae980efbaac407b618c087aadc3c98e59b50352dae28e0c--autoconf--2.72.ventura.bottle.tar.gz' ==> Fetching automake ==> Downloading https://ghcr.io/v2/homebrew/core/automake/manifests/1.16.5 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/6863d3ffa73c5a5cbf1f1ea9e47b60784d09b232ac9e56149c1b931d9ec44d8b--automake-1.16.5.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/automake/blobs/sha256:ae77a247a13ea860236a29b02769f5327395f712413f694d8a8d20cb6c21332d Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/25e6690671ae9c3741dac14ff17e9904701143701ad52a24789d60a14dce5077--automake--1.16.5.ventura.bottle.tar.gz ==> Verifying checksum for '25e6690671ae9c3741dac14ff17e9904701143701ad52a24789d60a14dce5077--automake--1.16.5.ventura.bottle.tar.gz' ==> Fetching osx-cross/avr/avr-binutils ==> Downloading https://github.com/osx-cross/homebrew-avr/releases/download/avr-binutils-2.40_2/avr-binutils-2.40_2.ventura.bottle.1.tar.gz Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/25182efb213c6b53ca61fbe83f409af009220b70cd9e1b2dbe9a5c3194a960f4--avr-binutils-2.40_2.ventura.bottle.1.tar.gz ==> Verifying checksum for '25182efb213c6b53ca61fbe83f409af009220b70cd9e1b2dbe9a5c3194a960f4--avr-binutils-2.40_2.ventura.bottle.1.tar.gz' ==> Fetching gmp ==> Downloading https://ghcr.io/v2/homebrew/core/gmp/manifests/6.3.0 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/70a72a71216843d66a953c06ff6337445ce9bc94fae9f0e301e2f59005274a8e--gmp-6.3.0.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/gmp/blobs/sha256:83ec5443c018c02036d88ae0dc8dc4237b3b38eb76a3cdd82148e7f841ffd39f Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/631bd9ec5f73cb2970768735fc2e3ebc0ee4c16cdabaa7fcfc0302dc0fc0ad94--gmp--6.3.0.ventura.bottle.tar.gz ==> Verifying checksum for '631bd9ec5f73cb2970768735fc2e3ebc0ee4c16cdabaa7fcfc0302dc0fc0ad94--gmp--6.3.0.ventura.bottle.tar.gz' Error: isl@0.18 has been disabled because it is a versioned formula!
# GCC will suffer build errors if forced to use a particular linker.
ENV.delete "LD"

Expand Down Expand Up @@ -161,7 +163,7 @@
:00000001FF
EOS

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

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

Expand Down Expand Up @@ -204,7 +206,7 @@
:00000001FF
EOS

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

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

Expand Down
10 changes: 6 additions & 4 deletions Formula/avr-gcc@8.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ class AvrGccAT8 < Formula
# 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? do
reason "The bottle needs the Xcode CLT to be installed."
satisfy { MacOS::CLT.installed? }
on_macos do
reason "The bottle needs the Xcode CLT to be installed."
satisfy { MacOS::CLT.installed? }
end
end

keg_only "it might interfere with other version of avr-gcc.\n" \
Expand Down Expand Up @@ -175,7 +177,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)

Expand Down Expand Up @@ -218,7 +220,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)

Expand Down
4 changes: 2 additions & 2 deletions Formula/avr-gcc@9.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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)

Expand Down Expand Up @@ -225,7 +225,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)

Expand Down
2 changes: 1 addition & 1 deletion Formula/simavr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
desc "Lean, mean and hackable AVR simulator for Linux & macOS"
homepage "https://github.com/buserror/simavr"

url "https://github.com/buserror/simavr/archive/v1.6.tar.gz"
url "https://github.com/buserror/simavr/releases/tag/v1.6"
sha256 "a55ad04d055eef5656c49f78bc089968b059c6efb6a831618b8d7e67a840936d"

head "https://github.com/buserror/simavr.git"
Expand All @@ -15,7 +15,7 @@
depends_on "avr-gcc"
depends_on "libelf"

def install

Check warning on line 18 in Formula/simavr.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-12)

`brew install --verbose --build-bottle osx-cross/avr/simavr` failed on macOS Monterey (12)!

==> Fetching osx-cross/avr/simavr ==> Downloading https://github.com/buserror/simavr/releases/tag/v1.6 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/bbd2f90bb0cb3c1f683d5973554e0ad4db3511f541903740811c0e835ae92529--v1.6 ==> Verifying checksum for 'bbd2f90bb0cb3c1f683d5973554e0ad4db3511f541903740811c0e835ae92529--v1.6' Error: simavr: SHA256 mismatch Expected: a55ad04d055eef5656c49f78bc089968b059c6efb6a831618b8d7e67a840936d Actual: 8b3412cd839c53ad2b5eabb798a89253f9c8eace4cac77cc242097e0c0bdbf78 File: /Users/runner/Library/Caches/Homebrew/downloads/bbd2f90bb0cb3c1f683d5973554e0ad4db3511f541903740811c0e835ae92529--v1.6 To retry an incomplete download, remove the file above.

Check warning on line 18 in Formula/simavr.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

`brew install --verbose --build-bottle osx-cross/avr/simavr` failed on macOS Ventura (13)!

==> Fetching osx-cross/avr/simavr ==> Downloading https://github.com/buserror/simavr/releases/tag/v1.6 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/bbd2f90bb0cb3c1f683d5973554e0ad4db3511f541903740811c0e835ae92529--v1.6 ==> Verifying checksum for 'bbd2f90bb0cb3c1f683d5973554e0ad4db3511f541903740811c0e835ae92529--v1.6' Error: simavr: SHA256 mismatch Expected: a55ad04d055eef5656c49f78bc089968b059c6efb6a831618b8d7e67a840936d Actual: 90b39f166370a59961d61ff0acaf7b0fc21c5fa10d8d0c17bbfd155a614d4aa5 File: /Users/runner/Library/Caches/Homebrew/downloads/bbd2f90bb0cb3c1f683d5973554e0ad4db3511f541903740811c0e835ae92529--v1.6 To retry an incomplete download, remove the file above.
ENV.deparallelize
system "make", "all", "HOMEBREW_PREFIX=#{HOMEBREW_PREFIX}", "RELEASE=1"
system "make", "install", "DESTDIR=#{prefix}", "HOMEBREW_PREFIX=#{HOMEBREW_PREFIX}", "RELEASE=1"
Expand Down
Loading