aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-main-lua-hashids-upgrade-to-1.0.5.patch110
-rw-r--r--community/lua-toml/APKBUILD10
-rw-r--r--community/lua-toml/fix-decode-arrays-and-include-testcase.patch50
3 files changed, 165 insertions, 5 deletions
diff --git a/0001-main-lua-hashids-upgrade-to-1.0.5.patch b/0001-main-lua-hashids-upgrade-to-1.0.5.patch
new file mode 100644
index 0000000000..5fd278dc08
--- /dev/null
+++ b/0001-main-lua-hashids-upgrade-to-1.0.5.patch
@@ -0,0 +1,110 @@
+From fd9fbcd03ee8e898a0a67da2096c61676ea94e59 Mon Sep 17 00:00:00 2001
+From: Carlo Landmeter <clandmeter@gmail.com>
+Date: Tue, 2 May 2017 09:48:31 +0200
+Subject: [PATCH] main/lua-hashids: upgrade to 1.0.5
+
+---
+ main/lua-hashids/APKBUILD | 57 ++++++++++++++++++++++-----------------
+ main/lua-hashids/installdir.patch | 8 ++++++
+ 2 files changed, 41 insertions(+), 24 deletions(-)
+ create mode 100644 main/lua-hashids/installdir.patch
+
+diff --git a/main/lua-hashids/APKBUILD b/main/lua-hashids/APKBUILD
+index 91ca0c74e2..039d2d7f68 100644
+--- a/main/lua-hashids/APKBUILD
++++ b/main/lua-hashids/APKBUILD
+@@ -1,44 +1,53 @@
+ # Contributor: Carlo Landmeter <clandmeter@gmail.com>
+ # Maintainer: Carlo Landmeter <clandmeter@gmail.com>
+ pkgname=lua-hashids
+-pkgver=1.0.0
++pkgver=1.0.5
+ pkgrel=0
+ pkgdesc="A Lua implementation of hashids"
+ url="https://github.com/leihog/hashids.lua"
+ arch="all"
+ license="MIT"
+-depends=""
+-depends_dev="lua5.1-dev"
+-makedepends="$depends_dev"
+ install=""
+-subpackages=""
+-source="hashids.lua-$pkgver.tar.gz::https://github.com/leihog/hashids.lua/archive/v$pkgver.tar.gz"
++source="$pkgname-$pkgver.tar.gz::https://github.com/leihog/hashids.lua/archive/v$pkgver.tar.gz
++ installdir.patch"
+
+-_builddir="$srcdir"/hashids.lua-$pkgver
++_luaversions="5.1 5.2 5.3"
++
++for _v in $_luaversions; do
++ makedepends="$makedepends lua$_v-dev"
++ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
++done
++
++builddir="$srcdir"/hashids.lua-$pkgver
+
+ prepare() {
+- local i
+- cd "$_sdir"
+- for i in $source; do
+- case $i in
+- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+- esac
+- done
++ default_prepare
++ local lver; for lver in $_luaversions; do
++ cp -r "$builddir" "$builddir-$lver"
++ done
+ }
+
+ build() {
+- cd "$_builddir"
+- make || return 1
++ cd "$builddir"
++ local lver; for lver in $_luaversions; do
++ msg "Building for Lua $lver..."
++ make -C "$builddir-$lver"
++ done
+ }
+
+ package() {
+- cd "$_builddir"
+- install -Dm644 hashids/init.lua \
+- "$pkgdir"/usr/share/lua/5.1/hashids/init.lua || return 1
+- install -Dm755 hashids/clib.so \
+- "$pkgdir"/usr/lib/lua/5.1/hashids/clib.so || return 1
++ mkdir -p "$pkgdir"
++}
++
++_subpackage() {
++ local lver="${subpkgname:3:3}"
++ pkgdesc="$pkgdesc (for Lua $lver)"
++ depends="lua$lver"
++ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
++
++ cd "$builddir-$lver"
++ make INSTALLDIR="$subpkgdir"/usr/share/lua/$lver/hashids/ install
+ }
+
+-md5sums="ace60336593b06eb7f7e8a9e37b5a0fd hashids.lua-1.0.0.tar.gz"
+-sha256sums="2a99927bba9c986be544d6c483b953c8f39b56cd5915a154553154c8aab7e3fc hashids.lua-1.0.0.tar.gz"
+-sha512sums="2d9f6928c82f0ce3e70f729f8f366f85bd2482474e841524c894381a125a27d5e209bf2f9a7b9e5d9fd476fd3865aca2be4c9c2118ebe125995fbd3008a1962a hashids.lua-1.0.0.tar.gz"
++sha512sums="e8c400055984c47a905fdef2facad3fc42a8f645440376ce089b53500e6b9a7d0a0b3dbd098f9453f86e0e037cb74dcf0e383911f498c5184c9d7156ffa23e79 lua-hashids-1.0.5.tar.gz
++3268b00656b0048adacf6e9d46a3b726d5e00ec209098f654d965de562b72b16a95bd44a9ad591e33eebbf323552e049d0181ec6d27c21cb2f4f2ca3861662ad installdir.patch"
+diff --git a/main/lua-hashids/installdir.patch b/main/lua-hashids/installdir.patch
+new file mode 100644
+index 0000000000..573338d0be
+--- /dev/null
++++ b/main/lua-hashids/installdir.patch
+@@ -0,0 +1,8 @@
++--- ./Makefile.orig
+++++ ./Makefile
++@@ -1,4 +1,4 @@
++-INSTALLDIR=/usr/local/lib/lua/5.2/hashids
+++INSTALLDIR := /usr/local/lib/lua/5.2/hashids
++
++ UNAME := $(shell uname -s)
++
+--
+2.12.2
+
diff --git a/community/lua-toml/APKBUILD b/community/lua-toml/APKBUILD
index e70451e2c2..fe2dfdb4c8 100644
--- a/community/lua-toml/APKBUILD
+++ b/community/lua-toml/APKBUILD
@@ -2,14 +2,15 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-toml
pkgver=1.0
-pkgrel=4
+pkgrel=5
pkgdesc="TOML decoder/encoder for Lua"
url="https://github.com/jonstoler/lua-toml"
arch="noarch"
license="Happy"
depends=""
checkdepends="lua-busted"
-source="$pkgname-$pkgver.tar.gz::https://github.com/jonstoler/$pkgname/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/jonstoler/$pkgname/archive/v$pkgver.tar.gz
+ fix-decode-arrays-and-include-testcase.patch"
builddir="$srcdir/$pkgname-$pkgver"
# luajit is not available for selected arches
@@ -47,6 +48,5 @@ _subpackage() {
install -m 644 -D toml.lua "$subpkgdir"/usr/share/lua/$lver/toml.lua
}
-md5sums="00422b0ef80b8903706360761fe204a1 lua-toml-1.0.tar.gz"
-sha256sums="4c81ae8c338d3da3d7007978f4ec2c736ea89448beaa5583fba7092e46a90e0d lua-toml-1.0.tar.gz"
-sha512sums="f04ed6f26f47d6492c7a21c310da09b1091476724022c32b81a5492713340a4571bc04c51f34dded73f4f1cf1085dbe08e280356b0f1fa88ef0efefd0685c77e lua-toml-1.0.tar.gz"
+sha512sums="f04ed6f26f47d6492c7a21c310da09b1091476724022c32b81a5492713340a4571bc04c51f34dded73f4f1cf1085dbe08e280356b0f1fa88ef0efefd0685c77e lua-toml-1.0.tar.gz
+8f09e578ef3e7bcc35316ca290e21a47b2d62b439a06228c7e6dcef14e3306800aa44d8b4d70ff2e1cf17211bf7e585423bb4fcd9edb4131076532d4bf5b0640 fix-decode-arrays-and-include-testcase.patch"
diff --git a/community/lua-toml/fix-decode-arrays-and-include-testcase.patch b/community/lua-toml/fix-decode-arrays-and-include-testcase.patch
new file mode 100644
index 0000000000..0409f39ee1
--- /dev/null
+++ b/community/lua-toml/fix-decode-arrays-and-include-testcase.patch
@@ -0,0 +1,50 @@
+From d77cbb5f94bb8fbaa8d589573de20ce120765055 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 14 Jun 2017 11:23:32 +0200
+Subject: [PATCH 1/2] add test case for issue #12
+
+---
+ spec/encode_spec.lua | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+ create mode 100644 spec/encode_spec.lua
+
+diff --git a/spec/encode_spec.lua b/spec/encode_spec.lua
+new file mode 100644
+index 0000000..db26834
+--- /dev/null
++++ b/spec/encode_spec.lua
+@@ -0,0 +1,11 @@
++describe("encoding", function()
++ setup(function()
++ TOML = require "toml"
++ end)
++
++ it("array", function()
++ local obj = TOML.encode{ a = { "foo","bar" } }
++ local sol = "a = [\nfoo,\nbar,\n]"
++ assert.same(sol, obj)
++ end)
++end)
+
+From b914f26b66856d82d11d4c9205d5ccd97ae54bb6 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 14 Jun 2017 11:44:20 +0200
+Subject: [PATCH 2/2] fix encoding of plain ol borring arrays (issue #12)
+
+---
+ toml.lua | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/toml.lua b/toml.lua
+index a5655ed..b5eb2ed 100644
+--- a/toml.lua
++++ b/toml.lua
+@@ -619,7 +619,7 @@ TOML.encode = function(tbl)
+ else
+ -- plain ol boring array
+ toml = toml .. k .. " = [\n"
+- for kk, vv in pairs(v) do
++ for kk, vv in pairs(first) do
+ toml = toml .. tostring(vv) .. ",\n"
+ end
+ toml = toml .. "]\n"