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

github.setup        processing processing 0270-3.5.4 processing-
revision            0
checksums           rmd160  5bc38bc45eca79252959e967ab7bc10caa4c6e78 \
                    sha256  99a5d3cfccd106e79fe82cafa66b72b15c19e5747eac77e40dd0a82b032c2925 \
                    size    53096631

version             [lindex [split ${github.version} -] 1]
categories          lang
license             GPL-2
maintainers         {guenael.com:macports @numeratus} \
                    openmaintainer

description         Flexible software sketchbook and a language for learning how to code\
                    within the context of the visual arts.
long_description    \
    Processing is an open source programming language and environment for people \
    who want to create images, animations, and interactions. Initially developed \
    to serve as a software sketchbook and to teach fundamentals of computer \
    programming within a visual context, Processing also has evolved into a \
    tool for generating finished professional work. Today, there are tens of \
    thousands of students, artists, designers, researchers, and hobbyists who \
    use Processing for learning, prototyping, and production.

homepage            https://processing.org
github.tarball_from archive
distname            ${name}-${version}

depends_build       port:apache-ant

# Requires Oracle JDK 8u202. Other versions are not supported. OpenJDK is not supported.
# https://github.com/processing/processing/wiki/Build-Instructions
java.version        1.8

use_configure       no

build.dir           ${worksrcpath}/build
build.cmd           ${prefix}/bin/ant
build.target        macosx-build

post-build {
    reinplace "s|\\\${version}|${version}|g" ${build.dir}/macosx/work/Processing.app/Contents/Info.plist
}

destroot {
    move ${build.dir}/macosx/work/Processing.app ${destroot}${applications_dir}/
}
