# Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
# $FreeBSD: sysutils/mate-power-manager/Makefile 334661 2013-11-23 11:39:07Z kwm $

PORTNAME=	mate-power-manager
PORTVERSION=	1.6.2
CATEGORIES=	sysutils mate
MASTER_SITES=	MATE
DIST_SUBDIR=	mate

MAINTAINER=	gnome@FreeBSD.org
COMMENT=	Power management system for the MATE Desktop

LIB_DEPENDS=	libcanberra-gtk.so:${PORTSDIR}/audio/libcanberra \
		libdbus-1.so:${PORTSDIR}/devel/dbus \
		libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib \
		libunique-1.0.so:${PORTSDIR}/x11-toolkits/unique \
		libupower-glib.so:${PORTSDIR}/sysutils/upower \
		libexecinfo.so:${PORTSDIR}/devel/libexecinfo \
		libnotify.so:${PORTSDIR}/devel/libnotify
RUN_DEPENDS=	pkexec:${PORTSDIR}/sysutils/polkit

PORTSCOUT=	limitw:1,even

USES=		gettext gmake pathfix pkgconfig
USE_XZ=		yes
USE_MATE=	autogen common:build docutils intlhack libmatekeyring \
		panel
USE_XORG=	x11 xext xproto xrandr xrender
USE_GNOME=	cairo glib20 gnomehier gtk20
INSTALLS_OMF=	yes
USE_AUTOTOOLS=	aclocal:env autoconf:env automake:env libtool libtoolize:env
GNU_CONFIGURE=	yes
INSTALLS_ICONS=	yes
CONFIGURE_ARGS=	--with-doc-dir=${PREFIX}/share/doc \
		--disable-docbook-docs \
		--with-gtk=2.0 \
		--with-systemdinhibit=no
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
PATHFIX_MAKEFILEIN=	Makefile.*

GLIB_SCHEMAS=	org.mate.power-manager.gschema.xml

post-patch:
	@${REINPLACE_CMD} -e "s|docbook2man|docbook2man_disabled|g" \
		${WRKSRC}/configure.ac
	@${CHMOD} +x ${WRKSRC}/autogen.sh

.include <bsd.port.mk>
