gdal: Patch to support hdf linked against libtirpc (#15995)

If hdf was built with +libtirpc, we need to add -ltirpc to our link
flags.
This commit is contained in:
Tom Payerle 2020-04-10 14:36:08 -04:00 committed by GitHub
parent 343a499aa8
commit a29956d71e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,6 +172,7 @@ def setup_build_environment(self, env):
# https://trac.osgeo.org/gdal/wiki/BuildHints
def configure_args(self):
spec = self.spec
libs = []
# Required dependencies
args = [
@ -294,6 +295,9 @@ def configure_args(self):
# https://trac.osgeo.org/gdal/wiki/HDF
if '+hdf4' in spec:
args.append('--with-hdf4={0}'.format(spec['hdf'].prefix))
hdf4 = self.spec['hdf']
if '+libtirpc' in hdf4:
libs.append('-ltirpc')
else:
args.append('--with-hdf4=no')
@ -480,6 +484,9 @@ def configure_args(self):
'--with-pdfium=no',
])
if libs:
args.append('LIBS=' + ' '.join(libs))
return args
@run_after('install')