libcroco: Get the doc
variant working (#34735)
This commit is contained in:
parent
35d0dc8bb5
commit
873871bc62
@ -3,6 +3,7 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
@ -15,18 +16,39 @@ class Libcroco(AutotoolsPackage):
|
||||
version("0.6.13", sha256="767ec234ae7aa684695b3a735548224888132e063f92db585759b422570621d4")
|
||||
version("0.6.12", sha256="ddc4b5546c9fb4280a5017e2707fbd4839034ed1aba5b7d4372212f34f84f860")
|
||||
|
||||
# libcroco has a --enable-gtk-doc configure flag that appears to be
|
||||
# ignored as of version 0.6.13. Until that flag is honored, the +doc
|
||||
# variant is a no-op
|
||||
# variant("doc", default=False,
|
||||
# description="Build documentation with gtk-doc")
|
||||
variant("doc", default=False, description="Build documentation with gtk-doc")
|
||||
|
||||
depends_on("glib")
|
||||
depends_on("libxml2")
|
||||
depends_on("gtk-doc", type="build")
|
||||
depends_on("gtk-doc", type="build", when="+doc")
|
||||
depends_on("docbook-xml", type="build", when="+doc")
|
||||
depends_on("docbook-xsl", type="build", when="+doc")
|
||||
depends_on("py-pygments", type="build", when="+doc")
|
||||
depends_on("pkgconfig", type="build")
|
||||
|
||||
def configure_args(self):
|
||||
config_args = []
|
||||
if "+doc" in self.spec:
|
||||
config_args.extend(
|
||||
[
|
||||
"--enable-gtk-doc",
|
||||
"--enable-gtk-doc-html",
|
||||
# PDF not supported in gtk-doc
|
||||
"--disable-gtk-doc-pdf",
|
||||
]
|
||||
)
|
||||
else:
|
||||
config_args.extend(
|
||||
[
|
||||
"--disable-gtk-doc",
|
||||
"--disable-gtk-doc-html",
|
||||
"--disable-gtk-doc-pdf",
|
||||
]
|
||||
)
|
||||
|
||||
# macOS ld does not support this flag
|
||||
# https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libcroco.rb
|
||||
return ["--disable-Bsymbolic"]
|
||||
if self.spec.satisfies("platform=darwin"):
|
||||
config_args.append("--disable-Bsymbolic")
|
||||
|
||||
return config_args
|
||||
|
Loading…
Reference in New Issue
Block a user