doxygen: add support for external detection (#20642)
This commit is contained in:
parent
f8124369f9
commit
0611036abd
1 changed files with 24 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
class Doxygen(CMakePackage):
|
class Doxygen(CMakePackage):
|
||||||
|
@ -33,6 +34,29 @@ class Doxygen(CMakePackage):
|
||||||
variant('mscgen', default=False,
|
variant('mscgen', default=False,
|
||||||
description='Build with support for code graphs from mscgen.')
|
description='Build with support for code graphs from mscgen.')
|
||||||
|
|
||||||
|
executables = ['doxygen']
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def determine_version(cls, exe):
|
||||||
|
output = Executable(exe)('-v', output=str, error=str)
|
||||||
|
match = re.search(r"^([\d\.]+)$", output)
|
||||||
|
return match.group(1) if match else None
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def determine_variants(cls, exes, version_str):
|
||||||
|
variants = ''
|
||||||
|
if which('dot'):
|
||||||
|
variants += "+graphviz"
|
||||||
|
else:
|
||||||
|
variants += "~graphviz"
|
||||||
|
|
||||||
|
if which('mscgen'):
|
||||||
|
variants += "+mscgen"
|
||||||
|
else:
|
||||||
|
variants += "~mscgen"
|
||||||
|
|
||||||
|
return variants
|
||||||
|
|
||||||
depends_on("cmake@2.8.12:", type='build')
|
depends_on("cmake@2.8.12:", type='build')
|
||||||
depends_on("python", type='build') # 2 or 3 OK; used in CMake build
|
depends_on("python", type='build') # 2 or 3 OK; used in CMake build
|
||||||
depends_on("iconv")
|
depends_on("iconv")
|
||||||
|
|
Loading…
Reference in a new issue