Merge branch 'ids1024-lua'

This commit is contained in:
Jeremy Soller 2017-03-29 19:09:49 -06:00
commit f57cd8dfc5
3 changed files with 69 additions and 8 deletions

2
.gitignore vendored
View File

@ -1,4 +1,6 @@
build
repo
source
source.tar
stage
stage.tar

42
cook.sh
View File

@ -48,19 +48,45 @@ function op {
op $1 unfetch
;;
fetch)
if [ ! -d build ]
if [ -n "$TAR" ]
then
git clone --recursive "$GIT" build
if [ ! -f source.tar ]
then
wget "$TAR" -O source.tar
fi
if [ ! -d source ]
then
mkdir source
tar xvf source.tar -C source --strip-components 1
fi
rm -rf build
cp -r source build
elif [ -n "$GIT" ]
then
if [ ! -d source ]
then
git clone --recursive "$GIT" source
fi
pushd source > /dev/null
git pull
git submodule sync
git submodule update --init --recursive
popd > /dev/null
rm -rf build
cp -r source build
fi
pushd build > /dev/null
git pull
git submodule sync
git submodule update --init --recursive
popd > /dev/null
;;
unfetch)
rm -rfv build
rm -rfv build source
if [ -n "$TAR" ]
then
rm -f source.tar
fi
;;
version)
pushd build > /dev/null

33
recipes/lua/recipe.sh Normal file
View File

@ -0,0 +1,33 @@
VERSION=5.3.1
TAR=http://www.lua.org/ftp/lua-$VERSION.tar.gz
function recipe_version {
echo "$VERSION"
return 1
}
function recipe_update {
echo "skipping update"
return 1
}
function recipe_build {
make generic CC="$CC -std=gnu99"
return 1
}
function recipe_test {
echo "skipping test"
return 1
}
function recipe_clean {
make clean
return 1
}
function recipe_stage {
mkdir -pv "$1/bin"
cp src/lua src/luac "$1/bin"
return 1
}