# $Id: Portfile 87583 2011-11-26 22:50:44Z blb@macports.org $

PortSystem          1.0
name                quickfix
version             1.13.3
revision            1
license             Permissive
# http://www.quickfixengine.org/quickfix/doc/html/license.html
categories          devel finance
maintainers         nomaintainer
description         FIX engine implementation
long_description \
   QuickFIX is a full-featured open source FIX engine, currently compatible \
   with the FIX 4.0-4.4 spec.

platforms           darwin

homepage            http://www.quickfixengine.org/
master_sites        sourceforge
worksrcdir          ${name}

checksums           md5     1e569a32107ecfc1de9c15bdcb5dc360 \
                    sha1    8a20894a9320206beaeee11c3967dced8b8d2fc0 \
                    rmd160  13d72e1c16a124e444f4ae520654015e06974356

depends_lib         port:libxml2

post-patch {
   reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/configure
}

configure.args      --with-java
configure.env       "JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home"

post-destroot {
   xinstall -m 755 -d ${destroot}${prefix}/share/${name}/sql
   copy ${worksrcpath}/src/sql/postgresql ${destroot}${prefix}/share/${name}/sql
}

variant python description {Include python support} {
   depends_lib-append      port:python26
   configure.args-append   --with-python=${prefix}
   patchfiles-append       patch-python.diff
}

variant postgresql84 conflicts postgresql90 description {Include PostGreSQL 8.4 support} {
   depends_lib-append      port:postgresql84
   configure.args-append   --with-postgresql=${prefix}
   patchfiles-append       patch-postgresql84.diff
}

variant postgresql90 conflicts postgresql84 description {Include PostGreSQL 9.0 support} {
   depends_lib-append      port:postgresql90
   configure.args-append   --with-postgresql=${prefix}
   patchfiles-append       patch-postgresql90.diff
}

livecheck.type      regex
livecheck.url       ${homepage}download.html
livecheck.regex     ${name}-(\[.\\d\]+)${extract.suffix}

