From 1cb07e566399e521d9d1c576eb895b07c6b06106 Mon Sep 17 00:00:00 2001 From: skyamgarp <130442619+skyamgarp@users.noreply.github.com> Date: Fri, 23 Jun 2023 17:56:02 +0530 Subject: [PATCH] (PA-5594) Updated conditions for arm64 --- configs/components/_base-ruby-augeas.rb | 2 +- configs/components/augeas.rb | 12 +++++++----- configs/components/openssl-1.1.1.rb | 2 +- configs/components/ruby-2.7.8.rb | 2 +- configs/components/yaml-cpp.rb | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/configs/components/_base-ruby-augeas.rb b/configs/components/_base-ruby-augeas.rb index df746fe64..61a056c14 100644 --- a/configs/components/_base-ruby-augeas.rb +++ b/configs/components/_base-ruby-augeas.rb @@ -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 diff --git a/configs/components/augeas.rb b/configs/components/augeas.rb index f1f29a143..57e9a8c46 100644 --- a/configs/components/augeas.rb +++ b/configs/components/augeas.rb @@ -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" @@ -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 diff --git a/configs/components/openssl-1.1.1.rb b/configs/components/openssl-1.1.1.rb index 9d4fba9fe..b1cc59907 100644 --- a/configs/components/openssl-1.1.1.rb +++ b/configs/components/openssl-1.1.1.rb @@ -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' diff --git a/configs/components/ruby-2.7.8.rb b/configs/components/ruby-2.7.8.rb index 58e95d9bc..baca6337c 100644 --- a/configs/components/ruby-2.7.8.rb +++ b/configs/components/ruby-2.7.8.rb @@ -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 diff --git a/configs/components/yaml-cpp.rb b/configs/components/yaml-cpp.rb index c9471a188..f57cd9d81 100644 --- a/configs/components/yaml-cpp.rb +++ b/configs/components/yaml-cpp.rb @@ -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