aboutsummaryrefslogtreecommitdiffstats
path: root/lang/jruby/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lang/jruby/Makefile')
-rw-r--r--lang/jruby/Makefile58
1 files changed, 20 insertions, 38 deletions
diff --git a/lang/jruby/Makefile b/lang/jruby/Makefile
index e9564fa7998e..258bd426d062 100644
--- a/lang/jruby/Makefile
+++ b/lang/jruby/Makefile
@@ -6,60 +6,42 @@
#
PORTNAME= jruby
-PORTVERSION= 0.5.1
+PORTVERSION= 0.5.2
CATEGORIES= lang ruby java
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
-DISTFILES= ${BINDIST}
+DISTNAME= ${PORTNAME}-bin-${PORTVERSION}
DIST_SUBDIR= ruby
-EXTRACT_ONLY= ${BINDIST}
MAINTAINER= knu@FreeBSD.org
-RUN_DEPENDS= ${JAVA}:${PORTSDIR}/java/javavmwrapper
-#RUN_DEPENDS= ${JAVA}:${PORTSDIR}/java/linux-jdk13
+USE_REINPLACE= yes
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/./_/g}
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+NO_BUILD= yes
-JAVA?= ${LOCALBASE}/bin/javavm
+JRUBY_HOME?= ${PREFIX}/share/${PORTNAME}
-BINDIST= ${PORTNAME}-${PORTVERSION:S/./_/g}${EXTRACT_SUFX}
-SRCDIST= ${PORTNAME}-src-${PORTVERSION:S/./_/g}${EXTRACT_SUFX}
-
-.if !defined(NOPORTDOCS)
-DISTFILES+= ${SRCDIST}
-
-FILES= README samples src
-.endif
+PLIST_SUB= JRUBY_HOME="${JRUBY_HOME:S,^${PREFIX}/,,}"
post-extract:
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${WRKSRC}/src
- cd ${WRKSRC}/src; ${TAR} zxf ${DISTDIR}/${DIST_SUBDIR}/${SRCDIST}
-.endif
- ${FIND} ${WRKSRC} -name '*.swp' -delete
+ ${MV} ${WRKSRC}/README ${WRKSRC}/docs/
+ ${RM} ${WRKSRC}/lib/COPYING.LIB
-do-build:
- ( \
- ${ECHO_CMD} '#!/bin/sh'; \
- ${ECHO_CMD} 'exec ${JAVA} -jar ${PREFIX}/share/java/classes/jruby.jar "$$@"'; \
- ) > ${WRKSRC}/jruby
+post-patch:
+ ${REINPLACE_CMD} -e 's,!!JRUBY_HOME!!,${JRUBY_HOME},g' \
+ ${WRKSRC}/bin/jruby.sh
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:
+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/jruby.sh ${PREFIX}/bin/jruby
+ ${MKDIR} ${JRUBY_HOME}/lib
+ ${INSTALL_DATA} ${WRKSRC}/lib/* ${JRUBY_HOME}/lib/
.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_CMD} '@dirrm share/java/${PORTNAME}' >> ${TMPPLIST}
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/docs/* ${DOCSDIR}/
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/samples/* ${EXAMPLESDIR}/
.endif
- ${ECHO_CMD} '@unexec ${RMDIR} %D/share/java 2> /dev/null || true' >> ${TMPPLIST}
+ ${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>