# -*- 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 61982 2009-12-27 02:31:31Z ryandesign@macports.org $

PortSystem        1.0

name              aqbanking
version           4.1.4
# this is specific to this port and *version* for downloading it
set release       41

categories        devel net finance
maintainers       nomaintainer
platforms         darwin

description       a generic online banking interface
long_description  aqbanking is a generic online banking interface mainly \
                  supporting Home Banking Computer Interface, a standard \
                  used for German checking accounts, but also suitable \
                  for OFX as used in several other countries. \
                  Note that the YellowNet backend (for Suisse Postfinance) \
                  is not available for OS X (upstream only has a Linux binary).

homepage          http://www2.aquamaniac.de/sites/aqbanking/index.php
master_sites      http://www2.aquamaniac.de/sites/download/download.php?package=03&release=${release}&file=01&dummy=

checksums           md5     7936669649f66b880200cdad23692586 \
                    sha1    7b80bb570c79beaae5333746093e3cd1a20fd0e6 \
                    rmd160  766519c7ed860ec5044feccedab82ae7b3ae5a8a
                                    
depends_lib       port:gwenhywfar \
                  port:qt3 \
                  port:ktoblzcheck \
                  port:libglade2 \
                  port:libofx \
                  port:gmp
depends_build     port:libtool

# qt3 is not universal
universal_variant no

configure.cppflags-append "-L${prefix}/lib"
configure.cflags-append   "-L${prefix}/lib"
configure.ldflags-append  "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
configure.env             QTDIR=${prefix}/lib/qt3
configure.args            --with-qt-dir=${prefix}/lib/qt3 \
                          --enable-static \
                          --disable-dependency-tracking \
                          --with-frontends="cbanking g2banking qbanking" \
                          --with-backends="aqhbci aqofxconnect aqnone" \
                          --enable-libofx \
                          --disable-chipcard-client \
                          --disable-chipcard-client-test

variant disable_ofx description "Disable OFX support" {
    depends_lib-delete      port:libofx
    configure.args-delete   --with-backends="aqhbci aqofxconnect aqnone"
    configure.args-delete   --enable-libofx
    configure.args-append   --with-backends="aqhbci aqnone" \
                            --disable-libofx
}

#variant enable_geldkarte conflicts disable_ofx description "Enable geldkarte" {
#    depends_lib-append      port:libchipcard
#    configure.args-delete   --disable-chipcard-client
#    configure.args-delete   --disable-chipcard-client-test
#    configure.args-append   --with-backends="aqhbci aqofxconnect aqgeldkarte aqnone" \
#                            --enable-chipcard-client \
#                            --enable-chipcard-client-test
#}

variant python24 description "Enable ctypes support. This is only needed if you are using Python 2.4. It is not needed if Python 2.5 or later is installed." {
    depends_build-append    port:py-ctypes
}

variant enable_local_install description "Enable local installation mode (plugins, data, locale and config are located relatively to the binary)" {
    configure.args-append   --enable-local-install
}

use_parallel_build no
