-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
280 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
diff --git a/src/builders/build_basalt.rs b/src/builders/build_basalt.rs | ||
index e67e081..0162e1d 100644 | ||
--- a/src/builders/build_basalt.rs | ||
+++ b/src/builders/build_basalt.rs | ||
@@ -6,6 +6,7 @@ use crate::{ | ||
util::file_utils::rm_rf, | ||
}; | ||
use std::collections::{HashMap, VecDeque}; | ||
+use std::env; | ||
|
||
pub fn get_build_basalt_jobs(profile: &Profile, clean_build: bool) -> VecDeque<WorkerJob> { | ||
let mut jobs = VecDeque::<WorkerJob>::new(); | ||
@@ -101,6 +102,21 @@ pub fn get_build_basalt_jobs(profile: &Profile, clean_build: bool) -> VecDeque<W | ||
.to_string(), | ||
]), | ||
)); | ||
+ jobs.push_back(WorkerJob::new_cmd( | ||
+ None, | ||
+ "auto-patchelf".into(), | ||
+ Some( | ||
+ [ | ||
+ vec![ | ||
+ "--no-add-existing", | ||
+ "--paths".into(), | ||
+ build_dir.into_os_string().into_string().unwrap(), | ||
+ "--libs".into(), | ||
+ ], | ||
+ env::var("libs").unwrap_or_default().split(":").map(|s| s.to_string()).collect(), | ||
+ ].concat() | ||
+ ), | ||
+ )); | ||
|
||
jobs | ||
} | ||
diff --git a/src/builders/build_libsurvive.rs b/src/builders/build_libsurvive.rs | ||
index b4b0dc3..1e2246c 100644 | ||
--- a/src/builders/build_libsurvive.rs | ||
+++ b/src/builders/build_libsurvive.rs | ||
@@ -9,6 +9,7 @@ use std::{ | ||
collections::{HashMap, VecDeque}, | ||
path::Path, | ||
}; | ||
+use std::env; | ||
|
||
pub fn get_build_libsurvive_jobs(profile: &Profile, clean_build: bool) -> VecDeque<WorkerJob> { | ||
let mut jobs = VecDeque::<WorkerJob>::new(); | ||
@@ -71,6 +72,21 @@ pub fn get_build_libsurvive_jobs(profile: &Profile, clean_build: bool) -> VecDeq | ||
} | ||
jobs.push_back(cmake.get_build_job()); | ||
jobs.push_back(cmake.get_install_job()); | ||
+ jobs.push_back(WorkerJob::new_cmd( | ||
+ None, | ||
+ "auto-patchelf".into(), | ||
+ Some( | ||
+ [ | ||
+ vec![ | ||
+ "--no-add-existing", | ||
+ "--paths".into(), | ||
+ build_dir.into_os_string().into_string().unwrap(), | ||
+ "--libs".into(), | ||
+ ], | ||
+ env::var("libs").unwrap_or_default().split(":").map(|s| s.to_string()).collect(), | ||
+ ].concat() | ||
+ ), | ||
+ )); | ||
|
||
jobs | ||
} | ||
diff --git a/src/builders/build_monado.rs b/src/builders/build_monado.rs | ||
index f379d6f..79d8fb9 100644 | ||
--- a/src/builders/build_monado.rs | ||
+++ b/src/builders/build_monado.rs | ||
@@ -9,6 +9,7 @@ use std::{ | ||
collections::{HashMap, VecDeque}, | ||
path::Path, | ||
}; | ||
+use std::env; | ||
|
||
pub fn get_build_monado_jobs(profile: &Profile, clean_build: bool) -> VecDeque<WorkerJob> { | ||
let mut jobs = VecDeque::<WorkerJob>::new(); | ||
@@ -83,6 +84,21 @@ pub fn get_build_monado_jobs(profile: &Profile, clean_build: bool) -> VecDeque<W | ||
} | ||
jobs.push_back(cmake.get_build_job()); | ||
jobs.push_back(cmake.get_install_job()); | ||
+ jobs.push_back(WorkerJob::new_cmd( | ||
+ None, | ||
+ "auto-patchelf".into(), | ||
+ Some( | ||
+ [ | ||
+ vec![ | ||
+ "--no-add-existing", | ||
+ "--paths".into(), | ||
+ build_dir.into_os_string().into_string().unwrap(), | ||
+ "--libs".into(), | ||
+ ], | ||
+ env::var("libs").unwrap_or_default().split(":").map(|s| s.to_string()).collect(), | ||
+ ].concat() | ||
+ ), | ||
+ )); | ||
|
||
jobs | ||
} | ||
diff --git a/src/builders/build_opencomposite.rs b/src/builders/build_opencomposite.rs | ||
index 631b69f..67fba3e 100644 | ||
--- a/src/builders/build_opencomposite.rs | ||
+++ b/src/builders/build_opencomposite.rs | ||
@@ -9,6 +9,7 @@ use std::{ | ||
collections::{HashMap, VecDeque}, | ||
path::Path, | ||
}; | ||
+use std::env; | ||
|
||
pub fn get_build_opencomposite_jobs(profile: &Profile, clean_build: bool) -> VecDeque<WorkerJob> { | ||
let mut jobs = VecDeque::<WorkerJob>::new(); | ||
@@ -48,6 +49,21 @@ pub fn get_build_opencomposite_jobs(profile: &Profile, clean_build: bool) -> Vec | ||
jobs.push_back(cmake.get_prepare_job()); | ||
} | ||
jobs.push_back(cmake.get_build_job()); | ||
+ jobs.push_back(WorkerJob::new_cmd( | ||
+ None, | ||
+ "auto-patchelf".into(), | ||
+ Some( | ||
+ [ | ||
+ vec![ | ||
+ "--no-add-existing", | ||
+ "--paths".into(), | ||
+ build_dir.into_os_string().into_string().unwrap(), | ||
+ "--libs".into(), | ||
+ ], | ||
+ env::var("libs").unwrap_or_default().split(":").map(|s| s.to_string()).collect(), | ||
+ ].concat() | ||
+ ), | ||
+ )); | ||
|
||
jobs | ||
} | ||
diff --git a/src/builders/build_openhmd.rs b/src/builders/build_openhmd.rs | ||
index 1157eca..359f49c 100644 | ||
--- a/src/builders/build_openhmd.rs | ||
+++ b/src/builders/build_openhmd.rs | ||
@@ -3,6 +3,7 @@ use crate::{ | ||
util::file_utils::rm_rf, | ||
}; | ||
use std::{collections::VecDeque, path::Path}; | ||
+use std::env; | ||
|
||
pub fn get_build_openhmd_jobs(profile: &Profile, clean_build: bool) -> VecDeque<WorkerJob> { | ||
let mut jobs = VecDeque::<WorkerJob>::new(); | ||
@@ -80,6 +81,22 @@ pub fn get_build_openhmd_jobs(profile: &Profile, clean_build: bool) -> VecDeque< | ||
"install".into(), | ||
]), | ||
)); | ||
+ // autopatchelf job | ||
+ jobs.push_back(WorkerJob::new_cmd( | ||
+ None, | ||
+ "auto-patchelf".into(), | ||
+ Some( | ||
+ [ | ||
+ vec![ | ||
+ "--no-add-existing", | ||
+ "--paths".into(), | ||
+ build_dir.into_os_string().into_string().unwrap(), | ||
+ "--libs".into(), | ||
+ ], | ||
+ env::var("libs").unwrap_or_default().split(":").map(|s| s.to_string()).collect(), | ||
+ ].concat() | ||
+ ), | ||
+ )); | ||
|
||
jobs | ||
} | ||
diff --git a/src/builders/build_wivrn.rs b/src/builders/build_wivrn.rs | ||
index f2a415d..a160186 100644 | ||
--- a/src/builders/build_wivrn.rs | ||
+++ b/src/builders/build_wivrn.rs | ||
@@ -9,6 +9,7 @@ use std::{ | ||
collections::{HashMap, VecDeque}, | ||
path::Path, | ||
}; | ||
+use std::env; | ||
|
||
pub fn get_build_wivrn_jobs(profile: &Profile, clean_build: bool) -> VecDeque<WorkerJob> { | ||
let mut jobs = VecDeque::<WorkerJob>::new(); | ||
@@ -60,6 +61,21 @@ pub fn get_build_wivrn_jobs(profile: &Profile, clean_build: bool) -> VecDeque<Wo | ||
} | ||
jobs.push_back(cmake.get_build_job()); | ||
jobs.push_back(cmake.get_install_job()); | ||
+ jobs.push_back(WorkerJob::new_cmd( | ||
+ None, | ||
+ "auto-patchelf".into(), | ||
+ Some( | ||
+ [ | ||
+ vec![ | ||
+ "--no-add-existing", | ||
+ "--paths".into(), | ||
+ build_dir.into_os_string().into_string().unwrap(), | ||
+ "--libs".into(), | ||
+ ], | ||
+ env::var("libs").unwrap_or_default().split(":").map(|s| s.to_string()).collect(), | ||
+ ].concat() | ||
+ ), | ||
+ )); | ||
|
||
jobs | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters