diff --git a/cook.sh b/cook.sh index 641a1c8d96ecede6c1f5a3c19f02329a6621cc17..ae5bc997bc4ba37e24a504cf7a3b7fb0e8011782 100755 --- a/cook.sh +++ b/cook.sh @@ -260,6 +260,18 @@ function op { echo "name = \"$1\"" > "stage.toml" echo "version = \"$(op $1 version)\"" >> "stage.toml" echo "target = \"$TARGET\"" >> "stage.toml" + + # Add runtime dependencies to package if they exist + if [ -n "$DEPENDS" ] + then + # Remove leading and trailing whitespace, replace whitespace between + # package names with commas, and surround package names with quotes + dependencies=$(echo -e "$DEPENDS" | sed -E 's/^[[:space:]]*//;s/[[:space:]]*$//;s/[[:space:]]+/,/g;s/[^, ][^, ]*/"&"/g') + echo "depends = [$dependencies]" >> "stage.toml" + else + echo "depends = []" >> "stage.toml" + fi + mkdir -p stage/pkg cp -v stage.toml "stage/pkg/$1.toml" pkg --target=$TARGET create stage diff --git a/recipes/curl/recipe.sh b/recipes/curl/recipe.sh index 9d460ebc9d84b976f29041fdbb64953c8b3bb0ac..a64a6b9fb74e209b6964556f8671fa6fbe63be18 100644 --- a/recipes/curl/recipe.sh +++ b/recipes/curl/recipe.sh @@ -1,6 +1,7 @@ TAR=https://curl.haxx.se/download/curl-7.55.1.tar.gz BRANCH=redox BUILD_DEPENDS=(openssl) +DEPENDS="ca-certificates" function recipe_version { printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" diff --git a/recipes/gcc/recipe.sh b/recipes/gcc/recipe.sh index 760fcf7cf1836d4df3fc0df7a422fc5f5528f939..1ce91e8312fe64c23de4af2e7dda36c2268174fe 100644 --- a/recipes/gcc/recipe.sh +++ b/recipes/gcc/recipe.sh @@ -1,5 +1,6 @@ GIT=https://github.com/redox-os/gcc.git BRANCH=redox +DEPENDS="gnu-binutils newlib" export AR="${HOST}-ar" export AS="${HOST}-as" diff --git a/recipes/rust/recipe.sh b/recipes/rust/recipe.sh index 389d5bd966748488421b6a3847b61e97aae6d5c4..0f793f7b37543faa4afc3875fa3634736cb9c364 100644 --- a/recipes/rust/recipe.sh +++ b/recipes/rust/recipe.sh @@ -1,5 +1,6 @@ GIT=https://github.com/ids1024/rust.git BRANCH=compile-redox +DEPENDS="gcc cargo" LLVM_PREFIX=$PWD/build/llvm-root SYSROOT=/usr/$HOST