# -*- 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           cmake 1.1
PortGroup           github 1.0
PortGroup           legacysupport 1.1
PortGroup           openssl 1.0

openssl.branch      1.1

github.setup        jbreams gonepass 3da5cfa120b4e530092d9cda5634e72f22b048d8
version             2018.12.22
revision            0
categories          sysutils security
maintainers         nomaintainer

description         GTK+ 1Password reader
long_description    {*}${description}
license             Apache-2

checksums           rmd160  5405e6aa17ac0c14ecbd8eace3d2b5fbc8f8f9a7 \
                    sha256  b8adacd4aa115b186c3ac4e06e22628b0241409eb6607464b82d01f1a983d17b \
                    size    394419
github.tarball_from archive

depends_lib-append  path:lib/pkgconfig/atkmm.pc:atkmm-1.6 \
                    port:atk \
                    path:lib/pkgconfig/glibmm-2.4.pc:glibmm-2.4 \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
                    path:lib/pkgconfig/cairomm-1.0.pc:cairomm-1.0 \
                    path:lib/pkgconfig/cairo.pc:cairo \
                    path:lib/pkgconfig/pangomm-1.4.pc:pangomm-1.4 \
                    path:lib/pkgconfig/pango.pc:pango \
                    path:lib/pkgconfig/harfbuzz.pc:harfbuzz \
                    port:libsigcxx2 \
                    port:gettext-runtime \
                    port:gtkmm3

depends_run-append  port:desktop-file-utils

# https://github.com/jbreams/gonepass/issues/29
compiler.cxx_standard 2011

# Notice that it may still crash on start on old systems.
# The issue seems to be either dbus or X server-related.
legacysupport.redirect_bins gonepass

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