aboutsummaryrefslogtreecommitdiff
blob: 0fcd3efc3a0554ab25178d141fd032ebc4bc51a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From ae3ae3711784865bdc38bf119a6182a7b8dae91c Mon Sep 17 00:00:00 2001
From: Matt Jolly <Matt.Jolly@footclan.ninja>
Date: Sun, 17 Sep 2023 16:51:42 +1000
Subject: [PATCH] Add system-zstd

--- a/build/linux/unbundle/replace_gn_files.py
+++ b/build/linux/unbundle/replace_gn_files.py
@@ -74,6 +74,7 @@ REPLACEMENTS = {
   #
   'woff2': 'third_party/woff2/BUILD.gn',
   'zlib': 'third_party/zlib/BUILD.gn',
+  'zstd': 'third_party/zstd/BUILD.gn',
 }
 
 
--- /dev/null
+++ b/build/linux/unbundle/zstd.gn
@@ -0,0 +1,25 @@
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_zstd") {
+  packages = [ "libzstd" ]
+}
+
+shim_headers("zstd_shim") {
+  root_path = "src/lib"
+  headers = [
+    "zdict.h",
+    "zstd.h",
+    "zstd_errors.h",
+  ]
+}
+
+source_set("zstd") {
+  deps = [ ":zstd_shim" ]
+  public_configs = [ ":system_zstd" ]
+}
+
+source_set("decompress") {
+  deps = [ ":zstd_shim" ]
+  public_configs = [ ":system_zstd" ]
+}
-- 
2.42.0