New recipes for PlantUML and py-sphinxcontrib-plantuml (#49204)

* new-recipe: plantuml
* new-recipe: py-sphinxcontrib-plantuml
This commit is contained in:
Chris Green 2025-02-27 18:57:23 -06:00 committed by GitHub
parent a43df598a1
commit a8cd0b99f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,39 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import os
from spack.package import *
class Plantuml(Package):
"""PlantUML is a highly versatile tool that facilitates the rapid
and straightforward creation of a wide array of diagrams."""
homepage = "https://plantuml.com"
url = "https://github.com/plantuml/plantuml/releases/download/v1.2025.1/plantuml-lgpl-1.2025.1.jar"
maintainers("greenc-FNAL", "knoepfel", "marcpaterno")
license("LGPL-3.0-or-later", checked_by="greenc-FNAL")
version(
"1.2025.1",
sha256="b08112f0c8ac2a2085c8c4a81ac9eac7bc5a3413a492c252cad4d39e473d9d6d",
expand=False,
)
depends_on("java@8.0:", type="run")
depends_on("graphviz", type="run")
def install(self, spec, prefix):
mkdirp(prefix.bin)
rename(glob.glob("plantuml-*.jar")[0], "plantuml.jar")
install("plantuml.jar", prefix.bin)
plantuml_wrapper = join_path(os.path.dirname(__file__), "plantuml")
install(plantuml_wrapper, prefix.bin.plantuml)
def setup_run_environment(self, env):
env.set("PLANTUML_JAR_LOCATION", join_path(self.prefix.bin, "plantuml.jar"))

View File

@ -0,0 +1,5 @@
#!/bin/bash
if [[ "$*" != *"-gui"* ]]; then
VMARGS="-Djava.awt.headless=true"
fi
exec java $VMARGS -jar "$PLANTUML_JAR_LOCATION" "$@"

View File

@ -0,0 +1,23 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PySphinxcontribPlantuml(PythonPackage):
"""PlantUML for Sphinx."""
homepage = "https://github.com/sphinx-contrib/plantuml/"
pypi = "sphinxcontrib-plantuml/sphinxcontrib-plantuml-0.30.tar.gz"
maintainers("greenc-FNAL", "knoepfel", "marcpaterno")
license("BSD-2-Clause", checked_by="greenc-FNAL")
version("0.30", sha256="2a1266ca43bddf44640ae44107003df4490de2b3c3154a0d627cfb63e9a169bf")
depends_on("py-setuptools", type="build")
depends_on("plantuml", type=("build", "run"))
depends_on("py-sphinx@1.6:", type=("build", "run"))