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