summaryrefslogtreecommitdiff
path: root/repo/lua-mpack/lua-mpack.xibuild
diff options
context:
space:
mode:
Diffstat (limited to 'repo/lua-mpack/lua-mpack.xibuild')
-rw-r--r--repo/lua-mpack/lua-mpack.xibuild81
1 files changed, 46 insertions, 35 deletions
diff --git a/repo/lua-mpack/lua-mpack.xibuild b/repo/lua-mpack/lua-mpack.xibuild
index 85c5195..59363b5 100644
--- a/repo/lua-mpack/lua-mpack.xibuild
+++ b/repo/lua-mpack/lua-mpack.xibuild
@@ -1,56 +1,67 @@
#!/bin/sh
-MAKEDEPS="make "
-DEPS="musl libmpack"
+NAME="lua-mpack"
+DESC="Libmpack bindings for Lua"
+
+MAKEDEPS="libmpack lua lua5-1"
PKG_VER=1.0.9
-SOURCE=https://github.com/libmpack/libmpack-lua/archive/$PKG_VER.tar.gz
-DESC="Libmpack bindings for Lua"
+SOURCE="https://github.com/libmpack/libmpack-lua/archive/$PKG_VER.tar.gz"
+
ADDITIONAL="
dont-install-busted.patch
skip-memleak-test.patch
"
-luaversions="5.1 "
+luaversions="5.1 5.4"
-prepare () {
- apply_patches
+prepare() {
+ apply_patches
+ local lver; for lver in $luaversions; do
+ mkdir -p "$BUILD_ROOT/$lver"
+ tar -xf $PKG_VER.tar.gz
+ mv "libmpack-lua-$PKG_VER"/* "$BUILD_ROOT/$lver"
- for lver in $luaversions; do
- tar xf $PKG_VER.tar.gz
- mv libmpack-lua-$PKG_VER build-$lver
+ cd "$BUILD_ROOT/$lver"
+ for p in ../*.patch; do
+ patch -Np1 -i $p
+ done
+ cd ..
done
+}
+build() {
+ local lver; for lver in $luaversions; do
+ echo "Building for Lua $lver..."
+ make -C "$BUILD_ROOT/$lver" \
+ FETCH=false \
+ USE_SYSTEM_LUA=yes \
+ USE_SYSTEM_MPACK=yes \
+ LUA_INCLUDE="$(pkg-config --cflags lua$lver)" \
+ LUA_LIB="$(pkg-config --libs lua$lver)"
+ done
}
-build () {
- for lver in $luaversions; do
- echo "building for lua $lver"
- make -C build-$lver \
- FETCH=false \
- USE_SYSTEM_LUA=yes \
- USE_SYSTEM_MPACK=yes \
- LUA=lua$lver \
- LUA_IMPL=lua$lver
- #LUA_INCLUDE="$(pkg-config --cflags lua$lver)" \
- #LUA_LIB="$(pkg-config --libs lua$lver)"
- done
+package() {
+ mkdir -p "$PKG_DEST"
+ local lver; for lver in $luaversions; do
+ _package $lver
+ done
}
-package () {
- for lver in $luaversions; do
- echo "building for lua $lver"
- local rockdir="$PKG_DEST/usr/lib/luarocks/rocks-$lver/mpack/$PKG_VER-0"
+_package() {
+ lver="$1"
+ local rockdir="$PKG_DEST/usr/lib/luarocks/rocks-$lver/mpack/$PKG_VER-0"
- make -C build-$lver \
- USE_SYSTEM_LUA=yes \
- USE_SYSTEM_MPACK=yes \
- LUA_CMOD_INSTALLDIR="$(pkg-config --variable=INSTALL_CMOD lua$lver)" \
- DESTDIR="$subpkgdir" \
- install || exit 1
+ make -C "$BUILD_ROOT/$lver" \
+ USE_SYSTEM_LUA=yes \
+ USE_SYSTEM_MPACK=yes \
+ LUA_CMOD_INSTALLDIR="$(pkg-config --variable=INSTALL_CMOD lua$lver)" \
+ DESTDIR="$PKG_DEST" \
+ install
- mkdir -p "$rockdir"
- echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
- done
+ mkdir -p "$rockdir"
+ echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
+