Skip to content

Commit

Permalink
(PA-5594) Updated conditions for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
skyamgarp committed Jun 23, 2023
1 parent f7da5c0 commit 1cb07e5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion configs/components/_base-ruby-augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

pkg.environment "PATH", "$(PATH):/opt/pl-build-tools/bin:/usr/local/bin:/opt/csw/bin:/usr/ccs/bin:/usr/sfw/bin"

if platform.architecture == 'arm64' && platform.is_macos? && platform.os_version.to_i > 12
if platform.architecture == 'arm64' && platform.is_macos? && platform.os_version.to_i >= 13
pkg.environment "PATH", "/opt/homebrew/bin:$(PATH):/opt/pl-build-tools/bin:/usr/local/bin:/opt/csw/bin:/usr/ccs/bin:/usr/sfw/bin"
end

Expand Down
12 changes: 7 additions & 5 deletions configs/components/augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
pkg.environment "PKG_CONFIG", "/opt/pl-build-tools/bin/pkg-config"
end
elsif platform.is_macos?
if platform.architecture == 'arm64' && platform.os_version.to_i > 12
if platform.architecture == 'arm64' && platform.os_version.to_i >= 13
pkg.environment "PATH", "/opt/homebrew/bin:$(PATH):/usr/local/bin"
else
pkg.environment "PATH", "$(PATH):/usr/local/bin"
Expand All @@ -125,10 +125,12 @@
end

# fix libtool linking on big sur
if platform.is_macos? && platform.architecture == 'arm64' && platform.os_version.to_i > 12
pkg.configure { ["/opt/homebrew/bin/autoreconf --force --install"] }
else
pkg.configure { ["/usr/local/bin/autoreconf --force --install"] }
if platform.is_macos?
if(platform.os_version.to_i >= 13 && platform.architecture == 'arm64')
pkg.configure { ["/opt/homebrew/bin/autoreconf --force --install"] }
else
pkg.configure { ["/usr/local/bin/autoreconf --force --install"] }
end
end

pkg.configure do
Expand Down
2 changes: 1 addition & 1 deletion configs/components/openssl-1.1.1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
ldflags = "-R/opt/pl-build-tools/#{settings[:platform_triple]}/lib -Wl,-rpath=#{settings[:libdir]} -L/opt/pl-build-tools/#{settings[:platform_triple]}/lib"
target = platform.architecture =~ /86/ ? 'solaris-x86-gcc' : 'solaris-sparcv9-gcc'
elsif platform.is_macos?
if platform.os_version.to_i > 12 && platform.architecture == 'arm64'
if platform.os_version.to_i >= 13 && platform.architecture == 'arm64'
pkg.environment 'PATH', '/opt/homebrew/bin:$(PATH):/usr/local/bin'
else
pkg.environment 'PATH', '/opt/pl-build-tools/bin:$(PATH):/usr/local/bin'
Expand Down
2 changes: 1 addition & 1 deletion configs/components/ruby-2.7.8.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
elsif platform.is_cross_compiled? && platform.is_linux?
special_flags += " --with-baseruby=#{host_ruby} "
elsif platform.is_macos? && platform.architecture == 'arm64'
if platform.os_version.to_i > 12
if platform.os_version.to_i >= 13
pkg.environment 'PATH', '/opt/homebrew/bin:$(PATH):/usr/local/bin'
end
# When the target arch is aarch64, ruby incorrectly selects the 'ucontext' coroutine
Expand Down
2 changes: 1 addition & 1 deletion configs/components/yaml-cpp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
pkg.environment 'CXX', 'clang++ -target arm64-apple-macos12' if platform.name =~ /osx-12/
pkg.environment 'CXX', 'clang++ -target arm64-apple-macos13' if platform.name =~ /osx-13/

if platform.os_version.to_i > 12
if platform.os_version.to_i >= 13
cmake = "/opt/homebrew/bin/cmake"
end
end
Expand Down

0 comments on commit 1cb07e5

Please sign in to comment.