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

github.setup        fbergo eboard 1.1.3 v
categories          games
license             GPL-2+
platforms           darwin
maintainers         nomaintainer

description         eboard is a chess interface just like xboard.
long_description    \
    eboard is a chess interface for Unix-like systems (GNU/Linux, FreeBSD, \
    Solaris, etc.) based on the GTK+ GUI toolkit. It provides a chess board \
    interface to ICS (Internet Chess Servers) like FICS and to chess \
    engines like GNU Chess, Sjeng and Crafty.

checksums           rmd160  9157280313a11fa839a46bed68db2ad22311079a \
                    sha256  b1a7a3c7873ea086aa2c89f3e4fb40e4c1e3f9f7350f05f33669eca43efb72bd \
                    size    1579046

depends_build-append    port:pkgconfig
depends_lib-append      port:gtk2 \
                        port:gstreamer1 \
                        port:gstreamer1-gst-plugins-base

# Use Debian's patches
patchfiles          patch-configure.diff \
                    patch-elifekam.diff \
                    patch-sound.diff

variant universal {}

build.env-append    "CXX=${configure.cxx} [get_canonical_archflags cxx]" \
                    "CFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
                    "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \
                    PREFIX=${prefix}
destroot.env-append "CXX=${configure.cxx} [get_canonical_archflags cxx]" \
                    "CFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
                    "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \
                    PREFIX=${prefix}

# Use system's perl
configure.cmd       ./configure
configure.args      --man-prefix=${prefix}/share/man

pre-destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/${name}

    # share/eboard/timeseal.Darwin is an executable that is not required
    # but needs fixed/moved.
}