Skip to content

Commit

Permalink
bump: vendored feature uses v4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Orycterope committed May 26, 2021
1 parent c30065b commit 05d130a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -8,10 +8,10 @@ env:
global:
- MAKEFLAGS="-j 2"
jobs:
- YARA_VERSION=4.1.0 YARA_FEATURES=bindgen
- YARA_VERSION=4.1.0 YARA_FEATURES=bundled-4_1_0
- YARA_VERSION=4.1.1 YARA_FEATURES=bindgen
- YARA_VERSION=4.1.1 YARA_FEATURES=bundled-4_1_1
- YARA_FEATURES=vendored,bindgen
- YARA_FEATURES=vendored,bundled-4_1_0
- YARA_FEATURES=vendored,bundled-4_1_1
before_install:
- |
if [ -n "$YARA_VERSION" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
Expand All @@ -34,7 +34,7 @@ jobs:
env: YARA_FEATURES=vendored,bindgen
- os: windows
rust: stable
env: YARA_FEATURES=vendored,bundled-4_1_0
env: YARA_FEATURES=vendored,bundled-4_1_1

allow_failures:
- rust: nightly
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Expand Up @@ -13,7 +13,7 @@ edition = "2018"
[features]
default = ["bindgen"]
bindgen = ["yara-sys/bindgen"]
bundled-4_1_0 = ["yara-sys/bundled-4_1_0"]
bundled-4_1_1 = ["yara-sys/bundled-4_1_1"]
vendored = ["yara-sys/vendored"]

[dependencies]
Expand All @@ -31,4 +31,4 @@ default-features = false

[package.metadata.docs.rs]
no-default-features = true
features = ["bundled-4_1_0"]
features = ["bundled-4_1_1"]
4 changes: 2 additions & 2 deletions yara-sys/Cargo.toml
Expand Up @@ -13,7 +13,7 @@ edition = "2018"

[features]
default = ["bindgen"]
bundled-4_1_0 = []
bundled-4_1_1 = []
vendored = ["cc"]

[build-dependencies]
Expand All @@ -22,4 +22,4 @@ cc = { version = "1.0", optional = true }

[package.metadata.docs.rs]
no-default-features = true
features = ["bundled-4_1_0"]
features = ["bundled-4_1_1"]
4 changes: 2 additions & 2 deletions yara-sys/README.md
Expand Up @@ -16,10 +16,10 @@ version of Yara. Just make sure the version you specify is the same that the
version on your system!

- `bindgen`: **recommended**: this is the default feature, to use generated bindings.
- `bundled-4_1_0`: use pre-generated bindings for Yara 4.1.0. Useful if you do not
- `bundled-4_1_1`: use pre-generated bindings for Yara 4.1.1. Useful if you do not
want to install LLVM to run bindgen. However, you'll have to make sure you use
a version of Yara with the same major and minor version number.
- `vendored`: automatically compile and link libyara v4.1.0.
- `vendored`: automatically compile and link libyara v4.1.1.

You can specify the location of Yara:

Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions yara-sys/build.rs
Expand Up @@ -136,16 +136,16 @@ mod build {
}
}

#[cfg(feature = "bundled-4_1_0")]
#[cfg(feature = "bundled-4_1_1")]
mod bindings {
use std::env;
use std::fs;
use std::path::PathBuf;

pub fn add_bindings() {
let binding_file = match env::var("CARGO_CFG_TARGET_FAMILY").unwrap().as_ref() {
"unix" => "yara-4.1.0-unix.rs",
"windows" => "yara-4.1.0-windows.rs",
"unix" => "yara-4.1.1-unix.rs",
"windows" => "yara-4.1.1-windows.rs",
f => panic!("no bundled bindings for family {}", f),
};
let out_dir = env::var("OUT_DIR").expect("$OUT_DIR should be defined");
Expand All @@ -155,7 +155,7 @@ mod bindings {
}
}

#[cfg(not(feature = "bundled-4_1_0"))]
#[cfg(not(feature = "bundled-4_1_1"))]
mod bindings {
extern crate bindgen;

Expand Down
2 changes: 1 addition & 1 deletion yara-sys/yara

0 comments on commit 05d130a

Please sign in to comment.