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

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         SGML-Parser-OpenSP 0.994
revision            5
platforms           darwin
license             {Artistic-1 GPL}
maintainers         nomaintainer
description         Provides an interface to the OpenSP SGML parser.
long_description    ${description}

checksums           md5 b1ee0244e9daa4d37f28cf32c4753691 \
                    sha1 7d63abac63da9fc2352cbdee476f4d095f84366f \
                    rmd160 fcdfefdc139bec595732c0eab9a7d7e251ba6d42

if {${perl5.major} != ""} {
    patchfiles      Makefile.PL.patch
    # wants to put C++ code in a .c file for some reason
    post-patch {
        reinplace "s|__CXX__|${configure.cxx}|" ${worksrcpath}/Makefile.PL
    }
    configure.cc    ${configure.cxx} {*}${configure.cxxflags}
    depends_lib-append \
                    port:p${perl5.major}-class-accessor \
                    port:p${perl5.major}-file-temp \
                    port:p${perl5.major}-test-exception \
                    port:opensp
}
