aboutsummaryrefslogtreecommitdiff
path: root/java/netrexx
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2001-09-06 04:17:13 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2001-09-06 04:17:13 +0000
commit4734a555895586e08ba30ef4931a44f37264b097 (patch)
tree7a0d3345d7a0e6dc73ff57c5bb6b0f5a8954237a /java/netrexx
parentb98ad6bb147758c8bca8a30a891594e4d0e0d3e9 (diff)
downloadports-4734a555895586e08ba30ef4931a44f37264b097.tar.gz
ports-4734a555895586e08ba30ef4931a44f37264b097.zip
1) do not install both/either useless and/or duplicate files
2) replace installed NetRexxC.cmd with a home grown version 3) add lang/rexx-imc as RUN_DEPENDS due to 2) 4) also, delete both the DOS-only *.bat files and the OS/2-only nrc.cmd file (which is not really a Rexx file). 5) furthermore, delete the duplicate hello.nrx because: 1. a copy is installed with the documentation; 2. one can't compile it from the same directory java is in (unless PATH contains .). 6) switch over maintainership to submitter PR: 30217 Submitted by: John Merryweather Cooper <jmcoopr@webmail.bmi.net>
Notes
Notes: svn path=/head/; revision=47464
Diffstat (limited to 'java/netrexx')
-rw-r--r--java/netrexx/Makefile18
-rw-r--r--java/netrexx/files/NetRexxC.cmd.new109
-rw-r--r--java/netrexx/pkg-plist5
3 files changed, 124 insertions, 8 deletions
diff --git a/java/netrexx/Makefile b/java/netrexx/Makefile
index d3bd809a174f..bf32e3e6579c 100644
--- a/java/netrexx/Makefile
+++ b/java/netrexx/Makefile
@@ -7,27 +7,37 @@
PORTNAME= netrexx
PORTVERSION= 1.160
+PORTREVISION= 1
CATEGORIES= java lang
MASTER_SITES= http://www.ibm.com/technology/NetRexx/
DISTNAME= NetRexx
EXTRACT_SUFX= .tar.Z
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= jmcoopr@webmail.bmi.net
-RUN_DEPENDS= ${PREFIX}/jdk${JDK_VERSION}/bin/java:${PORTSDIR}/java/jdk
+RUN_DEPENDS= ${PREFIX}/jdk${JDK_VERSION}/bin/java:${PORTSDIR}/java/jdk \
+ rexx:${PORTSDIR}/lang/rexx-imc
NO_BUILD= yes
# pkg/PLIST depends on the JDK_VERSION
JDK_VERSION?= 1.1.8
PLIST_SUB+= JDK_VERSION=${JDK_VERSION}
+ERASE_FILES= NetRexxC.bat nrc.bat nrc.cmd hello.nrx
+
do-install:
-${MV} ${WRKSRC}/nrtools.tar.Z ${WRKSRC}/.foo.Z
uncompress -c ${WRKSRC}/.foo.Z | \
tar -xvf - -C ${PREFIX}/jdk${JDK_VERSION}
+.for file in ${ERASE_FILES}
+ @${RM} -f ${PREFIX}/jdk${JDK_VERSION}/bin/${file}
+.endfor
+ @${CP} ${FILESDIR}/NetRexxC.cmd.new ${PREFIX}/jdk${JDK_VERSION}/bin/NetRexxC.cmd
+ @${LN} -sf ${PREFIX}/jdk${JDK_VERSION}/bin/NetRexxC.cmd \
+ ${PREFIX}/jdk${JDK_VERSION}/bin/nrc
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/doc/NetRexx
- ${CP} -R ${WRKSRC}/* ${PREFIX}/share/doc/NetRexx/
+ @${MKDIR} ${PREFIX}/share/doc/NetRexx
+ @${CP} -R ${WRKSRC}/* ${PREFIX}/share/doc/NetRexx/
.endif
.include <bsd.port.mk>
diff --git a/java/netrexx/files/NetRexxC.cmd.new b/java/netrexx/files/NetRexxC.cmd.new
new file mode 100644
index 000000000000..54c16a5a4f7a
--- /dev/null
+++ b/java/netrexx/files/NetRexxC.cmd.new
@@ -0,0 +1,109 @@
+/*usr/bin/true; exec rexx "$0" "$@" # REXX program */
+/* Translate and compile a NetRexx program */
+/* */
+/* use as: NetRexxC hello [file2]... */
+/* */
+/* which will use the NetRexx translator to */
+/* translate hello.nrx to hello.java */
+/* then will use javac to compile hello.java */
+/* */
+/* Any OPTIONS keywords, indicated by a prefix '-', */
+/* may be added before, after, or between file */
+/* specification(s), along with the following extra */
+/*flags: */
+/* */
+/* -run = run class after compilation */
+/* -keep = keep the java file after successful */
+/* compilation (as xxx.java.keep) */
+/* -nocompile = only translate, do not compile */
+/* */
+/* Multiple programs may be specified; in this case */
+/* they are all run (if requested) after all compiles. */
+/* */
+/* ---------- */
+/* 1996.09.02 -- handle Warnings from NetRexxC (rc=1) */
+/* 1996.12.14 -- use COM.ibm.netrexx.process */
+/* 1998.05.25 -- pass NETREXX_JAVA setting to java.exe */
+
+parse arg args
+w=wordpos('-run', args)
+if w>0 then do; run=1; args=delword(args,w,1); end; else run=0
+w=wordpos('-nocompile', args)
+if w>0 then do; noc=1; end; else noc=0
+
+/* ----- Translate & Compile ----- */
+parse source system .
+select /* system-specific options */
+ when system='OS/2' then do
+ '@echo off'
+ /* Add option -norestart for OS/2s 1.0.2+ java.exe, for better display */
+ 'java -version 2>&1|rxqueue'; parse pull '1.' subv ' '
+ if subv>=0.2 then javaopts='-norestart'; else javaopts='-noasyncgc'
+
+ /* Add any options from NETREXX_JAVA environment variable */
+ nrjava=value('NETREXX_JAVA',,'OS2ENVIRONMENT')
+ if nrjava\='' then javaopts=javaopts nrjava
+ end
+ otherwise
+ /* Add any options from NETREXX_JAVA environment variable */
+ javaopts=value('NETREXX_JAVA',,'ENVIRONMENT')
+
+ /* JAVAVM MUST be set to the native jdk 1.1.8 */
+ /* it might work with a later, native jdk */
+ /* it will NOT work with a linux jdk */
+ javavm=value('JAVAVM',,'ENVIRONMENT')
+ if javavm = "" then
+ do
+ say "NetRexx will not function unless: "
+ say ""
+ say " JAVAVM is set to"
+ say ""
+ say " /usr/local/jdk1.1.8/bin/java"
+ say ""
+ say "and"
+ say ""
+ say " CLASSPATH is set to"
+ say ""
+ say " .:/usr/local/jdk1.1.8/lib/classes.zip:/usr/local/jdk1.1.8/lib/NetRexxC.zip"
+ say ""
+ say "or"
+ say ""
+ say " NETREXX_JAVA is set to"
+ say ""
+ say " -classpath <and the above-pathes>"
+ exit
+ end
+ end
+
+/* NOTE: This won't work if NetRexx.cmd or nrc is executed from the */
+/* same directory as java is located in */
+'java -ms4M' javaopts 'COM.ibm.netrexx.process.NetRexxC' args
+
+/* ----- Run ----- */
+if rc<=1 & run then do
+ if noc then say 'Run option ignored as -nocompile specified'
+ else do
+ do forever /* find the file parameters */
+ parse var args file args
+ if file='' then leave
+ if left(file,1)='-' then iterate
+ filename=filespec('n', file); parse var filename fn '.' fe
+ /* Now determine the exact case of the class, for java commands */
+ file=fn'.class'
+ 'ls -l' file ' | rxstack' /* use ls to get exact case */
+ if queued()<>1 then do
+ if queued()=0 then say 'Cannot find file:' file
+ if queued()>1 then do; do queued(); parse pull .; end
+ say 'File "'file'" is not a unique specification'
+ end
+ exit 1; end
+ parse pull file /* is now correct case */
+ parse var file fn '.' fe
+ say 'Running' fn '...'
+ 'java' fn
+ end
+ end
+ end
+
+exit rc
+
diff --git a/java/netrexx/pkg-plist b/java/netrexx/pkg-plist
index fa75efba8d6f..0f9e77e0ecd4 100644
--- a/java/netrexx/pkg-plist
+++ b/java/netrexx/pkg-plist
@@ -1,8 +1,5 @@
-jdk%%JDK_VERSION%%/bin/NetRexxC.bat
jdk%%JDK_VERSION%%/bin/NetRexxC.cmd
-jdk%%JDK_VERSION%%/bin/hello.nrx
-jdk%%JDK_VERSION%%/bin/nrc.bat
-jdk%%JDK_VERSION%%/bin/nrc.cmd
+jdk%%JDK_VERSION%%/bin/nrc
jdk%%JDK_VERSION%%/lib/NetRexxC.zip
jdk%%JDK_VERSION%%/lib/NetRexxR.zip
share/doc/NetRexx/ArchText.class