feat: add support for Mercurial (hg) source handling in mod.rs
- Implemented `split_hg_url` to parse Mercurial URLs and revisions. - Added `checkout_hg` function to clone Mercurial repositories. - Integrated Mercurial handling into the `prepare_one` function to support resuming builds. - Added tests for `split_hg_url` to ensure correct parsing of URLs and revisions. --- feat: introduce legacy STARBUILD conversion support in starbuild.rs - Created `ConvertedStarbuild` and `ParsedStarbuild` structs to manage conversion data. - Implemented `convert_starbuild_file` to parse STARBUILD files and generate package specifications. - Added functions to handle parsing of various STARBUILD constructs, including dependencies and build phases. - Developed a build script generator for STARBUILD, supporting custom install functions. - Included tests to validate conversion of single and multi-output STARBUILD files.
This commit is contained in:
@@ -117,6 +117,19 @@ pub fn build(
|
||||
"DEPOT_PRIMARY_DESTDIR",
|
||||
install_destdir.to_string_lossy().into_owned(),
|
||||
);
|
||||
let starbuild_workdir = if spec.sources().is_empty() {
|
||||
src_dir.to_path_buf()
|
||||
} else {
|
||||
src_dir
|
||||
.parent()
|
||||
.map(Path::to_path_buf)
|
||||
.unwrap_or_else(|| src_dir.to_path_buf())
|
||||
};
|
||||
crate::builder::set_env_var(
|
||||
&mut env_vars,
|
||||
"DEPOT_STARBUILD_WORKDIR",
|
||||
starbuild_workdir.to_string_lossy().into_owned(),
|
||||
);
|
||||
add_output_destdir_envs(spec, &install_destdir, &mut env_vars);
|
||||
|
||||
// Ensure build script path is absolute for when we are in a sub-build-dir
|
||||
|
||||
Reference in New Issue
Block a user