# $NetBSD$

DISTNAME=		gnunet-gtk-0.16.0
CATEGORIES=		net
MASTER_SITES=		${MASTER_SITE_GNU:=gnunet/}

MAINTAINER=		nikita@NetBSD.org
HOMEPAGE=		https://gnunet.org/
COMMENT=		GTK user interfaces for GNUnet
LICENSE=		gnu-gpl-v3

GNU_CONFIGURE=		yes
USE_LIBTOOL=		yes
USE_PKGLOCALEDIR=	yes
USE_TOOLS+=		pkg-config automake autoconf autoreconf

# options.mk uses an option from gnunet's bl3
.include "../../wip/gnunet/buildlink3.mk"
.include "options.mk"

CONFIGURE_ENV+=		LD_LIBRARY_PATH+=${BUILDLINK_PREFIX.gtk3}/lib
CONFIGURE_ARGS+=	--with-gnunet=${BUILDLINK_PREFIX.gnunet}
CONFIGURE_ARGS+=	--with-glade=${BUILDLINK_PREFIX.glade}
# Without this, gnunet-gtk fails to build a file. Fixed upstream,
# next release won't require LE.
CONFIGURE_ARGS+=	--with-extractor=${BUILDLINK_PREFIX.libextractor}
# optional dependency, but x11/libunique says it is deprecated.
# CONFIGURE_ARGS+=	--with-libunique

pre-configure:
	(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} autoreconf -vif)

.include "../../converters/qrencode/buildlink3.mk"
.include "../../devel/glade/buildlink3.mk"
.include "../../devel/libextractor/buildlink3.mk"
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
.include "../../security/gnutls/buildlink3.mk"
.include "../../x11/gtk3/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
