feat: add package rust-bindgen
Signed-off-by: sisungo <[email protected]>
This commit is contained in:
1 parent
7ae32e99e0
commit
41979537e0
1 file changed
+32
@@ -0,0 +1,32 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import rust, packie
|
||||
|
||||
|
||||
version("0.73.2")
|
||||
description("Automatically generates Rust FFI bindings to C (and some C++) libraries.")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_managed("github://rust-lang/rust-bindgen#v0.73.2", "rust")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
builddep("pkgconf @target")
|
||||
builddep("libclang @target")
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["LIBCLANG_PATH"] = packie.prefix_of("libclang") + "/lib"
|
||||
rust.build([
|
||||
"--package", "bindgen-cli",
|
||||
"--no-default-features",
|
||||
"--features", "logging",
|
||||
"--features", "libcpp",
|
||||
])
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("rust-bindgen")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libclang @same-arch")
|
||||
rust.use_auto_pack(["bin"])
|
||||
Reference in new issue
Block a user