Fixup fromcvs/togit conversion
[pkgsrcv2.git] / lang / parrot / Makefile
1 # $NetBSD: Makefile,v 1.63 2012/08/15 11:01:39 he Exp $
2 #
3
4 VERSION=                4.7.0
5 RTYPE=                  devel
6 DISTNAME=               parrot-${VERSION}
7 CATEGORIES=             lang
8 MASTER_SITES=           ftp://ftp.parrot.org/pub/parrot/releases/${RTYPE}/${VERSION}/
9
10 MAINTAINER=             he@NetBSD.org
11 HOMEPAGE=               http://www.parrotcode.org/
12 COMMENT=                Virtual machine made to run Perl 6 and other languages
13 LICENSE=                artistic-2.0
14
15 PKG_DESTDIR_SUPPORT=    user-destdir
16 USE_LANGUAGES=          c c++
17 USE_TOOLS+=             perl
18 PTHREAD_OPTS+=          require
19 BUILD_TARGET=           world
20 TEST_TARGET=            test
21 HAS_CONFIGURE=          yes
22
23 .include "../../mk/pthread.buildlink3.mk"
24 .include "../../mk/bsd.prefs.mk"
25
26 CONFIG_SHELL=           perl
27 CONFIGURE_SCRIPT=       Configure.pl
28 CONFIGURE_ARGS+=        --prefix=${PREFIX:Q} \
29                         --icu-config=${PREFIX}/bin/icu-config \
30                         --optimize
31
32 SUBST_CLASSES+=         pthread
33 SUBST_STAGE.pthread=    post-configure
34 SUBST_FILES.pthread=    Makefile
35 SUBST_SED.pthread=      -e 's|-pthread||g'
36 SUBST_SED.pthread+=     -e 's|-lpthread||g'
37 SUBST_SED.pthread+=     -e 's|-lc_r||g'
38 SUBST_SED.pthread+=     -e '/^CFLAGS /s|$$|${PTHREAD_CFLAGS:Q}|'
39 SUBST_SED.pthread+=     -e '/^LINKFLAGS /s|$$|${PTHREAD_LDFLAGS:Q} ${PTHREAD_LIBS:Q}|'
40 SUBST_SED.pthread+=     -e '/^LDFLAGS /s|$$|${PTHREAD_LDFLAGS:Q} ${PTHREAD_LIBS:Q}|'
41
42 PLIST_SUBST+=           VERSION=${VERSION:Q}
43 PLIST_SRC+=             ${PLIST_SRC_DFLT}
44 # Default this to ELF shared libs with .so,
45 # Darwin has PLIST.Darwin which gets included automatically.
46 .if (${OPSYS} != "Darwin")
47 PLIST_SRC+=             PLIST.shared
48 .endif
49
50 REPLACE_PERL+=          tools/build/ops2c.pl
51 REPLACE_PERL+=          tools/build/pmc2c.pl
52 REPLACE_PERL+=          tools/dev/create_language.pl
53 REPLACE_PERL+=          tools/dev/gen_makefile.pl
54 REPLACE_PERL+=          tools/dev/mk_language_shell.in
55 REPLACE_PERL+=          tools/dev/pprof2cg.pl
56 REPLACE_PERL+=          tools/dev/reconfigure.pl
57
58 REPLACE_INTERPRETER+=   parrot
59 REPLACE.parrot.old=     .*parrot[^[:space:]]*
60 REPLACE.parrot.new=     ${PREFIX}/bin/parrot
61 REPLACE_FILES.parrot+=  tools/dev/pbc_to_exe.pir
62
63 REPLACE_INTERPRETER+=   parrot-nqp
64 REPLACE.parrot-nqp.old= .*parrot-nqp[^[:space:]]*
65 REPLACE.parrot-nqp.new= ${PREFIX}/bin/parrot-nqp
66 REPLACE_FILES.parrot-nqp+= compilers/data_json/JSON.nqp
67
68 REPLACE_INTERPRETER+=   nqp
69 REPLACE.nqp.old=        .*nqp[^[:space:]]*
70 REPLACE.nqp.new=        ${PREFIX}/bin/parrot-nqp
71 REPLACE_FILES.nqp+=     runtime/parrot/library/YAML/Tiny.pm
72
73 # These have been reported to parrot, Git tracking issue #201
74 CHECK_WRKREF_SKIP+=     bin/ops2c
75 CHECK_WRKREF_SKIP+=     bin/parrot
76 CHECK_WRKREF_SKIP+=     bin/parrot-nqp
77 CHECK_WRKREF_SKIP+=     bin/parrot-prove
78 CHECK_WRKREF_SKIP+=     bin/parrot_config
79 CHECK_WRKREF_SKIP+=     bin/parrot_nci_thunk_gen
80 CHECK_WRKREF_SKIP+=     bin/pbc_merge
81 CHECK_WRKREF_SKIP+=     bin/pbc_to_exe
82 CHECK_WRKREF_SKIP+=     bin/winxed
83 CHECK_WRKREF_SKIP+=     lib/parrot/${VERSION}/include/config.fpmc
84 CHECK_WRKREF_SKIP+=     lib/parrot/${VERSION}/parrot_config.o
85 CHECK_WRKREF_SKIP+=     lib/parrot/${VERSION}/tools/lib/Parrot/Config/Generated.pm
86
87 # Does relink internally, so allow local rpath entries
88 BUILDLINK_PASSTHRU_RPATHDIRS+=  ${WRKSRC}
89
90 pre-install:
91         ${CHMOD} -R g-w ${WRKSRC}
92
93 .include "../../textproc/icu/buildlink3.mk"
94 .include "../../devel/gmp/buildlink3.mk"
95 .include "../../devel/readline/buildlink3.mk"
96 .include "../../mk/bsd.pkg.mk"