# -*- 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           gobject_introspection 1.0

name                libgee
version             0.20.6
revision            0
license             LGPL-2.1+
set branch          [join [lrange [split ${version} .] 0 1] .]
categories          devel
maintainers         nomaintainer
description         Collection library providing GObject-based interfaces

long_description    Libgee is a collection library providing GObject-based interfaces and \
                    classes for commonly used data structures.

homepage            https://wiki.gnome.org/Projects/Libgee
master_sites        gnome:sources/${name}/${branch}

use_xz              yes

checksums           rmd160  94cc2a8ec68b166b9df9913c6bd80d7d521ea845 \
                    sha256  1bf834f5e10d60cc6124d74ed3c1dd38da646787fbf7872220b8b4068e476d4d \
                    size    690436

depends_build       port:pkgconfig \
                    path:bin/vala:vala

patchfiles          patch-typelib-use-absolute-sharedlib-path.diff

post-patch {
    # Recompile with Vala to resolve error. Should be fixed with newer tarballs
    # hashmap.c:4089:23: error: incompatible function pointer types
    delete ${worksrcpath}/gee/libgee_0_8_la_vala.stamp
    # testcase.c:281:59: error: incompatible function pointer types
    delete ${worksrcpath}/tests/tests_vala.stamp
}

compiler.c_standard 2011

# autoreconf after patching gee/Makefile.am
use_autoreconf      yes
autoreconf.args     -fvi

gobject_introspection yes

configure.args      --disable-silent-rules

test.run            yes
test.cmd            ./tests/tests
test.target

livecheck.type      gnome
