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

github.setup        brunoos luasec 0.6alpha luasec-
revision            1
name                lua-luasec
categories          devel
license             MIT
maintainers         nomaintainer
platforms           darwin
description         LuaSec depends on OpenSSL, and integrates with LuaSocket \
                    to make it easy to add secure connections to any Lua \
                    applications or scripts.

long_description    ${description} \
                    This version includes a new X509 certificate API.

checksums           rmd160  1944ed72f389d85f785093d1ea12b6c4e7a2c685 \
                    sha256  35dd386d7faf3f66b4e540fe48984eee1b7118c149429cded0971cf532c27c6f

# builds with bundled copy of LuaSocket by default
# so dependency on lua-luasocket is not necessary.

depends_lib         port:lua \
                    port:openssl

patchfiles          patch-Makefile.diff \
                    patch-src-Makefile.diff

use_configure       no
universal_variant   no

set lua_version     5.3
set lua_path        ${prefix}/share/lua/${lua_version}
set lua_cpath       ${prefix}/lib/lua/${lua_version}

build.target        macosx
build.env           CC="${configure.cc} [get_canonical_archflags]" \
                    INC_PATH=-I${prefix}/include \
                    LIB_PATH=-L${prefix}/lib \
                    LUAPATH=${lua_path} \
                    LUACPATH=${lua_cpath}

destroot.env        LUAPATH=${lua_path} \
                    LUACPATH=${lua_cpath}