# -*- 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
# $Id: Portfile 120233 2014-05-20 00:45:44Z nicos@macports.org $

PortSystem          1.0
PortGroup           kde4   1.1

name                pairs
version             4.12.5
categories          kde kde4
maintainers         nicos openmaintainer
license             {GPL-2 GPL-3}
description         KDE standard pairs game.
long_description    Pairs is a game that will help train your memory by \
                    remembering different images, shapes, sounds and text.
homepage            http://www.kde.org
platforms           darwin
master_sites        kde:stable/${version}/src/
use_xz              yes
checksums           rmd160  0481f04f989707ba85920c5b8d1c4dcfa1c763f2 \
                    sha256  4369290cbb8d04b74fbb8dad31c9a395769eb4c16d9f4df77862cef50dacc774

#Binaries do not link to openssl, nor use the ssl backend of kdelibs4
license_noconflict  openssl

patchfiles-append   patch-Newiconfolder.diff

depends_lib-append  port:kdelibs4

#Having two sets of icons in one folders breaks kde4_add_app_icon, so moving the
#second set in a separate folder (issue reported upstream in 
#https://bugs.kde.org/show_bug.cgi?id=315321
pre-configure {
    file mkdir ${worksrcpath}/iconseditor
    file copy ${worksrcpath}/icons/CMakeLists.txt ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi16-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi22-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi24-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi32-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi36-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi48-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi64-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi96-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi128-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi192-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hi256-apps-pairseditor.png ${worksrcpath}/iconseditor/.
    move ${worksrcpath}/icons/hisc-apps-pairseditor.svgz ${worksrcpath}/iconseditor/.
}

livecheck.url       http://kde.mirrors.hoobly.com/stable/
livecheck.regex     (\\d+(\\.\\d+)+)
