aboutsummaryrefslogtreecommitdiffstats
path: root/lang/rakudo/Makefile
blob: 3575d61d1baae0c8243dc4065e9a9a6f3ba15f0a (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
# New ports collection makefile for:    rakudo
# Date created:    15 March 2009
# Whom:            Aliaksandr Zahatski <zahatski@gmail.com>
#
# $FreeBSD$
#

PORTNAME=   rakudo
PORTVERSION=    2011.04
PORTEPOCH=  3
CATEGORIES= lang
MASTER_SITES=   http://cloud.github.com/downloads/rakudo/star/
DISTNAME=   ${PORTNAME}-star-${PORTVERSION}

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

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

LICENSE=    ART20
CONFLICTS=  parrot-[0-9]*

PARROT_VERSION=3.3.0
INSTALL_TARGET= install
CONFIGURE_SCRIPT=   Configure.pl
CONFIGURE_PARROT_ARGS=  --cc=${CC} --cxx=${CXX} --ld=${CC} --ccflags="${CFLAGS}" \
        --ldflags="${LDFLAGS} -L/usr/lib -L${LOCALBASE}/lib" \
        --icu-config=${LOCALBASE}/bin/icu-config \
        --optimize --parrot_is_shared --inline \
        --lex=${LOCALBASE}/bin/flex \
        --yacc=${LOCALBASE}/bin/bison \
        --verbose \
        --prefix=${PREFIX}
CONFIGURE_ARGS= --parrot-config=parrot-${PARROT_VERSION}/installable_parrot_config

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 700000
BROKEN= dependency devel/icu is broken on 6.x
.endif

USE_BISON=  build
USE_PERL5_BUILD=    5.8.0+
USE_GMAKE=  yes

MAN1=       perl6.1 rakudo.1
MANCOMPRESSED=  no

PLIST_SUB+= PARROT_VERSION=${PARROT_VERSION}

EXTRA_DOCS= UsingPerl6-draft.pdf cheatsheet.txt

PORTDOCS=   ${EXTRA_DOCS}

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

do-build:

do-install:
    cd ${WRKSRC}/parrot-${PARROT_VERSION} \
    && ${MAKE} install-dev 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 !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${EXTRA_DOCS:S!^!${WRKSRC}/docs/!} ${DOCSDIR}/
.endif

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

regression-test: 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.post.mk>