aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua5.2-b64
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-07-11 15:53:26 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-07-11 15:53:26 +0300
commit15dc9d67da3baaba547994fca07248ad202e80cc (patch)
treef5ba43b5b2f949892c46cb962ae2e6c210d3b4f0 /main/lua5.2-b64
parent22b4d9f5e400b61dad560d5a1e7a27acbac9b0e2 (diff)
downloadaports-15dc9d67da3baaba547994fca07248ad202e80cc.tar.bz2
aports-15dc9d67da3baaba547994fca07248ad202e80cc.tar.xz
main/aconf: moved from testing (with dependencies)
Diffstat (limited to 'main/lua5.2-b64')
-rw-r--r--main/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch25
-rw-r--r--main/lua5.2-b64/APKBUILD43
2 files changed, 68 insertions, 0 deletions
diff --git a/main/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch b/main/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch
new file mode 100644
index 0000000000..418a8321d1
--- /dev/null
+++ b/main/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch
@@ -0,0 +1,25 @@
+From 8b49d06375685d4dc0ddd71a9b7310663dc92d51 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 24 Feb 2014 11:25:28 +0100
+Subject: [PATCH] b64: fix segfault caused by signed char
+
+---
+ lua-b64.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lua-b64.c b/lua-b64.c
+index ce74481..cb03f4f 100644
+--- a/lua-b64.c
++++ b/lua-b64.c
+@@ -28,7 +28,7 @@ static const char *urlsafe_base64_tbl =
+ static int b64_encode_tbl(lua_State *L, const char *tbl)
+ {
+ size_t len, n = 0;
+- const char *src = luaL_checklstring(L, 1, &len);
++ const unsigned char *src = (const unsigned char *)luaL_checklstring(L, 1, &len);
+ luaL_Buffer dst;
+ unsigned int triplet = 0;
+ unsigned int pad;
+--
+1.8.5.4
+
diff --git a/main/lua5.2-b64/APKBUILD b/main/lua5.2-b64/APKBUILD
new file mode 100644
index 0000000000..fa2e6c4f54
--- /dev/null
+++ b/main/lua5.2-b64/APKBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua5.2-b64
+pkgver=0.1
+pkgrel=1
+pkgdesc="Lua 5.2 base64 implementation with support for urlsafe"
+url="https://github.com/ncopa/lua-b64"
+arch="all"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="$depends_dev lua5.2-dev"
+install=""
+subpackages=""
+source="lua-b64-$pkgver.tar.gz::https://github.com/ncopa/lua-b64/archive/v0.1.tar.gz
+ 0001-b64-fix-segfault-caused-by-signed-char.patch"
+
+_builddir="$srcdir"/lua-b64-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make
+}
+
+package() {
+ cd "$_builddir"
+ install -D b64.so "$pkgdir"/usr/lib/lua/5.2/b64.so || return 1
+}
+
+md5sums="91e537a0aedc7bd2fb4ca38cda1d9f9f lua-b64-0.1.tar.gz
+f396211df1ed6f94c2d23fc1c102ffdb 0001-b64-fix-segfault-caused-by-signed-char.patch"
+sha256sums="5136414bc5db7e6bfc96ff7eb9ac56e797419d04c5b4d3483891c8714239d700 lua-b64-0.1.tar.gz
+2e4b39f088c275fa572379283489232cecf383e2c6c6fd43e802b6be72cbc70e 0001-b64-fix-segfault-caused-by-signed-char.patch"
+sha512sums="8740d5061db01dca166ce2c959548a3232c85dce156fce3502da35f457db79db2bf23242ee6d26b64f4141c451db733898328b8fc3d1f62b47e8f7ec790577d1 lua-b64-0.1.tar.gz
+6da3b8048b2e6772a4aac954ea2db35f9c21897d720e7ff9dc6c1d63ffc37eeb4fb91be46bc13b32a2c3d1b88997172fe259ea699ac8591f0f3e1fd53cae378b 0001-b64-fix-segfault-caused-by-signed-char.patch"