# -*- 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
# $Id: Portfile 111711 2013-09-29 18:11:20Z macsforever2000@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        pavouk lgi 0.7.1
name                lua-lgi

maintainers         nomaintainer
categories          devel
platforms           darwin
license             MIT

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 af49608d6af76c468fef0ab67f2a065ed8730152 \
                    sha256 31f273e056959cea5a4e929b0e81b21e89c852d8a0e874bc6f78017c93d3a5a0

depends_build-append \
                    port:pkgconfig

depends_lib-append  port:gobject-introspection \
                    port:lua

patchfiles          patch-dylib-path.diff

use_configure       no

post-patch {
    reinplace "s|%PREFIX%|${prefix}|g" ${worksrcpath}/lgi/core.c
}

destroot.post_args PREFIX=${destroot}${prefix} LUA_VERSION=5.2
