|
| 1 | +-- Form B C-source compat descriptor for Brotli. The three source globs match |
| 2 | +-- upstream v1.2.0's BROTLI_COMMON_SOURCES, BROTLI_DEC_SOURCES, and |
| 3 | +-- BROTLI_ENC_SOURCES CMake sets; the CLI, tests, fuzzers, and the optional C++ |
| 4 | +-- lazy static-initialization implementation are outside those sets. |
| 5 | +package = { |
| 6 | + spec = "1", |
| 7 | + namespace = "compat", |
| 8 | + name = "brotli", |
| 9 | + description = "Brotli compression library", |
| 10 | + licenses = {"MIT"}, |
| 11 | + repo = "https://github.com/google/brotli", |
| 12 | + type = "package", |
| 13 | + |
| 14 | + xpm = { |
| 15 | + linux = { |
| 16 | + ["1.2.0"] = { |
| 17 | + url = "https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz", |
| 18 | + sha256 = "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec", |
| 19 | + }, |
| 20 | + }, |
| 21 | + macosx = { |
| 22 | + ["1.2.0"] = { |
| 23 | + url = "https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz", |
| 24 | + sha256 = "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec", |
| 25 | + }, |
| 26 | + }, |
| 27 | + windows = { |
| 28 | + ["1.2.0"] = { |
| 29 | + url = "https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz", |
| 30 | + sha256 = "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec", |
| 31 | + }, |
| 32 | + }, |
| 33 | + }, |
| 34 | + |
| 35 | + mcpp = { |
| 36 | + language = "c++23", |
| 37 | + import_std = false, |
| 38 | + c_standard = "c11", |
| 39 | + include_dirs = { "*/c/include" }, |
| 40 | + sources = { |
| 41 | + "*/c/common/*.c", |
| 42 | + "*/c/dec/*.c", |
| 43 | + "*/c/enc/*.c", |
| 44 | + }, |
| 45 | + targets = { ["brotli"] = { kind = "lib" } }, |
| 46 | + deps = {}, |
| 47 | + |
| 48 | + -- Upstream detects libm and propagates it for static builds. |
| 49 | + linux = { ldflags = { "-lm" } }, |
| 50 | + macosx = { ldflags = { "-lm" } }, |
| 51 | + windows = { |
| 52 | + -- This is upstream's only MSVC-specific library definition. |
| 53 | + cflags = { "-D_CRT_SECURE_NO_WARNINGS" }, |
| 54 | + }, |
| 55 | + }, |
| 56 | +} |
0 commit comments