Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/brotli/BUILD.bazel @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 # Description: | |
| 2 # Brotli is a generic-purpose lossless compression algorithm. | |
| 3 | |
| 4 package( | |
| 5 default_visibility = ["//visibility:public"], | |
| 6 ) | |
| 7 | |
| 8 licenses(["notice"]) # MIT | |
| 9 | |
| 10 exports_files(["LICENSE"]) | |
| 11 | |
| 12 config_setting( | |
| 13 name = "clang-cl", | |
| 14 flag_values = { | |
| 15 "@bazel_tools//tools/cpp:compiler": "clang-cl", | |
| 16 }, | |
| 17 visibility = ["//visibility:public"], | |
| 18 ) | |
| 19 | |
| 20 config_setting( | |
| 21 name = "msvc", | |
| 22 flag_values = { | |
| 23 "@bazel_tools//tools/cpp:compiler": "msvc-cl", | |
| 24 }, | |
| 25 visibility = ["//visibility:public"], | |
| 26 ) | |
| 27 | |
| 28 STRICT_C_OPTIONS = select({ | |
| 29 ":msvc": [], | |
| 30 ":clang-cl": [ | |
| 31 "/W4", | |
| 32 "-Wconversion", | |
| 33 "-Wlong-long", | |
| 34 "-Wmissing-declarations", | |
| 35 "-Wmissing-prototypes", | |
| 36 "-Wno-strict-aliasing", | |
| 37 "-Wshadow", | |
| 38 "-Wsign-compare", | |
| 39 "-Wno-sign-conversion", | |
| 40 ], | |
| 41 "//conditions:default": [ | |
| 42 "--pedantic-errors", | |
| 43 "-Wall", | |
| 44 "-Wconversion", | |
| 45 "-Werror", | |
| 46 "-Wextra", | |
| 47 "-Wlong-long", | |
| 48 "-Wmissing-declarations", | |
| 49 "-Wmissing-prototypes", | |
| 50 "-Wno-strict-aliasing", | |
| 51 "-Wshadow", | |
| 52 "-Wsign-compare", | |
| 53 ], | |
| 54 }) | |
| 55 | |
| 56 filegroup( | |
| 57 name = "public_headers", | |
| 58 srcs = glob(["c/include/brotli/*.h"]), | |
| 59 ) | |
| 60 | |
| 61 filegroup( | |
| 62 name = "common_headers", | |
| 63 srcs = glob(["c/common/*.h"]), | |
| 64 ) | |
| 65 | |
| 66 filegroup( | |
| 67 name = "common_sources", | |
| 68 srcs = glob(["c/common/*.c"]), | |
| 69 ) | |
| 70 | |
| 71 filegroup( | |
| 72 name = "dec_headers", | |
| 73 srcs = glob(["c/dec/*.h"]), | |
| 74 ) | |
| 75 | |
| 76 filegroup( | |
| 77 name = "dec_sources", | |
| 78 srcs = glob(["c/dec/*.c"]), | |
| 79 ) | |
| 80 | |
| 81 filegroup( | |
| 82 name = "enc_headers", | |
| 83 srcs = glob(["c/enc/*.h"]), | |
| 84 ) | |
| 85 | |
| 86 filegroup( | |
| 87 name = "enc_sources", | |
| 88 srcs = glob(["c/enc/*.c"]), | |
| 89 ) | |
| 90 | |
| 91 cc_library( | |
| 92 name = "brotli_inc", | |
| 93 hdrs = [":public_headers"], | |
| 94 copts = STRICT_C_OPTIONS, | |
| 95 strip_include_prefix = "c/include", | |
| 96 ) | |
| 97 | |
| 98 cc_library( | |
| 99 name = "brotlicommon", | |
| 100 srcs = [":common_sources"], | |
| 101 hdrs = [":common_headers"], | |
| 102 copts = STRICT_C_OPTIONS, | |
| 103 deps = [":brotli_inc"], | |
| 104 ) | |
| 105 | |
| 106 cc_library( | |
| 107 name = "brotlidec", | |
| 108 srcs = [":dec_sources"], | |
| 109 hdrs = [":dec_headers"], | |
| 110 copts = STRICT_C_OPTIONS, | |
| 111 deps = [":brotlicommon"], | |
| 112 ) | |
| 113 | |
| 114 cc_library( | |
| 115 name = "brotlienc", | |
| 116 srcs = [":enc_sources"], | |
| 117 hdrs = [":enc_headers"], | |
| 118 copts = STRICT_C_OPTIONS, | |
| 119 linkopts = select({ | |
| 120 ":clang-cl": [], | |
| 121 ":msvc": [], | |
| 122 "//conditions:default": ["-lm"], | |
| 123 }), | |
| 124 deps = [":brotlicommon"], | |
| 125 ) | |
| 126 | |
| 127 cc_binary( | |
| 128 name = "brotli", | |
| 129 srcs = ["c/tools/brotli.c"], | |
| 130 copts = STRICT_C_OPTIONS, | |
| 131 linkstatic = 1, | |
| 132 deps = [ | |
| 133 ":brotlidec", | |
| 134 ":brotlienc", | |
| 135 ], | |
| 136 ) | |
| 137 | |
| 138 filegroup( | |
| 139 name = "dictionary", | |
| 140 srcs = ["c/common/dictionary.bin"], | |
| 141 ) |
