# $Id: Portfile 82891 2011-08-21 14:17:27Z jmr@macports.org $

PortSystem          1.0

name                xroot
version             1.0
revision            2
categories          x11
maintainers         nomaintainer
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
homepage            http://sealiesoftware.com/
master_sites        ${homepage}
distfiles           xroot.c
depends_lib \
	port:xorg-libX11

extract   {
    file mkdir ${worksrcpath}
    file copy ${distpath}/${distfiles} ${worksrcpath}
}
use_configure       no

build       {
    system "cd ${worksrcpath} && ${configure.cxx} ${configure.cxxflags} ${configure.cxx_archflags} ${distfiles} -Wall -L${prefix}/lib -I${prefix}/include -lX11 -o xroot"
}
destroot    {
    xinstall -m 755 ${worksrcpath}/xroot ${destroot}${prefix}/bin/
}
