Package 'serf': link to the spack provided zlib installation. (#7667)

This commit is contained in:
Sergey Kosukhin 2018-04-06 22:44:39 +02:00 committed by Adam J. Stewart
parent fa3edd4af0
commit c328c667c0

View file

@ -54,6 +54,19 @@ def build_args(self, spec, prefix):
'ZLIB={0}'.format(spec['zlib'].prefix),
]
# ZLIB variable is ignored on non-Windows platforms before and
# including the version 1.3.9:
# https://www.mail-archive.com/dev@serf.apache.org/msg01359.html
# The issue is fixed in the trunk. Hopefully, the next stable version
# will work properly.
if '@:1.3.9' in self.spec:
zlib_spec = self.spec['zlib']
link_flags = [zlib_spec.libs.search_flags]
link_flags.extend([self.compiler.cc_rpath_arg + d
for d in zlib_spec.libs.directories])
args.append('LINKFLAGS=' + ' '.join(link_flags))
args.append('CPPFLAGS=' + zlib_spec.headers.cpp_flags)
if '+debug' in spec:
args.append('DEBUG=yes')
else: