|
Lines 3936-3942
Link Here
|
| 3936 |
<sect1 id="using-java"> |
3936 |
<sect1 id="using-java"> |
| 3937 |
<title>Using Java</title> |
3937 |
<title>Using Java</title> |
| 3938 |
|
3938 |
|
| 3939 |
<para>This section is yet to be written.</para> |
3939 |
<para>If your port needs a JDK to either build, run or even extract the |
|
|
3940 |
distfile, then it should define <makevar>USE_JAVA</makevar>.</para> |
| 3941 |
|
| 3942 |
<table frame="none"> |
| 3943 |
<title>Variables to be defined by ports that use Java</title> |
| 3944 |
|
| 3945 |
<tgroup cols="2"> |
| 3946 |
<thead> |
| 3947 |
<row> |
| 3948 |
<entry>Variable</entry> |
| 3949 |
<entry>Means</entry> |
| 3950 |
</row> |
| 3951 |
</thead> |
| 3952 |
<tbody> |
| 3953 |
<row> |
| 3954 |
<entry><makevar>USE_JAVA</makevar></entry> |
| 3955 |
<entry>Should be defined for the remaining variables to have any |
| 3956 |
effect.</entry> |
| 3957 |
</row> |
| 3958 |
<row> |
| 3959 |
<entry><makevar>JAVA_VERSION</makevar></entry> |
| 3960 |
<entry>List of space-separated suitable Java versions for the |
| 3961 |
port. An optional <literal>"+"</literal> allows you to specify a |
| 3962 |
range of versions (allowed values: <literal>1.1[+] 1.2[+] 1.3[+] |
| 3963 |
1.4[+]</literal>).</entry> |
| 3964 |
</row> |
| 3965 |
<row> |
| 3966 |
<entry><makevar>JAVA_OS</makevar></entry> |
| 3967 |
<entry>List of space-separated suitable JDK port operating |
| 3968 |
systems for the port (allowed values: <literal>native |
| 3969 |
linux</literal>).</entry> |
| 3970 |
</row> |
| 3971 |
<row> |
| 3972 |
<entry><makevar>JAVA_VENDOR</makevar></entry> |
| 3973 |
<entry>List of space-separated suitable JDK port vendors for the |
| 3974 |
port (allowed values: <literal>freebsd bsdjava sun ibm |
| 3975 |
blackdown</literal>).</entry> |
| 3976 |
</row> |
| 3977 |
<row> |
| 3978 |
<entry><makevar>JAVA_BUILD</makevar></entry> |
| 3979 |
<entry>When set, it means that the selected JDK port should be |
| 3980 |
added to build dependencies of the port.</entry> |
| 3981 |
</row> |
| 3982 |
<row> |
| 3983 |
<entry><makevar>JAVA_RUN</makevar></entry> |
| 3984 |
<entry>This variable works exactly the same as |
| 3985 |
<makevar>JAVA_BUILD</makevar> but regarding run |
| 3986 |
dependencies.</entry> |
| 3987 |
</row> |
| 3988 |
<row> |
| 3989 |
<entry><makevar>JAVA_EXTRACT</makevar></entry> |
| 3990 |
<entry>This variable works exactly the same as |
| 3991 |
<makevar>JAVA_BUILD</makevar> but regarding extract |
| 3992 |
dependencies.</entry> |
| 3993 |
</row> |
| 3994 |
<row> |
| 3995 |
<entry><makevar>USE_JIKES</makevar></entry> |
| 3996 |
<entry>Whether the port should or should not use |
| 3997 |
<command>jikes</command> to build. When no value is set for this |
| 3998 |
variable, the port will use <command>jikes</command> to build if |
| 3999 |
available. You may also explicitely forbid or enforce the use of |
| 4000 |
<command>jikes</command> (by setting <literal>'no'</literal> or |
| 4001 |
<literal>'yes'</literal>). In the later case, <filename |
| 4002 |
role="package">devel/jikes</filename> will be added to build |
| 4003 |
dependencies of the port.</entry> |
| 4004 |
</row> |
| 4005 |
</tbody> |
| 4006 |
</tgroup> |
| 4007 |
</table> |
| 4008 |
|
| 4009 |
<para>Below is the list of all settings a port will receive after setting |
| 4010 |
<makevar>USE_JAVA</makevar>:</para> |
| 4011 |
|
| 4012 |
<table frame="none"> |
| 4013 |
<title>Variables defined for ports that use Java</title> |
| 4014 |
|
| 4015 |
<tgroup cols="2"> |
| 4016 |
<thead> |
| 4017 |
<row> |
| 4018 |
<entry>Variable</entry> |
| 4019 |
<entry>Value</entry> |
| 4020 |
</row> |
| 4021 |
</thead> |
| 4022 |
<tbody> |
| 4023 |
<row> |
| 4024 |
<entry><makevar>JAVA_PORT</makevar></entry> |
| 4025 |
<entry>The name of the JDK port (e.g. |
| 4026 |
<literal>'java/jdk14'</literal>).</entry> |
| 4027 |
</row> |
| 4028 |
<row> |
| 4029 |
<entry><makevar>JAVA_PORT_VERSION</makevar></entry> |
| 4030 |
<entry>The full version of the JDK port (e.g. |
| 4031 |
<literal>'1.4.2'</literal>). If you only need the first two |
| 4032 |
digits of this version number, use |
| 4033 |
<makevar>${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/}</makevar>.</entry> |
| 4034 |
</row> |
| 4035 |
<row> |
| 4036 |
<entry><makevar>JAVA_PORT_OS</makevar></entry> |
| 4037 |
<entry>The operating system used by the JDK port (e.g. |
| 4038 |
<literal>'linux'</literal>).</entry> |
| 4039 |
</row> |
| 4040 |
<row> |
| 4041 |
<entry><makevar>JAVA_PORT_VENDOR</makevar></entry> |
| 4042 |
<entry>The vendor of the JDK port (e.g. |
| 4043 |
<literal>'sun'</literal>).</entry> |
| 4044 |
</row> |
| 4045 |
<row> |
| 4046 |
<entry><makevar>JAVA_PORT_OS_DESCRIPTION</makevar></entry> |
| 4047 |
<entry>Description of the operating system used by the JDK port |
| 4048 |
(e.g. <literal>'Linux'</literal>).</entry> |
| 4049 |
</row> |
| 4050 |
<row> |
| 4051 |
<entry><makevar>JAVA_PORT_VENDOR_DESCRIPTION</makevar></entry> |
| 4052 |
<entry>Description of the vendor of the JDK port (e.g. |
| 4053 |
<literal>'FreeBSD Foundation'</literal>).</entry> |
| 4054 |
</row> |
| 4055 |
<row> |
| 4056 |
<entry><makevar>JAVA_HOME</makevar></entry> |
| 4057 |
<entry>Path to the installation directory of the JDK (e.g. |
| 4058 |
<literal>'/usr/local/jdk1.3.1'</literal>).</entry> |
| 4059 |
</row> |
| 4060 |
<row> |
| 4061 |
<entry><makevar>JAVAC</makevar></entry> |
| 4062 |
<entry>Path to the Java compiler to use (e.g. |
| 4063 |
<literal>'/usr/local/jdk1.1.8/bin/javac'</literal> or |
| 4064 |
<literal>'/usr/local/bin/jikes'</literal>).</entry> |
| 4065 |
</row> |
| 4066 |
<row> |
| 4067 |
<entry><makevar>JAR</makevar></entry> |
| 4068 |
<entry>Path to the JAR tool to use (e.g. |
| 4069 |
<literal>'/usr/local/jdk1.2.2/bin/jar'</literal> or |
| 4070 |
<literal>'/usr/local/bin/fastjar'</literal>).</entry> |
| 4071 |
</row> |
| 4072 |
<row> |
| 4073 |
<entry><makevar>APPLETVIEWER</makevar></entry> |
| 4074 |
<entry>Path to the <command>appletviewer</command> utility (e.g. |
| 4075 |
<literal>'/usr/local/linux-jdk1.2.2/bin/appletviewer'</literal>).</entry> |
| 4076 |
</row> |
| 4077 |
<row> |
| 4078 |
<entry><makevar>JAVA</makevar></entry> |
| 4079 |
<entry>Path to the <command>java</command> executable. Use this |
| 4080 |
for executing Java programs (e.g. |
| 4081 |
<literal>'/usr/local/jdk1.3.1/bin/java'</literal>).</entry> |
| 4082 |
</row> |
| 4083 |
<row> |
| 4084 |
<entry><makevar>JAVADOC</makevar></entry> |
| 4085 |
<entry>Path to the <command>javadoc</command> utility |
| 4086 |
program.</entry> |
| 4087 |
</row> |
| 4088 |
<row> |
| 4089 |
<entry><makevar>JAVAH</makevar></entry> |
| 4090 |
<entry>Path to the <command>javah</command> program.</entry> |
| 4091 |
</row> |
| 4092 |
<row> |
| 4093 |
<entry><makevar>JAVAP</makevar></entry> |
| 4094 |
<entry>Path to the <command>javap</command> program.</entry> |
| 4095 |
</row> |
| 4096 |
<row> |
| 4097 |
<entry><makevar>JAVA_KEYTOOL</makevar></entry> |
| 4098 |
<entry>Path to the <command>keytool</command> utility program. |
| 4099 |
This variable is availble only if the JDK is Java 1.2 or |
| 4100 |
higher.</entry> |
| 4101 |
</row> |
| 4102 |
<row> |
| 4103 |
<entry><makevar>JAVA_N2A</makevar></entry> |
| 4104 |
<entry>Path to the <command>native2ascii</command> tool.</entry> |
| 4105 |
</row> |
| 4106 |
<row> |
| 4107 |
<entry><makevar>JAVA_POLICYTOOL</makevar></entry> |
| 4108 |
<entry>Path to the <command>policytool</command> program. This |
| 4109 |
variable is available only if the JDK is Java 1.2 or |
| 4110 |
higher.</entry> |
| 4111 |
</row> |
| 4112 |
<row> |
| 4113 |
<entry><makevar>JAVA_SERIALVER</makevar></entry> |
| 4114 |
<entry>Path to the <command>serialver</command> utility |
| 4115 |
program.</entry> |
| 4116 |
</row> |
| 4117 |
<row> |
| 4118 |
<entry><makevar>RMIC</makevar></entry> |
| 4119 |
<entry>Path to the RMI stub/skeleton generator, |
| 4120 |
<command>rmic</command>.</entry> |
| 4121 |
</row> |
| 4122 |
<row> |
| 4123 |
<entry><makevar>RMIREGISTRY</makevar></entry> |
| 4124 |
<entry>Path to the RMI registry program, |
| 4125 |
<command>rmiregistry</command>.</entry> |
| 4126 |
</row> |
| 4127 |
<row> |
| 4128 |
<entry><makevar>RMID</makevar></entry> |
| 4129 |
<entry>Path to the RMI daemon program. This variable is only |
| 4130 |
available if the JDK is Java 1.2 or higher.</entry> |
| 4131 |
</row> |
| 4132 |
<row> |
| 4133 |
<entry><makevar>JAVA_CLASSES</makevar></entry> |
| 4134 |
<entry>Path to the archive that contains the JDK class files. On |
| 4135 |
JDK 1.2 or later, this is |
| 4136 |
<literal>${JAVA_HOME}/jre/lib/rt.jar</literal>. Earlier JDK's use |
| 4137 |
<literal>${JAVA_HOME}/lib/classes.zip</literal>.</entry> |
| 4138 |
</row> |
| 4139 |
</tbody> |
| 4140 |
</tgroup> |
| 4141 |
</table> |
| 4142 |
|
| 4143 |
<para>You may use the <literal>java-debug</literal> make target to get |
| 4144 |
information for debugging your port. It will display the value of many of |
| 4145 |
the forecited variables.</para> |
| 4146 |
|
| 3940 |
</sect1> |
4147 |
</sect1> |
| 3941 |
|
4148 |
|
| 3942 |
<sect1 id="using-python"> |
4149 |
<sect1 id="using-python"> |