# -*- 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 92917 2012-05-10 18:47:50Z ryandesign@macports.org $

PortSystem          1.0

name                qore-devel
svn.revision        4615
version             0.8.3.99-${svn.revision}
categories          lang
maintainers         davidnichols pvanek

description         dynamically-typed programming language - a SVN trunk version
long_description    Qore is a dynamically-typed, embeddabble programming language designed for SMP scalability. \
                    This package uses SVN trunk. Use pacakge qore for stable releases.
homepage            http://qore.org
platforms           darwin
master_sites        sourceforge

conflicts           qore
livecheck.type      none
worksrcdir          trunk

fetch.type          svn
svn.url             https://qore.svn.sourceforge.net/svnroot/qore/qore/trunk/

depends_build       port:flex \
                    port:bison \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:openssl \
                    port:pcre \
                    port:zlib \
                    port:bzip2

pre-configure {
    # reconf.sh is mandatory for svn builds. svn-revision.h is not created when in an exported directory, which is what MacPorts creates unless you request a working copy by setting "svn.method checkout".
    system -W ${worksrcpath} "./reconf.sh && echo \"#define BUILD 0\" > ${worksrcpath}/include/qore/intern/svn-revision.h"
}

# --disable-dependency-tracking is safe here. The build is always done in one run.
#                               It's required to prevent autotools from using -M* options for multiple -arch options
configure.args      --disable-debug --disable-static --disable-dependency-tracking

# the autoconf check for iconv() in libiconv fails with GNU iconv, but we need it, so we turn it on anyway
configure.ldflags   -liconv

# to fix: https://trac.macports.org/ticket/31830
#patchfiles          patch-next_build.sh.diff
