summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorTrougnouf (Benoit Brummer)2023-07-15 15:41:29 +0200
committerTrougnouf (Benoit Brummer)2023-07-15 15:41:29 +0200
commit89abd55b6547111f97534a60bc8ecb26f2e031f5 (patch)
tree3cf6dbbb5fb4488d90323deb490e2e728a91a989 /PKGBUILD
parentb33ddbb47290fdb3cdb18397fb9bb5f86aa6de92 (diff)
downloadaur-lua-luajson.tar.gz
hack around https://github.com/harningt/luajson/issues/47
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD6
1 files changed, 5 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b2a590642238..11348b0349a6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ _name=luajson
pkgbase=lua-${_name}
pkgname=("${pkgbase}" "lua53-${_name}")
pkgver=1.3.4
-pkgrel=8
+pkgrel=9
pkgdesc="JSON parser/encoder for Lua"
url="https://www.eharning.us/wiki/${_name}/"
arch=(any)
@@ -15,6 +15,10 @@ makedepends=('lua' 'lua53')
source=(https://github.com/harningt/${_name}/archive/$pkgver.tar.gz)
sha1sums=('2ea25e4147ad661ff3b6d0427439bf99c06eb46d')
+prepare() {
+ sed -i 's/local DecimalLpegVersion = lpeg.version and tonumber(lpeg.version():match("^(%d+%.%d+)")) or 0.7/local DecimalLpegVersion = 1.1/g' "${srcdir}/${_name}-${pkgver}/lua/json/decode/util.lua"
+}
+
package_lua-luajson() {
depends=(lua-lpeg)
LUAVERSION=$(lua -v | grep -P -o '([0-9]+\.[0-9]+)')