-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
gcc-arm-none-eabi 8-2019-q3-update (new formula) #45780
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
class GccArmNoneEabi < Formula | ||
desc "GNU Arm Embedded Toolchain" | ||
homepage "https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm" | ||
url "https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-src.tar.bz2" | ||
version "8-2019-q3-update" | ||
sha256 "e8a8ddfec47601f2d83f1d80c0600f198476f227102121c8d6a5a781d0c2eeef" | ||
|
||
env :std | ||
|
||
depends_on "wget" => :build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resources shouldn't be downloaded by the build script behind our back. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hopefully fixed. I have to wait to find out if it builds with homebrews' versions of packages. |
||
|
||
def install | ||
inreplace "build-common.sh" do |s| | ||
s.gsub! "INSTALLDIR_NATIVE=$ROOT/install-native", "INSTALLDIR_NATIVE=#{prefix}" | ||
s.gsub! "INSTALLDIR_NATIVE_DOC=$ROOT/install-native/share/doc/gcc-arm-none-eabi", "INSTALLDIR_NATIVE_DOC=#{doc}" | ||
|
||
# Do not update version during build | ||
# see: https://bugs.launchpad.net/gcc-arm-embedded/+bug/1741994 | ||
s.gsub! "$GCC_VER_NAME-$RELEASEVER", version | ||
end | ||
|
||
inreplace "build-toolchain.sh" do |s| | ||
s.gsub! "rm -rf $INSTALLDIR_NATIVE && mkdir -p $INSTALLDIR_NATIVE", "" | ||
|
||
s.gsub! "--prefix=$INSTALLDIR_NATIVE", "--prefix=#{prefix}" | ||
s.gsub! "--libexecdir=$INSTALLDIR_NATIVE/lib", "--libexecdir=#{libexec}" | ||
s.gsub! "--infodir=$INSTALLDIR_NATIVE_DOC/info", "--infodir=#{info}" | ||
s.gsub! "--mandir=$INSTALLDIR_NATIVE_DOC/man", "--mandir=#{man}" | ||
s.gsub! "--htmldir=$INSTALLDIR_NATIVE_DOC/html", "--htmldir=#{doc}/html" | ||
s.gsub! "--pdfdir=$INSTALLDIR_NATIVE_DOC/pdf", "--pdfdir=#{doc}/pdf" | ||
s.gsub! "--with-sysroot=$INSTALLDIR_NATIVE/arm-none-eabi", "--with-sysroot=#{prefix}/arm-none-eabi" | ||
|
||
# Task III-11, IV-8, V-0 and V-1 generates package which we don't need | ||
s.gsub! /^echo Task \[III-11\].*?popd/m, "" | ||
s.gsub! /^echo Task \[IV-8\].*?popd/m, "" | ||
s.gsub! /^echo Task \[V-0\].*?popd/m, "" | ||
s.gsub! /^echo Task \[V-1\].*?popd/m, "" | ||
end | ||
|
||
system "./install-sources.sh" | ||
system "./build-prerequisites.sh" | ||
system "./build-toolchain.sh", "--skip_steps=manual" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be made to build closer to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sadly no. |
||
end | ||
|
||
test do | ||
assert_match version.to_s, shell_output("#{bin}/arm-none-eabi-gcc --version") | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not acceptable in Homebrew core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed