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

github.setup        pyfa-org Pyfa 1.31.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                pyfa
categories          games python
license             GPL-3
maintainers         nomaintainer

description         Python fitting assistant for EVE-Online
long_description    pyfa is the Python Fitting Assistant, a standalone \
                    application to create ship fittings for the \
                    EVE-Online SciFi MMORPG.

python.default_version  27

depends_run-append  port:py${python.version}-dateutil \
                    port:py${python.version}-logbook \
                    port:py${python.version}-matplotlib \
                    port:py${python.version}-pygtk \
                    port:py${python.version}-requests \
                    port:py${python.version}-sqlalchemy \
                    port:py${python.version}-urllib3 \
                    port:py${python.version}-wxpython-3.0

checksums           rmd160  cec83b490c6c96d89017e8be8abd7c194010707e \
                    sha256  f024e0710255b42152f744a5c4d9c553ac4a9ed5571deee0f51e1ee73cb74770

build { }

set python_path         ${python.pkgd}/${name}
set python_target_path  ${destroot}${python_path}

python.link_binaries no

post-patch {
    reinplace "s|#!/usr/bin/env python|#!${python.bin}|" ${worksrcpath}/pyfa.py
}

destroot {
    xinstall -d -m 755 ${python_target_path}
    copy {*}[glob ${worksrcpath}/*] ${python_target_path}
    ln -s ${python_path}/pyfa.py ${destroot}${prefix}/bin/pyfa
}
