# $Id: Portfile 62211 2009-12-31 21:36:31Z ryandesign@macports.org $

PortSystem          1.0

name                qgit
version             2.2
revision            1
categories          devel
maintainers         free.fr:ocroquette
description         A graphical interface to git repositories
long_description    A QT graphical interface to git repositories

homepage            http://sourceforge.net/projects/qgit/
platforms           darwin
distname            qgit-${version}

use_bzip2           yes
worksrcdir          qgit

master_sites        sourceforge
checksums           md5 f863efa000aa1549f803c6ad743decd6

depends_lib         path:bin/qmake-mac:qt4-mac port:git-core

patchfiles          patch_src_namespace_def.cpp.diff  patch_src_qgit.cpp.diff

configure {
    # ui_msg ${worksrcpath}
    system "cd ${worksrcpath} && ${prefix}/libexec/qt4-mac/bin/qmake"
}

destroot {
    # Install to the application directory
    xinstall -m 755 -d ${destroot}/Applications/MacPorts
    file copy ${worksrcpath}/bin/qgit.app \
              ${destroot}/Applications/MacPorts

    # Also copy to /bin for easier access from the command line
    # Especially useful since qgit is supposed to be started from
    # the GIT repository location.
    xinstall ${worksrcpath}/bin/qgit.app/Contents/MacOS/qgit ${destroot}${prefix}/bin
}

