zopfli: add new package (#31879)

Co-authored-by: James A Zilberman <jazrc@rit.edu>
Co-authored-by: qwertos <qwertos@users.noreply.github.com>
This commit is contained in:
Jen Herting 2022-08-03 08:02:02 -04:00 committed by GitHub
parent a5d49ef77a
commit ba9b225ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,23 @@
# Copyright 2013-2022 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 Zopfli(CMakePackage):
"""Zopfli Compression Algorithm is a compression library programmed
in C to perform very good, but slow, deflate or zlib compression."""
homepage = "https://github.com/google/zopfli"
url = "https://github.com/google/zopfli/archive/refs/tags/zopfli-1.0.3.tar.gz"
variant("shared", default=False, description="Build shared libraries")
version("1.0.3", sha256="e955a7739f71af37ef3349c4fa141c648e8775bceb2195be07e86f8e638814bd")
def cmake_args(self):
args = [self.define_from_variant("ZOPFLI_BUILD_SHARED", "shared")]
return args