Portfile

# $Id: Portfile 23053 2007-03-23 20:35:47Z pipping@macports.org $

PortSystem 1.0
name qthello
version 1.0
categories games x11
maintainers nomaintainer@macports.org
homepage http://qthello.sourceforge.net/
description Othello program written in Qt
long_description QtHello is an Othello program written in Qt. It's \
design makes it easy to extend both the computer \
player and human player interface. It currently \
has 6 different computer players ranging from \
completely random to tree search with Alpha-Beta \
pruning.

depends_lib lib:libqt-mt.3:qt3 lib:libX11.6:XFree86

platforms darwin
master_sites http://download.sourceforge.net/qthello/
checksums md5 a5eea252376b5e5082ac68cb649089f7
patchfiles patch-Makefile

post-patch {
reinplace s|viewmag|${prefix}/share/${name}/gfx/viewmag|g ${worksrcpath}/othello.cpp
reinplace s|new\.xpm|${prefix}/share/${name}/gfx/new\.xpm|g ${worksrcpath}/othello.cpp
reinplace s|stop\.png|${prefix}/share/${name}/gfx/stop\.png|g ${worksrcpath}/othello.cpp
reinplace s|gfx|${prefix}/share/${name}/gfx|g ${worksrcpath}/boardwidget.cpp
}

use_configure no

build.target all QTDIR=${prefix}

destroot {
system "install -c -m 655 ${worksrcpath}/qthello ${destroot}${prefix}/bin/qthello"
system "mkdir -p -m 655 ${destroot}${prefix}/share/${name}/gfx/"
system "install -c -m 644 ${worksrcpath}/stop.png ${destroot}${prefix}/share/${name}/gfx/"
system "install -c -m 644 ${worksrcpath}/new.xpm ${destroot}${prefix}/share/${name}/gfx/"
system "install -c -m 644 ${worksrcpath}/viewmag+.png ${destroot}${prefix}/share/${name}/gfx/"
system "install -c -m 644 ${worksrcpath}/viewmag-.png ${destroot}${prefix}/share/${name}/gfx/"
system "install -c -m 644 ${worksrcpath}/gfx/black.gif ${destroot}${prefix}/share/${name}/gfx/"
system "install -c -m 644 ${worksrcpath}/gfx/white.gif ${destroot}${prefix}/share/${name}/gfx/"
}

files