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

name                ocaml-tsdl-image
github.setup        sanette tsdl-image 0.6
revision            3
categories          ocaml graphics
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             BSD
description         SDL2_Image bindings to go with Tsdl
long_description    {*}${description}
checksums           rmd160  3e99602d43de0e9daae73df1821ab83b5d02ec4d \
                    sha256  f6e1f2dd2b8e43f309c8ab30ee6f3db3d9ef84ea0fe9a715f042d06aa59e420f \
                    size    366909
github.tarball_from archive

patchfiles          patch-fix-prefix.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/src/tsdl_image.ml
}

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:libsdl2_image \
                    port:ocaml-ctypes \
                    port:ocaml-ctypes-foreign \
                    port:ocaml-dune-configurator \
                    port:ocaml-tsdl

ocaml.build_type    dune
