# -*- 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                libbswabe
version             0.9
revision            3
categories          security
platforms           darwin
maintainers         nomaintainer
license             GPL-2

description         ciphertext-policy attribute-based encryption toolkit library

long_description    The cpabe toolkit provides a library implementing a \
                    ciphertext-policy attribute-based encryption scheme. \
                    \n\nIn a ciphertext policy attribute-based encryption \
                    scheme, each user's private key is associated with a set \
                    of attributes representing their capabilities, and a \
                    ciphertext is encrypted such that only users whose \
                    attributes satisfy a certain policy can decrypt. For \
                    example, we can encrypt a ciphertext such that in a \
                    company it can only be decrypted by a someone with \
                    attributes "Senior" and "Human Resources" or has the \
                    attribute "Executive." One interesting application of \
                    this tool is that we can do Role-Based Access Control \
                    (RBAC) without requiring trusted data storage.

homepage            http://acsc.cs.utexas.edu/cpabe/
master_sites        ${homepage}

checksums           sha1    ed94479cde2cc0351487597be477ac7f87242727 \
                    rmd160  580b9c1550ea097cb89dd2059fd1b11ac964e127

depends_build       port:pkgconfig

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:gmp \
                    path:lib/libssl.dylib:openssl \
                    port:pbc

patchfiles          dylib.patch

configure.args      --with-gmp-include=${prefix}/include \
                    --with-gmp-lib=${prefix}/lib \
                    --with-pbc-include=${prefix}/include/pbc \
                    --with-pbc-lib=${prefix}/lib