aboutsummaryrefslogtreecommitdiffstats
path: root/lang/io/Makefile
blob: c241d4197995b99bca61f43210c1bea15f6c45a4 (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
# Created by: Hye-Shik Chang
# $FreeBSD$

PORTNAME=   io
PORTVERSION=    2017.09.06
PORTREVISION=   1
CATEGORIES= lang

MAINTAINER= gahr@FreeBSD.org
COMMENT=    Small prototype-based programming language

LICENSE=    BSD3CLAUSE

BROKEN_armv6=       fails to compile: ucontext.h: expected parameter declarator

USES=       cmake:outsource,noninja compiler:c11 ssl

USE_GITHUB= yes
GH_ACCOUNT= stevedekorte

MAKE_JOBS_UNSAFE=yes
USE_LDCONFIG=   yes

PORTDOCS=   *
PORTEXAMPLES=   *

OPTIONS_DEFINE= DOCS EXAMPLES
OPTIONS_GROUP=  ADDONS
OPTIONS_SUB=    yes

.include "${.CURDIR}/Makefile.addons"

post-patch:
    ${REINPLACE_CMD} -e 's/^[ ]*add_subdirectory/#&/' \
        ${WRKSRC}/addons/CMakeLists.txt
    ${RM} ${WRKSRC}/modules/FindFreetype.cmake
.for addon in ${ADDONS}
    ${ECHO} "add_subdirectory(${addon})" >> ${WRKSRC}/addons/CMakeLists.txt
.endfor
    ${FIND} ${WRKSRC}/addons -name "*.bak" -o -name "*.orig" -delete

post-install:
    ${FIND} -d ${STAGEDIR}${PREFIX}/lib/io/addons -type d -empty -delete
    ${FIND} ${STAGEDIR}${PREFIX}/lib/io/addons -type f -name "*.so" -exec \
        ${STRIP_CMD} {} \;
    ${MKDIR}  ${STAGEDIR}${DOCSDIR}
    cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
    ${MKDIR}  ${STAGEDIR}${EXAMPLESDIR}
    cd ${WRKSRC}/samples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
    ${MKDIR} ${STAGEDIR}${DATADIR}/SyntaxHighlighters
.for syn in "Emacs IntelliJ JEdit Kate Scintilla Vim"
    cd ${WRKSRC}/extras/SyntaxHighlighters && \
        ${COPYTREE_SHARE} ${syn} ${STAGEDIR}${DATADIR}/SyntaxHighlighters
.endfor

do-test:
    cd ${BUILD_WRKSRC} && \
        ./_build/binaries/io ${WRKSRC}/libs/iovm/tests/correctness/run.io

.include <bsd.port.mk>