From 61628c473c2d802b8085703cfd30a2582f797381 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Tue, 3 Oct 2023 18:04:02 -0700 Subject: [PATCH] Update package.py --- .../builtin/packages/subversion/package.py | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py index 9aea69f178881c..1795c74eb99c5f 100644 --- a/var/spack/repos/builtin/packages/subversion/package.py +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -38,7 +38,7 @@ class Subversion(AutotoolsPackage): variant("perl", default=False, description="Build with Perl bindings") variant("apxs", default=True, description="Build with APXS") variant("nls", default=True, description="Enable Native Language Support") - variant("pic", default=True, description="Enable position-independent code") + variant("pic", default=False, description="Enable position-independent code") depends_on("apr") depends_on("apr-util") @@ -108,17 +108,21 @@ def configure_args(self): if "+nls" in spec: args.append("--enable-nls") ldflags = [] - if not is_system_path(spec["gettext"].prefix): - ldflags.append(spec["gettext"].libs.search_flags) - # Using .libs.link_flags is the canonical way to add these arguments, - # but since libintl is much smaller than the rest and also the only - # necessary one, we specify it by hand here. - libs = ["-lintl"] + libs = [] + if "intl" in spec["gettext"].libs.names: + # Using .libs.link_flags is the canonical way to add these arguments, + # but since libintl is much smaller than the rest and also the only + # necessary one, we specify it by hand here. + libs.append("-lintl") + if not is_system_path(spec["gettext"].prefix): + ldflags.append(spec["gettext"].libs.search_flags) if spec["gettext"].satisfies("~shared"): ldflags.append(spec["iconv"].libs.search_flags) libs.append(spec["iconv"].libs.link_flags) - args.append("LDFLAGS=%s" % " ".join(ldflags)) - args.append("LIBS=%s" % " ".join(libs)) + if ldflags: + args.append("LDFLAGS=%s" % " ".join(ldflags)) + if libs: + args.append("LIBS=%s" % " ".join(libs)) else: args.append("--disable-nls")