# -*- 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           app 1.0
PortGroup           github 1.0

github.setup        tux4kids tuxtype 1.8.3 upstream/
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1
categories          games education
maintainers         nomaintainer

description         Learn to type with Tux, the Linux Penguin!
long_description    Tux Typing is an SDL-based educational game intended for children but fun for all ages. \
                    The program includes two video game-styled activities for typing individual words, \
                    as well as a phrase/sentence typing activity that displays accuracy and words per \
                    minute.

checksums           rmd160  628770bd2e0d5b90deebb3355deacf4c03a44880 \
                    sha256  b1fe456a5fefb2a27f4ff4181f91424135d2d365862e8f95b7bf574047c1f9f9

use_autoreconf      yes

depends_build-append    port:pkgconfig

depends_lib-append  port:libsdl \
                    port:libsdl_image \
                    port:libsdl_mixer \
                    port:libsdl_ttf \
                    port:libsdl_net \
                    port:gettext \
                    port:t4k_common

patchfiles          patch-src-Makefile.am.diff

configure.args-append \
                    --disable-sdltest \
                    --without-sdlpango \
                    --without-rsvg

destroot.keepdirs   ${destroot}${prefix}/etc/${name} \
                    ${destroot}${prefix}/var/${name}
post-destroot {
    xinstall -d ${destroot}${prefix}/etc/${name}
    xinstall -m 0777 -d ${destroot}${prefix}/var/${name}
}

variant sdlpango description {Build with SDL_Pango enabled} {
    depends_lib-replace     port:libsdl_ttf port:libsdl_pango \
    configure.args-replace  --without-sdlpango --with-sdlpango
}

platform macosx {
    patchfiles-append patch-src-setup.c.diff
}

app.name            TuxType
app.icon            data/images/icons/icon.png
