summaryrefslogtreecommitdiff
path: root/lang/parrot/Makefile
blob: 8e2858f514d85412f7ea52c5647ca8091da3be79 (plain)
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
# $NetBSD: Makefile,v 1.9 2006/01/09 17:47:07 wiz Exp $
#

DISTNAME=		parrot-0.4.1
CATEGORIES=		lang
MASTER_SITES=		${MASTER_SITE_PERL_CPAN:=../by-authors/id/L/LT/LTOETSCH/}

MAINTAINER=		debolaz@gmail.com
HOMEPAGE=		http://www.parrotcode.org/
COMMENT=		Virtual machine made to run Perl 6 and other languages

USE_TOOLS+=		perl
PTHREAD_OPTS+=		require
BUILD_TARGET=		world
TEST_TARGET=		test

.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.prefs.mk"

CONFIGURE_ARGS+=	--prefix=${PREFIX:Q} \
			--icu-config=${PREFIX}/bin/icu-config

# If you have another architecture, please test if it can compile
# with (working) jit support and report status to the maintainer.

.if ${MACHINE_ARCH} == "i386"
CONFIGURE_ARGS+=	--jitcapable \
			--execcapable
.endif

do-configure:
	cd ${WRKSRC} && ${PERL5} Configure.pl ${CONFIGURE_ARGS}

post-configure:
	${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.orig
	${SED}	-e 's|-pthread||g' \
		-e 's|-lpthread||g' \
		-e 's|-lc_r||g' \
		-e '/^CFLAGS /s|$$|${PTHREAD_CFLAGS}|' \
		-e '/^LINKFLAGS /s|$$|${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}|' \
		-e '/^LDFLAGS /s|$$|${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}|' \
		< ${WRKSRC}/Makefile.orig \
		> ${WRKSRC}/Makefile

post-install:
	if [ -e ${PREFIX}/lib/libparrot.so.${PKGVERSION} ]; then \
		${LN} -s libparrot.so.${PKGVERSION} ${PREFIX}/lib/libparrot.so ; \
	fi

.include "../../textproc/icu/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"