package/gdal fix config issue with +pg for newer gdal (#30421)

* package/gdal fix config issue with +pg for newer gdal

* fix version logic

* improve style

Co-authored-by: sbulut <sbulut@3vgeomatics.com>
This commit is contained in:
Sinan 2022-05-02 20:06:42 -07:00 committed by GitHub
parent cbf0c3a8c4
commit 84611b5f29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -322,8 +322,11 @@ def configure_args(self):
args.append('--with-liblzma=no')
if '+pg' in spec:
args.append('--with-pg={0}'.format(
spec['postgresql'].prefix.bin.pg_config))
if spec.satisfies('@:2'):
args.append('--with-pg={0}'.format(
spec['postgresql'].prefix.bin.pg_config))
else:
args.append('--with-pg=yes')
else:
args.append('--with-pg=no')