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

github.setup            alisdair freecell 2.3 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from     tarball

name                    Freecell
categories              aqua games
license                 BSD
maintainers             nomaintainer

description             classic solitaire game
long_description        The imaginatively-titled “Freecell” is a Mac OS X \
                        version of the classic solitaire game.

checksums               sha1 f1218b7c1251fab5991201cd3fe2b48cb5e07673 \
                        rmd160 df8ef0824ec660cac69a77a43c9dd24454a1a138 \
                        size 1351501

post-patch {
    platform darwin 8 {
        reinplace "s|NSUInteger|unsigned|g" Card.m Game.h Game.m GameController.m GameView.m History.h History.m
        reinplace "s|NSInteger|int|g" History.m HistoryController.m
        reinplace "s|<NSTableViewDataSource>||g" History.h
    }
}

xcode.build.settings GCC_TREAT_WARNINGS_AS_ERRORS=0

destroot {
    file copy ${worksrcpath}/Base.lproj/MainMenu.nib ${worksrcpath}/build/Deployment/Freecell.app/Contents/Resources/English.lproj/MainMenu.nib
    file copy ${worksrcpath}/build/Deployment/Freecell.app ${destroot}${applications_dir}/Freecell.app
}
