Add zlib recipe; use in git recipe

This commit is contained in:
Ian Douglas Scott 2017-07-07 10:19:23 -07:00
parent 27bbfb298b
commit ccfd1885ee
No known key found for this signature in database
GPG Key ID: 4924E10E199B5959
2 changed files with 38 additions and 21 deletions

View File

@ -1,5 +1,6 @@
VERSION=2.13.1
TAR=https://www.kernel.org/pub/software/scm/git/git-$VERSION.tar.xz
BUILD_DEPENDS=(zlib)
HOST=x86_64-elf-redox
@ -26,27 +27,8 @@ function recipe_update {
}
function recipe_build {
if [ ! -d zlib ]
then
mkdir zlib
if [ ! -f zlib-1.2.11.tar.gz ]
then
wget http://zlib.net/zlib-1.2.11.tar.gz
fi
tar xvf zlib-1.2.11.tar.gz -C zlib --strip-components 1
fi
rm -rf zlib-prefix
mkdir zlib-prefix
pushd zlib
./configure --static --prefix=/
make -j"$(nproc)"
make DESTDIR="$PWD/../zlib-prefix" install
popd
autoconf
./configure --host=${HOST} --prefix=/ --with-zlib="${PWD}/zlib-prefix"
autoconf -f
./configure --host=${HOST} --prefix=/ --with-zlib="${PWD}/../sysroot"
make
skip=1
}

35
recipes/zlib/recipe.sh Normal file
View File

@ -0,0 +1,35 @@
VERSION=1.2.11
TAR=http://zlib.net/zlib-$VERSION.tar.gz
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
./configure --static --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,share}
skip=1
}