diff options
author | James Taliaferro <44253038+taliaferro@users.noreply.github.com> | 2024-02-09 12:09:10 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-09 12:09:10 -0800 |
commit | e9e6eb613b752bb3e40f324000896b4c2668587f (patch) | |
tree | 3ddc0fe4df7aad84b3b3e87a9bcdfa134254ee4f | |
parent | 6dd19594ab1cbcd20ee0de73529ca94fc25b7396 (diff) | |
download | spack-e9e6eb613b752bb3e40f324000896b4c2668587f.tar.gz spack-e9e6eb613b752bb3e40f324000896b4c2668587f.tar.bz2 spack-e9e6eb613b752bb3e40f324000896b4c2668587f.tar.xz spack-e9e6eb613b752bb3e40f324000896b4c2668587f.zip |
libsixel: add new package (#40031)
* add new package libsixel
* reorder to group variants and dependencies together
* Switch to using source from fork
The original developer of libsixel, Hayaki Saito (@saitoha), disappeared
in early 2020 and has not updated the repository or been seen since.
However, a fork of the project has been created at libsixel/libsixel,
and that fork has been getting much more regular updates. In this commit
I switch the package to using the better-maintained, now apparently
canonical fork of the project.
That project switched the build system from autotools to Meson, so much
of the build arguments code needed to be rewritten. The newest official
release also contained an error in meson.build which would break on
newer versions of Meson. That error only applied to the libjpeg and
libpng variants, though, so I switched the default to use libgd which
has broader format support anyway.
* blacken
* broke description into multiple lines
* allow libjpeg, etc to be loaded automatically
-rw-r--r-- | var/spack/repos/builtin/packages/libsixel/package.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libsixel/package.py b/var/spack/repos/builtin/packages/libsixel/package.py new file mode 100644 index 0000000000..c69628f3ff --- /dev/null +++ b/var/spack/repos/builtin/packages/libsixel/package.py @@ -0,0 +1,42 @@ +# 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 * + + +class Libsixel(MesonPackage): + """ + This package provides encoder/decoder implementation for DEC SIXEL graphics, + and some converter programs like img2sixel. + """ + + homepage = "https://github.com/libsixel/libsixel" + url = "https://github.com/libsixel/libsixel/archive/refs/tags/v1.10.3.tar.gz" + + maintainers("taliaferro") + + version("1.10.3", sha256="028552eb8f2a37c6effda88ee5e8f6d87b5d9601182ddec784a9728865f821e0") + + variant("img2sixel", default=True, description="build binary img2sixel") + variant("sixel2png", default=True, description="build binary sixel2png") + variant("gd", default=True, description="build with libgd") + variant("jpeg", default=False, description="build with libjpeg") + variant("png", default=False, description="build with libpng") + variant("libcurl", default=False, description="build with libcurl") + variant("gdk-pixbuf2", default=False, description="build with gdk-pixbuf2") + + depends_on("curl", when="+libcurl") + depends_on("libgd", when="+gd") + depends_on("gdk-pixbuf", when="+gdk-pixbuf2") + depends_on("libjpeg", when="+jpeg") + depends_on("libpng", when="+png") + + def meson_args(self): + options = ["img2sixel", "sixel2png", "libcurl", "gdk-pixbuf2"] + args = [] + for option in options: + state = "enabled" if "+{}".format(option) in self.spec else "disabled" + args.append("-D{option}={state}".format(option=option, state=state)) + return args |