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

name                php-mcrypt
categories-append   security
platforms           darwin
maintainers         {ryandesign @ryandesign} openmaintainer
license             PHP-3.01

# php71-mcrypt and earlier subports are in the php Portfile.
php.branches        7.2 7.3
php.pecl            yes
php.pecl.prerelease yes

description         a PHP interface to the mcrypt library, which offers \
                    a wide variety of algorithms

long_description    ${description}

if {[vercmp ${php.branch} 7.2] >= 0} {
    version         1.0.2
    revision        0
    checksums       rmd160  acd9f5842ae37c6d35d57a0960a5b06cf6881977 \
                    sha256  4d21dd20bfdc3cf4d43c967abdd137224f9c56258ca28ee0bc66ce130e01cae4 \
                    size    33698
}

if {${name} ne ${subport}} {
    depends_lib-append      port:libmcrypt

    # The mcrypt extension may be using libtool unnecessarily; monitor
    # https://bugs.php.net/bug.php?id=54500
    depends_lib-append      port:libtool

    configure.args-append   --with-mcrypt=${prefix}
}