From 54c4185190679c21cb2c69c424330f7b7aad073b Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 22 Apr 2017 16:36:16 +0000 Subject: community/lua-mpack: upgrade to 1.0.6 --- community/lua-mpack/APKBUILD | 44 ++++++++++++++++-------- community/lua-mpack/dont-download-libmpack.patch | 23 +++++++++++++ community/lua-mpack/dont-install-busted.patch | 4 +-- community/lua-mpack/skip-memleak-test.patch | 4 +-- 4 files changed, 56 insertions(+), 19 deletions(-) create mode 100644 community/lua-mpack/dont-download-libmpack.patch (limited to 'community/lua-mpack') diff --git a/community/lua-mpack/APKBUILD b/community/lua-mpack/APKBUILD index 6f258ab387..85e5f79057 100644 --- a/community/lua-mpack/APKBUILD +++ b/community/lua-mpack/APKBUILD @@ -1,20 +1,22 @@ # Contributor: Daniel Sabogal # Maintainer: Jakub Jirutka pkgname=lua-mpack -_pkgname=libmpack -pkgver=1.0.4 -pkgrel=2 +_pkgname=libmpack-lua +pkgver=1.0.6 +pkgrel=0 +_libmpack_ver=1.0.4 pkgdesc="Libmpack bindings for Lua" -url="https://github.com/tarruda/libmpack" +url="https://github.com/libmpack/libmpack-lua" arch="all" license="MIT" -depends="" -makedepends="" +makedepends="libmpack-dev" checkdepends="lua-busted" subpackages="" -source="$_pkgname-$pkgver.tar.gz::https://github.com/tarruda/$_pkgname/archive/$pkgver.tar.gz +source="$_pkgname-$pkgver.tar.gz::https://github.com/libmpack/$_pkgname/archive/$pkgver.tar.gz + libmpack-$_libmpack_ver.tar.gz::https://github.com/libmpack/libmpack/archive/$_libmpack_ver.tar.gz skip-memleak-test.patch - dont-install-busted.patch" + dont-install-busted.patch + dont-download-libmpack.patch" builddir="$srcdir/$_pkgname-$pkgver" _luaversions="5.1 5.2 5.3" @@ -24,6 +26,15 @@ for _v in $_luaversions; do done prepare() { + cd "$builddir" + + local libver=$(sed -En "s/^MPACK_VERSION\s*\??=\s*([^ ]+).*/\1/p" Makefile) + if [ "$libver" != "$_libmpack_ver" ]; then + warning "libmpack-lua should be built with libmpack $libver, not $_libmpack_ver!" + fi + + ln -s "$srcdir"/libmpack-$_libmpack_ver mpack-src || return 1 + default_prepare || return 1 local lver; for lver in $_luaversions; do @@ -34,8 +45,9 @@ prepare() { build() { local lver; for lver in $_luaversions; do msg "Building for Lua $lver..." - make -C "$builddir-$lver"/binding/lua \ - CFLAGS="$CFLAGS" \ + make -C "$builddir-$lver" \ + CFLAGS="$CFLAGS -lmpack" \ + FETCH=false \ USE_SYSTEM_LUA=yes \ LUA_INCLUDE="$(pkg-config --cflags lua$lver)" \ LUA_LIB="$(pkg-config --libs lua$lver)" || return 1 @@ -45,7 +57,7 @@ build() { check() { local lver; for lver in $_luaversions; do msg "Testing on Lua $lver..." - make -C "$builddir-$lver"/binding/lua \ + make -C "$builddir-$lver" \ USE_SYSTEM_LUA=yes \ LUA=/usr/bin/lua$lver \ BUSTED=/usr/bin/busted-$lver \ @@ -62,13 +74,15 @@ _subpackage() { pkgdesc="$pkgdesc $lver" install_if="$pkgname=$pkgver-r$pkgrel lua$lver" - make -C "$builddir-$lver"/binding/lua \ + make -C "$builddir-$lver" \ USE_SYSTEM_LUA=yes \ LUA_CMOD_INSTALLDIR="$(pkg-config --variable=INSTALL_CMOD lua$lver)" \ DESTDIR="$subpkgdir" \ install } -sha512sums="8e40a562faf8b62137dec0733cbb9006fa7054e5a47bdd128fb4dfd676fac4e4385a23c3d908a4ce2edd65d673db25916695fa74bc08c5316b0c80e571a7442c libmpack-1.0.4.tar.gz -380603230e65b8b4adec0153aa23089612f0923666b44ca503a4217c1125c5f8cbac9eb550a94add8fa2d5ac40464689302c8e79e5a087f408707ae21eb9faa9 skip-memleak-test.patch -a02076a3a5a98846ae5086f99b33655a7276087dc3ad0e0a64d742b1ca2de302a71ff173a555b9b33ac59f0d2837e5fdf64a3cccbe09791643d32b729bc04bee dont-install-busted.patch" +sha512sums="3a2f0697f94957c15a78ff24b296a034f301d1e8ab51d5636389f0fad7be838d450c59038c61d4173fa9e0463aa5565cfc0c35c273b4961a5e5631d343ca0605 libmpack-lua-1.0.6.tar.gz +8e40a562faf8b62137dec0733cbb9006fa7054e5a47bdd128fb4dfd676fac4e4385a23c3d908a4ce2edd65d673db25916695fa74bc08c5316b0c80e571a7442c libmpack-1.0.4.tar.gz +af6b670c1007aa86b696798ede30d17addc45d27dd7e78be6e7bd4a3eac931a9ce47b8e12d8146dadf44c80d21917983a836915dd8f0c33abf3be0381a24a642 skip-memleak-test.patch +f688f34c6893dbb4590b93e14de459c33d8efe621a41699a36286b117b874fac37fe473ef46ad2f2855c4672d90defb600c7e93555989d0c45a4964fda49c5a9 dont-install-busted.patch +6c151d65f2f5c2e5e5b5f851035a7be478544cf4152e40d81d2abdca724a6e41b3767e37e9ed59f1aa8d269477ae768716f7c6e4dfc93bc3cf577e83c6c0da56 dont-download-libmpack.patch" diff --git a/community/lua-mpack/dont-download-libmpack.patch b/community/lua-mpack/dont-download-libmpack.patch new file mode 100644 index 0000000000..2dc76cc97f --- /dev/null +++ b/community/lua-mpack/dont-download-libmpack.patch @@ -0,0 +1,23 @@ +--- a/Makefile ++++ b/Makefile +@@ -66,7 +66,7 @@ + mkdir -p $$dir && cd $$dir && \ + $(FETCH) $(MPACK_URL) | $(UNTGZ) + +-release: mpack-src ++release: + rm -f libmpack-lua-$(LMPACK_VERSION).tar.gz + tar cvfz libmpack-lua-$(LMPACK_VERSION).tar.gz \ + --transform 's,^,libmpack-lua-$(LMPACK_VERSION)/,' \ +@@ -95,10 +95,10 @@ + $(DEPS_PREFIX)/lib/luarocks/rocks/busted/2.0.rc12-1/bin/busted test.lua + + ifeq ($(USE_SYSTEM_LUA),no) +-$(MPACK): $(LUAROCKS) mpack-src lmpack.c ++$(MPACK): $(LUAROCKS) lmpack.c + $(LUAROCKS) make CFLAGS='$(CFLAGS)' + else +-$(MPACK): mpack-src lmpack.c ++$(MPACK): lmpack.c + $(CC) -shared $(CFLAGS) $(INCLUDES) $(LDFLAGS) $^ -o $@ $(LIBS) + endif diff --git a/community/lua-mpack/dont-install-busted.patch b/community/lua-mpack/dont-install-busted.patch index f6e07fa28f..2acb260862 100644 --- a/community/lua-mpack/dont-install-busted.patch +++ b/community/lua-mpack/dont-install-busted.patch @@ -1,7 +1,7 @@ Fix Makefile to not try to download and install LuaRocks and busted; use system-provided busted. ---- a/binding/lua/Makefile -+++ b/binding/lua/Makefile +--- a/Makefile ++++ b/Makefile @@ -61,7 +61,7 @@ depsclean: rm -rf $(DEPS_DIR) diff --git a/community/lua-mpack/skip-memleak-test.patch b/community/lua-mpack/skip-memleak-test.patch index 1f8b287dd7..f89b522516 100644 --- a/community/lua-mpack/skip-memleak-test.patch +++ b/community/lua-mpack/skip-memleak-test.patch @@ -1,6 +1,6 @@ This test requires binary to be built in debug mode. ---- a/binding/lua/test.lua -+++ b/binding/lua/test.lua +--- a/test.lua ++++ b/test.lua @@ -276,16 +276,6 @@ end) end) -- cgit v1.2.3