aboutsummaryrefslogtreecommitdiff
path: root/devel/libconcurrent/Makefile
blob: 91aa2dc3de6487acc1302520c8f0dedb7271019d (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
# Created by: Tobias Kortkamp <t@tobik.me>
# $FreeBSD$

PORTNAME=	libconcurrent
PORTVERSION=	0.0.20160629
PORTREVISION=	1
CATEGORIES=	devel

MAINTAINER=	tobik@FreeBSD.org
COMMENT=	Tiny asymmetric-coroutine library

LICENSE=	ZLIB
LICENSE_FILE=	${WRKSRC}/LICENSE

ONLY_FOR_ARCHS=	amd64 i386

BUILD_DEPENDS=	nasm:devel/nasm

USES=		gmake compiler:c11
USE_GITHUB=	yes
GH_ACCOUNT=	sharow
# Rolling release
GH_TAGNAME=	d84e7374c89be147ed7c0ba0fe844dad7f7ebb3e

MAKEFILE=	makefile
MAKE_ARGS=	LIBCONCURRENT_DESTDIR=${STAGEDIR}${PREFIX}
TEST_TARGET=	test

OPTIONS_DEFINE=	EXAMPLES

post-patch:
# libconcurrent's makefile resets ${ARCH} internally and the ports
# system interferes with that for some reason, so replace it with a
# more neutral variant.  Same with ${DESTDIR}.
	@${REINPLACE_CMD} -e 's/ARCH/LIBCONCURRENT_ARCH/g' \
		-e 's/DESTDIR/LIBCONCURRENT_DESTDIR/g' \
		${WRKSRC}/makefile

post-patch-EXAMPLES-on:
# Fix examples makefile to work out-of-tree
	@${REINPLACE_CMD} 's|INCDIR+=-I../include|INCDIR+=-I${PREFIX}/include|g' \
		${WRKSRC}/examples/makefile
	@${REINPLACE_CMD} 's|-L../|-L${PREFIX}/lib|g' \
		${WRKSRC}/examples/makefile

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

.include <bsd.port.mk>