dbus: AutotoolsPackage, optional documentation build (#38679)

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
This commit is contained in:
Adam J. Stewart 2023-07-03 03:18:00 -05:00 committed by GitHub
parent af449b7943
commit f0add2428c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@
from spack.package import * from spack.package import *
class Dbus(Package): class Dbus(AutotoolsPackage):
"""D-Bus is a message bus system, a simple way for applications to """D-Bus is a message bus system, a simple way for applications to
talk to one another. D-Bus supplies both a system daemon (for talk to one another. D-Bus supplies both a system daemon (for
events such new hardware device printer queue ) and a events such new hardware device printer queue ) and a
@ -28,19 +28,23 @@ class Dbus(Package):
version("1.8.4", sha256="3ef63dc8d0111042071ee7f7bafa0650c6ce2d7be957ef0b7ec269495a651ff8") version("1.8.4", sha256="3ef63dc8d0111042071ee7f7bafa0650c6ce2d7be957ef0b7ec269495a651ff8")
version("1.8.2", sha256="5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08") version("1.8.2", sha256="5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08")
variant("xml_docs", default=False, description="Build XML documentation")
depends_on("pkgconfig", type="build") depends_on("pkgconfig", type="build")
depends_on("docbook-xml", type="build") depends_on("docbook-xml", type="build")
depends_on("docbook-xsl", type="build") depends_on("docbook-xsl", type="build")
depends_on("expat") depends_on("expat")
depends_on("glib") depends_on("glib")
depends_on("libsm") depends_on("libsm")
depends_on("xmlto") depends_on("xmlto", when="+xml_docs", type="build")
def install(self, spec, prefix): def configure_args(self):
configure("--prefix=%s" % prefix, "--disable-systemd", "--disable-launchd") args = ["--disable-systemd", "--disable-launchd"]
make() args += self.enable_or_disable("xml-docs", variant="xml_docs")
make("install") return args
@run_after("install")
def generate_uuid(self):
# dbus needs a machine id generated after install # dbus needs a machine id generated after install
dbus_uuidgen = Executable(join_path(prefix.bin, "dbus-uuidgen")) dbus_uuidgen = Executable(self.prefix.bin.join("dbus-uuidgen"))
dbus_uuidgen("--ensure") dbus_uuidgen("--ensure")