# Created by: Dave McKay <dave@mu.org>
# $MidnightBSD: trunk/security/libcryptui/Makefile 20398 2015-10-03 04:42:56Z laffer1 $
# $FreeBSD: head/security/libcryptui/Makefile 393607 2015-08-05 19:13:24Z kwm $

PORTNAME=	libcryptui
PORTVERSION=	3.12.2
CATEGORIES=	security gnome
MASTER_SITES=	GNOME
DIST_SUBDIR=	gnome3

MAINTAINER=	ports@MidnightBSD.org
COMMENT=	GNOME application for managing encryption keys (PGP, SSH)

LICENSE=	gpl2

BUILD_DEPENDS=	seahorse>=3.0.0:${PORTSDIR}/security/seahorse \
		gpg:${PORTSDIR}/security/gnupg
LIB_DEPENDS=	libgpgme.so:${PORTSDIR}/security/gpgme \
		libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib \
		libgnome-keyring.so:${PORTSDIR}/security/libgnome-keyring
RUN_DEPENDS=	seahorse>=3.0.0:${PORTSDIR}/security/seahorse \
		gpg:${PORTSDIR}/security/gnupg

USES=		gettext gmake libtool pathfix pkgconfig tar:xz
USE_GNOME=	intlhack gnomeprefix gtk30 introspection:build
USE_XORG=	sm ice
USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
INSTALL_TARGET=	install-strip

GLIB_SCHEMAS=	org.gnome.seahorse.recipients.gschema.xml

OPTIONS_DEFINE=	NOTIFY

.include <bsd.mport.options.mk>

.if ${PORT_OPTIONS:MNOTIFY}
LIB_DEPENDS+=	libnotify.so:${PORTSDIR}/devel/libnotify
.else
CONFIGURE_ARGS+=--disable-libnotify
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|"1.2 1.4 2.0"|"1.2 1.4 2.0 2.1"|g' \
		${WRKSRC}/configure

.include <bsd.port.mk>
