diff options
author | davidovski <david@davidovski.xyz> | 2023-02-02 14:10:02 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-02-02 14:10:02 +0000 |
commit | f29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch) | |
tree | 76fe6267f8307e7630fc6f53ff99a9767ad40de0 /repo/lua-mpack/lua-mpack.xibuild | |
parent | 05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff) |
Work
Diffstat (limited to 'repo/lua-mpack/lua-mpack.xibuild')
-rw-r--r-- | repo/lua-mpack/lua-mpack.xibuild | 81 |
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 } + |