blob: 5e56bf668cd5e49ecefcaa237cd9fa7e61d01bbf (
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
|
# Created by: Tobias Kortkamp <t@tobik.me>
# $FreeBSD$
PORTNAME= libconcurrent
PORTVERSION= 0.0.20160303
PORTREVISION= 1
CATEGORIES= devel
MAINTAINER= t@tobik.me
COMMENT= Tiny asymmetric-coroutine library
LICENSE= ZLIB
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= nasm:devel/nasm
USE_GITHUB= yes
GH_ACCOUNT= sharow
# Rolling release
GH_TAGNAME= f55d33a789a4b2c6267268ec2d44a245f766f500
ONLY_FOR_ARCHS= i386 amd64
OPTIONS_DEFINE= EXAMPLES
MAKEFILE= makefile
MAKE_ARGS= LIBCONCURRENT_DESTDIR=${STAGEDIR}${PREFIX}
USES= gmake compiler:c11
post-patch:
# Remove explicitly (re-)set C compiler and linker in libconcurrent's
# makefile. The ports system will provide the correct ones. This is
# needed on FreeBSD 9 where cc does not understand -std=c11.
@${REINPLACE_CMD} 's/CC=cc//g' ${WRKSRC}/makefile
@${REINPLACE_CMD} 's/LD=ld//g' ${WRKSRC}/makefile
# libconcurrent's makefile resets ${ARCH} internally and the ports
# system interferes with that for some reason, so replace it with a
# more neutral variant.
@${REINPLACE_CMD} 's/ARCH/LIBCONCURRENT_ARCH/g' ${WRKSRC}/makefile
# Same with ${DESTDIR}
@${REINPLACE_CMD} '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>
|