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

name                cpabe
version             0.11
revision            3
categories          security
maintainers         nomaintainer
license             GPL-2

description         ciphertext-policy attribute-based encryption toolkit

long_description    The cpabe toolkit provides a set of programs 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           rmd160  43fcb2b12e8cc219f5a1753ea627bca3307d8f20 \
                    sha256  11774b0d6f2caa263e8c379afa61982e96ceafb3ba7206820d978b74a99acc1c \
                    size    90374

patchfiles          patch-fix-finding-gmp.diff

depends_build       port:gettext \
                    path:bin/pkg-config:pkgconfig
depends_lib         port:gettext-runtime \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:libbswabe \
                    port:pbc

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