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

PortSystem              1.0
PortGroup               python 1.0
PortGroup               github 1.0

github.setup            edyoung gnofract4d 3_14_1 V_
version                 [string map {_ .} ${version}]
revision                1
description             Gnofract4D is a program to draw fractals.
long_description        Gnofract 4D is a fractal browser. It can \
                        generate many different fractals, including \
                        some which are hybrids between the Mandelbrot \
                        and Julia sets, and includes a Fractint-compatible \
                        parser for your own fractal formulas.

maintainers             khindenburg openmaintainer
categories              gnome math python
license                 LGPL-2.1+
platforms               darwin
# Remove next line with next version update.
master_sites            https://github.com/edyoung/gnofract4d/archive/

checksums               rmd160  e42b53ec651430d88d7479fb8cb2704d0b33ab6d \
                        sha256  29f05d9b07f7b53bf250b0f81f74b76dbd68efc5d6ba71f4d55ef332f6b6f83d

# Remove next 3 lines with next version update.
dist_subdir             ${name}/${version}_1
distname                V_[regsub -all {\.} $version {_}]
worksrcdir              ${name}-${distname}

python.default_version  27

depends_build           port:pkgconfig
depends_lib-append      port:py${python.version}-pygtk \
                        port:jpeg \
                        port:libpng

post-extract {
    # DOS to UNIX line endings so we can patch
    reinplace "s|\r||" ${worksrcpath}/fract4dgui/gtkio.py
}

patchfiles              patch-fract4d_fractconfig.py.diff \
                        patch-setup.py.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/setup.py
}