Skip to content

Commit

Permalink
(PA-5618) Build curl on AIX 7.2
Browse files Browse the repository at this point in the history
Hide and restore /opt/freeware/lib/libcurl.a while building curl
  • Loading branch information
joshcooper committed Jul 6, 2023
1 parent 27c97b3 commit 699ec80
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions configs/components/curl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
configure_options << "--disable-dependency-tracking"
end

if platform.name == 'aix-7.2-ppc'
# yum on aix installs an old version of libcurl.a that /opt/freeware/bin/gcc seems
# to use no matter what -L search path I use, so use the same workaround as bbf248fb6
pkg.configure do
[
'mkdir -p /opt/freeware/lib/hide',
'mv /opt/freeware/lib/libcurl.a /opt/freeware/lib/hide/libcurl.a'
]
end
end

pkg.configure do
["CPPFLAGS='#{settings[:cppflags]}' \
LDFLAGS='#{settings[:ldflags]}' \
Expand All @@ -59,6 +70,12 @@
["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"]
end

if platform.name == 'aix-7.2-ppc'
pkg.build do
['mv /opt/freeware/lib/hide/libcurl.a /opt/freeware/lib/libcurl.a']
end
end

install_steps = [
"#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install",
]
Expand Down
2 changes: 1 addition & 1 deletion configs/projects/_shared-agent-components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
proj.component "openssl-#{proj.openssl_version}"
end

proj.component 'curl' if platform.name != 'aix-7.2-ppc' # PA-5618
proj.component 'curl'
proj.component 'puppet-ca-bundle'
proj.component "ruby-#{proj.ruby_version}"
proj.component "readline" if platform.is_macos?
Expand Down

0 comments on commit 699ec80

Please sign in to comment.