# $MidnightBSD: trunk/devel/libpeas/Makefile 20270 2015-09-26 21:41:11Z laffer1 $

PORTNAME=	libpeas
PORTVERSION=	1.14.0
CATEGORIES=	devel gnome
MASTER_SITES=	GNOME
DIST_SUBDIR=	gnome3

MAINTAINER=	ports@MidnightBSD.org
COMMENT=	Next evolution of the Gedit plugins engine

LICENSE=	lgpl

BUILD_DEPENDS=	valac:${PORTSDIR}/lang/vala

LIBPEAS_SLAVE?=	no

.if ${LIBPEAS_SLAVE} == no
.else
LIB_DEPENDS+=	libpeas-1.0.so:${PORTSDIR}/devel/libpeas
.endif

USES=		gettext gmake libtool pathfix pkgconfig tar:xz
USE_GNOME=	gtk30 intlhack introspection:build
USE_LDCONFIG=	yes
INSTALLS_ICONS=	yes
GNU_CONFIGURE=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LIBS+=		-L${LOCALBASE}/lib
INSTALL_TARGET=	install-strip
CONFIGURE_ARGS+=--disable-glade-catalog
PLIST=          ${.CURDIR}/pkg-plist

.if ${LIBPEAS_SLAVE} == python2
USES+=		python:2
USE_GNOME+=	pygobject3
.else
CONFIGURE_ARGS+=	--disable-python2
.endif

.if ${LIBPEAS_SLAVE} == python3
USES+=		python:3
USE_GNOME+=	py3gobject3
.else
CONFIGURE_ARGS+=	--disable-python3
.endif

# lua needs lua 5.1 and devel/lua-lgi. The latter is build for lua 5.2 however..
CONFIGURE_ARGS+=	--disable-lua5.1 --disable-luajit

.include <bsd.port.mk>
