33 lines
735 B
Python
33 lines
735 B
Python
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"])
|