aboutsummaryrefslogtreecommitdiffstats
path: root/lang/spidermonkey/Makefile
blob: 8edb5780a954fd556477792f82fa7d023542602b (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Ports collection makefile for:    spidermonkey
# Date created:     Fri Apr 18, 2003
# Whom:         Dan Rench <citric@cubicone.tmetic.com>
#
# $FreeBSD$

PORTNAME=   spidermonkey
DISTVERSION=    1.5
PORTREVISION=   3
CATEGORIES= lang
MASTER_SITES=   MOZILLA
MASTER_SITE_SUBDIR= js/older-packages/
DISTNAME=   js-${DISTVERSION}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX}:src

MAINTAINER= citric@cubicone.tmetic.com
COMMENT=    A standalone JavaScript interpreter from the Mozilla project

LIB_DEPENDS=    nspr4.1:${PORTSDIR}/devel/nspr

CONFLICTS=  njs-[0-9]*

MAKE_ARGS+= JS_THREADSAFE=YES \
        PROG_LIBS="-lreadline -ltermcap -lm ${PTHREAD_LIBS}" \
        LDFLAGS="-L${LOCALBASE}/lib"
CFLAGS+=    -I${LOCALBASE}/include/nspr
.if defined(WITH_TEST)
USE_PERL5_BUILD=test harness
PATCHFILES= spidermonkey-patch-tests-ecma.bz2   \
        spidermonkey-patch-tests-timezone.bz2   \
        spidermonkey-patch-tests-js.bz2
PATCH_SITES=    http://virtual-estates.net/~mi/port-stuff/
BUILD_DEPENDS+= ${SITE_PERL}/Getopt/Mixed.pm:${PORTSDIR}/devel/p5-Getopt-Mixed

DISTFILES+= js-tests-20021118${EXTRACT_SUFX}:older
post-build: test
post-patch:
    #
    # Removing known bad tests:
    #   https://bugzilla.mozilla.org/show_bug.cgi?id=10278
    #   https://bugzilla.mozilla.org/show_bug.cgi?id=101964
    #
    cd ${WRKDIR}/tests && ${RM} js1_3/regress/function-001-n.js \
        js1_2/function/function-001-n.js    \
        js1_3/Script/function-001-n.js  \
        js1_5/Array/regress-101964.js
.endif

USE_GMAKE=  YES
MAKEFILE=   Makefile.ref
ALL_TARGET= ${OPSYS}`${UNAME} -r`_DBG.OBJ/js
MAKE_ENV+=  CC="${CC}" CCC="${CXX}"
USE_LDCONFIG=   yes
SRC_DIR=    js/src
JSH=        jsapi.h jsautocfg.h jscompat.h jslong.h jsosdep.h jsotypes.h jspubtd.h jstypes.h \
        jsstr.h jshash.h jsprvtd.h
PLIST_FILES=    bin/js lib/libjs.so lib/libjs.so.1 ${JSH:S,^,include/,}
WRKSRC= ${WRKDIR}/${SRC_DIR}
EXTRACT_AFTER_ARGS=| ${TAR} -xf - \
        --exclude js/jsd    \
        --exclude ${SRC_DIR}/editline   \
        --exclude ${SRC_DIR}/fdlibm \
        --exclude ${SRC_DIR}/liveconnect    \
        --exclude ${SRC_DIR}/perlconnect

test:
    cd ${WRKDIR}/tests && ${SETENV} \
        LD_LIBRARY_PATH=${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ \
        ${PERL5} jsDriver.pl    \
            --shellpath ${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ/js \
            --engine smdebug --confail --trace --list ecma* js1_*

do-configure:
    ${CP} ${WRKSRC}/config/Linux_All.mk \
        ${WRKSRC}/config/${OPSYS}`${UNAME} -r`.mk && \

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ/js \
        ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ/libjs.so \
        ${PREFIX}/lib
    ${LN} -sf ${PREFIX}/lib/libjs.so ${PREFIX}/lib/libjs.so.1
    ${CP} ${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ/jsautocfg.h ${WRKSRC}
    @${INSTALL_DATA} ${JSH:S,^,${WRKSRC}/,} ${PREFIX}/include/

.include <bsd.port.mk>