# $Id: Portfile 68420 2010-06-03 05:37:37Z ryandesign@macports.org $

PortSystem                  1.0

name                        xdotool
version                     2.20100602.2915
categories                  x11 devel
platforms                   darwin
maintainers                 ryandesign
license                     BSD

description                 X11 keyboard and mouse simulation utility

long_description            ${name} lets you programatically (or manually) \
                            simulate keyboard input and mouse activity\; \
                            move, resize, hide and show windows\; \
                            modify window properties like the title\; etc.

notes                       To use xdotool (and avoid the error message \
                            \"Error: XTEST extension unavailable on '(null)'\")\
                            you need to enable the XTEST extension. If you're \
                            using Apple's X11.app, the command to do so is: \
                            \n\ndefaults write org.x.X11 enable_test_extensions -boolean true \
                            \n\nIf you're using the MacPorts X11.app, use: \
                            \n\ndefaults write org.macports.X11 enable_test_extensions -boolean true \
                            \n\nThis only needs to be done once.

homepage                    http://www.semicomplete.com/projects/xdotool/
master_sites                googlecode:semicomplete

checksums                   md5     feea60df4e5731e5a2607860d3a2727f \
                            sha1    6b540e49aa5a711c4aa16f2bc4027863e43c3468 \
                            rmd160  936a94049073378d228375a4394cef276bb546ce

depends_build               port:pkgconfig \
                            path:bin/perl:perl5

depends_lib                 port:xorg-libXtst

patchfiles                  patch-Makefile.diff

use_configure               no

build.env                   PREFIX=${prefix} \
                            CC=${configure.cc} \
                            CFLAGS="${configure.cflags}" \
                            LDFLAGS="${configure.ldflags}"
destroot.env                PREFIX=${prefix} \
                            INSTALLMAN=${prefix}/share/man

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name} ${destroot}${prefix}/share/examples
    xinstall -m 644 -W ${worksrcpath} CHANGELIST COPYRIGHT README VERSION ${destroot}${prefix}/share/doc/${name}
    copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/${name}
}

livecheck.url               http://code.google.com/p/semicomplete/downloads/list?q=${name}
livecheck.regex             ${name}-(\\d+\\.\\d+\\.\\d+)\\.tar
