* libiconv can be provided by libc, so update packages which depend on libiconv to require the iconv virtual instead * Many packages need special consideration when locating iconv depending on whether it is provided by libc (no prefix provided) or the libiconv package (in that case we want to provide a prefix) * It was also noticed that when an iconv external was provided, that there was interference with linking (this should generally be handled by Spack's compiler wrappers and bears further investigation) * Like iconv, libintl can be provided by libc or another package, namely gettext. It is not converted to a provider like libiconv because it provides additional routines. The logic is similar to that of iconv but instead of checking the provider, we check whether the gettext installation includes libintl.
65 lines
2.2 KiB
Python
65 lines
2.2 KiB
Python
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
#
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
from spack.package import *
|
|
from spack.util.environment import is_system_path
|
|
|
|
|
|
class Procps(AutotoolsPackage):
|
|
"""Command line and full screen utilities for browsing procfs, a "pseudo"
|
|
file system dynamically generated by the kernel to provide information
|
|
about the status of entries in its process table."""
|
|
|
|
homepage = "https://gitlab.com/procps-ng/procps"
|
|
git = "https://gitlab.com/procps-ng/procps.git"
|
|
|
|
version("master", branch="master")
|
|
version("3.3.15", tag="v3.3.15")
|
|
|
|
variant("nls", default=True, description="Enable Native Language Support.")
|
|
|
|
depends_on("autoconf", type="build")
|
|
depends_on("automake", type="build")
|
|
depends_on("libtool", type="build")
|
|
depends_on("m4", type="build")
|
|
depends_on("pkgconfig@0.9.0:", type="build")
|
|
depends_on("dejagnu", type="test")
|
|
depends_on("iconv")
|
|
depends_on("gettext", when="+nls")
|
|
depends_on("ncurses")
|
|
|
|
conflicts("platform=darwin", msg="procps is linux-only")
|
|
|
|
def autoreconf(self, spec, prefix):
|
|
sh = which("sh")
|
|
sh("autogen.sh")
|
|
|
|
def flag_handler(self, name, flags):
|
|
if name == "ldlibs":
|
|
spec = self.spec
|
|
if "+nls" in spec and "intl" in spec["gettext"].libs.names:
|
|
flags.append("-lintl")
|
|
return self.build_system_flags(name, flags)
|
|
|
|
def configure_args(self):
|
|
spec = self.spec
|
|
args = ["--with-ncurses"]
|
|
|
|
if "+nls" in spec:
|
|
args.append("--enable-nls")
|
|
if "intl" not in spec["gettext"].libs.names:
|
|
args.append("--without-libintl-prefix")
|
|
elif not is_system_path(spec["gettext"].prefix):
|
|
args.append("--with-libintl-prefix=" + spec["gettext"].prefix)
|
|
else:
|
|
args.append("--disable-nls")
|
|
|
|
if spec["iconv"].name == "libc":
|
|
args.append("--without-libiconv-prefix")
|
|
elif not is_system_path(spec["iconv"].prefix):
|
|
args.append("--with-libiconv-prefix={0}".format(spec["iconv"].prefix))
|
|
|
|
return args
|