Skip to content

Allow building in a local install #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hts-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ static = []
fs-utils = "1.1"
bindgen = { version = "0.53.2", default-features = false, features = ["runtime"] }
cc = "1.0"
glob = "0.3.0"
glob = "0.3.0"
dirs = "1.0.2"
21 changes: 18 additions & 3 deletions hts-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use fs_utils::copy::copy_directory;
use glob::glob;

use ::dirs::home_dir;

use std::env;
use std::fs;
use std::path::PathBuf;
Expand Down Expand Up @@ -86,7 +88,21 @@ fn main() {
.current_dir(out.join("htslib"))
.arg("clean")
.status().unwrap().success()


&&

!Command::new("autoconf")
.current_dir(out.join("htslib"))
.status().unwrap().success()

&&

!Command::new("./configure")
.current_dir(out.join("htslib"))
.env("CFLAGS", &cc_cflags)
.arg(format!("--host={}", &host))
.status().unwrap().success()

&&

!Command::new("autoreconf")
Expand All @@ -98,8 +114,7 @@ fn main() {

!Command::new("./configure")
.current_dir(out.join("htslib"))
.env("CFLAGS", &cc_cflags)
.arg(format!("--host={}", &host))
.arg(format!("--prefix={}/local", home_dir().unwrap().into_os_string().into_string().unwrap()))
.status().unwrap().success()
{
panic!("could not configure htslib nor any of its plugins")
Expand Down