aboutsummaryrefslogtreecommitdiffstats
path: root/lang/rakudo/Makefile
blob: b77d83e0d84f44064768c919fa1d9c1bd911de0c (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
87
88
89
90
91
92
93
94
95
96
97
98
99
# Created by: Aliaksandr Zahatski <zahatski@gmail.com>
# $FreeBSD$

PORTNAME=   rakudo
PORTVERSION=    2013.10
PORTREVISION=   1
PORTEPOCH=  4
CATEGORIES= lang
MASTER_SITES=   http://rakudo.org/downloads/star/
DISTNAME=   ${PORTNAME}-star-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    The Rakudo Perl 6 Compiler targets the Parrot Virtual Machine

LICENSE=    ART20

BUILD_DEPENDS=  ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \
        ${LOCALBASE}/bin/gm4:${PORTSDIR}/devel/m4 \
        ${LOCALBASE}/bin/pcre-config:${PORTSDIR}/devel/pcre
LIB_DEPENDS=    libgmp.so:${PORTSDIR}/math/gmp \
        libicudata.so:${PORTSDIR}/devel/icu

OPTIONS_DEFINE= DOCS

CONFLICTS=  parrot-[0-9]*

CONFIGURE_SCRIPT=   Configure.pl
CONFIGURE_PARROT_ARGS=  --cc=${CC} --ccflags="${CFLAGS}" --cxx=${CXX} --link=${CXX} \
        --ld=${CC} --ldflags="${LDFLAGS} -L${LIBDIR} -L${LOCALBASE}/lib" \
        --gc=gms --inline --optimize --parrot_is_shared --verbose \
        --prefix=${PREFIX} \
        --icu-config=${LOCALBASE}/bin/icu-config \
        --lex=${LOCALBASE}/bin/flex \
        --yacc=${LOCALBASE}/bin/bison
CONFIGURE_ARGS= --with-parrot=${PREFIX}/bin/parrot \
        --with-nqp=${PREFIX}/bin/nqp
NO_BUILD=   yes
USES=       bison gmake perl5
USE_LDCONFIG=   yes
USE_PERL5=  build

EXTRA_DOCS= UsingPerl6-draft.pdf cheatsheet.txt
MAN1=       ops2c.1 \
        parrot.1 \
        parrot-nqp.1 \
        parrot-prove.1 \
        parrot_config.1 \
        parrot_nci_thunk_gen.1 \
        parrotbug.1 \
        pbc_to_exe.1 \
        perl6.1 \
        plumage.1 \
        rakudo.1 \
        winxed.1
MANCOMPRESSED=  no
PLIST_SUB=  PARROT_VERSION=${PARROT_VERSION}
PORTDOCS=   *

PARROT_VERSION= 5.9.0

NOT_FOR_ARCHS=  ia64 powerpc sparc64
NOT_FOR_ARCHS_REASON=   does not compile

NO_STAGE=   yes
.include <bsd.port.options.mk>

do-configure:
    cd ${WRKSRC}/parrot \
    && ${PERL} ${CONFIGURE_SCRIPT} ${CONFIGURE_PARROT_ARGS} \
    && ${MAKE} installable PREFIX=${PREFIX}

do-install:
    cd ${WRKSRC}/parrot \
    && ${MAKE} install-dev PREFIX=${PREFIX} \
    && cd ${WRKSRC}/nqp \
    && ${PERL} ${CONFIGURE_SCRIPT} --with-parrot=${PREFIX}/bin/parrot \
                    --prefix=${PREFIX} \
    && ${MAKE} ${INSTALL_TARGET} PREFIX=${PREFIX} \
    && cd ${WRKSRC} && ${PERL} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}\
    && ${MAKE} PREFIX=${PREFIX} && ${MAKE} ${INSTALL_TARGET} PREFIX=${PREFIX}

post-install:
    ${INSTALL_MAN} ${WRKSRC}/perl6.1 ${MAN1PREFIX}/man/man1/perl6.1
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}/
    cd ${WRKSRC}/docs/ && ${INSTALL_DATA} ${EXTRA_DOCS} ${DOCSDIR}/
.endif

regression-test test: build
    ${MAKE} -C ${WRKSRC} test

x-generate-plist:
    (${PORTSDIR}/Tools/scripts/plist -d -m ${MTREE_FILE} ${PREFIX} \
    | ${SED} -E \
    's,.*share/nls/.+$$,,g \
    ;s,${PARROT_VERSION}(/.+)?$$,%%PARROT_VERSION%%\1,g \
    ' | ${TR} -s '\n') > temp-pkg-plist

.include <bsd.port.mk>