From 7e54bddc0c7b9bb9925fa9ba971e90e693aef23b Mon Sep 17 00:00:00 2001 From: snehring Date: Fri, 29 Apr 2022 15:11:46 -0500 Subject: gdal: changing behavior of configure for +xml2 with 3.0+ (#30405) * gdal: changing behavior of configure for +xml2 with 3.0+ * Update var/spack/repos/builtin/packages/gdal/package.py Co-authored-by: Adam J. Stewart Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/gdal/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py index 22c61864ff..13f8e677ad 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -414,8 +414,11 @@ class Gdal(AutotoolsPackage): args.append('--with-curl=no') if '+xml2' in spec: - args.append('--with-xml2={0}'.format( - join_path(spec['libxml2'].prefix.bin, 'xml2-config'))) + if spec.satisfies('@:2'): + args.append('--with-xml2={0}'.format( + join_path(spec['libxml2'].prefix.bin, 'xml2-config'))) + else: + args.append('--with-xml2=yes') else: args.append('--with-xml2=no') -- cgit v1.2.3-70-g09d2