diff options
author | Ernst de Haan <znerd@FreeBSD.org> | 2002-04-13 11:35:48 +0000 |
---|---|---|
committer | Ernst de Haan <znerd@FreeBSD.org> | 2002-04-13 11:35:48 +0000 |
commit | 136c2d834e1574e02b494eb4f5e2ca4eb79e37d4 (patch) | |
tree | 9949eb91a6ccc9c9905b3ac32b35f71489a66b5c | |
parent | 29d7824fd0b3e0fb0f26ccc78143afa348ffc067 (diff) | |
download | ports-136c2d834e1574e02b494eb4f5e2ca4eb79e37d4.tar.gz ports-136c2d834e1574e02b494eb4f5e2ca4eb79e37d4.zip |
Notes
-rw-r--r-- | devel/apache-ant/Makefile | 51 | ||||
-rw-r--r-- | devel/apache-ant/files/patch-bin::ant | 28 | ||||
-rw-r--r-- | devel/jakarta-ant/Makefile | 51 | ||||
-rw-r--r-- | devel/jakarta-ant/files/patch-bin::ant | 28 |
4 files changed, 130 insertions, 28 deletions
diff --git a/devel/apache-ant/Makefile b/devel/apache-ant/Makefile index c67727258fc2..1982506fa236 100644 --- a/devel/apache-ant/Makefile +++ b/devel/apache-ant/Makefile @@ -7,6 +7,7 @@ PORTNAME= jakarta-ant PORTVERSION= 1.4.1 +PORTREVISION= 1 CATEGORIES= devel java MASTER_SITES= http://jakarta.apache.org/builds/${PORTNAME}/release/v${PORTVERSION}/bin/ \ http://www.metaverse.nl/~ernst/ @@ -17,11 +18,9 @@ EXTRACT_ONLY= ${DISTNAME}-bin${EXTRACT_SUFX} MAINTAINER= znerd@FreeBSD.org -RUN_DEPENDS= ${JAVAVM}:${PORTSDIR}/java/javavmwrapper \ - ${LOCALBASE}/share/java/classes/crimson.jar:${PORTSDIR}/textproc/crimson +RUN_DEPENDS= ${LOCALBASE}/share/java/classes/crimson.jar:${PORTSDIR}/textproc/crimson -JAVAVM?= ${LOCALBASE}/bin/javavm -FIND?= /usr/bin/find +USE_JAVA= 1.2+ NO_BUILD= YES ANT_SUBDIR= ${DISTNAME} @@ -37,24 +36,48 @@ DATADIRS+= docs .endif post-patch: - @${PERL} -pi -e 's,JAVACMD=java,JAVACMD=javavm,g' ${WRKSRC}/bin/ant + @${ECHO_CMD} -n ">> Customizing ant shell script..." + @${SED} \ + -e "/%%JAVA%%/s//${JAVA:S/\//\\\//g}/g" \ + -e "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/g" \ + ${WRKSRC}/bin/ant > ${WRKDIR}/ant + @${MV} ${WRKDIR}/ant ${WRKSRC}/bin/ant + @${ECHO_CMD} " [ DONE ]" + + @${ECHO_CMD} -n ">> Removing unneeded files..." + @${RM} -f ${WRKSRC}/lib/parser.jar + @${ECHO_CMD} " [ DONE ]" do-install: - ${MKDIR} ${PORTDESTDIR}/bin ${PORTDESTDIR}/lib - cd ${INSTALL_WRKSRC}; \ - ${INSTALL_SCRIPT} ${SCRIPTS} ${PORTDESTDIR}/bin; \ + @${ECHO_CMD} -n ">> Creating destination directory..." + @${MKDIR} ${PORTDESTDIR}/bin ${PORTDESTDIR}/lib + @${ECHO_CMD} " [ DONE ]" + + @${ECHO_CMD} -n ">> Installing scripts..." + @cd ${INSTALL_WRKSRC}; \ + ${INSTALL_SCRIPT} ${SCRIPTS} ${PORTDESTDIR}/bin; + @${LN} -sf ${PORTDESTDIR}/bin/ant ${PREFIX}/bin + @${ECHO_CMD} " [ DONE ]" + + @${ECHO_CMD} -n ">> Installing readme files..." + @cd ${INSTALL_WRKSRC}; \ ${INSTALL_DATA} ${READMES} ${PORTDESTDIR}; - ${LN} -sf ${PORTDESTDIR}/bin/ant ${PREFIX}/bin + @${ECHO_CMD} " [ DONE ]" + .if defined(DATADIRS) .for DIR in ${DATADIRS} - cd ${INSTALL_WRKSRC}; \ + @${ECHO_CMD} -n ">> Installing data directory '${DIR}'..." + @cd ${INSTALL_WRKSRC}; \ ${FIND} ${DIR} -type d -exec ${MKDIR} ${PORTDESTDIR}/\{} \; ;\ ${FIND} ${DIR} -type f -exec ${INSTALL_DATA} \{} ${PORTDESTDIR}/\{} \; + @${ECHO_CMD} " [ DONE ]" .endfor .endif - ${RM} -f ${PORTDESTDIR}/lib/parser.jar - ${INSTALL_DATA} ${_DISTDIR}/${DISTNAME}-optional.jar ${PORTDESTDIR}/lib/optional.jar - ${LN} -sf ${LOCALBASE}/share/java/classes/jaxp.jar ${PORTDESTDIR}/lib - ${LN} -sf ${LOCALBASE}/share/java/classes/crimson.jar ${PORTDESTDIR}/lib + + @${ECHO_CMD} -n ">> Installing additional JAR files..." + @${INSTALL_DATA} ${_DISTDIR}/${DISTNAME}-optional.jar ${PORTDESTDIR}/lib/optional.jar + @${LN} -sf ${LOCALBASE}/share/java/classes/jaxp.jar ${PORTDESTDIR}/lib + @${LN} -sf ${LOCALBASE}/share/java/classes/crimson.jar ${PORTDESTDIR}/lib + @${ECHO_CMD} " [ DONE ]" .include <bsd.port.mk> diff --git a/devel/apache-ant/files/patch-bin::ant b/devel/apache-ant/files/patch-bin::ant new file mode 100644 index 000000000000..40958b1aae04 --- /dev/null +++ b/devel/apache-ant/files/patch-bin::ant @@ -0,0 +1,28 @@ +--- bin/ant.orig Thu Oct 11 15:57:19 2001 ++++ bin/ant Sat Apr 13 13:12:06 2002 +@@ -1,9 +1,16 @@ + #! /bin/sh + ++DEFAULT_JAVACMD=%%JAVA%% ++DEFAULT_JAVA_HOME=%%JAVA_HOME%% ++ + if [ -f $HOME/.antrc ] ; then + . $HOME/.antrc + fi + ++if [ -z "$JAVA_HOME" ] ; then ++ JAVA_HOME=$DEFAULT_JAVA_HOME ++fi ++ + # OS specific support. $var _must_ be set to either true or false. + cygwin=false; + darwin=false; +@@ -59,7 +66,7 @@ + JAVACMD=$JAVA_HOME/bin/java + fi + else +- JAVACMD=java ++ JAVACMD=$DEFAULT_JAVACMD + fi + fi + diff --git a/devel/jakarta-ant/Makefile b/devel/jakarta-ant/Makefile index c67727258fc2..1982506fa236 100644 --- a/devel/jakarta-ant/Makefile +++ b/devel/jakarta-ant/Makefile @@ -7,6 +7,7 @@ PORTNAME= jakarta-ant PORTVERSION= 1.4.1 +PORTREVISION= 1 CATEGORIES= devel java MASTER_SITES= http://jakarta.apache.org/builds/${PORTNAME}/release/v${PORTVERSION}/bin/ \ http://www.metaverse.nl/~ernst/ @@ -17,11 +18,9 @@ EXTRACT_ONLY= ${DISTNAME}-bin${EXTRACT_SUFX} MAINTAINER= znerd@FreeBSD.org -RUN_DEPENDS= ${JAVAVM}:${PORTSDIR}/java/javavmwrapper \ - ${LOCALBASE}/share/java/classes/crimson.jar:${PORTSDIR}/textproc/crimson +RUN_DEPENDS= ${LOCALBASE}/share/java/classes/crimson.jar:${PORTSDIR}/textproc/crimson -JAVAVM?= ${LOCALBASE}/bin/javavm -FIND?= /usr/bin/find +USE_JAVA= 1.2+ NO_BUILD= YES ANT_SUBDIR= ${DISTNAME} @@ -37,24 +36,48 @@ DATADIRS+= docs .endif post-patch: - @${PERL} -pi -e 's,JAVACMD=java,JAVACMD=javavm,g' ${WRKSRC}/bin/ant + @${ECHO_CMD} -n ">> Customizing ant shell script..." + @${SED} \ + -e "/%%JAVA%%/s//${JAVA:S/\//\\\//g}/g" \ + -e "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/g" \ + ${WRKSRC}/bin/ant > ${WRKDIR}/ant + @${MV} ${WRKDIR}/ant ${WRKSRC}/bin/ant + @${ECHO_CMD} " [ DONE ]" + + @${ECHO_CMD} -n ">> Removing unneeded files..." + @${RM} -f ${WRKSRC}/lib/parser.jar + @${ECHO_CMD} " [ DONE ]" do-install: - ${MKDIR} ${PORTDESTDIR}/bin ${PORTDESTDIR}/lib - cd ${INSTALL_WRKSRC}; \ - ${INSTALL_SCRIPT} ${SCRIPTS} ${PORTDESTDIR}/bin; \ + @${ECHO_CMD} -n ">> Creating destination directory..." + @${MKDIR} ${PORTDESTDIR}/bin ${PORTDESTDIR}/lib + @${ECHO_CMD} " [ DONE ]" + + @${ECHO_CMD} -n ">> Installing scripts..." + @cd ${INSTALL_WRKSRC}; \ + ${INSTALL_SCRIPT} ${SCRIPTS} ${PORTDESTDIR}/bin; + @${LN} -sf ${PORTDESTDIR}/bin/ant ${PREFIX}/bin + @${ECHO_CMD} " [ DONE ]" + + @${ECHO_CMD} -n ">> Installing readme files..." + @cd ${INSTALL_WRKSRC}; \ ${INSTALL_DATA} ${READMES} ${PORTDESTDIR}; - ${LN} -sf ${PORTDESTDIR}/bin/ant ${PREFIX}/bin + @${ECHO_CMD} " [ DONE ]" + .if defined(DATADIRS) .for DIR in ${DATADIRS} - cd ${INSTALL_WRKSRC}; \ + @${ECHO_CMD} -n ">> Installing data directory '${DIR}'..." + @cd ${INSTALL_WRKSRC}; \ ${FIND} ${DIR} -type d -exec ${MKDIR} ${PORTDESTDIR}/\{} \; ;\ ${FIND} ${DIR} -type f -exec ${INSTALL_DATA} \{} ${PORTDESTDIR}/\{} \; + @${ECHO_CMD} " [ DONE ]" .endfor .endif - ${RM} -f ${PORTDESTDIR}/lib/parser.jar - ${INSTALL_DATA} ${_DISTDIR}/${DISTNAME}-optional.jar ${PORTDESTDIR}/lib/optional.jar - ${LN} -sf ${LOCALBASE}/share/java/classes/jaxp.jar ${PORTDESTDIR}/lib - ${LN} -sf ${LOCALBASE}/share/java/classes/crimson.jar ${PORTDESTDIR}/lib + + @${ECHO_CMD} -n ">> Installing additional JAR files..." + @${INSTALL_DATA} ${_DISTDIR}/${DISTNAME}-optional.jar ${PORTDESTDIR}/lib/optional.jar + @${LN} -sf ${LOCALBASE}/share/java/classes/jaxp.jar ${PORTDESTDIR}/lib + @${LN} -sf ${LOCALBASE}/share/java/classes/crimson.jar ${PORTDESTDIR}/lib + @${ECHO_CMD} " [ DONE ]" .include <bsd.port.mk> diff --git a/devel/jakarta-ant/files/patch-bin::ant b/devel/jakarta-ant/files/patch-bin::ant new file mode 100644 index 000000000000..40958b1aae04 --- /dev/null +++ b/devel/jakarta-ant/files/patch-bin::ant @@ -0,0 +1,28 @@ +--- bin/ant.orig Thu Oct 11 15:57:19 2001 ++++ bin/ant Sat Apr 13 13:12:06 2002 +@@ -1,9 +1,16 @@ + #! /bin/sh + ++DEFAULT_JAVACMD=%%JAVA%% ++DEFAULT_JAVA_HOME=%%JAVA_HOME%% ++ + if [ -f $HOME/.antrc ] ; then + . $HOME/.antrc + fi + ++if [ -z "$JAVA_HOME" ] ; then ++ JAVA_HOME=$DEFAULT_JAVA_HOME ++fi ++ + # OS specific support. $var _must_ be set to either true or false. + cygwin=false; + darwin=false; +@@ -59,7 +66,7 @@ + JAVACMD=$JAVA_HOME/bin/java + fi + else +- JAVACMD=java ++ JAVACMD=$DEFAULT_JAVACMD + fi + fi + |