# -*- 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
PortGroup           cxx11 1.0
PortGroup           github 1.0

github.setup        facebook fbthrift 90bdb701d91e
version             0.31.99
categories          devel
platforms           darwin
license             Apache-2

maintainers         sean openmaintainer

description         Facebook's branch of Apache Thrift, including a new C++ server.
long_description    ${description}

checksums           rmd160  522bbeaacfeda93ebfd0337f601981f69dffa888 \
                    sha256  075a42ae1610ba2257f246f9a8cb482565e48fd2c94cfd3d230814a210e37c68

use_autoreconf      yes

worksrcdir          ${worksrcdir}/thrift

configure.env-append \
    PYTHON_EXTRA_LDFLAGS="-u _PyMac_Error ${frameworks_dir}/Python.framework/Versions/2.7/Python" \
    PYTHON="${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7" \
    PY_INSTALL_ARGS="--prefix=${frameworks_dir}/Python.framework/Versions/2.7 --root=${destroot}"

# needed for ax_boost and friends
depends_build-append \
                    port:autoconf-archive \
                    port:pkgconfig

# doesn't build with libressl as of 2016-09-05
depends_lib-append  port:boost \
                    port:python27 \
                    port:gflags \
                    port:google-glog \
                    port:double-conversion \
                    port:libevent \
                    port:snappy \
                    port:openssl \
                    port:mstch \
                    port:wangle \
                    port:folly