# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 120196 2014-05-19 03:27:20Z ryandesign@macports.org $

PortSystem          1.0

name                geocode-glib
version             3.12.2
license             LGPL-2.1
set branch          [join [lrange [split ${version} .] 0 1] .]
description         A convenience library for geocoding and reverse geocoding.
long_description    geocode-glib is a convenience library for geocoding (finding longitude, \
                    and latitude from an address) and reverse geocoding (finding an address from \
                    coordinates). It uses the Nominatim service to achieve that. It also caches \
                    (reverse-)geocoding requests for faster results and to avoid unnecessary \
                    server load.

maintainers         devans openmaintainer
categories          gnome devel
platforms           darwin
homepage            https://wiki.gnome.org/Librest
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  4925e43847a1c4821e7db053025058b2a4c2d3bc \
                    sha256  5ca581a927cac3025adc2afadfdaf9a493ca887537a548aa47296bc77bcfa49e

depends_build       port:pkgconfig \
                    port:intltool \
                    port:gnome-common

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:json-glib \
                    port:libxml2 \
                    port:libsoup \
                    port:gobject-introspection

patchfiles          patch-geocode-glib-geocode-glib.symbols.diff

# update m4/intltool.m4 and autoreconf

pre-configure {
    copy -force ${prefix}/share/aclocal/intltool.m4 ${worksrcpath}/m4
}

use_autoreconf      yes
autoreconf.args     -fvi

configure.args      --enable-introspection=yes \
                    --disable-silent-rules

platform darwin 8 {
    # The rules enabled by gobject-introspection require GNU make 3.81+
    depends_build-append    port:gmake
    build.cmd               ${prefix}/bin/gmake
}

livecheck.type      gnome
