# $Id: Portfile 63054 2010-01-24 20:21:04Z afb@macports.org $

PortSystem 1.0

name		xfce4-corner-plugin
version		1.0.1
revision	1
categories	xfce
platforms	darwin
maintainers	afb
description	Mac-style menubar corner plugin for xfce panel (4.4+)
long_description ${description}
homepage	http://aquila.deus.googlepages.com/
master_sites	http://aur.archlinux.org/packages/xfce4-corner-plugin/
distname	${name}
checksums	md5 a0e26652ef7f2e8ca26fd007cc39d186 \
		sha1 d310b43e5a3c6891364e95b1195ba24f2c6ef2ae \
		rmd160 84e652dc6883bda0f04b032deb350753925a9db0

depends_build	path:bin/pkg-config:pkgconfig
depends_lib	port:xfce4-panel
use_configure	no

patchfiles	patch-xfce4-corner-plugin.c
post-patch {
    reinplace "s;/usr;${prefix};" ${worksrcpath}/${name}.desktop
}

build {
    # upstream really needs to learn about make
    system "gcc -std=c99 -Wall `pkg-config --cflags --libs libxfce4panel-1.0` -o ${worksrcpath}/${name} ${worksrcpath}/${name}.c"
}

destroot {
    xinstall -d ${destroot}${prefix}/libexec/xfce4/panel-plugins
    xinstall -d ${destroot}${prefix}/share/xfce4/panel-plugins
    copy ${worksrcpath}/${name} ${destroot}${prefix}/libexec/xfce4/panel-plugins/
    copy ${worksrcpath}/${name}.desktop ${destroot}${prefix}/share/xfce4/panel-plugins/
}
