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

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

github.setup        KJ7LNW xnec2c 4.4.18 v
revision            0
categories          science
license             GPL-3
maintainers         @vk1kcm openmaintainer

description         Xnec2c: Fast Multi-Threaded EM Simulator based on NEC2
long_description    Xnec2c is a GTK3-based Graphical version of nec2c, a translation \
                    to the C language of NEC2, the FORTRAN Numerical Electromagnetics \
                    Code commonly used for antenna simulation and analysis.

homepage            https://www.xnec2c.org

checksums           rmd160  ddf718a92574ea4e1f659353f1ca70cd628d0a2b \
                    sha256  c4b7eaf4d45242a805b6d697136ad13b1ff751db1d5854d31a755da7f1973045 \
                    size    1539818
github.tarball_from archive

use_autoreconf      yes

depends_build-append \
                    path:bin/pkg-config:pkgconfig \
                    port:gettext

depends_lib-append  path:lib/pkgconfig/gtk+-3.0.pc:gtk3

depends_run-append  port:desktop-file-utils

compiler.c_standard 2011

notes-append "Examples are in ${prefix}/share/xnec2c/examples"

post-activate {
    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}
