# -*- 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

PortSystem          1.0
PortGroup           qt4 1.0

name                qtmobility
version             1.2.0
revision            0
categories          devel
license             LGPL-2.1 EPL-1
platforms           darwin
maintainers         nomaintainer
homepage            http://qt.nokia.com/products/qt-addons/mobility/
description         Qt Mobility APIs
long_description    Additional Qt APIs which enable developers to include \
                    standard mobile functionality in their applications and \
                    provide useful application functionality across desktop \
                    platforms.

master_sites        http://get.qt.nokia.com/qt/add-ons/
distname            qt-mobility-opensource-src-${version}
checksums           md5     ea5db5a8d3dd4709c2926dceda646bd8 \
                    sha1    090d1cc0d9c27f41d6fc9022b80ab5579af5e46d \
                    rmd160  c8c3c6c301e90a2ba9a2a249569084b9c3923322

# --prefix is not recognized.
configure.pre_args-delete       --prefix=${prefix}

configure.args                                            \
    -prefix          ${qt_dir}                            \
    -bindir          ${qt_bins_dir}                       \
    -libdir          ${qt_libs_dir}                       \
    -headerdir       ${qt_includes_dir}                   \
    -plugindir       ${qt_plugins_dir}                    \
    -examplesdir     ${qt_examples_dir}                   \
    -demosdir        ${qt_demos_dir}

variant debug description {Build both release and debug library} {}

# Fix building without bluez
patchfiles-append patch-src-connectivity-bluetooth.diff

if {[variant_isset debug]} {
    configure.args-append -debug-and-release
} else {
    configure.args-append -release

    # Do not force building debug version of the declarative location plugin.
    patchfiles-append patch-plugins-declarative-location-location.pro.diff
}
