# -*- 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               xcode 1.0
PortGroup               github 1.0

name                    LimeChat

if {${os.platform} eq "darwin" && ${os.major} < 11} {
    # Peg until this is addressed: https://github.com/psychs/limechat/issues/340
    github.setup        psychs limechat 2.26
    revision            1
    checksums           sha256  fb4cb99bc2b26defb623d33ae46f500674c25e0f4bd1eda0ec44cef9e88a2e64 \
                        rmd160  3851851afa4e2b010090a2f487fcc025519450ce \
                        size    3567569
    github.tarball_from archive

    patchfiles-append   0001-Unbreak-the-build-10.5.patch

    xcode.target        LimeChat
} else {
    github.setup        psychs limechat 2.47
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    revision            1
    checksums           sha256  cb07c833d8bff0057b6bd1b38ee687e82a18466f8ab9e8b3c8db54ba21f48a12 \
                        rmd160  fa81e57d258280ff50d1a44e7f1759680554212e \
                        size    3540775
}

categories              aqua irc
license                 GPL-2
platforms               macosx
maintainers             {danchr @danchr} openmaintainer
homepage                http://limechat.net/mac/

description             IRC Client for Mac

long_description        LimeChat is an IRC client for Mac OS X that's \
                        fast and stable, offering one window for \
                        multiple servers and rich keyboard shortcuts \
                        for your comfortable operations.

xcode.configuration     Release

if {${os.major} >= 22} {
    xcode.build.settings-append \
        CODE_SIGN_IDENTITY=-
} else {
    xcode.build.settings-append \
        CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO
}

destroot {
    file copy ${worksrcpath}/build/${xcode.configuration}/LimeChat.app ${destroot}${applications_dir}
}
