Skip to content

Commit

Permalink
Update package.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA authored Oct 4, 2023
1 parent 35ded4f commit 61628c4
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions var/spack/repos/builtin/packages/subversion/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 61628c4

Please sign in to comment.