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

PortSystem          1.0

name                qore-devel
version             0.8.12.0.99
categories          lang
license             {LGPL-2.1 MIT}
maintainers         davidnichols pvanek

description         dynamically-typed programming language - development version from git master
long_description    Qore is a multithreaded, embeddabble programming language designed for SMP scalability. \
                    This package uses git master. Use the qore package for the latest stable release.
homepage            http://qore.org
platforms           darwin
master_sites        sourceforge

conflicts           qore
livecheck.type      none
worksrcdir          trunk

# git fetches are not working for me with SSL errors from github,
# but only from macports; see https://trac.macports.org/ticket/42063
fetch.type          svn
svn.url             https://github.com/qorelanguage/qore/trunk/

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

depends_lib         path:lib/libssl.dylib:openssl \
                    port:pcre \
                    port:zlib \
                    port:bzip2 \
                    port:gmp \
                    port:mpfr

pre-configure {
    # reconf.sh is mandatory for git builds. git-revision.h is not created when in an exported directory.
    system -W ${worksrcpath} "./reconf.sh && echo \"#define BUILD \\\"git_master\\\"\" > ${worksrcpath}/include/qore/intern/git-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