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

name             scriptix
version          0.31
revision         3
categories       devel
license          BSD
maintainers      nomaintainer
platforms        {darwin < 16}

description      scripting system coded in C++
long_description Scriptix is a scripting system coded in C++, designed solely \
                 for embedding in other C++ applications. Scriptix doesn't \
                 pretend to be a stand-alone language.
homepage         https://sourceforge.net/projects/awemud/

master_sites     sourceforge:awemud
checksums        rmd160  6286fdffaf324d0f754340d921bb191f9dd8c82c \
                 sha256  2b38ca0cad98f3794b9460ea1ee3f6f57ce3fd225a2854f32ad50eab6f403c47 \
                 size    386220

depends_lib-append \
                 port:boehmgc

patchfiles-append patch-Makefile.am.diff
patchfiles-append patch-Makefile.in.diff
patchfiles-append patch-missing-headers.diff

post-patch {
    reinplace s|shrext_cmds|shrext|g ${worksrcpath}/configure
}

platform darwin {
    if {${os.major} > 10 && ${os.major} < 16} {
        # Newer gcc and clang fail to build it.
        # apple-gcc-4.2 builds through 10.11.
        depends_build-append    port:apple-gcc42
        configure.compiler      apple-gcc-4.2
    }
}

configure.args-append \
                 --with-gc=${prefix}

# See: https://github.com/ivmai/bdwgc/issues/268
configure.ldflags-append \
                 -lgccpp
