From 74680778f2b79e4d646e68af44712eaf66693078 Mon Sep 17 00:00:00 2001 From: Marcus Calhoun-Lopez Date: Sat, 11 Mar 2023 08:12:49 -0700 Subject: [PATCH] lua-lgi: update to version 0.9.2 & use luarocks PG --- lua/lua-lgi/Portfile | 61 +++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/lua/lua-lgi/Portfile b/lua/lua-lgi/Portfile index 4be9fb7c74f52..01cd9eb5d7617 100644 --- a/lua/lua-lgi/Portfile +++ b/lua/lua-lgi/Portfile @@ -1,40 +1,49 @@ # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 -PortSystem 1.0 -PortGroup github 1.0 -PortGroup gobject_introspection 1.0 +PortSystem 1.0 +PortGroup luarocks 1.1 +PortGroup github 1.0 -github.setup pavouk lgi 0.9.0 -revision 1 -name lua-lgi +name lua-lgi +luarocks.module lgi -maintainers nomaintainer -categories lua devel -platforms darwin -license MIT +if {${subport} ne "lua51-lgi"} { + github.setup pavouk lgi 0.9.2 + revision 0 -description Dynamic Lua binding to GObject libraries using \ - GObject-Introspection -long_description LGI is gobject-introspection based dynamic Lua binding to \ - GObject based libraries. It allows using GObject-based \ - libraries directly from Lua. + checksums rmd160 ed5a2018423276ab8509f167ee8a405cce4fecdd \ + sha256 e019e61b75d25bd2bf3fc0cab2f1c380911db2061a32a35fbff61867661d3117 \ + size 291502 +} else { + # see https://github.com/lgi-devs/lgi/issues/236 -checksums rmd160 44f9157cc16bcad65233e62f9896c337336e5696 \ - sha256 68927380f6ed5b7d00284d9b9dc269704ee5d11c40ec76b6bd6056eb595c1578 + github.setup pavouk lgi 0.9.0 + revision 0 -depends_build-append \ - port:pkgconfig + checksums rmd160 8d6132368e183c246520a3b7e2d85c597e3b2d1f \ + sha256 6fdaaa0aecb0cbf98c93dd35fd94daa972e82a4229ed1dbe2a66300a1027c060 \ + size 285297 +} + +maintainers nomaintainer +license MIT -depends_lib-append port:lua +description Lua bindings to GObject libraries +long_description Dynamic Lua binding to any library which is introspectable \ + using gobject-introspection. Allows using GObject-based libraries \ + directly from Lua. -patchfiles patch-dylib-path.diff +depends_build-append port:pkgconfig +depends_lib-append path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection +patchfiles patch-dylib-path.diff post-patch { - reinplace "s|%PREFIX%|${prefix}|g" ${worksrcpath}/lgi/core.c + reinplace "s|%PREFIX%|${prefix}|g" \ + ${worksrcpath}/lgi/core.c } -gobject_introspection yes +luarocks.build_type make -use_configure no - -destroot.post_args PREFIX=${destroot}${prefix} LUA_VERSION=5.3 +pre-build { + system -W ${build.dir} "make rock" +}