# $NetBSD: Makefile,v 1.31 2025/10/23 20:39:20 wiz Exp $

DISTNAME=	i3status-2.15
PKGREVISION=	1
CATEGORIES=	sysutils
MASTER_SITES=	https://i3wm.org/i3status/
EXTRACT_SUFX=	.tar.xz

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://i3wm.org/i3status/
COMMENT=	Small program for generating a status bar
LICENSE=	modified-bsd

TOOL_DEPENDS+=	asciidoc-[0-9]*:../../textproc/asciidoc
TOOL_DEPENDS+=	xmlto-[0-9]*:../../textproc/xmlto

USE_TOOLS+=	pkg-config bash perl

CFLAGS.SunOS+=	-D__EXTENSIONS__

INSTALLATION_DIRS=	share/examples/${PKGBASE}

CONF_FILES=	${PREFIX}/share/examples/${PKGBASE}/i3status.conf \
		${PKG_SYSCONFDIR}/i3status.conf

BUILD_DEFS+=	VARBASE

SUBST_CLASSES+=			fix-paths
SUBST_STAGE.fix-paths=		pre-configure
SUBST_MESSAGE.fix-paths=	Fixing absolute paths.
SUBST_FILES.fix-paths=		man/i3status.*
SUBST_SED.fix-paths+=		-e 's,/var,${VARBASE},g'

.include "options.mk"
.include "../../devel/meson/build.mk"
.include "../../devel/confuse/buildlink3.mk"
.include "../../devel/yajl/buildlink3.mk"
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "Linux"
.  include "../../audio/alsa-lib/buildlink3.mk"
.endif
.include "../../mk/bsd.pkg.mk"
