# -*- 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 116552 2014-01-28 14:06:20Z devans@macports.org $

PortSystem              1.0

name                    gramps
version                 3.4.7
license                 GPL-2
categories              genealogy python
platforms               darwin
supported_archs         noarch
maintainers             devans openmaintainer
           
description             GRAMPS is a genealogy program

long_description        GRAMPS is a genealogy program to store, edit, \
                        and research genealogical data.  It provides \
                        advanced capabilities for research, analysis, and \
                        correlation to potentially fill relationship gaps.

homepage                http://www.gramps-project.org/
master_sites            sourceforge:gramps

checksums               rmd160  e7095ce672576698094905296d482b3e87d6d5a8 \
                        sha256  8492c76c7bb6ac1b72684f475d53cb1557b72dc7f1b5666f8b19491e2709a521

depends_build           port:pkgconfig \
                        port:intltool \
                        port:gnome-doc-utils

# librsvg is required at least for icons in dialogs

depends_lib             port:librsvg \
                        port:aspell-dict-en \
                        port:shared-mime-info \
                        port:desktop-file-utils \
                        path:bin/dot:graphviz

patchfiles              patch-configure.diff

# update intltool.m4 and autoreconf

post-patch {
    copy -force ${prefix}/share/aclocal/intltool.m4 ${worksrcpath}/m4
}

use_autoreconf          yes
autoreconf.args         -fvi

configure.args          --disable-mime-install

variant python26 conflicts python27 description {Use python 2.6} {
    depends_lib-append  port:py26-gtkspell \
                        port:py26-enchant \
                        port:py26-webkitgtk \
                        port:py26-osmgpsmap \
                        port:py26-exiv2 \
                        port:py26-pil \
                        port:py26-pyicu
    configure.python    ${prefix}/bin/python2.6
}

variant python27 conflicts python26 description {Use python 2.7} {
    depends_lib-append  port:py27-gtkspell \
                        port:py27-enchant \
                        port:py27-webkitgtk \
                        port:py27-osmgpsmap \
                        port:py27-exiv2 \
                        port:py27-pil \
                        port:py27-pyicu
    configure.python    ${prefix}/bin/python2.7
}

if {![variant_isset python26]} {
    default_variants +python27
}

post-activate {
    system "${prefix}/bin/update-mime-database ${prefix}/share/mime"
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}

notes {

When using GRAMPS, be sure to backup your data regularly! GRAMPS backups are in XML format.
XML is machine- and human-readable. It is completely self-sufficient. It is also small.

The following are good backup practices:

    Backup to XML from time to time, especially after large edits.
    Backup to XML before making big changes, such as importing new data into an existing database from e.g. GEDCOM,
        merging records, running tools that may heavily modify the data, etc.
    Backup to XML before upgrading GRAMPS to a newer version. Backup to XML with the old version before you install the new one!
    Backup to XML before upgrading your OS.

Also, use XML format for any data migration. Moving to another machine, sending data to a family member,
copying to another user on the same machine -- all of these cases should use XML.

For detailed backup instructions, see the online GRAMPS documentation at http://www.gramps-project.org/wiki/index.php?title=How_to_make_a_backup

}

livecheck.type                  regex
livecheck.url                   http://sourceforge.net/projects/gramps/files/Stable/
livecheck.regex                 "/Stable/(\[0-9.\]+)"
