srctree

Robin Linden parent 4ccc0898 28a50048
deps: Add xcursor

inlinesplit
WORKSPACE added: 41, removed: 2, total 39
@@ -271,6 +271,19 @@ http_archive(
)
 
# The freedesktop GitLab goes down too often to be trusted.
# https://gitlab.freedesktop.org/xorg/lib/libxcursor
http_archive(
name = "xcursor", # MIT
build_file = "//third_party:xcursor.BUILD",
integrity = "sha256-iRTpjSBuz2Z+o4vWguqUQSWKLFOGZhCfWvTa3WGq630=",
patch_cmds = ["sed -i'' -e /config.h/d src/xcursorint.h"],
strip_prefix = "libxcursor-libXcursor-1.2.1",
urls = [
"https://gitlab.freedesktop.org/xorg/lib/libxcursor/-/archive/libXcursor-1.2.1/libxcursor-libXcursor-1.2.1.tar.gz",
# TODO(robinlinden): Mirror.
],
)
 
http_archive(
name = "xext", # MIT
build_file = "//third_party:xext.BUILD",
 
filename was Deleted added: 41, removed: 2, total 39
@@ -0,0 +1,26 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
 
genrule(
name = "xcursor_hdrs",
srcs = ["include/X11/Xcursor/Xcursor.h.in"],
outs = ["X11/Xcursor/Xcursor.h"],
cmd = "cp $< $@",
)
 
genrule(
name = "internal_xcursor_hdrs",
srcs = [":xcursor_hdrs"],
outs = ["Xcursor.h"],
cmd = "cp $< $@",
)
 
cc_library(
name = "xcursor",
srcs = [":internal_xcursor_hdrs"] + glob([
"src/*.c",
"src/*.h",
]),
hdrs = [":xcursor_hdrs"],
includes = ["."],
visibility = ["//visibility:public"],
)