mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-21 04:14:17 +08:00
Merge branch 'ids1024-lua'
This commit is contained in:
commit
f57cd8dfc5
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
build
|
||||
repo
|
||||
source
|
||||
source.tar
|
||||
stage
|
||||
stage.tar
|
||||
|
||||
42
cook.sh
42
cook.sh
@ -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
33
recipes/lua/recipe.sh
Normal 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
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user