ok/jj
1
0
Fork 0
forked from mirrors/jj

buck: build zstd

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2024-06-25 18:38:28 -05:00
parent 5547e28cea
commit 60f2a44273
2 changed files with 37 additions and 0 deletions

32
buck/third-party/zstd/BUILD vendored Normal file
View file

@ -0,0 +1,32 @@
load("@root//buck/shims/jj.bzl", "jj")
# XXX FIXME (aseipp): download the real source, not my copy of zstd i amalgamated a few months ago
http_archive(
name = 'src',
sha256 = '3dde08c4ceb16a1de42ed4008fa52eda01fc1b8b115012e8216b9f6d910db9e5',
urls = [
'https://gist.github.com/thoughtpolice/bb26bee5c02e8986760210b291e43288/archive/6bcf321e242d62765c640458cd98d407e84f33a1.tar.gz',
],
type = 'tar.gz',
strip_prefix = "bb26bee5c02e8986760210b291e43288-6bcf321e242d62765c640458cd98d407e84f33a1",
sub_targets = [
'zstd.h',
'zdict.h',
'zstd_errors.h',
'zstd.c',
]
)
jj.cxx_library(
name = 'zstd',
header_namespace = 'zstd',
exported_headers = {
'zstd.h': ':src[zstd.h]',
'zdict.h': ':src[zdict.h]',
'zstd_errors.h': ':src[zstd_errors.h]',
},
srcs = [ ':src[zstd.c]' ],
preferred_linkage = "static",
)

5
buck/third-party/zstd/PACKAGE vendored Normal file
View file

@ -0,0 +1,5 @@
package(
inherit = True,
visibility = [ 'PUBLIC' ],
)