summaryrefslogtreecommitdiff
path: root/lang/jruby/Makefile
blob: 9ec077994d3de10e4187327f8f1edbd79e3d19ba (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
# New ports collection makefile for:	JRuby
# Date created:			20 September 2001
# Whom:				Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#

PORTNAME=	jruby
PORTVERSION=	0.2.0
CATEGORIES=	lang ruby java
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}
DISTFILES=	${PORTNAME}-${PORTVERSION:S/./_/g}${EXTRACT_SUFX}
DIST_SUBDIR=	ruby

MAINTAINER=	knu@FreeBSD.org

RUN_DEPENDS=	${JAVA}:${PORTSDIR}/java/javavmwrapper
#RUN_DEPENDS=	${JAVA}:${PORTSDIR}/java/linux-jdk13

JAVA?=		${LOCALBASE}/bin/javavm

NO_WRKSUBDIR=	yes

.if !defined(NOPORTDOCS)
DISTFILES+=	${PORTNAME}-src-${PORTVERSION:S/./_/g}${EXTRACT_SUFX}

FILES=		README build.xml jruby.mf org test.rb samples
.endif

do-build:
	( \
	${ECHO} '#!/bin/sh'; \
	${ECHO} 'exec ${JAVA} -jar ${PREFIX}/share/java/classes/jruby.jar "$$@"'; \
	) > ${WRKSRC}/jruby

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/jruby ${PREFIX}/bin/
	${MKDIR} ${PREFIX}/share/java/classes
	${INSTALL_DATA} ${WRKSRC}/jruby.jar ${PREFIX}/share/java/classes/
.if !defined(NOPORTDOCS)
	${MKDIR} ${PREFIX}/share/java/${PORTNAME}
	cd ${WRKSRC}; ${CP} -R ${FILES} ${PREFIX}/share/java/${PORTNAME}/
.endif

post-install:
.if !defined(NOPORTDOCS)
	cd ${WRKSRC}; find ${FILES} -type f | sort | ${SED} 's,^,share/java/${PORTNAME}/,' >> ${TMPPLIST}
	cd ${WRKSRC}; find ${FILES} -type d | sort -r | ${SED} 's,^,@dirrm share/java/${PORTNAME}/,' >> ${TMPPLIST}
	${ECHO} '@dirrm share/java/${PORTNAME}' >> ${TMPPLIST}
.endif
	${ECHO} '@unexec ${RMDIR} %D/share/java 2> /dev/null || true' >> ${TMPPLIST}

.include <bsd.port.mk>