From a13495e4155267bb59b495c8e62816b542653d0d Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 23 Jun 2017 18:16:40 -0700 Subject: [PATCH 1/3] Recipe for curl --- recipes/curl/recipe.sh | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 recipes/curl/recipe.sh diff --git a/recipes/curl/recipe.sh b/recipes/curl/recipe.sh new file mode 100644 index 000000000..ad96990c2 --- /dev/null +++ b/recipes/curl/recipe.sh @@ -0,0 +1,55 @@ +GIT=https://github.com/ids1024/curl.git +BRANCH=redox + +HOST=x86_64-elf-redox + +function recipe_version { + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + skip=1 +} + +function recipe_update { + echo "skipping update" + skip=1 +} + +function recipe_build { + if [ -d openssl-redox ] + then + git -C openssl-redox pull + else + git clone https://github.com/ids1024/openssl.git -b redox --depth 1 openssl-redox + fi + + rm -rf openssl-prefix + mkdir openssl-prefix + + pushd openssl-redox + ./Configure no-shared no-dgram redox-x86_64 --prefix="/" + make -j"$(nproc)" + make DESTDIR="$PWD/../openssl-prefix" install + popd + + rm -rf openssl-prefix/lib/pkgconfig # pkg-config returns paths based on / prefix, breaking cross compile + + ./configure --prefix=/ --host=${HOST} --disable-tftp --disable-ftp --disable-ntlm-wb --with-ssl="$PWD/openssl-prefix" --with-ca-path=/ssl/certs + make + + skip=1 +} + +function recipe_test { + echo "skipping test" + skip=1 +} + +function recipe_clean { + make clean + skip=1 +} + +function recipe_stage { + mkdir "$1/bin" + cp src/curl "$1/bin" + skip=1 +} From 76fc2f5b4f2b742658f4ceae8fb63d514576d4f2 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 23 Jun 2017 19:09:55 -0700 Subject: [PATCH 2/3] Correct prefix for openssl in cargo build --- recipes/cargo/recipe.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/cargo/recipe.sh b/recipes/cargo/recipe.sh index a6faa2c79..835267931 100644 --- a/recipes/cargo/recipe.sh +++ b/recipes/cargo/recipe.sh @@ -13,9 +13,9 @@ function recipe_build { mkdir openssl-prefix pushd openssl-redox - ./Configure no-shared no-dgram redox-x86_64 --prefix="$PWD/../openssl-prefix" + ./Configure no-shared no-dgram redox-x86_64 --prefix="/" make -j"$(nproc)" - make install + make DESTDIR="$PWD/../openssl-prefix" install popd export OPENSSL_DIR=$PWD/openssl-prefix From 7ed36c0d3e2624e5bd4a661d6c9ed1ce02a02c92 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 23 Jun 2017 20:45:17 -0700 Subject: [PATCH 3/3] Correct ca-certificates recipe --- recipes/ca-certificates/recipe.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/recipes/ca-certificates/recipe.sh b/recipes/ca-certificates/recipe.sh index dc5a06b49..f4e00f7a0 100644 --- a/recipes/ca-certificates/recipe.sh +++ b/recipes/ca-certificates/recipe.sh @@ -1,15 +1,16 @@ function recipe_fetch { - mkdir source + if [ ! -d source ] + then + mkdir source + fi pushd source - curl -o make-ca.sh http://anduin.linuxfromscratch.org/BLFS/other/make-ca.sh-20170514 - curl -o certdata.txt http://anduin.linuxfromscratch.org/BLFS/other/certdata.txt + curl -o make-ca.sh --time-cond make-ca.sh http://anduin.linuxfromscratch.org/BLFS/other/make-ca.sh-20170514 + curl -o certdata.txt --time-cond certdata.txt http://anduin.linuxfromscratch.org/BLFS/other/certdata.txt popd skip=1 } function recipe_update { - curl -o make-ca.sh --time-cond make-ca.sh http://anduin.linuxfromscratch.org/BLFS/other/make-ca.sh-20170514 - curl -o certdata.txt --time-cond certdata.txt http://anduin.linuxfromscratch.org/BLFS/other/certdata.txt skip=1 }