Add extensive information about porting with Java.
PR: docs/66633 Submitted by: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr> Approved by: ceri (mentor)
This commit is contained in:
parent
d470924251
commit
2eea2fcdfe
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=20943
1 changed files with 215 additions and 1 deletions
|
@ -3936,7 +3936,221 @@ LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
|
|||
<sect1 id="using-java">
|
||||
<title>Using Java</title>
|
||||
|
||||
<para>This section is yet to be written.</para>
|
||||
<para>If your port needs a Java™ Development Kit (JDK) to
|
||||
either build, run or even extract the distfile, then it should
|
||||
define <makevar>USE_JAVA</makevar>.</para>
|
||||
|
||||
<para>There are several JDKs in the ports collection, from various
|
||||
vendors, and in several versions. If your port must use one of
|
||||
these versions, you can define which one. The most current
|
||||
version is <filename role="package">java/jdk14</filename>.</para>
|
||||
|
||||
<table frame="none">
|
||||
<title>Variables to be defined by ports that use Java</title>
|
||||
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Variable</entry>
|
||||
<entry>Means</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><makevar>USE_JAVA</makevar></entry>
|
||||
<entry>Should be defined for the remaining variables to have any
|
||||
effect.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_VERSION</makevar></entry>
|
||||
<entry>List of space-separated suitable Java versions for
|
||||
the port. An optional <literal>"+"</literal> allows you to
|
||||
specify a range of versions (allowed values:
|
||||
<literal>1.1[+] 1.2[+] 1.3[+] 1.4[+]</literal>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_OS</makevar></entry>
|
||||
<entry>List of space-separated suitable JDK port operating
|
||||
systems for the port (allowed values: <literal>native
|
||||
linux</literal>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_VENDOR</makevar></entry>
|
||||
<entry>List of space-separated suitable JDK port vendors for
|
||||
the port (allowed values: <literal>freebsd bsdjava sun ibm
|
||||
blackdown</literal>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_BUILD</makevar></entry>
|
||||
<entry>When set, it means that the selected JDK port should
|
||||
be added to the build dependencies of the port.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_RUN</makevar></entry>
|
||||
<entry>When set, it means that the selected JDK port should
|
||||
be added to the run dependencies of the port.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_EXTRACT</makevar></entry>
|
||||
<entry>When set, it means that the selected JDK port should
|
||||
be added to the extract dependencies of the port.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>USE_JIKES</makevar></entry>
|
||||
<entry>Whether the port should or should not use the
|
||||
<command>jikes</command> bytecode compiler to build. When
|
||||
no value is set for this variable, the port will use
|
||||
<command>jikes</command> to build if available. You may
|
||||
also explicitely forbid or enforce the use of
|
||||
<command>jikes</command> (by setting <literal>'no'</literal>
|
||||
or <literal>'yes'</literal>). In the later case, <filename
|
||||
role="package">devel/jikes</filename> will be added to build
|
||||
dependencies of the port.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<para>Below is the list of all settings a port will receive after
|
||||
setting <makevar>USE_JAVA</makevar>:</para>
|
||||
|
||||
<table frame="none">
|
||||
<title>Variables defined for ports that use Java</title>
|
||||
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Variable</entry>
|
||||
<entry>Value</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><makevar>JAVA_PORT</makevar></entry>
|
||||
<entry>The name of the JDK port (e.g.
|
||||
<literal>'java/jdk14'</literal>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_PORT_VERSION</makevar></entry>
|
||||
<entry>The full version of the JDK port (e.g.
|
||||
<literal>'1.4.2'</literal>). If you only need the first
|
||||
two digits of this version number, use
|
||||
<makevar>${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/}</makevar>.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_PORT_OS</makevar></entry>
|
||||
<entry>The operating system used by the JDK port (e.g.
|
||||
<literal>'linux'</literal>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_PORT_VENDOR</makevar></entry>
|
||||
<entry>The vendor of the JDK port (e.g.
|
||||
<literal>'sun'</literal>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_PORT_OS_DESCRIPTION</makevar></entry>
|
||||
<entry>Description of the operating system used by the JDK port
|
||||
(e.g. <literal>'Linux'</literal>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_PORT_VENDOR_DESCRIPTION</makevar></entry>
|
||||
<entry>Description of the vendor of the JDK port (e.g.
|
||||
<literal>'FreeBSD Foundation'</literal>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_HOME</makevar></entry>
|
||||
<entry>Path to the installation directory of the JDK (e.g.
|
||||
<filename>'/usr/local/jdk1.3.1'</filename>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVAC</makevar></entry>
|
||||
<entry>Path to the Java compiler to use (e.g.
|
||||
<filename>'/usr/local/jdk1.1.8/bin/javac'</filename> or
|
||||
<filename>'/usr/local/bin/jikes'</filename>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAR</makevar></entry>
|
||||
<entry>Path to the <command>jar</command> tool to use (e.g.
|
||||
<filename>'/usr/local/jdk1.2.2/bin/jar'</filename> or
|
||||
<filename>'/usr/local/bin/fastjar'</filename>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>APPLETVIEWER</makevar></entry>
|
||||
<entry>Path to the <command>appletviewer</command> utility (e.g.
|
||||
<filename>'/usr/local/linux-jdk1.2.2/bin/appletviewer'</filename>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA</makevar></entry>
|
||||
<entry>Path to the <command>java</command> executable. Use
|
||||
this for executing Java programs (e.g.
|
||||
<filename>'/usr/local/jdk1.3.1/bin/java'</filename>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVADOC</makevar></entry>
|
||||
<entry>Path to the <command>javadoc</command> utility
|
||||
program.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVAH</makevar></entry>
|
||||
<entry>Path to the <command>javah</command> program.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVAP</makevar></entry>
|
||||
<entry>Path to the <command>javap</command> program.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_KEYTOOL</makevar></entry>
|
||||
<entry>Path to the <command>keytool</command> utility program.
|
||||
This variable is availble only if the JDK is Java 1.2 or
|
||||
higher.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_N2A</makevar></entry>
|
||||
<entry>Path to the <command>native2ascii</command> tool.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_POLICYTOOL</makevar></entry>
|
||||
<entry>Path to the <command>policytool</command> program.
|
||||
This variable is available only if the JDK is Java 1.2 or
|
||||
higher.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_SERIALVER</makevar></entry>
|
||||
<entry>Path to the <command>serialver</command> utility
|
||||
program.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>RMIC</makevar></entry>
|
||||
<entry>Path to the RMI stub/skeleton generator,
|
||||
<command>rmic</command>.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>RMIREGISTRY</makevar></entry>
|
||||
<entry>Path to the RMI registry program,
|
||||
<command>rmiregistry</command>.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>RMID</makevar></entry>
|
||||
<entry>Path to the RMI daemon program <command>rmid</command>.
|
||||
This variable is only available if the JDK is Java 1.2
|
||||
or higher.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><makevar>JAVA_CLASSES</makevar></entry>
|
||||
<entry>Path to the archive that contains the JDK class
|
||||
files. On JDK 1.2 or later, this is
|
||||
<filename>${JAVA_HOME}/jre/lib/rt.jar</filename>. Earlier
|
||||
JDKs used
|
||||
<filename>${JAVA_HOME}/lib/classes.zip</filename>.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<para>You may use the <literal>java-debug</literal> make target
|
||||
to get information for debugging your port. It will display the
|
||||
value of many of the forecited variables.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="using-python">
|
||||
|
|
Loading…
Reference in a new issue