# -*- 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 117963 2014-03-17 20:10:16Z snc@macports.org $

PortSystem          1.0
PortGroup           conflicts_build 1.0

name                virtuoso-7
set myname          virtuoso
version             7.1.0
categories          devel
maintainers         snc openmaintainer
license             GPL
description         a high-performance object-relational SQL database
long_description    Virtuoso is an enterprise-grade server that delivers a platform \
                    for Data Access, Integration and Management.
platforms           darwin
homepage            http://${myname}.openlinksw.com/dataspace/dav/wiki/Main/
master_sites        sourceforge:project/${myname}/${myname}/${version}
distname            ${myname}-opensource-${version}

checksums           rmd160  952eff3f239827801bddcb8b1d42d725256d9407 \
                    sha256  07105a144ffa01891d1b2f40d4902bf992e8babc283089dde45edcf6c332ad96

supported_archs     x86_64

depends_build       port:gawk

depends_lib         port:ImageMagick \
                    port:openldap \
                    port:openssl

conflicts_build     unixODBC
if {${os.platform} eq "darwin" && ${os.major} < 11} {
    conflicts_build-append  xnu-headers
}

configure.args-append   --disable-all-vads
post-configure {
    reinplace "s|\"gcc\"|\"${configure.cc}\"|" ${worksrcpath}/bin/libtool.macosx
    foreach note $PortInfo(notes) {
        ui_msg $note
    }
}

post-build {
    touch ${worksrcpath}/docsrc/html_virt/test.html
}

pre-activate {
    if {[file exists ${prefix}/bin/inifile]
        && ![catch {set vers [lindex [registry_active $myname ] 0]}]} {
        registry_deactivate_composite ${myname} "" [list ports_nodepcheck 1]
    }
}

notes "
Some antivirus software can cause the virtuoso build to hang indefinitely.\
If you have any antivirus software installed, please disable it while\
building virtuoso; it can be re-enabled after virtuoso has been installed.
"

livecheck.url       http://sourceforge.net/api/file/index/project-id/161622/mtime/desc/rss?path=/virtuoso
livecheck.type      regex
livecheck.regex     ${myname}/(\\d+(\\.\\d+)+)/${myname}-opensource-(\\d+(\\.\\d+)+)
