aboutsummaryrefslogtreecommitdiff
path: root/devel/alog/Makefile
blob: b740feba12f33f404817ff306544772a1bba9529 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Created by: John Marino <marino@FreeBSD.org>
# $FreeBSD$

PORTNAME=	alog
PORTVERSION=	0.5.1
CATEGORIES=	devel
MASTER_SITES=	http://www.codelabs.ch/download/
DISTNAME=	libalog-${PORTVERSION}

MAINTAINER=	marino@FreeBSD.org
COMMENT=	Stackable logging framework for Ada

LICENSE=	LGPL21

BUILD_DEPENDS=	gprbuild:devel/gprbuild

USES=		ada tar:bzip2
ALL_TARGET=	all
PORTDOCS=	html
MAKE_ARGS+=	NUM_CPUS=${MAKE_JOBS_NUMBER} \
		LIBRARY_KIND=static

OPTIONS_DEFINE=	TEST DOCS
OPTIONS_SUB=	yes
TEST_DESC=	Run unit test suite before installation
NO_OPTIONS_SORT=yes

DOCS_USES=		gmake
DOCS_BUILD_DEPENDS=	asciidoc:textproc/asciidoc \
			source-highlight:textproc/source-highlight
TEST_BUILD_DEPENDS=	${LOCALBASE}/lib/gnat/ahven.gpr:devel/ahven

MAKE_JOBS_UNSAFE=	yes

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MTEST}
ALL_TARGET+=	tests
.endif

.if ${PORT_OPTIONS:MDOCS}
ALL_TARGET+=	doc
.endif

post-patch:
	${REINPLACE_CMD} -e '/^NUM_CPUS/d' ${WRKSRC}/Makefile
	${REINPLACE_CMD} -e 's/\(not-allowed\)/NONEXISTENT\/\1/' \
		${WRKSRC}/tests/facility_tests-fd.adb

do-install:
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/gnat \
		${STAGEDIR}${PREFIX}/lib/alog \
		${STAGEDIR}${PREFIX}/include/alog \
		${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/src/* ${STAGEDIR}${PREFIX}/include/alog
	${INSTALL_DATA} ${WRKSRC}/lib/*/*.ali ${STAGEDIR}${PREFIX}/lib/alog
	${INSTALL_DATA} ${WRKSRC}/gnat/alog.gpr ${STAGEDIR}${PREFIX}/lib/gnat
	${INSTALL_DATA} ${WRKSRC}/lib/*/libalog.a ${STAGEDIR}${PREFIX}/lib/alog
.if ${PORT_OPTIONS:MDOCS}
	(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR})
.endif

.include <bsd.port.mk>