aboutsummaryrefslogtreecommitdiffstats
path: root/lang/v8-devel/Makefile
blob: 7ebad47c3f402217f77d6454a76ac2161d16351e (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
64
65
# Created by: siasia
# $FreeBSD$

PORTNAME=   v8
PORTVERSION=    3.24.30
PORTREVISION=   1
CATEGORIES= lang
MASTER_SITES=   LOCAL/vanilla
PKGNAMESUFFIX=  -devel

MAINTAINER= vanilla@FreeBSD.org
COMMENT=    Google\'s open source JavaScript engine

LICENSE=    BSD3CLAUSE

BUILD_DEPENDS=  python:${PORTSDIR}/lang/python
LIB_DEPENDS=    libexecinfo.so:${PORTSDIR}/devel/libexecinfo \
        libicui18n.so:${PORTSDIR}/devel/icu

CONFLICTS=  v8-3.19.*

USES=       gmake shebangfix compiler tar:xz
SHEBANG_FILES=  ${WRKSRC}/build/gyp/gyp
USE_PYTHON= 2
USE_LDCONFIG=   yes
ALL_TARGET= native
MAKE_ARGS=  library=shared use_system_icu=on
MAKE_ENV+=  CC.host=${CC} CXX.host=${CXX} LINK.host=${CXX} LINK.target=${CXX}
bash_CMD=   ${SH}

.include <bsd.port.pre.mk>

.if ${COMPILER_TYPE} == clang
MAKE_ENV+=  LINK=clang++ AR=/usr/bin/ar
MAKE_ARGS+= clang=on
CFLAGS+=    -Wno-unused-private-field -Wno-unused-variable
.if ${COMPILER_VERSION} >= 33
CFLAGS+=    -Wno-nested-anon-types -Wno-unused-function
.endif
.if ${COMPILER_VERSION} >= 34
CFLAGS+=    -Wno-unused-const-variable
.endif
.else
MAKE_ARGS+= strictaliasing=off
USE_GCC=    any
.endif

ONLY_FOR_ARCHS= i386 amd64

post-patch:
    @${REINPLACE_CMD} -e '/^exec python / s| python | ${PYTHON_CMD} |' ${WRKSRC}/build/gyp/gyp

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/out/native/d8 ${STAGEDIR}${PREFIX}/bin/d8
    ${INSTALL_LIB} -m 755 ${WRKSRC}/out/native/lib.target/libv8.so ${STAGEDIR}${PREFIX}/lib/libv8.so.1
    ${LN} -sf ${PREFIX}/lib/libv8.so.1 ${STAGEDIR}${PREFIX}/lib/libv8.so
    ${INSTALL_DATA} ${WRKSRC}/include/v8.h ${STAGEDIR}${PREFIX}/include
    ${INSTALL_DATA} ${WRKSRC}/include/v8-debug.h ${STAGEDIR}${PREFIX}/include
    ${INSTALL_DATA} ${WRKSRC}/include/v8-platform.h ${STAGEDIR}${PREFIX}/include
    ${INSTALL_DATA} ${WRKSRC}/include/v8-profiler.h ${STAGEDIR}${PREFIX}/include
    ${INSTALL_DATA} ${WRKSRC}/include/v8-testing.h ${STAGEDIR}${PREFIX}/include
    ${INSTALL_DATA} ${WRKSRC}/include/v8config.h ${STAGEDIR}${PREFIX}/include
    ${INSTALL_DATA} ${WRKSRC}/include/v8stdint.h ${STAGEDIR}${PREFIX}/include

.include <bsd.port.post.mk>