1 # $NetBSD: Makefile,v 1.63 2012/08/15 11:01:39 he Exp $
6 DISTNAME= parrot-${VERSION}
8 MASTER_SITES= ftp://ftp.parrot.org/pub/parrot/releases/${RTYPE}/${VERSION}/
10 MAINTAINER= he@NetBSD.org
11 HOMEPAGE= http://www.parrotcode.org/
12 COMMENT= Virtual machine made to run Perl 6 and other languages
15 PKG_DESTDIR_SUPPORT= user-destdir
18 PTHREAD_OPTS+= require
23 .include "../../mk/pthread.buildlink3.mk"
24 .include "../../mk/bsd.prefs.mk"
27 CONFIGURE_SCRIPT= Configure.pl
28 CONFIGURE_ARGS+= --prefix=${PREFIX:Q} \
29 --icu-config=${PREFIX}/bin/icu-config \
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}|'
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
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
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
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
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
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
87 # Does relink internally, so allow local rpath entries
88 BUILDLINK_PASSTHRU_RPATHDIRS+= ${WRKSRC}
91 ${CHMOD} -R g-w ${WRKSRC}
93 .include "../../textproc/icu/buildlink3.mk"
94 .include "../../devel/gmp/buildlink3.mk"
95 .include "../../devel/readline/buildlink3.mk"
96 .include "../../mk/bsd.pkg.mk"