diff options
Diffstat (limited to 'main/lua-alt-getopt')
-rw-r--r-- | main/lua-alt-getopt/APKBUILD | 24 | ||||
-rw-r--r-- | main/lua-alt-getopt/lua5.2-compat.patch | 77 |
2 files changed, 95 insertions, 6 deletions
diff --git a/main/lua-alt-getopt/APKBUILD b/main/lua-alt-getopt/APKBUILD index a40f3f5687..20d15fc81b 100644 --- a/main/lua-alt-getopt/APKBUILD +++ b/main/lua-alt-getopt/APKBUILD @@ -1,13 +1,13 @@ # Maintainer: Natanael Copa <ncopa@alpinlinux.org> _luaversions="5.1 5.2 5.3" pkgname=lua-alt-getopt -pkgver=0.7.0 -pkgrel=6 +pkgver=0.7 +pkgrel=7 pkgdesc="Lua module for processing options similar to getopt_long(3)" url="http://luaforge.net/projects/alt-getopt/" arch="noarch" license="MIT" -depends="lua5.1-alt-getopt lua5.2-alt-getopt" +depends="" makedepends= install= subpackages="" @@ -15,11 +15,18 @@ for _v in $_luaversions; do makedepends="$makedepends lua$_v-dev" subpackages="$subpackages lua$_v-alt-getopt:split_${_v/./_}" done -source="http://mova.org/~cheusov/pub/lua_alt_getopt/lua-alt-getopt-$pkgver.tar.gz" +source="alt-getopt-$pkgver.tar.gz::https://github.com/LuaDist/alt-getopt/archive/$pkgver.tar.gz + lua5.2-compat.patch + " -_builddir="$srcdir"/$pkgname-$pkgver +_builddir="$srcdir"/alt-getopt-$pkgver prepare() { cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done } build() { @@ -53,4 +60,9 @@ _split() { for _v in $_luaversions; do eval "split_${_v/./_}() { _split $_v; }" done -md5sums="f504578b1287ea02759add231b972812 lua-alt-getopt-0.7.0.tar.gz" +md5sums="6fb65337dda22614ad1bc633a813996e alt-getopt-0.7.tar.gz +de4d4609ee6b07b7c79a6a958df0bdeb lua5.2-compat.patch" +sha256sums="69ee2d386797087ba57ba48f7d1d4ed369793efde64341a2c9bbf7ff3408e222 alt-getopt-0.7.tar.gz +5920af61a938cf56dd4cdcbf6500d113907ce016e86869f7638852269191db19 lua5.2-compat.patch" +sha512sums="8e7d1a2686a320a47199a71d09da1d3fad51bfa086dd6b1a95414325a24c66c4bef9ac9dd1ec9d866248a3b292a47e6c12cef47e88ce79a7f99bc5eaea68afc7 alt-getopt-0.7.tar.gz +9c4f44c811e1dd6164fb332bb95c23cff63f3347ee2e130b4bac08683a394cd3578425716a7cd49873ee35344d40414f03f5a30130c6a8fa4f94cd78cb0004f9 lua5.2-compat.patch" diff --git a/main/lua-alt-getopt/lua5.2-compat.patch b/main/lua-alt-getopt/lua5.2-compat.patch new file mode 100644 index 0000000000..5ac65dba94 --- /dev/null +++ b/main/lua-alt-getopt/lua5.2-compat.patch @@ -0,0 +1,77 @@ +From 86eb438ffb3580e6f7e82c17929d59c914dd46cb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Peter=20Drahos=CC=8C?= <drahosp@gmail.com> +Date: Wed, 16 May 2012 10:40:55 +0200 +Subject: [PATCH] Updated lua 5.2 compatibility + +--- + CMakeLists.txt | 2 +- + alt_getopt | 2 +- + alt_getopt.lua | 11 +++++++---- + dist.info | 2 +- + 4 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/alt_getopt b/alt_getopt +index 4a48bf4..9fafee6 100755 +--- a/alt_getopt ++++ b/alt_getopt +@@ -1,6 +1,6 @@ + #!/usr/bin/env lua + +-require "alt_getopt" ++local alt_getopt = require "alt_getopt" + + local long_opts = { + verbose = "v", +diff --git a/alt_getopt.lua b/alt_getopt.lua +index 7a6591a..efba5ac 100644 +--- a/alt_getopt.lua ++++ b/alt_getopt.lua +@@ -21,8 +21,6 @@ + + local type, pairs, ipairs, io, os = type, pairs, ipairs, io, os + +-module ("alt_getopt") +- + local function convert_short2long (opts) + local i = 1 + local len = #opts +@@ -61,7 +59,7 @@ local function canonize (options, opt) + return opt + end + +-function get_ordered_opts (arg, sh_opts, long_opts) ++local function get_ordered_opts (arg, sh_opts, long_opts) + local i = 1 + local count = 1 + local opts = {} +@@ -150,7 +148,7 @@ function get_ordered_opts (arg, sh_opts, long_opts) + return opts,i,optarg + end + +-function get_opts (arg, sh_opts, long_opts) ++local function get_opts (arg, sh_opts, long_opts) + local ret = {} + + local opts,optind,optarg = get_ordered_opts (arg, sh_opts, long_opts) +@@ -164,3 +162,8 @@ function get_opts (arg, sh_opts, long_opts) + + return ret,optind + end ++ ++return { ++ get_ordered_opts = get_ordered_opts, ++ get_opts = get_opts, ++} +diff --git a/dist.info b/dist.info +index 37f626a..02abf2a 100644 +--- a/dist.info ++++ b/dist.info +@@ -1,7 +1,7 @@ + --- This file is part of LuaDist project + + name = "alt-getopt" +-version = "0.7" ++version = "0.7-1" + + maintainer = "Peter Drahoš" + desc = "Process application arguments the same way as getopt_long" |