# $Id: #

PortSystem          1.0
name                xroot
version             1.0
categories          x11
maintainers         yeled@opendarwin.org
description         A small X -root window
long_description    Greg Parker wrote 'xroot tool', it creates a small X11 window \
                    that routes input events to the X11 root window. In particular, \
                    you can click on it to get window manager menus.\
                    \
                    To run:\
                    ./xroot  -display :0  -geometry 100x100+0-0 -color blue\
                    (100x100 in lower-left corner, colored blue)

checksums           md5 a4a1f7f2cceea814380cd7e831b47c3b
platforms           darwin
master_sites        http://sealiesoftware.com/
distfiles           xroot.c
depends_lib         lib:libX11.6:XFree86

extract   {}
use_configure       no

pre-build   {
    file mkdir ${worksrcpath}
}
build       {
    file copy ${distpath}/${distfile} ${worksrcpath}
    cd ${worksrcpath}
    system "c++ ${distfile} -Wall -L${x11prefix}/lib -I${x11prefix}/include -lX11 -o xroot"
}
destroot    {
    system "install -m 755 ${worksrcpath}/xroot ${destroot}${prefix}/bin/"
}
