2001-09-20 11:18:26 +02:00
|
|
|
# New ports collection makefile for: JRuby
|
|
|
|
# Date created: 20 September 2001
|
|
|
|
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= jruby
|
2007-07-25 04:34:31 +02:00
|
|
|
PORTVERSION= 1.0
|
2007-05-19 22:36:56 +02:00
|
|
|
PORTREVISION= 1
|
2001-09-20 11:18:26 +02:00
|
|
|
CATEGORIES= lang ruby java
|
2007-05-22 08:41:01 +02:00
|
|
|
MASTER_SITES= http://dist.codehaus.org/jruby/ \
|
|
|
|
http://dist.codehaus.org/jruby/previous/
|
2002-10-08 19:59:57 +02:00
|
|
|
DISTNAME= ${PORTNAME}-bin-${PORTVERSION}
|
2001-09-20 11:18:26 +02:00
|
|
|
|
2007-04-30 08:27:41 +02:00
|
|
|
MAINTAINER= nemoliu@FreeBSD.org
|
2003-02-18 06:42:05 +01:00
|
|
|
COMMENT= An implementation of Ruby Interpreter in Pure Java
|
2001-09-20 11:18:26 +02:00
|
|
|
|
2002-10-08 19:59:57 +02:00
|
|
|
NO_BUILD= yes
|
2007-04-25 05:03:50 +02:00
|
|
|
USE_JAVA= yes
|
|
|
|
JAVA_VERSION= 1.3+
|
2001-09-20 11:18:26 +02:00
|
|
|
|
2007-04-25 05:03:50 +02:00
|
|
|
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work
|
2002-10-08 19:59:57 +02:00
|
|
|
JRUBY_HOME?= ${PREFIX}/share/${PORTNAME}
|
2007-04-25 05:03:50 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
|
|
|
REPLACE_FILES= ${WRKSRC}/bin/jruby \
|
2007-07-25 04:34:31 +02:00
|
|
|
${WRKSRC}/bin/jrubyc \
|
|
|
|
${WRKSRC}/bin/jrubycli \
|
|
|
|
${WRKSRC}/bin/jrubysrv
|
2007-04-25 05:03:50 +02:00
|
|
|
REPLACE_LIST= JRUBY_HOME=${JRUBY_HOME} \
|
|
|
|
JAVA_HOME=${JAVA_HOME}
|
|
|
|
REPLACE_LIST_TEMP= ${REPLACE_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/}
|
2001-09-20 11:18:26 +02:00
|
|
|
|
2007-04-25 05:03:50 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
2001-09-20 11:18:26 +02:00
|
|
|
|
2007-04-25 05:03:50 +02:00
|
|
|
pre-patch:
|
|
|
|
@${ECHO_MSG} "Installation settings:"
|
|
|
|
@${ECHO_MSG} " JRUBY_HOME: ${JRUBY_HOME}"
|
|
|
|
@${ECHO_MSG} " JAVA_HOME: ${JAVA_HOME}"
|
2001-12-26 19:56:18 +01:00
|
|
|
|
2002-10-08 19:59:57 +02:00
|
|
|
post-patch:
|
2007-04-25 05:03:50 +02:00
|
|
|
@${ECHO_MSG} -n ">> Removing unneeded files..."
|
|
|
|
@${RM} -f `${FIND} ${WRKSRC} -name '*.bat'` `${FIND} ${WRKSRC} -name '*.orig'` `${FIND} ${WRKSRC} -name '*.exe'`
|
|
|
|
@${ECHO_MSG} " [ DONE ]"
|
|
|
|
.for file in ${REPLACE_FILES}
|
|
|
|
@${ECHO_MSG} -n ">> Customizing `basename ${file}`..."
|
|
|
|
@${SED} ${REPLACE_LIST_TEMP} ${file} > ${WRKDIR}/`basename ${file}`
|
|
|
|
@${ECHO_MSG} " [ DONE ]"
|
|
|
|
.endfor
|
2001-09-20 11:18:26 +02:00
|
|
|
|
|
|
|
do-install:
|
2007-04-25 05:03:50 +02:00
|
|
|
@${ECHO_MSG} -n ">> Installation JRuby files..."
|
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/jruby ${PREFIX}/bin/jruby
|
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/jrubyc ${PREFIX}/bin/jrubyc
|
2007-07-25 04:34:31 +02:00
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/jrubycli ${PREFIX}/bin/jrubycli
|
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/jrubysrv ${PREFIX}/bin/jrubysrv
|
2007-04-25 05:03:50 +02:00
|
|
|
@cd ${WRKSRC}/lib \
|
|
|
|
&& ${FIND} . -type d -exec ${MKDIR} ${JRUBY_HOME}/lib/{} \; \
|
|
|
|
&& ${FIND} . -type f -exec ${INSTALL_DATA} {} ${JRUBY_HOME}/lib/{} \;
|
|
|
|
@${ECHO_MSG} " [ DONE ]"
|
2001-09-20 11:18:26 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2007-04-25 05:03:50 +02:00
|
|
|
@${ECHO_MSG} -n ">> Installation Documents files..."
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
@(cd ${WRKSRC}/docs \
|
|
|
|
&& ${COPYTREE_SHARE} \* ${DOCSDIR})
|
|
|
|
@${MKDIR} ${EXAMPLESDIR}
|
|
|
|
@(cd ${WRKSRC}/samples \
|
|
|
|
&& ${COPYTREE_SHARE} \* ${EXAMPLESDIR})
|
|
|
|
@${ECHO_MSG} " [ DONE ]"
|
2001-09-20 11:18:26 +02:00
|
|
|
.endif
|
|
|
|
|
2007-04-25 05:03:50 +02:00
|
|
|
.include <bsd.port.post.mk>
|