From 9e2e6ef292e9bedd4de30fad9ba650f2e0111d61 Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 1 Jul 2020 18:11:51 +0200 Subject: [PATCH] luaexpat: add support for all lua versions, rename --- srcpkgs/lua51-luaexpat | 1 + srcpkgs/lua52-luaexpat | 1 + srcpkgs/lua53-luaexpat | 1 + srcpkgs/lua54-luaexpat/template | 83 +++++++++++++++++++++++++++++++++ srcpkgs/luaexpat | 1 + srcpkgs/luaexpat/template | 19 -------- 6 files changed, 87 insertions(+), 19 deletions(-) create mode 120000 srcpkgs/lua51-luaexpat create mode 120000 srcpkgs/lua52-luaexpat create mode 120000 srcpkgs/lua53-luaexpat create mode 100644 srcpkgs/lua54-luaexpat/template create mode 120000 srcpkgs/luaexpat delete mode 100644 srcpkgs/luaexpat/template diff --git a/srcpkgs/lua51-luaexpat b/srcpkgs/lua51-luaexpat new file mode 120000 index 0000000000..fe62399e2e --- /dev/null +++ b/srcpkgs/lua51-luaexpat @@ -0,0 +1 @@ +lua54-luaexpat \ No newline at end of file diff --git a/srcpkgs/lua52-luaexpat b/srcpkgs/lua52-luaexpat new file mode 120000 index 0000000000..fe62399e2e --- /dev/null +++ b/srcpkgs/lua52-luaexpat @@ -0,0 +1 @@ +lua54-luaexpat \ No newline at end of file diff --git a/srcpkgs/lua53-luaexpat b/srcpkgs/lua53-luaexpat new file mode 120000 index 0000000000..fe62399e2e --- /dev/null +++ b/srcpkgs/lua53-luaexpat @@ -0,0 +1 @@ +lua54-luaexpat \ No newline at end of file diff --git a/srcpkgs/lua54-luaexpat/template b/srcpkgs/lua54-luaexpat/template new file mode 100644 index 0000000000..7e2e100472 --- /dev/null +++ b/srcpkgs/lua54-luaexpat/template @@ -0,0 +1,83 @@ +# Template file for 'lua54-luaexpat' +pkgname=lua54-luaexpat +version=1.3.0 +revision=3 +wrksrc=luaexpat-${version} +make_build_args="EXPAT_INC=-I${XBPS_CROSS_BASE}/usr/include" +makedepends="lua51-devel lua52-devel lua53-devel lua54-devel expat-devel" +depends="lua54" +_desc="XML Expat parsing for the Lua programming language" +short_desc="${_desc} (5.4.x)" +maintainer="Duncaen " +license="MIT" +homepage="https://matthewwild.co.uk/projects/luaexpat/" +distfiles="https://matthewwild.co.uk/projects/luaexpat/luaexpat-${version}.tar.gz" +checksum=d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3 + +post_extract() { + cd "${wrksrc}" + mkdir -p lua5.1 + + sed -n '/Copyright/,/SOFTWARE\./p' doc/us/license.html > LICENSE + # lua 5.3+ does not work with -ansi (integer type detection error) + vsed -i 's, -ansi,,' Makefile + + mv * lua5.1 || true + cp -a lua5.1 lua5.2 + cp -a lua5.1 lua5.3 + cp -a lua5.1 lua5.4 +} + +do_build() { + for luaver in 5.1 5.2 5.3 5.4; do + pushd lua${luaver} + make CC=$CC LUA_V=${luaver} ${make_build_args} ${makejobs} \ + LUA_INC=-I${XBPS_CROSS_BASE}/usr/include/lua${luaver} + popd + done +} + +do_install() { + for luaver in 5.1 5.2 5.3 5.4; do + pushd lua${luaver} + make DESTDIR=${DESTDIR} LUA_V=${luaver} install + popd + done + vlicense lua5.4/LICENSE +} + +lua51-luaexpat_package() { + depends="lua51" + short_desc="${_desc} (5.1.x)" + pkg_install() { + vlicense "${wrksrc}/lua5.1/LICENSE" + vmove usr/lib/lua/5.1 + vmove usr/share/lua/5.1 + } +} + +lua52-luaexpat_package() { + depends="lua52" + short_desc="${_desc} (5.2.x)" + pkg_install() { + vlicense "${wrksrc}/lua5.2/LICENSE" + vmove usr/lib/lua/5.2 + vmove usr/share/lua/5.2 + } +} + +lua53-luaexpat_package() { + depends="lua53" + short_desc="${_desc} (5.3.x)" + pkg_install() { + vlicense "${wrksrc}/lua5.3/LICENSE" + vmove usr/lib/lua/5.3 + vmove usr/share/lua/5.3 + } +} + +luaexpat_package() { + depends="lua51-luaexpat>=${version}_${revision}" + short_desc="${_desc} (5.1.x) (transitional dummy package)" + build_style=meta +} diff --git a/srcpkgs/luaexpat b/srcpkgs/luaexpat new file mode 120000 index 0000000000..fe62399e2e --- /dev/null +++ b/srcpkgs/luaexpat @@ -0,0 +1 @@ +lua54-luaexpat \ No newline at end of file diff --git a/srcpkgs/luaexpat/template b/srcpkgs/luaexpat/template deleted file mode 100644 index 61dc698c2b..0000000000 --- a/srcpkgs/luaexpat/template +++ /dev/null @@ -1,19 +0,0 @@ -# Template file for 'luaexpat' -pkgname=luaexpat -version=1.3.0 -revision=2 -build_style=gnu-makefile -make_build_args="LUA_INC=-I${XBPS_CROSS_BASE}/usr/include/lua5.1 EXPAT_INC=-I${XBPS_CROSS_BASE}/usr/include" -makedepends="lua51-devel expat-devel" -depends="lua51" -short_desc="XML Expat parsing for the Lua programming language" -maintainer="Duncaen " -license="MIT" -homepage="https://matthewwild.co.uk/projects/luaexpat/" -distfiles="https://matthewwild.co.uk/projects/luaexpat/luaexpat-${version}.tar.gz" -checksum=d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3 - -post_install() { - sed -n '/Copyright/,/SOFTWARE\./p' doc/us/license.html > LICENSE - vlicense LICENSE -}