# -*- 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 88930 2012-01-15 06:27:59Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           github 1.0
PortGroup           xcode 1.0

github.setup        francois mongo_explorer 1.0.2 v
name                MongoExplorer
categories          aqua databases
maintainers         ryandesign
license             MIT

description         a Cocoa administration interface for Mongo databases

long_description    Mongo Explorer is a simple Cocoa application to administer \
                    Mongo databases. It is still a work in progress.

checksums           rmd160  91c6805bf4af23b66e0975cf2c330019ec177e27 \
                    sha256  921e9632727dc243992391b81410da14695f8d61a3a8c9f665f3a7f0c062e44c

#fetch.type          git
#git.url             https://github.com/francois/mongo_explorer.git
#git.branch          d671413af75443df690f43165dbad5e2c51f2075

depends_lib         port:BWToolkit

# synthesized property must either be named the same as a compatible ivar or must explicitly name an ivar
# https://github.com/francois/mongo_explorer/issues/3
supported_archs     ppc64 x86_64
universal_variant   no

post-extract {
    # File forgotten in 1.0.2 tarball
    # https://github.com/francois/mongo_explorer/commit/c0b0b7bd9c5a99baf193727c80a646d700c4b6a3
    copy ${filespath}/Mongo_Explorer_Prefix.pch ${worksrcpath}
}

patchfiles          patch-project.pbxproj.diff

post-patch {
    reinplace "s|@FRAMEWORKS_DIR@|${frameworks_dir}|g" "${worksrcpath}/Mongo Explorer.xcodeproj/project.pbxproj"
}

xcode.configuration Release
