diff options
author | hq <hq@FreeBSD.org> | 2004-11-25 11:07:24 +0800 |
---|---|---|
committer | hq <hq@FreeBSD.org> | 2004-11-25 11:07:24 +0800 |
commit | d5daf62f30896923da034d806aca9ed0cb897f24 (patch) | |
tree | c7f6ec2dcb2a58a0c3aae4f5376a1a911c78b438 /java | |
parent | cfc7309eb073551f334bad6692af1e9c93caa24e (diff) | |
download | freebsd-ports-gnome-d5daf62f30896923da034d806aca9ed0cb897f24.tar.gz freebsd-ports-gnome-d5daf62f30896923da034d806aca9ed0cb897f24.tar.zst freebsd-ports-gnome-d5daf62f30896923da034d806aca9ed0cb897f24.zip |
- Fixed download location [1]
- Update to bsd.java.mk 2.0
- Use JAVAJARDIR
- Removed patch, added a launcher script file
- Use javavmwrapper to run Java in the launcher script
- Honor hier(7): docs in DOCSDIR and samples in EXAMPLESDIR
- Honor NOPORTDOCS
- Dynamic plist
- do-build -> do-configure (and NO_BUILD=yes)
- ECHO -> ECHO_MSG
- Bumped PORTREVISION as many file locations has changed and the use of
javavmwrapper will allow user to use different JVMs
PR: 72883 [1]
Submitted by: Aaron Dalton <aaron@daltons.ca> [1]
Approved by: maintainer timeout
Diffstat (limited to 'java')
-rw-r--r-- | java/jsdk/Makefile | 82 | ||||
-rw-r--r-- | java/jsdk/files/patch-aa | 45 | ||||
-rw-r--r-- | java/jsdk/files/servletrunner | 5 | ||||
-rw-r--r-- | java/jsdk/pkg-plist | 73 |
4 files changed, 64 insertions, 141 deletions
diff --git a/java/jsdk/Makefile b/java/jsdk/Makefile index 063c55567ebe..6e8ab482f2ae 100644 --- a/java/jsdk/Makefile +++ b/java/jsdk/Makefile @@ -7,15 +7,19 @@ PORTNAME= jsdk PORTVERSION= 2.0 -CATEGORIES= java -MASTER_SITES= +PORTREVISION= 1 +CATEGORIES= java devel +MASTER_SITES= # DISTNAME= jsdk20-solaris2-sparc EXTRACT_SUFX= .tar.Z MAINTAINER= greg@greg.rim.or.jp -COMMENT= Sun's Java Servlet Developers Kit +COMMENT= Sun\'s Java Servlet Developers Kit -USE_JAVA= 1.1+ +RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper + +USE_JAVA= yes +NO_BUILD= yes NO_CDROM= "Sun has a funky license for this software" RESTRICTED= "no commercial use" @@ -26,28 +30,60 @@ WRKSRC= ${WRKDIR}/JSDK2.0 IGNORE= "Should be fetched manually" .endif +PLIST_FILES= %%JAVAJARDIR%%/jsdk.jar bin/servletrunner +.if !defined(NOPORTDOCS) +OTHERDOCS= apidoc images servlet_tutorial.html +PORTDOCS= README ${OTHERDOCS} +.endif + do-fetch: @if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \ - ${ECHO} "=========================================================="; \ - ${ECHO} " You must a fetch the Java Servlet Development Kit 2.0"; \ - ${ECHO} " (for Unix) archive from"; \ - ${ECHO} ""; \ - ${ECHO} " http://java.sun.com/products/servlet/download.html"; \ - ${ECHO} ""; \ - ${ECHO} " And copy into ${DISTDIR}"; \ - ${ECHO} "=========================================================="; \ - fi - -do-build: - @${SED} -e s,%%PREFIX%%,${PREFIX},g \ - ${WRKSRC}/bin/servletrunner > ${WRKDIR}/servletrunner + ${ECHO_MSG} "=========================================================="; \ + ${ECHO_MSG} " You must a fetch the Java Servlet Development Kit 2.0"; \ + ${ECHO_MSG} " (for Unix) archive from"; \ + ${ECHO_MSG} ""; \ + ${ECHO_MSG} " http://java.sun.com/products/servlet/archive.html"; \ + ${ECHO_MSG} ""; \ + ${ECHO_MSG} " And copy into ${DISTDIR}"; \ + ${ECHO_MSG} "=========================================================="; \ + ${FALSE}; \ + fi + +do-configure: + @${SED} \ + -e 's,%%JAVAJARDIR%%,${JAVAJARDIR},g' \ + -e 's,%%JAVA_CLASSES%%,${JAVA_CLASSES},g' \ + -e 's,%%LOCALBASE%%,${LOCALBASE},g' \ + ${FILESDIR}/servletrunner > ${WRKSRC}/servletrunner do-install: - @${MKDIR} ${PREFIX}/share/java/classes ${PREFIX}/share/java/jsdk20 - @${INSTALL_SCRIPT} ${WRKDIR}/servletrunner ${PREFIX}/bin - @${INSTALL_DATA} ${WRKSRC}/lib/jsdk.jar ${PREFIX}/share/java/classes - @cd ${WRKSRC}; \ - ${CP} -R [Rde]* ${PREFIX}/share/java/jsdk20 - @${CHOWN} -h -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/java/jsdk20 + @${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/jsdk.jar..." + @${MKDIR} ${JAVAJARDIR} + @${INSTALL_DATA} ${WRKSRC}/lib/jsdk.jar ${JAVAJARDIR}/ + @${ECHO_MSG} " [ DONE ]" + @${ECHO_MSG} -n ">> Installing script in ${PREFIX}/bin..." + @${INSTALL_SCRIPT} ${WRKSRC}/servletrunner ${PREFIX}/bin + @${ECHO_MSG} " [ DONE ]" +.if !defined(NOPORTDOCS) + @${ECHO_MSG} -n ">> Installing samples in ${EXAMPLESDIR}/..." + @cd ${WRKSRC}/examples/ \ + && ${FIND} . -type d -exec ${MKDIR} ${EXAMPLESDIR}/{} \; \ + && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${EXAMPLESDIR}/{} \; + @${ECHO_MSG} " [ DONE ]" + @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}/..." + @cd ${WRKSRC}/doc/ \ + && ${FIND} ${OTHERDOCS} -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \ + && ${FIND} ${OTHERDOCS} -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \; + @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/ + @${ECHO_MSG} " [ DONE ]" +.endif + +.if !defined(NOPORTDOCS) +post-install: + @${FIND} -s ${WRKSRC}/examples -not -type d \ + | ${SED} -ne 's,^${WRKSRC}/examples,${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST} + @${FIND} -s -d ${WRKSRC}/examples -type d \ + | ${SED} -ne 's,^${WRKSRC}/examples,@dirrm ${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST} +.endif .include <bsd.port.mk> diff --git a/java/jsdk/files/patch-aa b/java/jsdk/files/patch-aa deleted file mode 100644 index 6f33ea8615a1..000000000000 --- a/java/jsdk/files/patch-aa +++ /dev/null @@ -1,45 +0,0 @@ ---- bin/servletrunner.orig Wed Apr 22 04:32:48 1998 -+++ bin/servletrunner Wed Jun 30 22:34:20 1999 -@@ -54,7 +54,7 @@ - fi - if [ -z "$JAVA_HOME" ] - then -- JAVA_HOME=/usr/local/jdk1.1 -+ JAVA_HOME=/usr/local/jdk1.1.8 - fi - fi - -@@ -66,31 +66,12 @@ - error "Cannot find the Java runtime. Please set JAVA_HOME." - fi - --# If JSDK_HOME not specified then determine default location of JSDK --# from directory out of which this script was executed. Otherwise, --# JSDK_HOME must be set manually. -- --d=`dirname $0` --if [ -n "$d" ] -- then -- JSDK_HOME=`cd $d/.. >/dev/null 2>&1 && pwd` --fi --if [ -z "$JSDK_HOME" ] -- then -- error "Cannot find the JSDK. Please set JSDK_HOME." --fi -- --if [ ! -d "$JSDK_HOME" ] --then -- error "JSDK_HOME ($JSDK_HOME) must be a directory." --fi -- - # Add JSDK classes to default class path. - --CLASSPATH=$JSDK_HOME/classes:$JSDK_HOME/lib/jsdk.jar:$CLASSPATH -+CLASSPATH=%%PREFIX%%/share/java/classes/jsdk.jar:$CLASSPATH - export CLASSPATH - - # Start server and pass any arguments specified on command line. - --cd $JSDK_HOME -+cd %%PREFIX%%/share/java/classes - $JAVA_HOME/bin/java sun.servlet.http.HttpServer $* diff --git a/java/jsdk/files/servletrunner b/java/jsdk/files/servletrunner new file mode 100644 index 000000000000..1f8e67692204 --- /dev/null +++ b/java/jsdk/files/servletrunner @@ -0,0 +1,5 @@ +#!/bin/sh +# +# $FreeBSD$ + +exec %%LOCALBASE%%/bin/java -classpath "%%JAVAJARDIR%%/jsdk.jar:%%JAVA_CLASSES%%:${CLASSPATH}" sun.servlet.http.HttpServer "$@" diff --git a/java/jsdk/pkg-plist b/java/jsdk/pkg-plist deleted file mode 100644 index e33d71e3ee67..000000000000 --- a/java/jsdk/pkg-plist +++ /dev/null @@ -1,73 +0,0 @@ -bin/servletrunner -share/java/classes/jsdk.jar -share/java/jsdk20/README -share/java/jsdk20/doc/apidoc/AllNames.html -share/java/jsdk20/doc/apidoc/Package-javax.servlet.html -share/java/jsdk20/doc/apidoc/Package-javax.servlet.http.html -share/java/jsdk20/doc/apidoc/images/OpenBookIcon.gif -share/java/jsdk20/doc/apidoc/images/blue-ball-small.gif -share/java/jsdk20/doc/apidoc/images/blue-ball.gif -share/java/jsdk20/doc/apidoc/images/class-index.gif -share/java/jsdk20/doc/apidoc/images/constructor-index.gif -share/java/jsdk20/doc/apidoc/images/constructors.gif -share/java/jsdk20/doc/apidoc/images/cyan-ball-small.gif -share/java/jsdk20/doc/apidoc/images/cyan-ball.gif -share/java/jsdk20/doc/apidoc/images/error-index.gif -share/java/jsdk20/doc/apidoc/images/exception-index.gif -share/java/jsdk20/doc/apidoc/images/green-ball-small.gif -share/java/jsdk20/doc/apidoc/images/green-ball.gif -share/java/jsdk20/doc/apidoc/images/interface-index.gif -share/java/jsdk20/doc/apidoc/images/java.awt/GridBagEx.gif -share/java/jsdk20/doc/apidoc/images/magenta-ball-small.gif -share/java/jsdk20/doc/apidoc/images/magenta-ball.gif -share/java/jsdk20/doc/apidoc/images/method-index.gif -share/java/jsdk20/doc/apidoc/images/methods.gif -share/java/jsdk20/doc/apidoc/images/package-index.gif -share/java/jsdk20/doc/apidoc/images/red-ball-small.gif -share/java/jsdk20/doc/apidoc/images/red-ball.gif -share/java/jsdk20/doc/apidoc/images/variable-index.gif -share/java/jsdk20/doc/apidoc/images/variables.gif -share/java/jsdk20/doc/apidoc/images/yellow-ball-small.gif -share/java/jsdk20/doc/apidoc/images/yellow-ball.gif -share/java/jsdk20/doc/apidoc/javax.servlet.GenericServlet.html -share/java/jsdk20/doc/apidoc/javax.servlet.Servlet.html -share/java/jsdk20/doc/apidoc/javax.servlet.ServletConfig.html -share/java/jsdk20/doc/apidoc/javax.servlet.ServletContext.html -share/java/jsdk20/doc/apidoc/javax.servlet.ServletException.html -share/java/jsdk20/doc/apidoc/javax.servlet.ServletInputStream.html -share/java/jsdk20/doc/apidoc/javax.servlet.ServletOutputStream.html -share/java/jsdk20/doc/apidoc/javax.servlet.ServletRequest.html -share/java/jsdk20/doc/apidoc/javax.servlet.ServletResponse.html -share/java/jsdk20/doc/apidoc/javax.servlet.SingleThreadModel.html -share/java/jsdk20/doc/apidoc/javax.servlet.UnavailableException.html -share/java/jsdk20/doc/apidoc/javax.servlet.http.Cookie.html -share/java/jsdk20/doc/apidoc/javax.servlet.http.HttpServlet.html -share/java/jsdk20/doc/apidoc/javax.servlet.http.HttpServletRequest.html -share/java/jsdk20/doc/apidoc/javax.servlet.http.HttpServletResponse.html -share/java/jsdk20/doc/apidoc/javax.servlet.http.HttpSession.html -share/java/jsdk20/doc/apidoc/javax.servlet.http.HttpSessionBindingEvent.html -share/java/jsdk20/doc/apidoc/javax.servlet.http.HttpSessionBindingListener.html -share/java/jsdk20/doc/apidoc/javax.servlet.http.HttpSessionContext.html -share/java/jsdk20/doc/apidoc/javax.servlet.http.HttpUtils.html -share/java/jsdk20/doc/apidoc/packages.html -share/java/jsdk20/doc/apidoc/tree.html -share/java/jsdk20/doc/images/banner.gif -share/java/jsdk20/doc/images/survey-reply.gif -share/java/jsdk20/doc/servlet_tutorial.html -share/java/jsdk20/examples/JdcSurvey.html -share/java/jsdk20/examples/SessionServlet.class -share/java/jsdk20/examples/SessionServlet.java -share/java/jsdk20/examples/SimpleServlet.class -share/java/jsdk20/examples/SimpleServlet.java -share/java/jsdk20/examples/SnoopServlet.class -share/java/jsdk20/examples/SnoopServlet.java -share/java/jsdk20/examples/SurveyServlet.class -share/java/jsdk20/examples/SurveyServlet.java -share/java/jsdk20/examples/servlet.properties -@dirrm share/java/jsdk20/doc/apidoc/images/java.awt -@dirrm share/java/jsdk20/doc/apidoc/images -@dirrm share/java/jsdk20/doc/apidoc -@dirrm share/java/jsdk20/doc/images -@dirrm share/java/jsdk20/doc -@dirrm share/java/jsdk20/examples -@dirrm share/java/jsdk20 |