|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
|
|
|
|
|
2 files changed, 2 insertions(+), 16 deletions(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/build.rs b/build.rs
|
|
|
|
|
index c7cb1fa..2155fe2 100644
|
|
|
|
|
index cf1b6f3..d704fce 100644
|
|
|
|
|
--- a/build.rs
|
|
|
|
|
+++ b/build.rs
|
|
|
|
|
@@ -1,4 +1,3 @@
|
|
|
|
@ -18,15 +18,18 @@ index c7cb1fa..2155fe2 100644
|
|
|
|
|
extern crate bindgen;
|
|
|
|
|
extern crate cc;
|
|
|
|
|
extern crate pkg_config;
|
|
|
|
|
@@ -187,7 +186,6 @@ fn compile() {
|
|
|
|
|
@@ -196,10 +195,6 @@ fn compile() {
|
|
|
|
|
cc.compile("onig");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn bindgen_headers(_path: &str) {
|
|
|
|
|
-#[cfg(not(feature = "generate"))]
|
|
|
|
|
-fn bindgen_headers(_path: &str) {}
|
|
|
|
|
-
|
|
|
|
|
-#[cfg(feature = "generate")]
|
|
|
|
|
{
|
|
|
|
|
let bindings = bindgen::Builder::default()
|
|
|
|
|
.header(_path)
|
|
|
|
|
@@ -205,13 +203,13 @@ fn bindgen_headers(_path: &str) {
|
|
|
|
|
fn bindgen_headers(path: &str) {
|
|
|
|
|
let arch = env::var("CARGO_CFG_TARGET_ARCH");
|
|
|
|
|
let mut bindgen = bindgen::Builder::default()
|
|
|
|
|
@@ -219,17 +214,13 @@ fn bindgen_headers(path: &str) {
|
|
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
|
let link_type = link_type_override();
|
|
|
|
@ -37,7 +40,11 @@ index c7cb1fa..2155fe2 100644
|
|
|
|
|
let mut conf = Config::new();
|
|
|
|
|
// dynamically-generated headers can work with an older version
|
|
|
|
|
// pre-generated headers are for the latest
|
|
|
|
|
- conf.atleast_version(if cfg!(feature = "generate") {"6.8.0"} else {"6.9.3"});
|
|
|
|
|
- conf.atleast_version(if cfg!(feature = "generate") {
|
|
|
|
|
- "6.8.0"
|
|
|
|
|
- } else {
|
|
|
|
|
- "6.9.3"
|
|
|
|
|
- });
|
|
|
|
|
+ conf.atleast_version("6.8.0");
|
|
|
|
|
if link_type == Some(LinkType::Static) {
|
|
|
|
|
conf.statik(true);
|
|
|
|
@ -66,6 +73,3 @@ index 4d855ad..c9b6d20 100644
|
|
|
|
|
// backfill types from the old hand-written bindings:
|
|
|
|
|
|
|
|
|
|
pub type OnigSyntaxBehavior = ::std::os::raw::c_uint;
|
|
|
|
|
--
|
|
|
|
|
2.26.2
|
|
|
|
|
|
|
|
|
|