Skip to content

Commit

Permalink
add libdir argument to fix conflicts with other versions of gcc libs -
Browse files Browse the repository at this point in the history
…fix #41
  • Loading branch information
ladislas committed Nov 7, 2017
1 parent 848863e commit 50b95f3
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions avr-gcc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class AvrGcc < Formula
sha256 "b2dd7fd2eefd8d8646ef6a325f6f0665537e2f604ed02828ced748d49dc85b97"
end

def version_suffix
if build.head?
(stable.version.to_s.slice(/\d/).to_i + 1).to_s
else
version.to_s.slice(/\d/)
end
end

cxxstdlib_check :skip

def install
Expand All @@ -38,6 +46,7 @@ def install
args = [
"--target=avr",
"--prefix=#{prefix}",
"--libdir=#{lib}/gcc/#{version_suffix}",

"--enable-languages=#{languages.join(",")}",
"--with-ld=#{Formula["avr-binutils"].opt_bin/"avr-ld"}",
Expand Down
9 changes: 9 additions & 0 deletions avr-gcc@4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class AvrGccAT4 < Formula
sha256 "b2dd7fd2eefd8d8646ef6a325f6f0665537e2f604ed02828ced748d49dc85b97"
end

def version_suffix
if build.head?
(stable.version.to_s.slice(/\d/).to_i + 1).to_s
else
version.to_s.slice(/\d/)
end
end

cxxstdlib_check :skip

def install
Expand All @@ -41,6 +49,7 @@ def install
args = [
"--target=avr",
"--prefix=#{prefix}",
"--libdir=#{lib}/gcc/#{version_suffix}",

"--enable-languages=#{languages.join(",")}",
"--with-ld=#{Formula["avr-binutils"].opt_bin/"avr-ld"}",
Expand Down
9 changes: 9 additions & 0 deletions avr-gcc@5.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class AvrGccAT5 < Formula
sha256 "b2dd7fd2eefd8d8646ef6a325f6f0665537e2f604ed02828ced748d49dc85b97"
end

def version_suffix
if build.head?
(stable.version.to_s.slice(/\d/).to_i + 1).to_s
else
version.to_s.slice(/\d/)
end
end

cxxstdlib_check :skip

def install
Expand All @@ -41,6 +49,7 @@ def install
args = [
"--target=avr",
"--prefix=#{prefix}",
"--libdir=#{lib}/gcc/#{version_suffix}",

"--enable-languages=#{languages.join(",")}",
"--with-ld=#{Formula["avr-binutils"].opt_bin/"avr-ld"}",
Expand Down
9 changes: 9 additions & 0 deletions avr-gcc@6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class AvrGccAT6 < Formula
sha256 "b2dd7fd2eefd8d8646ef6a325f6f0665537e2f604ed02828ced748d49dc85b97"
end

def version_suffix
if build.head?
(stable.version.to_s.slice(/\d/).to_i + 1).to_s
else
version.to_s.slice(/\d/)
end
end

cxxstdlib_check :skip

def install
Expand All @@ -41,6 +49,7 @@ def install
args = [
"--target=avr",
"--prefix=#{prefix}",
"--libdir=#{lib}/gcc/#{version_suffix}",

"--enable-languages=#{languages.join(",")}",
"--with-ld=#{Formula["avr-binutils"].opt_bin/"avr-ld"}",
Expand Down

0 comments on commit 50b95f3

Please sign in to comment.