From 9820bd7f0e2c174f7b7f46bcda0979060180658d Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 1 Jul 2020 04:06:38 +0200 Subject: [PATCH] lua-cjson: add 5.4 support, properly version --- srcpkgs/lua-cjson | 1 + srcpkgs/lua51-cjson | 2 +- srcpkgs/lua52-cjson | 2 +- srcpkgs/lua53-cjson | 1 + srcpkgs/{lua-cjson => lua54-cjson}/template | 42 +++++++++++++++------ 5 files changed, 34 insertions(+), 14 deletions(-) create mode 120000 srcpkgs/lua-cjson create mode 120000 srcpkgs/lua53-cjson rename srcpkgs/{lua-cjson => lua54-cjson}/template (52%) diff --git a/srcpkgs/lua-cjson b/srcpkgs/lua-cjson new file mode 120000 index 00000000000..da5aa9861b9 --- /dev/null +++ b/srcpkgs/lua-cjson @@ -0,0 +1 @@ +lua54-cjson \ No newline at end of file diff --git a/srcpkgs/lua51-cjson b/srcpkgs/lua51-cjson index b379c087453..da5aa9861b9 120000 --- a/srcpkgs/lua51-cjson +++ b/srcpkgs/lua51-cjson @@ -1 +1 @@ -lua-cjson \ No newline at end of file +lua54-cjson \ No newline at end of file diff --git a/srcpkgs/lua52-cjson b/srcpkgs/lua52-cjson index b379c087453..da5aa9861b9 120000 --- a/srcpkgs/lua52-cjson +++ b/srcpkgs/lua52-cjson @@ -1 +1 @@ -lua-cjson \ No newline at end of file +lua54-cjson \ No newline at end of file diff --git a/srcpkgs/lua53-cjson b/srcpkgs/lua53-cjson new file mode 120000 index 00000000000..da5aa9861b9 --- /dev/null +++ b/srcpkgs/lua53-cjson @@ -0,0 +1 @@ +lua54-cjson \ No newline at end of file diff --git a/srcpkgs/lua-cjson/template b/srcpkgs/lua54-cjson/template similarity index 52% rename from srcpkgs/lua-cjson/template rename to srcpkgs/lua54-cjson/template index b2703270328..c74cfc667fe 100644 --- a/srcpkgs/lua-cjson/template +++ b/srcpkgs/lua54-cjson/template @@ -1,25 +1,27 @@ -# Template file for 'lua-cjson' -pkgname=lua-cjson +# Template file for 'lua54-cjson' +pkgname=lua54-cjson version=2.1.0 -revision=1 +revision=2 create_wrksrc=yes -hostmakedepends="lua lua51 lua52" -makedepends="lua-devel lua51-devel lua52-devel" -depends="lua>=5.3" -short_desc="JSON support for Lua" +hostmakedepends="lua51 lua52 lua53 lua54" +makedepends="lua51-devel lua52-devel lua53-devel lua54-devel" +depends="lua54" +_desc="JSON support for Lua" +short_desc="${_desc} (5.4.x)" maintainer="Denis Revin " license="MIT" homepage="http://www.kyne.com.au/~mark/software/lua-cjson.php" -distfiles="http://www.kyne.com.au/~mark/software/download/${pkgname}-${version}.tar.gz" +distfiles="http://www.kyne.com.au/~mark/software/download/lua-cjson-${version}.tar.gz" checksum=51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778 post_extract() { mv "lua-cjson-${version}" lua51 cp -a lua51 lua52 cp -a lua51 lua53 + cp -a lua51 lua54 } do_build() { - for x in lua51 lua52 lua53; do + for x in lua51 lua52 lua53 lua54; do make -C "$x" \ CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ LUA_VERSION="5.${x#lua5}" USE_INTERNAL_FPCONV=1 \ @@ -27,7 +29,7 @@ do_build() { done } do_install() { - for x in lua51 lua52 lua53; do + for x in lua51 lua52 lua53 lua54; do vinstall "$x/cjson.so" 755 "usr/lib/lua/5.${x#lua5}" done vlicense lua53/LICENSE @@ -35,17 +37,33 @@ do_install() { lua51-cjson_package() { depends="lua51" - short_desc+=" (5.1)" + short_desc="${_desc} (5.1.x)" pkg_install() { vmove usr/lib/lua/5.1 vlicense ${wrksrc}/lua51/LICENSE } } + lua52-cjson_package() { depends="lua52" - short_desc+=" (5.2)" + short_desc="${_desc} (5.2.x)" pkg_install() { vmove usr/lib/lua/5.2 vlicense ${wrksrc}/lua52/LICENSE } } + +lua53-cjson_package() { + depends="lua53" + short_desc="${_desc} (5.3.x)" + pkg_install() { + vmove usr/lib/lua/5.3 + vlicense ${wrksrc}/lua53/LICENSE + } +} + +lua-cjson_package() { + depends="lua53-cjson>=${version}_${revision}" + short_desc+="${_desc} (5.3.x) (transitional dummy package)" + build_style=meta +}