1 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2 load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
4 workspace(name = "libjxl")
8 path = "third_party/highway",
13 path = "third_party/brotli",
18 build_file_content = """
23 "src/skcms_internals.h",
24 "src/skcms_Transform.h",
25 "src/Transform_inl.h",
28 visibility = ["//visibility:public"],
31 path = "third_party/skcms",
35 name = "libjpeg_turbo",
36 build_file_content = """
37 load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
39 "@BUILD@" : "20230208",
40 "@CMAKE_PROJECT_NAME@" : "libjpeg-turbo",
41 "@COPYRIGHT_YEAR@" : "2023",
42 "@INLINE@" : "__inline__",
43 "@JPEG_LIB_VERSION@" : "62",
44 "@LIBJPEG_TURBO_VERSION_NUMBER@" : "2001091",
46 "@THREAD_LOCAL@" : "__thread",
47 "@VERSION@" : "2.1.91",
50 "C_ARITH_CODING_SUPPORTED", "D_ARITH_CODING_SUPPORTED",
51 "HAVE_BUILTIN_CTZL", "MEM_SRCDST_SUPPORTED"
54 "WITH_SIMD", "RIGHT_SHIFT_IS_UNSIGNED", "HAVE_INTRIN_H"
56 SUBSTITUTIONS.update({
57 "#cmakedefine " + key : "#define " + key for key in YES_DEFINES
59 SUBSTITUTIONS.update({
60 "#cmakedefine " + key : "// #define " + key for key in NO_DEFINES
64 name = "expand_" + src,
65 template = src + ".in",
67 substitutions = SUBSTITUTIONS,
68 visibility = ["//visibility:public"],
69 ) for src in ["jconfig.h", "jconfigint.h", "jversion.h"]
89 JPEG12_SOURCES = JPEG16_SOURCES + [
101 JPEG_SOURCES = JPEG12_SOURCES + [
155 "jpeg_nbits_table.h",
167 srcs = JPEG16_SOURCES,
169 local_defines = ["BITS_IN_JSAMPLE=16"],
170 visibility = ["//visibility:public"],
174 srcs = JPEG12_SOURCES,
176 local_defines = ["BITS_IN_JSAMPLE=12"],
177 visibility = ["//visibility:public"],
183 deps = [":jpeg16", ":jpeg12"],
185 visibility = ["//visibility:public"],
192 remote = "https://github.com/libjpeg-turbo/libjpeg-turbo.git",
198 build_file_content = """
202 "dgif_lib.c", "egif_lib.c", "gifalloc.c", "gif_err.c", "gif_font.c",
203 "gif_hash.c", "openbsd-reallocarray.c", "gif_hash.h",
206 hdrs = ["gif_lib.h"],
208 visibility = ["//visibility:public"],
211 sha256 = "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd",
212 strip_prefix = "giflib-5.2.1",
213 url = "https://netcologne.dl.sourceforge.net/project/giflib/giflib-5.2.1.tar.gz",