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

name                    gelide
version                 0.1.5
revision                1
checksums               rmd160  11d8c3206414b5c85f86233d8338f4e6d7f29cc0 \
                        sha256  7b8762fb1a9e418d81b33a7985aa02861be5e28ac8c29e2d3a571defd5ea0147 \
                        size    2135100

# https://sourceforge.net/p/gelide/bugs/22/
license                 GPL-3+
categories              emulators
maintainers             nomaintainer

description             configurable user interface for managing emulated systems

long_description        Gelide is a configurable user interface which lets you \
                        manage any kind of emulated system (PC, console, arcade, etc).

homepage                https://gelide.sourceforge.net
master_sites            sourceforge:project/${name}/${name}/${name}-${version}

depends_build           port:gnome-doc-utils \
                        port:intltool \
                        port:libtool \
                        path:bin/pkg-config:pkgconfig

depends_lib             port:desktop-file-utils \
                        port:gtkmm \
                        port:libxml2 \
                        port:rarian

patchfiles              01-01-about-box.patch \
                        01-02-update-german-translation.patch.bz2 \
                        01-03-update-italian-translation.patch.bz2 \
                        01-04-add-generic-spanish-translation.patch.bz2 \
                        01-05-fix-lack-of-return.patch \
                        03-01-fix-debug-mode.patch \
                        04-01-debug-messages.patch \
                        05-01-fallback-for-gtk-missing-image.patch \
                        06-01-include-only-glib.h.patch \
                        06-02-dont-update-if-user-selects-directory.patch \
                        06-03-check-if-path-is-directory.patch \
                        06-04-debug-messages.patch \
                        06-05-uppercase-extensions.patch \
                        06-06-include-unistd.h.patch \
                        fix-docdir.patch \
                        fix-gpl-version.patch \
                        include-glibmm.h.patch

post-patch {
    # https://sourceforge.net/p/gelide/bugs/17/
    copy ${filespath}/gelide-no-image.png ${worksrcpath}/ui/icons/
}

# Fix intltool code in configure script.
# We are also patching Makefile.am files.
use_autoreconf          yes
autoreconf.args         -fvi

configure.args          --disable-scrollkeeper

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

# Last release was in 2011. No new releases are expected.
livecheck.type          none
