mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-25 22:34:18 +08:00
Merge pull request #39 from ids1024/builddeps
System for compile-time dependencies; use for openssl
This commit is contained in:
commit
b8da5d50ef
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,4 +7,5 @@ stage.sig
|
|||||||
stage.tar
|
stage.tar
|
||||||
stage.tar.gz
|
stage.tar.gz
|
||||||
stage.toml
|
stage.toml
|
||||||
|
sysroot
|
||||||
xargo
|
xargo
|
||||||
|
|||||||
16
cook.sh
16
cook.sh
@ -95,6 +95,21 @@ function op {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
prepare)
|
prepare)
|
||||||
|
rm -rf sysroot
|
||||||
|
mkdir sysroot
|
||||||
|
|
||||||
|
if [ ${#BUILD_DEPENDS} -gt 0 ]
|
||||||
|
then
|
||||||
|
pushd $ROOT
|
||||||
|
./repo.sh ${BUILD_DEPENDS}
|
||||||
|
popd
|
||||||
|
|
||||||
|
for i in "${BUILD_DEPENDS[@]}"
|
||||||
|
do
|
||||||
|
CC=cc cargo run --release --manifest-path "$ROOT/pkgutils/Cargo.toml" --bin pkg -- --target=$TARGET install --root sysroot "$REPO/$i.tar.gz"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf build
|
rm -rf build
|
||||||
cp -r source build
|
cp -r source build
|
||||||
|
|
||||||
@ -105,6 +120,7 @@ function op {
|
|||||||
;;
|
;;
|
||||||
unprepare)
|
unprepare)
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
rm -rf sysroot
|
||||||
;;
|
;;
|
||||||
version)
|
version)
|
||||||
pushd build > /dev/null
|
pushd build > /dev/null
|
||||||
|
|||||||
2
pkgutils
2
pkgutils
@ -1 +1 @@
|
|||||||
Subproject commit bf8cc11ddcc649c3be3e97055ab6a7f4060b7946
|
Subproject commit 96a6b2d9fe30d054ef754e6cc3bf88ff60e40199
|
||||||
@ -1,22 +1,7 @@
|
|||||||
GIT=https://github.com/ids1024/cargo.git
|
GIT=https://github.com/ids1024/cargo.git
|
||||||
BRANCH=redox
|
BRANCH=redox
|
||||||
|
BUILD_DEPENDS=(openssl)
|
||||||
|
|
||||||
function recipe_build {
|
function recipe_build {
|
||||||
if [ -d openssl-redox ]
|
export OPENSSL_DIR="$PWD/../sysroot"
|
||||||
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
|
|
||||||
|
|
||||||
export OPENSSL_DIR=$PWD/openssl-prefix
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
GIT=https://github.com/ids1024/curl.git
|
GIT=https://github.com/ids1024/curl.git
|
||||||
BRANCH=redox
|
BRANCH=redox
|
||||||
|
BUILD_DEPENDS=(openssl)
|
||||||
|
|
||||||
HOST=x86_64-elf-redox
|
HOST=x86_64-elf-redox
|
||||||
|
|
||||||
@ -14,27 +15,8 @@ function recipe_update {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function recipe_build {
|
function recipe_build {
|
||||||
if [ -d openssl-redox ]
|
./configure --prefix=/ --host=${HOST} --disable-tftp --disable-ftp --disable-ntlm-wb --with-ssl="$PWD/../sysroot" --with-ca-path=/ssl/certs
|
||||||
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
|
make
|
||||||
|
|
||||||
skip=1
|
skip=1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
38
recipes/openssl/recipe.sh
Normal file
38
recipes/openssl/recipe.sh
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
GIT=https://github.com/ids1024/openssl.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 {
|
||||||
|
./Configure no-shared no-dgram redox-x86_64 --prefix="/"
|
||||||
|
make -j"$(nproc)"
|
||||||
|
skip=1
|
||||||
|
}
|
||||||
|
|
||||||
|
function recipe_test {
|
||||||
|
echo "skipping test"
|
||||||
|
skip=1
|
||||||
|
}
|
||||||
|
|
||||||
|
function recipe_clean {
|
||||||
|
make clean
|
||||||
|
skip=1
|
||||||
|
}
|
||||||
|
|
||||||
|
function recipe_stage {
|
||||||
|
dest="$(realpath $1)"
|
||||||
|
make DESTDIR="$dest" install
|
||||||
|
rm -rf "$1/lib/pkgconfig" # pkg-config returns paths based on / prefix, breaking cross compile
|
||||||
|
rm -rf "$1/{share,ssl}"
|
||||||
|
skip=1
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user