updating my port to bsd.java.mk options

updating my port to bsd.java.mk options

Post by ronald-fre » Sat, 24 Apr 2004 02:32:18


Hello,

Is this patch correct to update my port to the new bsd.java.mk?
Do I need to set JAVA_BUILD or JAVA_RUN? And what are valid values for
these?
It uses javac while building and is a library to run with java. That's why
it needs native java.
Any comments before I send a PR for this?

Greetings,

Ronald.
PS: It al builds/runs ok here (but I already have jdk14 installed).

diff -ur /usr/ports/java/jmp/Makefile jmp/Makefile
--- /usr/ports/java/jmp/Makefile Mon Apr 5 18:54:38 2004
+++ jmp/Makefile Thu Apr 22 19:14:45 2004
@@ -35,7 +35,9 @@

USE_LIBTOOL_VER=13
USE_GMAKE= yes
-USE_JAVA= 1.2+
+USE_JAVA= yes
+JAVA_VERSION= 1.2+
+JAVA_OS= native
NEED_JAVAC= yes

MAKE_FLAGS= JAVAC=${JAVAC} JAVAH=${JAVAH}


--
Using M2, Opera's revolutionary e-mail client: http://www.yqcomputer.com/
_______________________________________________
XXXX@XXXXX.COM mailing list
http://www.yqcomputer.com/
To unsubscribe, send any mail to " XXXX@XXXXX.COM "
 
 
 

updating my port to bsd.java.mk options

Post by herve.quir » Sat, 24 Apr 2004 03:01:09

--Nq2Wo0NMKNjxTN9z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Ronald,

Good initiative indeed! :)

NEED_JAVAC has been deprecated as well. Now JAVA_BUILD (and respectively
JAVA_RUN) allows two values: 'jdk' or 'jre'. When JAVA_BUILD=jdk, it
means that a compiler is needed, which is the same as setting
NEED_JAVAC=yes as before.

When nothing is set (neither JAVA_BUILD nor JAVA_RUN), bsd.java.mk
assumes the folloing default values:

JAVA_BUILD= jdk
JAVA_RUN= jre

So your patch is correct is this regard. You just need to remove the
NEED_JAVAC statement. I tested it on my box and it seems to work. I said
"seems" because I have a build error. I've attached the log just in
case. I haven't got enough time to debug it myself at the moment so if
you know the problem, please tell me (I'll investigate myself in a few
days otherwise).

BTW, I had trouble with your diff file: probably a cut-n-paste error but
all tabs were replaced by spaces in your message.

Herve

On Thu, Apr 22, 2004 at 07:28:50PM +0200, Ronald Klop wrote:

--Nq2Wo0NMKNjxTN9z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=mylog

===> Building for jmp-0.41_1
gmake: `Makefile' is up to date.
gmake all-recursive
gmake[1]: Entering directory `/usr/ports/java/jmp/work/jmp-0.41'
Making all in intl
gmake[2]: Entering directory `/usr/ports/java/jmp/work/jmp-0.41/intl'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/usr/ports/java/jmp/work/jmp-0.41/intl'
Making all in po
gmake[2]: Entering directory `/usr/ports/java/jmp/work/jmp-0.41/po'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/usr/ports/java/jmp/work/jmp-0.41/po'
Making all in java
gmake[2]: Entering directory `/usr/ports/java/jmp/work/jmp-0.41/java'
Making all in jmp
gmake[3]: Entering directory `/usr/ports/java/jmp/work/jmp-0.41/java/jmp'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/usr/ports/java/jmp/work/jmp-0.41/java/jmp'
gmake[3]: Entering directory `/usr/ports/java/jmp/work/jmp-0.41/java'
gmake[3]: Nothing to be done for `all-am'.
gmake[3]: Leaving directory `/usr/ports/java/jmp/work/jmp-0.41/java'
gmake[2]: Leaving directory `/usr/ports/java/jmp/work/jmp-0.41/java'
Making all in javadoc
gmake[2]: Entering directory `/usr/ports/java/jmp/work/jmp-0.41/javadoc'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/usr/ports/java/jmp/work/jmp-0.41/javadoc'
Making all in jvmsimulator
gmake[2]: Entering directory `/usr/ports/java/jmp/work/jmp-0.41/jvmsimulator'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/usr/ports/java/jmp/work/jmp-0.41/jvmsimulator'
gmake[2]: Entering directory `/usr/ports/java/jmp/work/jmp-0.41'
sourcepath java -d . java/jmp/JMPController.java
gmake[2]: sourcepath: Command not found
gmake[2]: [jmp/JMPController.class] Error 127 (ignored)
/usr/local/jdk1.4.2/bin/javah jmp.JMPController
Error: Class jmp.JMPController could not be found.
gmake[2]: *** [jmp_JMPController.h] Error 15
gmake[2]: Leaving directory `/usr/ports/java/jmp/work/jmp-0.41'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/java/jmp/work/jmp-0.41'
gmake: *** [all-recursive-am] Error 2
*** Error code 2

Stop in /usr/ports/java/jmp.

--Nq2Wo0NMKNjxTN9z
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Conten
 
 
 

updating my port to bsd.java.mk options

Post by ronald-fre » Sat, 24 Apr 2004 03:51:47

On Thu, 22 Apr 2004 19:57:58 +0200, Herve Quiroz



Thanks.


Maybe this can be documented in bsd.java.mk. (Or is it already documented
somewhere?)


I see the same problem. It's happens when NEED_JAVAC is removed. I'll
investigate this later, because I have a basketball game to win in half an
hour.

Ronald.

--
Using M2, Opera's revolutionary e-mail client: http://www.yqcomputer.com/
_______________________________________________
XXXX@XXXXX.COM mailing list
http://www.yqcomputer.com/
To unsubscribe, send any mail to " XXXX@XXXXX.COM "
 
 
 

updating my port to bsd.java.mk options

Post by herve.quir » Sat, 24 Apr 2004 04:31:12


It's part of the just-in-time fixes we applied to bsd.java.mk so it's
not yet documented. But as soon as the ports tree is unfrozen, I'll do
that.


Ok I'll check that as well.

BTW, have a good play!

Herve
_______________________________________________
XXXX@XXXXX.COM mailing list
http://www.yqcomputer.com/
To unsubscribe, send any mail to " XXXX@XXXXX.COM "
 
 
 

updating my port to bsd.java.mk options

Post by ronald-fre » Sat, 24 Apr 2004 09:24:03

--Boundary_(ID_zeAXgAnZxw/1OdG/5LvlBw)
Content-type: text/plain; format=flowed; charset=iso-8859-1
Content-transfer-encoding: 7BIT

On Thu, 22 Apr 2004 21:19:52 +0200, Herve Quiroz
< XXXX@XXXXX.COM > wrote:


When I look at bsd.java.mk I see that JAVAC is only defined if
NEED_JAVAC=yes.
I think this is the problem. JAVAH is always defined for example.
I attached a patch to bsd.java.mk which fixes my problem. But I don't know
if it is wanted for other ports.
And I attached a latest version of the patch to my port.


We did win!

Cheers,

Ronald.

--
Amsterdam, The Netherlands

--Boundary_(ID_zeAXgAnZxw/1OdG/5LvlBw)
Content-type: application/octet-stream; name=bsd.java.mk.patch
Content-transfer-encoding: 8bit
Content-disposition: attachment; filename=bsd.java.mk.patch

--- bsd.java.mk.orig Fri Apr 23 02:08:06 2004
+++ bsd.java.mk Fri Apr 23 02:06:48 2004
@@ -528,6 +528,9 @@
APPLETVIEWER= ${JAVA_HOME}/bin/appletviewer
JAR= ${JAVA_HOME}/bin/jar
JAVA= ${JAVA_HOME}/bin/java
+.if !defined(JAVAC)
+JAVAC= ${JAVA_HOME}/bin/javac
+.endif
JAVADOC= ${JAVA_HOME}/bin/javadoc
JAVAH= ${JAVA_HOME}/bin/javah
JAVAP= ${JAVA_HOME}/bin/javap

--Boundary_(ID_zeAXgAnZxw/1OdG/5LvlBw)
Content-type: application/octet-stream; name=jmp.Makefile.patch
Content-transfer-encoding: 8bit
Content-disposition: attachment; filename=jmp.Makefile.patch

diff -ur /usr/ports/java/jmp/Makefile jmp/Makefile
--- /usr/ports/java/jmp/Makefile Mon Apr 5 18:54:38 2004
+++ jmp/Makefile Fri Apr 23 02:10:27 2004
@@ -35,8 +35,9 @@

USE_LIBTOOL_VER=13
USE_GMAKE= yes
-USE_JAVA= 1.2+
-NEED_JAVAC= yes
+USE_JAVA= yes
+JAVA_VERSION= 1.2+
+JAVA_OS= native

MAKE_FLAGS= JAVAC=${JAVAC} JAVAH=${JAVAH}

Only in jmp: work

--Boundary_(ID_zeAXgAnZxw/1OdG/5LvlBw)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
XXXX@XXXXX.COM mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to " XXXX@XXXXX.COM "

--Boundary_(ID_zeAXgAnZxw/1OdG/5LvlBw)--