summaryrefslogtreecommitdiff
path: root/games/puzzles/Makefile
blob: 66bc0799162b966ca94fb0c8bf90c9ff2ccd7ed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# $NetBSD: Makefile,v 1.73 2022/06/28 11:33:56 wiz Exp $

DISTNAME=	puzzles-20220127
GIT_COMMIT=	c43a34fbfe430d235bafc379595761880a19ed9f
PKGREVISION=	1
CATEGORIES=	games
MASTER_SITES=	-https://git.tartarus.org/?p=simon/puzzles.git;a=snapshot;h=${GIT_COMMIT};sf=tgz

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://www.chiark.greenend.org.uk/~sgtatham/puzzles/
COMMENT=	Collection of small one-player puzzle games by Simon Tatham
LICENSE=	mit

BUILD_DEPENDS+=		halibut>=1.1:../../textproc/halibut
BUILD_DEPENDS+=		ImageMagick-[0-9]*:../../graphics/ImageMagick

WRKSRC=		${WRKDIR}/puzzles-${GIT_COMMIT:C,(.......).*,\1,}
AUTO_MKDIRS=	yes

USE_LANGUAGES=		c99
USE_CMAKE=		yes
USE_TOOLS+=		perl pkg-config

SUBST_CLASSES+=		net
SUBST_STAGE.net=	pre-configure
SUBST_FILES.net=	CMakeLists.txt
SUBST_SED.net=		-e 's,puzzle(net$$,&game,'

pre-configure:
	cd ${WRKSRC} && make -f Makefile.doc puzzles.txt
	cd ${WRKSRC} && mv net.c netgame.c && mv icons/net.sav icons/netgame.sav

post-install:
	${INSTALL_DATA} ${WRKSRC}/puzzles.txt \
		${DESTDIR}${PREFIX}/share/doc/puzzles

.include "../../x11/gtk2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"