# -*- 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           gitlab 1.0
PortGroup           meson 1.0

gitlab.instance     https://gitlab.gnome.org
gitlab.setup        GNOME libhandy 0.0.13 v
revision            1

name                libhandy-0.0
categories          gnome
license             LGPL-2.1+
maintainers         {devans @dbevans} openmaintainer

description         A library full of GTK+ widgets for mobile phones
long_description    The aim of the Handy library is to help with developing UI \
                    for mobile devices using GTK/GNOME.

checksums           rmd160  4c7454aafc684e31910d78af50443394d40d3d89 \
                    sha256  e19f3d72c2043f247d38a6949683fe23ffa34477935d332b02bf503bb13a1e18 \
                    size    377247

# Ignore stealth update
master_sites        macports_distfiles

depends_build-append \
                    port:pkgconfig \
                    port:gtk-doc \
                    path:bin/vala:vala

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3

patchfiles          glade-3.36-api.patch

compiler.c_standard 2011

configure.args      -Dintrospection=enabled \
                    -Dglade_catalog=disabled \
                    -Dvapi=true \
                    -Dgtk_doc=true \
                    -Dexamples=false \
                    -Dtests=false \
                    -Dbuildtype=plain

# gobject-introspection uses g-ir-scanner, which uses $CC from env
if {${universal_possible} && [variant_isset universal]} {
    foreach arch ${configure.universal_archs} {
        lappend merger_build_env(${arch})  "CC=${configure.cc} -arch ${arch}"
        lappend merger_destroot_env(${arch})  "CC=${configure.cc} -arch ${arch}"
    }
} else {
    build.env-append       "CC=${configure.cc} ${configure.cc_archflags}"
    destroot.env-append    "CC=${configure.cc} ${configure.cc_archflags}"
}

platform darwin 8 {
    # meson on Tiger cannot use rpaths, so we workaround with this to find dylib
    destroot.env-append "DYLD_LIBRARY_PATH=${build_dir}/src"
}

# last release of the 0.0 API
livecheck.type      none