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

name                impressive
version             0.13.2
revision            1

categories-append   graphics
license             GPL-2
maintainers         nomaintainer
supported_archs     noarch
platforms           any

description         Slide presentation tool
long_description    Impressive is a program that displays presentation slides,\
                    but unlike OpenOffice.org Impress or other similar\
                    applications, it does so with style. Smooth alpha-blended\
                    slide transitions are provided for the sake of eye candy,\
                    but in addition to this, Impressive offers some unique\
                    tools that are really useful for presentations.

homepage            https://impressive.sourceforge.net/
master_sites        sourceforge:impressive

distname            Impressive-${version}

checksums           rmd160  889715558eefe287110c092ab1da449bd380b4af \
                    sha256  033123b25f42cb084f6fd0a959ddf53100d3202c67e666e5cc57a4e48ec1253c \
                    size    294531

python.default_version 312

depends_lib-append  port:py${python.version}-opengl \
                    port:py${python.version}-game \
                    port:py${python.version}-Pillow

depends_run-append  path:bin/ffmpeg:ffmpeg \
                    path:bin/pdftoppm:poppler \
                    port:ghostscript \
                    port:mupdf

post-patch {
    reinplace "s|#!.*|#!${python.bin}|" \
        ${worksrcpath}/impressive.py
}

build {}

destroot {
    xinstall -m 0775 ${worksrcpath}/impressive.py \
        ${destroot}${prefix}/bin/impressive
    xinstall -m 0644 ${worksrcpath}/impressive.1 \
        ${destroot}${prefix}/share/man/man1
    xinstall -m 0664 -W ${worksrcpath} \
        license.txt \
        changelog.txt \
        impressive.html \
            ${destroot}${prefix}/share/doc/impressive
    xinstall -m 0664 ${worksrcpath}/demo.pdf \
            ${destroot}${prefix}/share/doc/impressive/examples
}

notes "
For a demo run:
  \$ impressive ${prefix}/share/doc/impressive/examples/demo.pdf
"

livecheck.regex "Impressive/(\\d+(\\.\\d+)+)/"
