libjxl: add new package (#31983)

This commit is contained in:
Adam J. Stewart 2022-08-10 00:20:07 -07:00 committed by GitHub
parent e7d8a7765b
commit 03a91df81a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 114 additions and 7 deletions

View file

@ -251,7 +251,7 @@ class Gdal(CMakePackage):
# depends_on('ingres', when='+ingres')
depends_on("jasper@1.900.1", patches=[patch("uuid.patch")], when="+jasper")
depends_on("jpeg", when="+jpeg")
# depends_on('libjxl', when='+jxl')
depends_on("libjxl", when="+jxl")
# depends_on('kakadu', when='+kdu')
depends_on("kealib", when="+kea")
depends_on("lerc", when="+lerc")
@ -364,7 +364,6 @@ class Gdal(CMakePackage):
conflicts("+gta")
conflicts("+idb")
conflicts("+ingres")
conflicts("+jxl")
conflicts("+kdu")
conflicts("+libcsf")
conflicts("+luratech")

View file

@ -14,12 +14,10 @@ class Googletest(CMakePackage):
git = "https://github.com/google/googletest"
version("main", branch="main")
version("1.12.1", sha256="81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2")
version("1.12.0", sha256="2a4f11dce6188b256f3650061525d0fe352069e5c162452818efbbf8d0b5fe1c")
version("1.11.0", sha256="07b0896360f8e14414a8419e35515da0be085c5b4547c914ab8f4684ef0a3a8e")
version(
"1.10.0",
sha256="e4a7cd97c903818abe7ddb129db9c41cc9fd9e2ded654be57ced26d45c72e4c9",
preferred=True,
)
version("1.10.0", sha256="e4a7cd97c903818abe7ddb129db9c41cc9fd9e2ded654be57ced26d45c72e4c9")
version("1.8.1", sha256="8e40a005e098b1ba917d64104549e3da274e31261dedc57d6250fe91391b2e84")
version("1.8.0", sha256="d8c33605d23d303b08a912eaee7f84c4e091d6e3d90e9a8ec8aaf7450dfe2568")
version("1.7.0", sha256="9639cf8b7f37a4d0c6575f52c01ef167c5f11faee65252296b3ffc2d9acd421b")

View file

@ -0,0 +1,24 @@
# 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 Highway(CMakePackage):
"""Performance-portable, length-agnostic SIMD with runtime dispatch."""
homepage = "https://github.com/google/highway"
url = "https://github.com/google/highway/archive/refs/tags/1.0.0.tar.gz"
version("1.0.0", sha256="ab4f5f864932268356f9f6aa86f612fa4430a7db3c8de0391076750197e876b8")
depends_on("cmake@3.10:", type="build")
depends_on("googletest", type="test")
def cmake_args(self):
args = []
if self.run_tests:
args.append(self.define("HWY_SYSTEM_GTEST", True))
return args

View file

@ -0,0 +1,41 @@
# 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 Libjxl(CMakePackage):
"""JPEG XL image format reference implementation."""
homepage = "https://github.com/libjxl/libjxl"
url = "https://github.com/libjxl/libjxl/archive/refs/tags/v0.6.1.tar.gz"
git = "https://github.com/libjxl/libjxl.git"
version("main", branch="main", submodules=True)
version("0.6.1", tag="v0.6.1", submodules=True)
depends_on("cmake@3.10:", type="build")
depends_on("brotli")
depends_on("highway")
# Only needed at test time, but unfortunately "test" doesn't cause the dep to be added
# by Spack's compiler wrappers. Solution of adding "link" means that dependency is now
# always required...
depends_on("googletest+gmock", type=("link", "test"))
# https://github.com/libjxl/libjxl/pull/582
conflicts("%clang", when="@0.6")
conflicts("%apple-clang", when="@0.6")
def cmake_args(self):
args = [
self.define("JPEGXL_FORCE_SYSTEM_BROTLI", True),
self.define("JPEGXL_FORCE_SYSTEM_HWY", True),
]
if self.run_tests:
args.append(self.define("JPEGXL_FORCE_SYSTEM_GTEST", True))
return args

View file

@ -0,0 +1,22 @@
# 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 Lodepng(MakefilePackage):
"""PNG encoder and decoder in C and C++."""
homepage = "https://lodev.org/lodepng/"
git = "https://github.com/lvandeve/lodepng.git"
version("master", branch="master")
depends_on("sdl2")
def install(self, spec, prefix):
mkdir(prefix.bin)
for exe in ["unittest", "benchmark", "pngdetail", "showpng"]:
install(exe, prefix.bin)

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 Sjpeg(CMakePackage):
"""SimpleJPEG: simple jpeg encoder."""
homepage = "https://github.com/webmproject/sjpeg"
git = "https://github.com/webmproject/sjpeg.git"
version("master", branch="master")
depends_on("cmake@2.8.7:", type="build")
# TODO: these dependencies seem to be optional?
# depends_on("zlib")
# depends_on("libpng")
# depends_on("jpeg")
# depends_on("gl")
# depends_on("freeglut")