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.
This commit is contained in:
q66 2020-07-01 18:12:07 +02:00
parent b03337232e
commit 34dbb40587
7 changed files with 103 additions and 21 deletions

1
srcpkgs/lgi Symbolic link
View file

@ -0,0 +1 @@
lua54-lgi

View file

@ -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 <orphan@voidlinux.org>"
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
}

1
srcpkgs/lua51-lgi Symbolic link
View file

@ -0,0 +1 @@
lua54-lgi

1
srcpkgs/lua52-lgi Symbolic link
View file

@ -0,0 +1 @@
lua54-lgi

1
srcpkgs/lua53-lgi Symbolic link
View file

@ -0,0 +1 @@
lua54-lgi

View file

@ -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);

View file

@ -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 <orphan@voidlinux.org>"
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
}