2002-03-28 06:24:43 -05:00
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
#
# bsd.java.mk - Support for Java-based ports.
#
# Created by: Ernst de Haan <znerd@FreeBSD.org>
#
# For FreeBSD committers:
# Please send all suggested changes to the maintainer instead of committing
# them to CVS yourself.
#
# $FreeBSD$
#
. i f ! d e f i n e d ( J a v a _ I n c l u d e )
Java_Include = bsd.java.mk
Java_Include_MAINTAINER = znerd@FreeBSD.org
2002-04-04 18:01:24 -05:00
#
# There are the following stages:
#
# Stage 1: Define constants
2002-06-18 09:14:30 -04:00
# Stage 2: Deal with JAVA_HOME if it is already set
# Stage 3: Determine which JDK ports are installed
# Stage 4: Decide the exact JDK version if only a minimum version is specified
# Stage 5: Decide the exact JDK to use
# Stage 6: Define all settings for the port to use
# Stage 7: Add any dependencies if necessary
2002-04-04 18:01:24 -05:00
#
2002-03-28 06:24:43 -05:00
. i f d e f i n e d ( U S E _ J A V A )
#-----------------------------------------------------------------------------
# Stage 1: Define constants
#
# The complete list of Java versions supported.
_JAVA_VERSIONS = 1.1 1.2 1.3 1.4
# Set the JAVA_HOME directories for all recognized JDK's
_JAVA_HOME_FREEBSD_1_1 = ${ LOCALBASE } /jdk1.1.8
_JAVA_HOME_FREEBSD_1_2 = ${ LOCALBASE } /jdk1.2.2
_JAVA_HOME_FREEBSD_1_3 = ${ LOCALBASE } /jdk1.3.1
2002-08-10 05:03:47 -04:00
_JAVA_HOME_BLACKDOWN_LINUX_1_2 = ${ LOCALBASE } /linux-blackdown-jdk1.2.2
2002-08-07 16:36:04 -04:00
_JAVA_HOME_SUN_LINUX_1_2 = ${ LOCALBASE } /linux-sun-jdk1.2.2
2002-05-09 07:00:02 -04:00
_JAVA_HOME_BLACKDOWN_LINUX_1_3 = ${ LOCALBASE } /linux-blackdown-jdk1.3.1
2002-04-26 19:23:02 -04:00
_JAVA_HOME_IBM_LINUX_1_3 = ${ LOCALBASE } /linux-ibm-jdk1.3.1
2002-08-10 06:31:09 -04:00
_JAVA_HOME_SUN_LINUX_1_3 = ${ LOCALBASE } /linux-sun-jdk1.3.1
2002-06-25 09:12:13 -04:00
_JAVA_HOME_SUN_LINUX_1_4 = ${ LOCALBASE } /linux-jdk1.4.0.01
2002-03-28 06:24:43 -05:00
# Set the JDK ports for all recognized JDK's
2002-06-12 16:51:19 -04:00
_JAVA_PORT_FREEBSD_1_1 = java/jdk11
_JAVA_PORT_FREEBSD_1_2 = java/jdk12
2002-03-28 06:24:43 -05:00
_JAVA_PORT_FREEBSD_1_3 = java/jdk13
2002-06-12 16:51:19 -04:00
_JAVA_PORT_BLACKDOWN_LINUX_1_2 = java/linux-blackdown-jdk12
2002-05-09 07:00:02 -04:00
_JAVA_PORT_BLACKDOWN_LINUX_1_3 = java/linux-blackdown-jdk13
2002-03-28 06:24:43 -05:00
_JAVA_PORT_IBM_LINUX_1_3 = java/linux-ibm-jdk13
2002-06-12 16:51:19 -04:00
_JAVA_PORT_SUN_LINUX_1_2 = java/linux-sun-jdk12
_JAVA_PORT_SUN_LINUX_1_3 = java/linux-sun-jdk13
_JAVA_PORT_SUN_LINUX_1_4 = java/linux-sun-jdk14
2002-03-28 06:24:43 -05:00
# Set the name of the file that indicates that a JDK is indeed installed, as a
# relative path within the JAVA_HOME directory.
2002-04-04 18:01:24 -05:00
_JDK_FILE = bin/javac
2002-03-28 06:24:43 -05:00
# Set the path to Jikes and define the Jikes dependency
_JIKES_PATH = ${ LOCALBASE } /bin/jikes
_DEPEND_JIKES = ${ _JIKES_PATH } :${ PORTSDIR } /java/jikes
#-----------------------------------------------------------------------------
2002-06-18 09:14:30 -04:00
# Stage 2: Determine which JDK ports are installed
2002-05-02 08:46:56 -04:00
#
. u n d e f H A V E _ J A V A _ F R E E B S D _ 1 _ 1
. u n d e f H A V E _ J A V A _ F R E E B S D _ 1 _ 2
. u n d e f H A V E _ J A V A _ F R E E B S D _ 1 _ 3
. u n d e f H A V E _ J A V A _ B L A C K D O W N _ L I N U X _ 1 _ 2
. u n d e f H A V E _ J A V A _ S U N _ L I N U X _ 1 _ 2
2002-05-09 07:00:02 -04:00
. u n d e f H A V E _ J A V A _ B L A C K D O W N _ L I N U X _ 1 _ 3
2002-05-02 08:46:56 -04:00
. u n d e f H A V E _ J A V A _ S U N _ L I N U X _ 1 _ 3
. u n d e f H A V E _ J A V A _ I B M _ L I N U X _ 1 _ 3
. u n d e f H A V E _ J A V A _ S U N _ L I N U X _ 1 _ 4
. i f e x i s t s ( $ { _ J A V A _ H O M E _ F R E E B S D _ 1 _ 1 } / $ { _ J D K _ F I L E } )
HAVE_JAVA_FREEBSD_1_1 = YES
. e n d i f
. i f e x i s t s ( $ { _ J A V A _ H O M E _ F R E E B S D _ 1 _ 2 } / $ { _ J D K _ F I L E } )
HAVE_JAVA_FREEBSD_1_2 = YES
. e n d i f
. i f e x i s t s ( $ { _ J A V A _ H O M E _ F R E E B S D _ 1 _ 3 } / $ { _ J D K _ F I L E } )
HAVE_JAVA_FREEBSD_1_3 = YES
. e n d i f
. i f e x i s t s ( $ { _ J A V A _ H O M E _ B L A C K D O W N _ L I N U X _ 1 _ 2 } / $ { _ J D K _ F I L E } )
HAVE_JAVA_BLACKDOWN_LINUX_1_2 = YES
. e n d i f
. i f e x i s t s ( $ { _ J A V A _ H O M E _ S U N _ L I N U X _ 1 _ 2 } / $ { _ J D K _ F I L E } )
HAVE_JAVA_SUN_LINUX_1_2 = YES
. e n d i f
2002-05-09 07:00:02 -04:00
. i f e x i s t s ( $ { _ J A V A _ H O M E _ B L A C K D O W N _ L I N U X _ 1 _ 3 } / $ { _ J D K _ F I L E } )
HAVE_JAVA_BLACKDOWN_LINUX_1_3 = YES
. e n d i f
2002-05-02 08:46:56 -04:00
. i f e x i s t s ( $ { _ J A V A _ H O M E _ S U N _ L I N U X _ 1 _ 3 } / $ { _ J D K _ F I L E } )
HAVE_JAVA_SUN_LINUX_1_3 = YES
. e n d i f
. i f e x i s t s ( $ { _ J A V A _ H O M E _ I B M _ L I N U X _ 1 _ 3 } / $ { _ J D K _ F I L E } )
HAVE_JAVA_IBM_LINUX_1_3 = YES
. e n d i f
. i f e x i s t s ( $ { _ J A V A _ H O M E _ S U N _ L I N U X _ 1 _ 4 } / $ { _ J D K _ F I L E } )
HAVE_JAVA_SUN_LINUX_1_4 = YES
. e n d i f
#-----------------------------------------------------------------------------
2002-06-18 09:14:30 -04:00
# Stage 3: Deal with JAVA_HOME if it is already set
2002-03-28 06:24:43 -05:00
#
# See if JAVA_HOME points to a known JDK. If it does, then undefine JAVA_HOME
# and actually use JAVA_PORT instead, so that we do not screw with our
# dependencies.
. i f d e f i n e d ( J A V A _ H O M E )
_JAVA_HOME = ${ JAVA_HOME }
. u n d e f ( J A V A _ H O M E )
. i f ${_JAVA_HOME} = = ${ _JAVA_HOME_FREEBSD_1_1 }
JAVA_PORT = ${ _JAVA_PORT_FREEBSD_1_1 }
. e l i f ${_JAVA_HOME} = = ${ _JAVA_HOME_FREEBSD_1_2 }
JAVA_PORT = ${ _JAVA_PORT_FREEBSD_1_2 }
. e l i f ${_JAVA_HOME} = = ${ _JAVA_HOME_FREEBSD_1_3 }
JAVA_PORT = ${ _JAVA_PORT_FREEBSD_1_3 }
. e l i f ${_JAVA_HOME} = = ${ _JAVA_HOME_BLACKDOWN_LINUX_1_2 }
JAVA_PORT = ${ _JAVA_PORT_BLACKDOWN_LINUX_1_2 }
2002-04-26 19:39:17 -04:00
. e l i f ${_JAVA_HOME} = = ${ _JAVA_HOME_SUN_LINUX_1_2 }
JAVA_PORT = ${ _JAVA_PORT_SUN_LINUX_1_2 }
2002-05-09 07:00:02 -04:00
. e l i f ${_JAVA_HOME} = = ${ _JAVA_HOME_BLACKDOWN_LINUX_1_3 }
JAVA_PORT = ${ _JAVA_PORT_BLACKDOWN_LINUX_1_3 }
2002-03-28 06:24:43 -05:00
. e l i f ${_JAVA_HOME} = = ${ _JAVA_HOME_IBM_LINUX_1_3 }
JAVA_PORT = ${ _JAVA_PORT_IBM_LINUX_1_3 }
. e l i f ${_JAVA_HOME} = = ${ _JAVA_HOME_SUN_LINUX_1_3 }
JAVA_PORT = ${ _JAVA_PORT_SUN_LINUX_1_3 }
. e l i f ${_JAVA_HOME} = = ${ _JAVA_HOME_SUN_LINUX_1_4 }
JAVA_PORT = ${ _JAVA_PORT_SUN_LINUX_1_4 }
. e l s e
JAVA_HOME = ${ _JAVA_HOME }
. e n d i f
. e n d i f
#-----------------------------------------------------------------------------
2002-06-18 09:14:30 -04:00
# Stage 4: Decide the exact JDK version if only a minimum version is specified
2002-03-28 06:24:43 -05:00
#
# If USE_JAVA is 1.1+, 1.2+, 1.3+ or 1.4+, then set it to 1.1, 1.2, 1.3 or
# 1.4, depending on what JDK's are already installed. The FreeBSD JDK will be
# preferred. The Sun JDK 1.4 for Linux is always the least preferred JDK.
# However, the most respected rule is that if a JDK is already installed, then
# no JDK will be downloaded unless necessary.
#
# The following rules will be used, per setting:
#
# If the setting is 1.1+, then use an existing 1.2 or 1.3 JDK if installed,
# otherwise use the JDK 1.1.8 for FreeBSD if it is already installed. If no
# other JDK than the Sun JDK 1.4 for Linux is installed, then that one will be
# used. It is the least preferred alternative.
#
# If the setting is 1.2+, then use an already installed 1.2, 1.3 or 1.4 JDK.
# If there is no such JDK, then set USE_JAVA to 1.2. An 1.3 JDK is preferred
# over 1.2 JDK's.
#
# If the setting is 1.3+, then see if the Sun JDK 1.4 for Linux is installed,
# while no 1.3 JDK's are installed. If that is the case, then USE_JAVA will be
# set to 1.4. Otherwise it will be set to 1.3. All 1.3 JDK's are currently
# preferred over a 1.4.0 JDK since it is considered less stable.
#
# If the setting is 1.4+, then set it to 1.4 right away. There is no other
# option at the moment.
. i f (${USE_JAVA} = = "1.1+" )
2002-05-02 08:46:56 -04:00
. i f d e f i n e d ( H A V E _ J A V A _ F R E E B S D _ 1 _ 3 ) | | \
defined( HAVE_JAVA_SUN_LINUX_1_3) || \
defined( HAVE_JAVA_IBM_LINUX_1_3)
2002-03-28 06:24:43 -05:00
USE_JAVA = 1.3
2002-05-02 08:46:56 -04:00
. e l i f d e f i n e d ( H A V E _ J A V A _ F R E E B S D _ 1 _ 2 ) | | \
defined( HAVE_JAVA_BLACKDOWN_LINUX_1_2) || \
defined( HAVE_JAVA_SUN_LINUX_1_2)
2002-03-28 06:24:43 -05:00
USE_JAVA = 1.2
2002-05-02 08:46:56 -04:00
. e l i f ! d e f i n e d ( H A V E _ J A V A _ S U N _ L I N U X _ 1 _ 4 )
2002-03-28 06:24:43 -05:00
USE_JAVA = 1.1
. e l s e
USE_JAVA = 1.4
. e n d i f
. e l i f (${USE_JAVA} = = "1.2+" )
2002-05-02 08:46:56 -04:00
. i f d e f i n e d ( H A V E _ J A V A _ F R E E B S D _ 1 _ 3 ) | | \
defined( HAVE_JAVA_SUN_LINUX_1_3) || \
defined( HAVE_JAVA_IBM_LINUX_1_3)
2002-03-28 06:24:43 -05:00
USE_JAVA = 1.3
2002-05-02 08:46:56 -04:00
. e l i f ! d e f i n e d ( H A V E _ J A V A _ S U N _ L I N U X _ 1 _ 4 )
2002-03-28 06:24:43 -05:00
USE_JAVA = 1.2
. e l s e
USE_JAVA = 1.4
. e n d i f
. e l i f (${USE_JAVA} = = "1.3+" )
2002-05-02 08:46:56 -04:00
. i f d e f i n e d ( H A V E _ J A V A _ F R E E B S D _ 1 _ 3 ) | | \
defined( HAVE_JAVA_SUN_LINUX_1_3) || \
defined( HAVE_JAVA_IBM_LINUX_1_3) || \
!defined( HAVE_JAVA_SUN_LINUX_1_4)
2002-03-28 06:24:43 -05:00
USE_JAVA = 1.3
. e l s e
USE_JAVA = 1.4
. e n d i f
. e l i f (${USE_JAVA} = = "1.4+" )
USE_JAVA = 1.4
. e l s e
.BEGIN :
@${ ECHO } " ${ Java_Include } : Internal error. \" ${ USE_JAVA } \" is not caught as a valid value for USE_JAVA. Please send an email to ${ Java_Include_MAINTAINER } with a detailed description of what you did and what the output was. " ;
@${ FALSE }
. e n d i f
#-----------------------------------------------------------------------------
2002-06-18 09:14:30 -04:00
# Stage 5: Decide the exact JDK to use
2002-03-28 06:24:43 -05:00
#
# Apply different settings for different values of USE_JAVA.
#
# If the port needs Java 1.1, then there's only one choice, the JDK 1.1.8 for
# FreeBSD.
. i f (${USE_JAVA} = = "1.1" )
JAVA_VENDOR = FreeBSD
JAVA_VER = 1.1.8
JAVA_OS = FreeBSD
JAVA_HOME = ${ _JAVA_HOME_FREEBSD_1_1 }
JAVA_PORT = ${ _JAVA_PORT_FREEBSD_1_1 }
# If the port needs Java 1.2, then there are 2 choices. They are, in order or
# preference:
#
# (1) JDK 1.2.2 for FreeBSD
# (2) Blackdown JDK 1.2.2 for Linux
#
2002-04-26 19:39:17 -04:00
# If either the Blackdown or Sun JDK 1.2.2 (both for Linux) is installed, but
# the FreeBSD JDK 1.2.2 is *not* installed, then the installed Linux JDK will
# be used as the dependency. Otherwise the FreeBSD JDK 1.2.2 will be used as
# the dependency.
#
# The FreeBSD JDK 1.2 is preferred over the Linux JDK's. Among these, the
# Blackdown JDK is preferred over the Sun JDK.
2002-03-28 06:24:43 -05:00
. e l i f ${USE_JAVA} = = "1.2"
2002-05-02 08:46:56 -04:00
. i f d e f i n e d ( H A V E _ J A V A _ B L A C K D O W N _ L I N U X _ 1 _ 2 ) \
&& !defined( HAVE_JAVA_FREEBSD_1_2)
2002-03-28 06:24:43 -05:00
JAVA_VENDOR = Blackdown
JAVA_VER = 1.2.2
JAVA_OS = Linux
JAVA_HOME = ${ _JAVA_HOME_BLACKDOWN_LINUX_1_2 }
JAVA_PORT = ${ _JAVA_PORT_BLACKDOWN_LINUX_1_2 }
2002-05-02 08:46:56 -04:00
. e l i f d e f i n e d ( H A V E _ J A V A _ S U N _ L I N U X _ 1 _ 2 ) \
&& !defined( HAVE_JAVA_FREEBSD_1_2)
2002-04-26 19:39:17 -04:00
JAVA_VENDOR = Sun
JAVA_VER = 1.2.2
JAVA_OS = Linux
JAVA_HOME = ${ _JAVA_HOME_SUN_LINUX_1_2 }
JAVA_PORT = ${ _JAVA_PORT_SUN_LINUX_1_2 }
2002-03-28 06:24:43 -05:00
. e l s e
JAVA_VENDOR = FreeBSD
JAVA_VER = 1.2.2
JAVA_OS = FreeBSD
JAVA_HOME = ${ _JAVA_HOME_FREEBSD_1_2 }
2002-04-02 03:57:28 -05:00
JAVA_PORT = ${ _JAVA_PORT_FREEBSD_1_2 }
2002-03-28 06:24:43 -05:00
. e n d i f
2002-05-09 07:00:02 -04:00
# If the port needs Java 1.3, then there are 4 choices. They are, in order or
2002-03-28 06:24:43 -05:00
# preference:
#
# (1) JDK 1.3.1 for FreeBSD
# (2) Sun JDK 1.3.1 for Linux
# (3) IBM JDK 1.3.1 for Linux
2002-05-13 08:25:18 -04:00
# (4) Blackdown JDK 1.3.1 for Linux
2002-03-28 06:24:43 -05:00
#
# If the FreeBSD JDK 1.3.1 is installed or if none of the 1.3.1 JDK's is
# installed, then the FreeBSD JDK 1.3.1 is used as a dependency for the port.
#
2002-05-09 07:00:02 -04:00
# Otherwise, one of the installed Linux JDKs is chosen, based on their
# preferences.
2002-03-28 06:24:43 -05:00
. e l i f ${USE_JAVA} = = "1.3"
2002-05-09 07:00:02 -04:00
. i f d e f i n e d ( H A V E _ J A V A _ B L A C K D O W N _ L I N U X _ 1 _ 3 ) \
&& !defined( HAVE_JAVA_IBM_LINUX_1_3) \
&& !defined( HAVE_JAVA_SUN_LINUX_1_3) \
&& !defined( HAVE_JAVA_FREEBSD_1_3)
JAVA_VENDOR = Blackdown
JAVA_VER = 1.3.1
JAVA_OS = Linux
JAVA_HOME = ${ _JAVA_HOME_BLACKDOWN_LINUX_1_3 }
JAVA_PORT = ${ _JAVA_PORT_BLACKDOWN_LINUX_1_3 }
. e l i f d e f i n e d ( H A V E _ J A V A _ I B M _ L I N U X _ 1 _ 3 ) \
2002-05-02 08:46:56 -04:00
&& !defined( HAVE_JAVA_SUN_LINUX_1_3) \
&& !defined( HAVE_JAVA_FREEBSD_1_3)
2002-03-28 06:24:43 -05:00
JAVA_VENDOR = IBM
JAVA_VER = 1.3.1
JAVA_OS = Linux
JAVA_HOME = ${ _JAVA_HOME_IBM_LINUX_1_3 }
JAVA_PORT = ${ _JAVA_PORT_IBM_LINUX_1_3 }
2002-05-02 08:46:56 -04:00
. e l i f d e f i n e d ( H A V E _ J A V A _ S U N _ L I N U X _ 1 _ 3 ) \
&& !defined( HAVE_JAVA_FREEBSD_1_3)
2002-03-28 06:24:43 -05:00
JAVA_VENDOR = Sun
JAVA_VER = 1.3.1
JAVA_OS = Linux
JAVA_HOME = ${ _JAVA_HOME_SUN_LINUX_1_3 }
JAVA_PORT = ${ _JAVA_PORT_SUN_LINUX_1_3 }
. e l s e
JAVA_VENDOR = FreeBSD
JAVA_VER = 1.3.1
JAVA_OS = FreeBSD
JAVA_HOME = ${ _JAVA_HOME_FREEBSD_1_3 }
JAVA_PORT = ${ _JAVA_PORT_FREEBSD_1_3 }
. e n d i f
# If the port needs JDK 1.4, then there's currently only one choice, the Sun
# JDK 1.4.0 for Linux.
. e l i f ${USE_JAVA} = = "1.4"
JAVA_VENDOR = Sun
JAVA_VER = 1.4.0
JAVA_OS = Linux
JAVA_HOME = ${ _JAVA_HOME_SUN_LINUX_1_4 }
JAVA_PORT = ${ _JAVA_PORT_SUN_LINUX_1_4 }
. e l s e
.BEGIN :
@${ ECHO } " ${ PKGNAME } : \" ${ USE_JAVA } \" is not a valid value for USE_JAVA. It should be one of: ${ _JAVA_VERSIONS } (with an optional \"+\" suffix.) " ;
@${ FALSE }
. e n d i f
#-----------------------------------------------------------------------------
2002-06-18 09:14:30 -04:00
# Stage 6: Define all settings for the port to use
2002-03-28 06:24:43 -05:00
2002-04-26 18:30:47 -04:00
# At this stage both JAVA_HOME and JAVA_PORT are definitely given a value.
2002-03-28 06:24:43 -05:00
# Define the location of the Java compiler. If USE_JIKES is set to YES, then
# use Jikes. If USE_JIKES is set to NO, then don't use it. If it is set to a
# different value, then fail with an error message. Otherwise USE_JIKES is not
# set, in which case it is checked if Jikes is already installed. If it is,
# then it will be used, otherwise it will not be used.
2002-04-26 18:30:47 -04:00
# Only define JAVAC if NEED_JAVAC is defined
2002-03-28 06:24:43 -05:00
. u n d e f J A V A C
2002-04-26 18:30:47 -04:00
# The default value for NEED_JAVAC is temporarily (!) YES
# This will change as soon as the affecting ports have NEED_JAVAC=YES
. i f ! d e f i n e d ( N E E D _ J A V A C )
2002-04-26 20:18:53 -04:00
NEED_JAVAC = NO
2002-04-26 18:30:47 -04:00
. e n d i f
2002-04-26 19:39:17 -04:00
. i f (${NEED_JAVAC} = = "YES" ) || ( ${ NEED_JAVAC } = = "yes" )
2002-04-26 18:30:47 -04:00
. i f d e f i n e d ( U S E _ J I K E S )
. i f (${USE_JIKES} = = "YES" ) || ( ${ USE_JIKES } = = "yes" )
2002-03-28 06:24:43 -05:00
JAVAC = ${ _JIKES_PATH }
WITH_JIKES = YES
2002-04-26 18:30:47 -04:00
. e l i f ! ((${USE_JIKES} = = "NO" ) || ( ${ USE_JIKES } = = "no" ) )
2002-03-28 06:24:43 -05:00
.BEGIN :
@${ ECHO } " ${ PKGNAME } : \" ${ USE_JIKES } \" is not a valid value for USE_JIKES. It should be YES or NO, or it should be undefined. " ;
@${ FALSE }
2002-04-26 18:30:47 -04:00
. e n d i f
. e l i f e x i s t s ( $ { _ J I K E S _ P A T H } )
2002-03-28 06:24:43 -05:00
JAVAC = ${ _JIKES_PATH }
WITH_JIKES = YES
2002-04-26 18:30:47 -04:00
. e n d i f
. i f ! d e f i n e d ( J A V A C )
2002-03-28 06:24:43 -05:00
JAVAC = ${ JAVA_HOME } /bin/javac
2002-04-26 18:30:47 -04:00
. e n d i f
2002-03-28 06:24:43 -05:00
. e n d i f
# Define the location of some more executables.
APPLETVIEWER = ${ JAVA_HOME } /bin/appletviewer
JAR = ${ JAVA_HOME } /bin/jar
JAVA = ${ JAVA_HOME } /bin/java
JAVADOC = ${ JAVA_HOME } /bin/javadoc
JAVAH = ${ JAVA_HOME } /bin/javah
JAVAP = ${ JAVA_HOME } /bin/javap
JAVA_N2A = ${ JAVA_HOME } /bin/native2ascii
JAVA_SERIALVER = ${ JAVA_HOME } /bin/serialver
RMIC = ${ JAVA_HOME } /bin/rmic
RMIREGISTRY = ${ JAVA_HOME } /bin/rmiregistry
# Some executables only exists in JDK 1.2 and up
. i f d e f i n e d ( U S E _ J A V A ) & & ${USE_JAVA} != 1.1
JAVA_KEYTOOL = ${ JAVA_HOME } /bin/keytool
JAVA_POLICYTOOL = ${ JAVA_HOME } /bin/policytool
RMID = ${ JAVA_HOME } /bin/rmid
. e n d i f
# Set the location of the ZIP or JAR file with all standard Java classes.
. i f d e f i n e d ( U S E _ J A V A ) & & ${USE_JAVA} = = "1.1"
JAVA_CLASSES = ${ JAVA_HOME } /lib/classes.zip
. e l s e
JAVA_CLASSES = ${ JAVA_HOME } /jre/lib/rt.jar
. e n d i f
2002-04-04 18:01:24 -05:00
#-----------------------------------------------------------------------------
2002-06-18 09:14:30 -04:00
# Stage 7: Add any dependencies if necessary
2002-04-04 18:01:24 -05:00
# Possibly add Jikes to the dependencies
2002-04-26 20:18:53 -04:00
. i f d e f i n e d ( J A V A C ) & & (${JAVAC} = = ${ _JIKES_PATH } )
2002-04-04 18:01:24 -05:00
. i f ! d e f i n e d ( N O _ B U I L D _ D E P E N D S _ J A V A )
BUILD_DEPENDS += ${ _DEPEND_JIKES }
. e n d i f
. i f ! d e f i n e d ( N O _ R U N _ D E P E N D S _ J A V A )
RUN_DEPENDS += ${ _DEPEND_JIKES }
. e n d i f
. e n d i f
# Add the JDK port to the dependencies
2002-03-28 06:24:43 -05:00
. i f d e f i n e d ( N O _ B U I L D _ D E P E N D S _ J A V A ) & & d e f i n e d ( N O _ R U N _ D E P E N D S _ J A V A )
.BEGIN :
@${ ECHO } " ${ PKGNAME } : NO_BUILD_DEPENDS_JAVA and NO_RUN_DEPENDS_JAVA cannot be set at the same time. " ;
@${ FALSE }
. e n d i f
_DEPEND_JAVA = ${ JAVA } :${ PORTSDIR } /${ JAVA_PORT }
2002-03-29 06:22:41 -05:00
. i f ! d e f i n e d ( N O _ B U I L D _ D E P E N D S _ J A V A )
2002-03-28 06:24:43 -05:00
BUILD_DEPENDS += ${ _DEPEND_JAVA }
. e n d i f
2002-03-29 06:22:41 -05:00
. i f ! d e f i n e d ( N O _ R U N _ D E P E N D S _ J A V A )
2002-03-28 06:24:43 -05:00
RUN_DEPENDS += ${ _DEPEND_JAVA }
. e n d i f
. e n d i f
. e n d i f