# -*- 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 115038 2013-12-23 05:17:49Z ryandesign@macports.org $

PortSystem 1.0

name                geda-gaf
epoch               1
version             1.6.2
revision            1
set branch          [join [lrange [split ${version} .] 0 1] .]
platforms           darwin
categories          science electronics
maintainers         emer.net:emer openmaintainer
license             GPL-2+

description         gEDA/gaf - gschem and friends
long_description    The gEDA project has produced and continues working on a \
                    full GPL'd suite and toolkit of Electronic Design Automation \
                    tools. These tools are used for electrical circuit design, \
                    schematic capture, simulation, prototyping, and production. \
                    This package is the smallest subset of the gEDA Suite that is \
                    directly maintained by gEDA Project founders.

homepage            http://www.geda-project.org/
master_sites        http://ftp.geda-project.org/geda-gaf/stable/v${branch}/${version} \
                    http://geda.seul.org/release/v${branch}/${version}

checksums           rmd160  4e32ba11188b9a2849036299b972c35481cb975e \
                    sha256  507ee440ad976a534beab205231840468004366d471c17a211ffbdcbc24a6d2b

depends_build       port:pkgconfig
depends_lib         port:gtk2 \
                    port:guile \
                    port:libffi

patchfiles          patch-glib-2.32.diff

configure.args-append   --disable-update-xdg-database

destroot.destdir    DESTDIR=${destroot}/

variant enable_xdg description {enable XDG database update} {
    depends_lib-append      port:desktop-file-utils
    configure.args-delete   --disable-update-xdg-database
    
    post-destroot {
        file delete ${destroot}${prefix}/share/applications/mimeinfo.cache
        file delete ${destroot}${prefix}/share/mime/XMLnamespaces
    }
    post-activate {
        system ${prefix}/bin/update-desktop-database
    }
}

livecheck.type      regex
livecheck.url       http://wiki.geda-project.org/geda:download
livecheck.regex     ${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)${extract.suffix}
