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

# 0.12.0 was the last release long time ago
python.rootname     Minecraft-Overviewer

# github.setup      overviewer Minecraft-Overviewer 0.12.0 v
github.setup        overviewer ${python.rootname} bde265a8ac7a27b51fd8b7764e12c7b2ccc3d90d
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
version             0.12.280_2018-11-18
name                py-minecraft-overviewer
license             GPL-3
maintainers         nomaintainer

description         Render high-resolution maps of a Minecraft world with a Google Maps powered interface
long_description    {*}${description}

homepage            http://overviewer.org/

# We need either this Imaging library or Pil(low)
# http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz
set libname         Pillow
set libvers         5.3.0
set libfile         ${libname}-${libvers}${extract.suffix}
set mainfile        ${python.rootname}-${git.branch}${extract.suffix}

master_sites-append pypi:P/${libname}:pil
distfiles-append    ${libfile}:pil

checksums           ${mainfile} \
                    rmd160  4166e80db26a6e7a0f5c304b031e3df6c646c61a \
                    sha256  62965d1c159a0c247a5a1c2983b19090be5d83e0a46c9094f3118ab2575c65c9 \
                    size    2951474 \
                    ${libfile} \
                    rmd160  5442d263857277761830878b8aa109038a23f2b2 \
                    sha256  2ea3517cd5779843de8a759c2349a3cd8d3893e03ab47053b66d5ec6f8bc4f93 \
                    size    15553718

python.versions     27

if {${name} ne ${subport}} {
    build.env-append \
                    PIL_INCLUDE_DIR=${workpath}/${libname}-${libvers}/src/libImaging/

    depends_build-append \
                    port:py${python.version}-numpy
    depends_run-append \
                    port:py${python.version}-numpy

    livecheck.type  none
}