From 34dbb40587c25ed7eb27bf6d28fe417900b6d933 Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 1 Jul 2020 18:12:07 +0200 Subject: [PATCH] lgi: add all lua versions, version package, disable checks Also drop dump-typelib as it doesn't work out of box anyway and is mostly just for development of lgi itself. --- srcpkgs/lgi | 1 + srcpkgs/lgi/template | 21 ------- srcpkgs/lua51-lgi | 1 + srcpkgs/lua52-lgi | 1 + srcpkgs/lua53-lgi | 1 + srcpkgs/lua54-lgi/patches/lua54.patch | 14 +++++ srcpkgs/lua54-lgi/template | 85 +++++++++++++++++++++++++++ 7 files changed, 103 insertions(+), 21 deletions(-) create mode 120000 srcpkgs/lgi delete mode 100644 srcpkgs/lgi/template create mode 120000 srcpkgs/lua51-lgi create mode 120000 srcpkgs/lua52-lgi create mode 120000 srcpkgs/lua53-lgi create mode 100644 srcpkgs/lua54-lgi/patches/lua54.patch create mode 100644 srcpkgs/lua54-lgi/template diff --git a/srcpkgs/lgi b/srcpkgs/lgi new file mode 120000 index 0000000000..3f76e777e3 --- /dev/null +++ b/srcpkgs/lgi @@ -0,0 +1 @@ +lua54-lgi \ No newline at end of file diff --git a/srcpkgs/lgi/template b/srcpkgs/lgi/template deleted file mode 100644 index 5941e26ea6..0000000000 --- a/srcpkgs/lgi/template +++ /dev/null @@ -1,21 +0,0 @@ -# Template file for 'lgi' -pkgname=lgi -version=0.9.2 -revision=3 -build_style=gnu-makefile -make_install_args="LUA_VERSION=5.3" -hostmakedepends="pkg-config" -makedepends="libglib-devel libffi-devel lua-devel - gobject-introspection gir-freedesktop" -depends="lua gir-freedesktop" -short_desc="Lua binadings for gnome/gobject using gobject-introspection library" -maintainer="Orphaned " -license="MIT" -homepage="https://github.com/pavouk/lgi" -distfiles="https://github.com/pavouk/lgi/archive/$version.tar.gz" -checksum=cfc4105482b4730b3a40097c9d9e7e35c46df2fb255370bdeb2f45a886548c4f - -post_install() { - vbin tools/dump-typelib.lua dump-typelib - vlicense LICENSE -} diff --git a/srcpkgs/lua51-lgi b/srcpkgs/lua51-lgi new file mode 120000 index 0000000000..3f76e777e3 --- /dev/null +++ b/srcpkgs/lua51-lgi @@ -0,0 +1 @@ +lua54-lgi \ No newline at end of file diff --git a/srcpkgs/lua52-lgi b/srcpkgs/lua52-lgi new file mode 120000 index 0000000000..3f76e777e3 --- /dev/null +++ b/srcpkgs/lua52-lgi @@ -0,0 +1 @@ +lua54-lgi \ No newline at end of file diff --git a/srcpkgs/lua53-lgi b/srcpkgs/lua53-lgi new file mode 120000 index 0000000000..3f76e777e3 --- /dev/null +++ b/srcpkgs/lua53-lgi @@ -0,0 +1 @@ +lua54-lgi \ No newline at end of file diff --git a/srcpkgs/lua54-lgi/patches/lua54.patch b/srcpkgs/lua54-lgi/patches/lua54.patch new file mode 100644 index 0000000000..d4e2ba364f --- /dev/null +++ b/srcpkgs/lua54-lgi/patches/lua54.patch @@ -0,0 +1,14 @@ +--- lgi/callable.c ++++ lgi/callable.c +@@ -1233,7 +1233,10 @@ closure_callback (ffi_cif *cif, void *ret, void **args, void *closure_arg) + } + else + { +-#if LUA_VERSION_NUM >= 502 ++#if LUA_VERSION_NUM > 503 ++ int nres; ++ res = lua_resume (L, NULL, npos, &nres); ++#elif LUA_VERSION_NUM >= 502 + res = lua_resume (L, NULL, npos); + #else + res = lua_resume (L, npos); diff --git a/srcpkgs/lua54-lgi/template b/srcpkgs/lua54-lgi/template new file mode 100644 index 0000000000..abae56cc43 --- /dev/null +++ b/srcpkgs/lua54-lgi/template @@ -0,0 +1,85 @@ +# Template file for 'lua54-lgi' +pkgname=lua54-lgi +version=0.9.2 +revision=4 +wrksrc=lgi-${version} +hostmakedepends="pkg-config" +makedepends="libglib-devel libffi-devel lua51-devel lua52-devel lua53-devel + lua54-devel gobject-introspection gir-freedesktop" +depends="lua54 gir-freedesktop" +_desc="Lua binadings for gnome/gobject using gobject-introspection library" +short_desc="${_desc} (5.4.x)" +maintainer="Orphaned " +license="MIT" +homepage="https://github.com/pavouk/lgi" +distfiles="https://github.com/pavouk/lgi/archive/$version.tar.gz" +checksum=cfc4105482b4730b3a40097c9d9e7e35c46df2fb255370bdeb2f45a886548c4f + +# requires X11 +do_check() { + : +} + +post_patch() { + cd "${wrksrc}" + mkdir -p lua5.1 + + 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_VERSION=${luaver} ${make_build_args} ${makejobs} \ + LUA_CFLAGS=-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} PREFIX=/usr LUA_VERSION=${luaver} install + popd + done + vlicense lua5.4/LICENSE +} + +lua51-lgi_package() { + depends="lua51 gir-freedesktop" + 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-lgi_package() { + depends="lua52 gir-freedesktop" + 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-lgi_package() { + depends="lua53 gir-freedesktop" + short_desc="${_desc} (5.2.x)" + pkg_install() { + vlicense "${wrksrc}/lua5.3/LICENSE" + vmove usr/lib/lua/5.3 + vmove usr/share/lua/5.3 + } +} + +lgi_package() { + depends="lua53-lgi>=${version}_${revision}" + short_desc="${_desc} (5.3.x) (transitional dummy package)" + build_style=meta +}