summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/tar/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/tar/package.py')
-rw-r--r--var/spack/repos/builtin/packages/tar/package.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/tar/package.py b/var/spack/repos/builtin/packages/tar/package.py
index 7b5af9403c..5e83af3d8b 100644
--- a/var/spack/repos/builtin/packages/tar/package.py
+++ b/var/spack/repos/builtin/packages/tar/package.py
@@ -6,7 +6,6 @@
import re
from spack.package import *
-from spack.util.environment import is_system_path
class Tar(AutotoolsPackage, GNUMirrorPackage):
@@ -74,10 +73,10 @@ class Tar(AutotoolsPackage, GNUMirrorPackage):
"--with-bzip2={0}".format(spec["bzip2"].prefix.bin.bzip2),
]
- if spec["iconv"].name == "libc":
+ if spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={spec['iconv'].prefix}")
+ else:
args.append("--without-libiconv-prefix")
- elif not is_system_path(spec["iconv"].prefix):
- args.append("--with-libiconv-prefix={0}".format(spec["iconv"].prefix))
if "^zstd" in spec:
args.append("--with-zstd={0}".format(spec["zstd"].prefix.bin.zstd))