Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • fabiao/cookbook
  • redox-os/cookbook
  • stratact/cookbook
  • carrot93/cookbook
  • microcolonel/cookbook
  • feliwir/cookbook
  • xTibor/cookbook
  • jD91mZM2/cookbook
  • mpajkowski/cookbook
  • rw_van/cookbook
  • athei/cookbook
  • kblobr/cookbook
  • VitalyAnkh/cookbook
  • sajattack/cookbook
  • sainath14/cookbook
  • ackxolotl/cookbook
  • AdminXVII/cookbook
  • coolreader18/cookbook
  • deepaksirone/cookbook
  • smckay/cookbook
  • 4lDO2/cookbook
  • tomasritter/cookbook
  • alfredoyang/cookbook
  • samuela/cookbook
  • andrewdavidmackenzie/cookbook
  • uuuvn/cookbook
  • josh_williams/cookbook
  • bjorn3/cookbook
  • ids1024/cookbook
  • Chocimier/cookbook
  • bpisch/cookbook
  • willnode/cookbook
  • grnmeira/cookbook
  • andrey.turkin/cookbook
  • cameronbraid/cookbook
  • kamirr/cookbook
  • freewilll/cookbook
  • kivimango/cookbook
  • rukai/cookbook
  • mattmadeofpasta/cookbook
  • jordan_mccallum/cookbook
  • dahc/cookbook
  • Forest0923/cookbook
  • LLeny/cookbook
  • doriancodes/cookbook
  • ashton/cookbook
  • gmacd/cookbook
  • mojo/cookbook
  • wt/cookbook
  • red15/cookbook
  • hasheddan/cookbook
  • dimymark/cookbook
  • andypython/cookbook
  • enygmator/cookbook
  • Ivan/cookbook
  • argslc/cookbook
  • adi-g15/cookbook
  • tfinnegan937/cookbook
  • raffaeleragni/cookbook
  • Lekkit/cookbook
  • bitstr0m/cookbook
  • josh/cookbook
  • zhaozhao/cookbook
  • blueskyson/cookbook
  • Xunjin/cookbook
  • StaringAtEditor/cookbook
66 results
Show changes
#TODO not compiled or tested
[source]
git = "https://github.com/bragefuglseth/keypunch"
[build]
template = "cargo"
dependencies = [
"gtk4",
"libadwaita",
]
#TODO not compiled or tested
# build instructions - https://github.com/flxzt/rnote/blob/main/BUILDING.md#build-with-meson
[source]
git = "https://github.com/flxzt/rnote"
[build]
template = "custom"
dependencies = [
"glib",
"libadwaita",
"glib",
"libalsa",
"libpoppler",
]
script = """
cookbook_cargo_packages rnote
"""
#TODO missing script for go
#TODO determine dependencies
# build instructions - https://gitlab.com/imatt-foss/clipqr#build
[source]
git = "https://gitlab.com/imatt-foss/clipqr"
rev = "400a98c302aead3f2b1b81ec6dc45d654c8bf209"
[build]
template = "custom"
......@@ -56,6 +56,11 @@ fn copy_dir_all(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> io::Result<()>
Ok(())
}
fn symlink(original: impl AsRef<Path>, link: impl AsRef<Path>) -> Result<(), String> {
std::os::unix::fs::symlink(&original, &link)
.map_err(|err| format!("failed to symlink '{}' to '{}': {}\n{:?}", original.as_ref().display(), link.as_ref().display(), err, err))
}
fn modified(path: &Path) -> Result<SystemTime, String> {
let metadata = fs::metadata(path).map_err(|err| {
format!(
......@@ -196,7 +201,7 @@ function DYNAMIC_INIT {
COOKBOOK_CONFIGURE_FLAGS=(
--host="${GNU_TARGET}"
--prefix=""
--prefix="/usr"
--enable-shared
--disable-static
)
......@@ -249,6 +254,8 @@ fn fetch(recipe_dir: &Path, source: &Option<SourceRecipe>) -> Result<PathBuf, St
upstream,
branch,
rev,
patches,
script,
}) => {
//TODO: use libgit?
if !source_dir.is_dir() {
......@@ -326,6 +333,14 @@ fi"#,
run_command(command)?;
}
if !patches.is_empty() || script.is_some() {
// Hard reset
let mut command = Command::new("git");
command.arg("-C").arg(&source_dir);
command.arg("reset").arg("--hard");
run_command(command)?;
}
// Sync submodules URL
let mut command = Command::new("git");
command.arg("-C").arg(&source_dir);
......@@ -341,6 +356,41 @@ fi"#,
.arg("--init")
.arg("--recursive");
run_command(command)?;
// Apply patches
for patch_name in patches {
let patch_file = recipe_dir.join(patch_name);
if !patch_file.is_file() {
return Err(format!(
"failed to find patch file '{}'",
patch_file.display()
));
}
let patch = fs::read_to_string(&patch_file).map_err(|err| {
format!(
"failed to read patch file '{}': {}\n{:#?}",
patch_file.display(),
err,
err
)
})?;
let mut command = Command::new("patch");
command.arg("--forward");
command.arg("--batch");
command.arg("--directory").arg(&source_dir);
command.arg("--strip=1");
run_command_stdin(command, patch.as_bytes())?;
}
// Run source script
if let Some(script) = script {
let mut command = Command::new("bash");
command.arg("-ex");
command.current_dir(&source_dir);
run_command_stdin(command, format!("{SHARED_PRESCRIPT}\n{script}").as_bytes())?;
}
}
Some(SourceRecipe::Tar {
tar,
......@@ -505,10 +555,18 @@ fn build(
let sysroot_dir_tmp = target_dir.join("sysroot.tmp");
create_dir_clean(&sysroot_dir_tmp)?;
// Make sure sysroot/include exists
create_dir(&sysroot_dir_tmp.join("include"))?;
// Make sure sysroot/lib exists
create_dir(&sysroot_dir_tmp.join("lib"))?;
// Make sure sysroot/usr exists
create_dir(&sysroot_dir_tmp.join("usr"))?;
for folder in &["bin", "include", "lib", "share"] {
// Make sure sysroot/usr/$folder exists
create_dir(&sysroot_dir_tmp.join("usr").join(folder))?;
// Link sysroot/$folder sysroot/usr/$folder
symlink(
Path::new("usr").join(folder),
&sysroot_dir_tmp.join(folder),
)?;
}
for archive_path in dep_pkgars {
let public_path = "build/id_ed25519.pub.toml";
......@@ -641,7 +699,7 @@ function cookbook_cargo_packages {
COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/configure"
COOKBOOK_CONFIGURE_FLAGS=(
--host="${GNU_TARGET}"
--prefix=""
--prefix="/usr"
--disable-shared
--enable-static
)
......
......@@ -36,6 +36,11 @@ pub enum SourceRecipe {
/// The optional revision of the git repository to use for builds. Please specify for
/// reproducible builds
rev: Option<String>,
/// A list of patch files to apply to the source
#[serde(default)]
patches: Vec<String>,
/// Optional script to run to prepare the source
script: Option<String>,
},
/// A tar file source
Tar {
......@@ -236,6 +241,8 @@ mod tests {
upstream: None,
branch: Some("master".to_string()),
rev: Some("06344744d3d55a5ac9a62a6059cb363d40699bbc".to_string()),
patches: Vec::new(),
script: None,
}),
build: BuildRecipe {
kind: BuildKind::Cargo {
......@@ -260,7 +267,7 @@ mod tests {
r#"
[source]
tar = "http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.xz"
sha256 = "8220c0e4082fa26c07b10bfe31f641d2e33ebe1d1bb0b20221b7016bc8b78a3a"
blake3 = "8220c0e4082fa26c07b10bfe31f641d2e33ebe1d1bb0b20221b7016bc8b78a3a"
[build]
template = "custom"
......