# -*- 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           github   1.0
PortGroup           legacysupport 1.1
PortGroup           makefile 1.0

# _strnlen, _strndup, _getdelim
legacysupport.newest_darwin_requires_legacy 10

github.setup        leahneukirchen mblaze 1.3 v
github.tarball_from archive
revision            0

description         Unix utilities to deal with Maildir

long_description    The mblaze message system is a set of Unix utilities for \
                    processing and interacting with mail messages which are \
                    stored in maildir folders.

categories          mail
installs_libs       no
license             public-domain
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  88208ee3702c6948cf4db24e658619cb180dbf95 \
                    sha256  db2c7bdc37eb2f6ac07263232b1d70d733edfa709cdef87db63aaec4fe64da3c \
                    size    102829

# It installs /opt/local/bin/mdate and /opt/local/bin/msort binaries.
conflicts           mdate msort

patch {
    # Allow PREFIX to be overridden
    reinplace -E {s|^PREFIX=|PREFIX?=|}     ${worksrcpath}/GNUmakefile

    # Remove optimization
    reinplace -E {s|^(CFLAGS.*) -O2|\1|}    ${worksrcpath}/GNUmakefile
}
