aboutsummaryrefslogtreecommitdiff
path: root/graphics/ansilove/Makefile
blob: 6cba0bf87ae40a049f49bb0c2ad83c1139dc555f (plain) (blame)
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
39
40
41
42
43
PORTNAME=	ansilove
PORTVERSION=	4.1.6
CATEGORIES=	graphics textproc

MAINTAINER=	amdmi3@FreeBSD.org
COMMENT=	ANSI / ASCII art to PNG converter
WWW=		https://github.com/ansilove/ansilove

LICENSE=	BSD2CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	libansilove.so:graphics/libansilove

USE_GITHUB=	yes

USES=		cmake
TEST_TARGET=	test

PORTDOCS=	AUTHORS ChangeLog README.md THANKS
PORTEXAMPLES=	*

PLIST_FILES=	bin/ansilove \
		share/man/man1/ansilove.1.gz

OPTIONS_DEFINE=	DOCS EXAMPLES

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${PORTDOCS}
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/
.endfor

post-install-EXAMPLES-on:
	@cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}

post-test:
	@cd ${WRKSRC}/examples/ && for f in */*.ans; do \
		${MKDIR} -p ${WRKDIR}/test/`dirname "$$f"`; \
		${BUILD_WRKSRC}/${PORTNAME} -o "${WRKDIR}/test/$$f.png" "$$f"; \
		${FILE} "${WRKDIR}/test/$$f.png" | ${GREP} -q 'PNG'; \
	done

.include <bsd.port.mk>