# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       app 1.0

name            gtkwave
version         3.3.117
revision        1

categories      cad
license         GPL-2+
maintainers     {langly.org:kenneth.ostby @langly} openmaintainer
description     A viewer for common electronic CAD waveform files.
long_description \
        GTKWave is a fully featured GTK+ based wave viewer for Unix \
        and Win32 which reads LXT, LXT2, VZT, and GHW files as well \
        as standard Verilog VCD/EVCD files and allows their viewing.

homepage        http://gtkwave.sourceforge.net
master_sites    sourceforge:project/gtkwave/gtkwave-${version}

checksums       rmd160  7e1556072540ab5ef1b94dc2a823533ba6ba15ba \
                sha256  55520fc308244c5dc99d5a3f42f5e782eb8e6a9e81cece5c84ea3f11875bff13 \
                size    3506108

depends_build-append \
                port:pkgconfig

depends_lib-append \
                port:bzip2 \
                path:lib/pkgconfig/gtk+-2.0.pc:gtk2 \
                port:gtk-osx-application-gtk2 \
                path:lib/pkgconfig/harfbuzz.pc:harfbuzz \
                path:lib/pkgconfig/pango.pc:pango \
                port:tk \
                port:xz \
                port:zlib

configure.args-append \
                --with-tcl=${prefix}/lib \
                --with-tk=${prefix}/lib \
                --disable-mime-update \
                "GTK_MAC_CFLAGS=\"\$(${prefix}/bin/pkg-config --cflags gtk-mac-integration-gtk2)\"" \
                "GTK_MAC_LIBS=\"\$(${prefix}/bin/pkg-config --libs gtk-mac-integration-gtk2)\""\
                --disable-silent-rules

post-activate {
        system "${prefix}/bin/update-desktop-database -q ${prefix}/share/applications; true"
        system "${prefix}/bin/update-mime-database ${prefix}/share/mime; true"
}

app.create      yes
app.name        GTKWave
app.executable  gtkwave
app.icon        share/icons/hicolor/scalable/apps/gtkwave.svg
app.retina      yes
