Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 315 lines (289 sloc) 9.022 kb
b12e341 mk/java-vm.mk: Defined default VM for DragonFly
marino authored
1 # $NetBSD: java-vm.mk,v 1.87 2012/08/11 14:49:44 marino Exp $
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
2 #
3 # This Makefile fragment handles Java dependencies and make variables,
4 # and is meant to be included by packages that require Java either at
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
5 # build-time or at run-time.
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
6 #
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
7 # User-settable variables:
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
8 #
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
9 # PKG_JVM_DEFAULT
10 # The JVM that should be used if nothing particular is specified.
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
11 #
b87a39c Remove support for jdk and jdk14, they had been removed from pkgsrc.
obache authored
12 # Possible values: kaffe openjdk7 openjdk7-bin
6b8c63a Add support for wip/jdk16 (for PR 44294).
wiz authored
13 # sun-jdk6 jdk15 jdk16
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
14 # Default value: (platform-dependent)
b6d86a1 Clarify comments to more explicitly note how to _not_ add the dependency
jlam authored
15 #
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
16 # Package-settable variables:
4874f1d USE_JAVA2 is used to note that the package requires a Java2 implementati...
jlam authored
17 #
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
18 # USE_JAVA
fbcbd02 Allow USE_JAVA=build (build dependency on jre).
obache authored
19 # When set to "yes", a build-time dependency on the JDK and
20 # a run-time dependency on the JRE are added.
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
21 # When set to "run", a run-time dependency on the JRE is added.
fbcbd02 Allow USE_JAVA=build (build dependency on jre).
obache authored
22 # When set to "build", a build-time dependency on the JRE is added.
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
23 #
fbcbd02 Allow USE_JAVA=build (build dependency on jre).
obache authored
24 # Possible values: yes run build
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
25 # Default value: yes
26 #
27 # USE_JAVA2
28 # When the package needs a Java 2 implementation, this variable
f8a96a3 Document section update. PR pkg/45654.
ryoon authored
29 # should be set to "yes". It can also be set to "1.4", "1.5", "6"
30 # or "7" require an even more recent implementation.
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
31 #
f8a96a3 Document section update. PR pkg/45654.
ryoon authored
32 # Possible values: yes no 1.4 1.5 6 7
8004ac9 Made the code that selects the possible Java VMs much simpler.
rillig authored
33 # Default value: no
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
34 #
35 # PKG_JVMS_ACCEPTED
36 # The list of JVMs that may be used as possible implementations.
37 #
38 # Variables set by this file:
39 #
241b4d8 Added the variable JAVA_BINPREFIX containing the prefix to the wrapped
rillig authored
40 # JAVA_BINPREFIX
41 # The prefix for the Java binaries. The path to the real binaries
42 # is constructed by appending -${program} to it.
43 #
44 # Examples:
45 # * ${JAVA_BINPREFIX}-java is the path to the Java interpreter.
46 # * ${JAVA_BINPREFIX}-javac is the path to the Java compiler.
47 #
97afdf2 Brought the comment into "pkgsrc comment normal form".
rillig authored
48 # PKG_JVM
49 # The name of the selected Java implementation.
50 #
51 # PKG_JAVA_HOME
52 # The directory where the JVM is installed.
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
53 #
54
9f0238b Move java.mk to java-vm.mk to avoid name conflict with devel/mk-files as
jlam authored
55 .if !defined(JAVA_VM_MK)
56 JAVA_VM_MK= # defined
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
57
241b4d8 Added the variable JAVA_BINPREFIX containing the prefix to the wrapped
rillig authored
58 _VARGROUPS+= java
59 _USER_VARS.java= PKG_JVM_DEFAULT
60 _PKG_VARS.java= USE_JAVA USE_JAVA2 PKG_JVMS_ACCEPTED
61 _SYS_VARS.java= PKG_JVM PKG_JAVA_HOME JAVA_BINPREFIX
62
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
63 .include "../../mk/bsd.prefs.mk"
64
ce533b0 Allow for strangely-cased USE_JAVA values.
jlam authored
65 USE_JAVA?= yes
8004ac9 Made the code that selects the possible Java VMs much simpler.
rillig authored
66 USE_JAVA2?= no
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
67
68 PKG_JVM_DEFAULT?= # empty
a1e9689 Knock off a TODO item: when generating the internal list of acceptable
jlam authored
69 PKG_JVMS_ACCEPTED?= ${_PKG_JVMS}
70
a143ec4 Sorted the _ONLY_FOR_PLATFORM.* lists so that each operating system has
rillig authored
71 # This is a list of all of the JDKs that may be used.
ce533b0 Allow for strangely-cased USE_JAVA values.
jlam authored
72 #
b5d2593 Support lang/openjdk7 and make it the default on
wiz authored
73 _PKG_JVMS.7= openjdk7 openjdk7-bin
6b8c63a Add support for wip/jdk16 (for PR 44294).
wiz authored
74 _PKG_JVMS.6= ${_PKG_JVMS.7} sun-jdk6 jdk16
f93421c Remove support for sun-j{dk,re}{14,15}, since the corresponding
wiz authored
75 _PKG_JVMS.1.5= ${_PKG_JVMS.6} jdk15
b87a39c Remove support for jdk and jdk14, they had been removed from pkgsrc.
obache authored
76 _PKG_JVMS.1.4= ${_PKG_JVMS.1.5}
4adc4b1 Remove blackdown-j{dk,re}13 and sun-j{dk,re}13.
wiz authored
77 _PKG_JVMS.yes= ${_PKG_JVMS.1.4} kaffe
b87a39c Remove support for jdk and jdk14, they had been removed from pkgsrc.
obache authored
78 _PKG_JVMS.no= ${_PKG_JVMS.yes}
8004ac9 Made the code that selects the possible Java VMs much simpler.
rillig authored
79 _PKG_JVMS= ${_PKG_JVMS.${USE_JAVA2}}
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
80
81 # To be deprecated: if PKG_JVM is explicitly set, then use it as the
82 # default JVM. Note that this has lower precedence than PKG_JVM_DEFAULT.
83 #
84 .if defined(PKG_JVM)
85 . if !empty(PKG_JVM)
86 _PKG_JVM_DEFAULT:= ${PKG_JVM}
87 . endif
88 .endif
89
90 # Set the default JVM for this platform.
91 #
92 .if !empty(PKG_JVM_DEFAULT)
93 _PKG_JVM_DEFAULT= ${PKG_JVM_DEFAULT}
94 .endif
95 .if !defined(_PKG_JVM_DEFAULT)
b5d2593 Support lang/openjdk7 and make it the default on
wiz authored
96 . if !empty(MACHINE_PLATFORM:MNetBSD-[456789].*-i386) || \
97 !empty(MACHINE_PLATFORM:MNetBSD-[56789].*-x86_64)
98 _PKG_JVM_DEFAULT?= openjdk7
d8ec688 Add openjdk7-bin to the list of valid JVMs and use as a default on
abs authored
99 . elif !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || \
55b83c1 sun-j{re,dk} run fine on x86_64 Linux. They may install the 32 bit VM, b...
abs authored
100 !empty(MACHINE_PLATFORM:MLinux-*-i[3456]86) || \
101 !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
f93421c Remove support for sun-j{dk,re}{14,15}, since the corresponding
wiz authored
102 _PKG_JVM_DEFAULT?= sun-jdk6
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
103 . elif !empty(MACHINE_PLATFORM:MDarwin-*-*)
f93421c Remove support for sun-j{dk,re}{14,15}, since the corresponding
wiz authored
104 _PKG_JVM_DEFAULT?= sun-jdk6
be96104 Initial support for Java on OpenSolaris (i386 only)
adrianp authored
105 . elif !empty(MACHINE_PLATFORM:MSunOS-5.11-i386)
f93421c Remove support for sun-j{dk,re}{14,15}, since the corresponding
wiz authored
106 _PKG_JVM_DEFAULT?= sun-jdk6
b12e341 mk/java-vm.mk: Defined default VM for DragonFly
marino authored
107 . elif !empty(MACHINE_PLATFORM:MDragonFly-*-*)
108 _PKG_JVM_DEFAULT?= openjdk7
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
109 . else
110 _PKG_JVM_DEFAULT?= kaffe
111 . endif
112 .endif
113
a1e9689 Knock off a TODO item: when generating the internal list of acceptable
jlam authored
114 # These lists are copied from the JVM package Makefiles.
d03f0d5 add jdk15, modelled on jdk14
abs authored
115 _ONLY_FOR_PLATFORMS.jdk15= \
091e940 Update patterns for jdk15, from Francois Tigeot in PR 44294.
wiz authored
116 DragonFly-*-* \
c2f4c0e jdk-1.5 also supports FreeBSD 8 now, add it.
wiz authored
117 FreeBSD-8.[1-9]*-i386 FreeBSD-8.[1-9]*-x86_64 \
091e940 Update patterns for jdk15, from Francois Tigeot in PR 44294.
wiz authored
118 NetBSD-[2-9].*-i386 NetBSD-[4-9].*-x86_64
6b8c63a Add support for wip/jdk16 (for PR 44294).
wiz authored
119 _ONLY_FOR_PLATFORMS.jdk16= \
03fd97c jdk16 now works on DragonFly.
obache authored
120 DragonFly-*-* \
6b8c63a Add support for wip/jdk16 (for PR 44294).
wiz authored
121 NetBSD-[2-9].*-i386 NetBSD-[4-9].*-x86_64
5e9acab Add win32-jdk. While here, sort the per-JVM metadata sections by JVM na...
tv authored
122 _ONLY_FOR_PLATFORMS.kaffe= \
76e1ff9 Update _ONLY_FOR_PLATFORMS.kaffe from kaffe's makefile.
dholland authored
123 *-*-alpha *-*-arm *-*-arm32 *-*-i386 *-*-m68k \
c18da65 Partially revert previous: exclude kaffe on x86_64 again as it builds
dholland authored
124 *-*-mipsel* *-*-sparc *-*-powerpc
125 # exclude *-*-x86_64 from kaffe list as it apparently doesn't work
a8640ec Add support for sun-j{dk,re}6.
tv authored
126 _ONLY_FOR_PLATFORMS.sun-jdk6= \
9505146 Cleanup regexps for Darwin. PPC version of the JDK never exists.
yyamano authored
127 Darwin-9.*-i386 Darwin-9.*-x86_64 \
128 Darwin-10.*-i386 Darwin-10.*-x86_64 \
129 Darwin-11.*-i386 Darwin-11.*-x86_64 \
a8640ec Add support for sun-j{dk,re}6.
tv authored
130 DragonFly-*-i386 \
131 FreeBSD-6.*-i386 \
132 Linux-*-i[3-6]86 \
55b83c1 sun-j{re,dk} run fine on x86_64 Linux. They may install the 32 bit VM, b...
abs authored
133 Linux-*-x86_64 \
85296f6 enable 1.6 for x86_64 too, and make it the default.
christos authored
134 NetBSD-*-i386 NetBSD-*-x86_64 \
be96104 Initial support for Java on OpenSolaris (i386 only)
adrianp authored
135 SunOS-5.11-i386
b5d2593 Support lang/openjdk7 and make it the default on
wiz authored
136 _ONLY_FOR_PLATFORMS.openjdk7= \
2d93470 mk/java-vm.mk: Set DragonFly for openjdk7
marino authored
137 DragonFly-*-* \
b5d2593 Support lang/openjdk7 and make it the default on
wiz authored
138 NetBSD-[4-9]*-i386 \
139 NetBSD-[5-9]*-x86_64
d8ec688 Add openjdk7-bin to the list of valid JVMs and use as a default on
abs authored
140 _ONLY_FOR_PLATFORMS.openjdk7-bin= \
1024a9d PR pkg/41542 - java-vm.mk needs updating for openjdk7-bin from yamt
abs authored
141 NetBSD-[5-9]*-i386 \
142 NetBSD-[5-9]*-x86_64
a1e9689 Knock off a TODO item: when generating the internal list of acceptable
jlam authored
143
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
144 # Set the accepted JVMs for this platform.
a1e9689 Knock off a TODO item: when generating the internal list of acceptable
jlam authored
145 .for _jvm_ in ${_PKG_JVMS}
146 . for _pattern_ in ${_ONLY_FOR_PLATFORMS.${_jvm_}}
147 . if !empty(MACHINE_PLATFORM:M${_pattern_})
148 _PKG_JVMS_ACCEPTED+= ${PKG_JVMS_ACCEPTED:M${_jvm_}}
149 . endif
150 . endfor
151 .endfor
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
152
153 _JAVA_PKGBASE.jdk= jdk
b126903 Allow PKG_JVM=jdk14 (once a buildlink file has been added to wip/jdk14)
abs authored
154 _JAVA_PKGBASE.jdk14= jdk14
d03f0d5 add jdk15, modelled on jdk14
abs authored
155 _JAVA_PKGBASE.jdk15= jdk15
6b8c63a Add support for wip/jdk16 (for PR 44294).
wiz authored
156 _JAVA_PKGBASE.jdk16= jdk16
5e9acab Add win32-jdk. While here, sort the per-JVM metadata sections by JVM na...
tv authored
157 _JAVA_PKGBASE.kaffe= kaffe
b5d2593 Support lang/openjdk7 and make it the default on
wiz authored
158 _JAVA_PKGBASE.openjdk7= openjdk7
d8ec688 Add openjdk7-bin to the list of valid JVMs and use as a default on
abs authored
159 _JAVA_PKGBASE.openjdk7-bin= openjdk7-bin
a8640ec Add support for sun-j{dk,re}6.
tv authored
160 _JAVA_PKGBASE.sun-jdk6= sun-jre6
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
161
241b4d8 Added the variable JAVA_BINPREFIX containing the prefix to the wrapped
rillig authored
162 # The following is copied from the respective JVM Makefiles.
163 _JAVA_NAME.jdk= jdk11
164 _JAVA_NAME.jdk14= jdk14
165 _JAVA_NAME.kaffe= kaffe
b5d2593 Support lang/openjdk7 and make it the default on
wiz authored
166 _JAVA_NAME.openjdk7= openjdk7
d8ec688 Add openjdk7-bin to the list of valid JVMs and use as a default on
abs authored
167 _JAVA_NAME.openjdk7-bin= openjdk7-bin
241b4d8 Added the variable JAVA_BINPREFIX containing the prefix to the wrapped
rillig authored
168 _JAVA_NAME.sun-jdk6= sun6
169
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
170 # Mark the acceptable JVMs and check which JVM packages are installed.
171 .for _jvm_ in ${_PKG_JVMS_ACCEPTED}
172 _PKG_JVM_OK.${_jvm_}= yes
173 _PKG_JVM_INSTALLED.${_jvm_}!= \
174 if ${PKG_INFO} -qe ${_JAVA_PKGBASE.${_jvm_}}; then \
175 ${ECHO} yes; \
176 else \
177 ${ECHO} no; \
178 fi
179 .endfor
180
181 # Use one of the installed JVMs,...
182 #
183 .if !defined(_PKG_JVM)
184 . for _jvm_ in ${_PKG_JVMS_ACCEPTED}
185 . if !empty(_PKG_JVM_INSTALLED.${_jvm_}:M[yY][eE][sS])
186 _PKG_JVM?= ${_jvm_}
187 . else
188 _PKG_JVM_FIRSTACCEPTED?= ${_jvm_}
189 . endif
190 . endfor
191 #
192 # ...otherwise, prefer the default one if it's accepted,...
193 #
194 . if defined(_PKG_JVM_OK.${_PKG_JVM_DEFAULT}) && \
195 !empty(_PKG_JVM_OK.${_PKG_JVM_DEFAULT}:M[yY][eE][sS])
196 _PKG_JVM= ${_PKG_JVM_DEFAULT}
197 . endif
198 .endif
199 #
200 # ...otherwise, just use the first accepted JVM.
201 #
202 .if !defined(_PKG_JVM)
85359ab Fix typo (missing leading underscore), and add a currently unreachable
jlam authored
203 . if defined(_PKG_JVM_FIRSTACCEPTED)
204 _PKG_JVM= ${_PKG_JVM_FIRSTACCEPTED}
205 . endif
206 .endif
207 #
208 # If there are no acceptable JVMs, then generate an error.
209 #
210 .if !defined(_PKG_JVM)
211 # force an error
ef9ac4e Replaced the deprecated PKG_SKIP_REASON with PKG_FAIL_REASON.
rillig authored
212 PKG_FAIL_REASON= "no acceptable JVM found"
337266b on systems where _PKG_JVM is not set, set PKG_FAIL_REASON and set
dmcmahill authored
213 _PKG_JVM= "none"
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
214 .endif
215
d03f0d5 add jdk15, modelled on jdk14
abs authored
216 BUILDLINK_API_DEPENDS.jdk15?= jdk15-[0-9]*
6b8c63a Add support for wip/jdk16 (for PR 44294).
wiz authored
217 BUILDLINK_API_DEPENDS.jdk16?= jdk16-[0-9]*
c735e69 Over 1200 files touched but no revisions bumped :)
reed authored
218 BUILDLINK_API_DEPENDS.kaffe?= kaffe>=1.1.4
b5d2593 Support lang/openjdk7 and make it the default on
wiz authored
219 BUILDLINK_API_DEPENDS.openjdk7?= openjdk7-[0-9]*
d8ec688 Add openjdk7-bin to the list of valid JVMs and use as a default on
abs authored
220 BUILDLINK_API_DEPENDS.openjdk7-bin?= openjdk7-bin-[0-9]*
221 BUILDLINK_API_DEPENDS.sun-jdk6?= sun-jdk6-[0-9]*
222 BUILDLINK_API_DEPENDS.sun-jre6?= sun-jre6-[0-9]*
668fe3e Revert 1.29.
wiz authored
223
d03f0d5 add jdk15, modelled on jdk14
abs authored
224 _JRE.jdk15= jdk15
6b8c63a Add support for wip/jdk16 (for PR 44294).
wiz authored
225 _JRE.jdk16= jdk16
5e9acab Add win32-jdk. While here, sort the per-JVM metadata sections by JVM na...
tv authored
226 _JRE.kaffe= kaffe
b5d2593 Support lang/openjdk7 and make it the default on
wiz authored
227 _JRE.openjdk7= openjdk7
d8ec688 Add openjdk7-bin to the list of valid JVMs and use as a default on
abs authored
228 _JRE.openjdk7-bin= openjdk7-bin
a8640ec Add support for sun-j{dk,re}6.
tv authored
229 _JRE.sun-jdk6= sun-jre6
50c7413 Use a table-based lookup scheme to pair up JREs to JDKs.
jlam authored
230
8701aba Set _JAVA_BASE_CLASSES to classes.zip or wre.jar in java-vm.mk, then use...
abs authored
231 _JAVA_BASE_CLASSES= classes.zip
232
b87a39c Remove support for jdk and jdk14, they had been removed from pkgsrc.
obache authored
233 .if ${_PKG_JVM} == "jdk15"
d03f0d5 add jdk15, modelled on jdk14
abs authored
234 _JDK_PKGSRCDIR= ../../wip/jdk15
235 _JRE_PKGSRCDIR= ${_JDK_PKGSRCDIR}
236 _JAVA_HOME_DEFAULT= ${LOCALBASE}/java/jdk-1.5.0
6b8c63a Add support for wip/jdk16 (for PR 44294).
wiz authored
237 .elif ${_PKG_JVM} == "jdk16"
238 _JDK_PKGSRCDIR= ../../wip/jdk16
239 _JRE_PKGSRCDIR= ${_JDK_PKGSRCDIR}
240 _JAVA_HOME_DEFAULT= ${LOCALBASE}/java/jdk-1.6.0
5e9acab Add win32-jdk. While here, sort the per-JVM metadata sections by JVM na...
tv authored
241 .elif ${_PKG_JVM} == "kaffe"
242 _JDK_PKGSRCDIR= ../../lang/kaffe
243 _JRE_PKGSRCDIR= ${_JDK_PKGSRCDIR}
244 _JAVA_HOME_DEFAULT= ${LOCALBASE}/java/kaffe
b5d2593 Support lang/openjdk7 and make it the default on
wiz authored
245 .elif ${_PKG_JVM} == "openjdk7"
246 _JDK_PKGSRCDIR= ../../lang/openjdk7
247 _JRE_PKGSRCDIR= ${_JDK_PKGSRCDIR}
248 _JAVA_HOME_DEFAULT= ${LOCALBASE}/java/openjdk7
d8ec688 Add openjdk7-bin to the list of valid JVMs and use as a default on
abs authored
249 .elif ${_PKG_JVM} == "openjdk7-bin"
250 _JDK_PKGSRCDIR= ../../lang/openjdk7-bin
251 _JRE_PKGSRCDIR= ${_JDK_PKGSRCDIR}
252 _JAVA_HOME_DEFAULT= ${LOCALBASE}/java/openjdk7-bin
a8640ec Add support for sun-j{dk,re}6.
tv authored
253 .elif ${_PKG_JVM} == "sun-jdk6"
254 _JDK_PKGSRCDIR= ../../lang/sun-jdk6
255 _JRE_PKGSRCDIR= ../../lang/sun-jre6
256 _JAVA_HOME_DEFAULT= ${LOCALBASE}/java/sun-6
257 UNLIMIT_RESOURCES+= datasize
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
258 .endif
259
ba13345 Use "_JAVA_HOME_DEFAULT" if it is defined instead of using "EVAL_PREFIX"...
tron authored
260 .if defined(_JAVA_HOME_DEFAULT)
261 _JAVA_HOME= ${_JAVA_HOME_DEFAULT}
262 .else
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
263 EVAL_PREFIX+= _JAVA_HOME=${_JAVA_PKGBASE.${_PKG_JVM}}
ba13345 Use "_JAVA_HOME_DEFAULT" if it is defined instead of using "EVAL_PREFIX"...
tron authored
264 .endif
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
265
fbcbd02 Allow USE_JAVA=build (build dependency on jre).
obache authored
266 # If we are not using Java for building, then we need a run-time dependency on
267 # the JRE, otherwise, build-time dependency on the JRE.
bdb8302 make this also behave correctly when USE_BUILDLINK2 is not defined as we...
dmcmahill authored
268 .if defined(_JRE_PKGSRCDIR)
de1ef15 USE_BUILDLINK3 is no longer optional (and cannot be turned off). Per ma...
tv authored
269 . if exists(${_JRE_PKGSRCDIR}/buildlink3.mk)
fbcbd02 Allow USE_JAVA=build (build dependency on jre).
obache authored
270 . if !empty(USE_JAVA:M[bB][uU][iI][lL][dD])
271 BUILDLINK_DEPMETHOD.${_JRE.${_PKG_JVM}}= build
272 . endif
de1ef15 USE_BUILDLINK3 is no longer optional (and cannot be turned off). Per ma...
tv authored
273 . include "${_JRE_PKGSRCDIR}/buildlink3.mk"
d9ef29b Add buildlink3 bits.
xtraeme authored
274 . endif
bdb8302 make this also behave correctly when USE_BUILDLINK2 is not defined as we...
dmcmahill authored
275 .endif
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
276
277 # If we are building Java software, then we need a build-time dependency on
278 # the JDK.
279 #
fbcbd02 Allow USE_JAVA=build (build dependency on jre).
obache authored
280 .if !empty(USE_JAVA:M[yE][eE][sS])
d9ef29b Add buildlink3 bits.
xtraeme authored
281 . if defined(_JDK_PKGSRCDIR)
de1ef15 USE_BUILDLINK3 is no longer optional (and cannot be turned off). Per ma...
tv authored
282 . if exists(${_JDK_PKGSRCDIR}/buildlink3.mk)
283 . include "${_JDK_PKGSRCDIR}/buildlink3.mk"
d9ef29b Add buildlink3 bits.
xtraeme authored
284 . endif
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
285 . endif
286 .endif
287
288 PKG_JVM:= ${_PKG_JVM}
289 .if defined(BUILDLINK_JAVA_PREFIX.${_PKG_JVM})
290 PKG_JAVA_HOME?= ${BUILDLINK_JAVA_PREFIX.${_PKG_JVM}}
291 .else
292 PKG_JAVA_HOME?= ${_JAVA_HOME}
293 .endif
8b1539c Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
294 .if !defined(CLASSPATH)
295 CLASSPATH_cmd= ${ECHO} `for p in \
296 ${PKG_JAVA_HOME}/lib/${_JAVA_BASE_CLASSES} \
297 ${PKG_JAVA_HOME}/lib/tools.jar; do \
298 ${TEST} ! -f $$p || ${ECHO} $$p; done` \
299 . | ${TR} ' ' :
300 CLASSPATH?= ${CLASSPATH_cmd:sh}
301 .endif
302
6c0e802 Visual cleanup from tv-derecurse:
tv authored
303 ALL_ENV+= CLASSPATH=${CLASSPATH:Q}
304 ALL_ENV+= JAVA_HOME=${PKG_JAVA_HOME}
241b4d8 Added the variable JAVA_BINPREFIX containing the prefix to the wrapped
rillig authored
305 BUILD_DEFS+= ${_USER_VARS.java}
306 BUILD_DEFS_EFFECTS+= ${_SYS_VARS.java}
447fd2e Applied all quoting fixes found by "pkglint --autofix".
rillig authored
307 MAKEFLAGS+= PKG_JVM=${PKG_JVM:Q}
8b1539c Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
308 PREPEND_PATH+= ${PKG_JAVA_HOME}/bin
241b4d8 Added the variable JAVA_BINPREFIX containing the prefix to the wrapped
rillig authored
309 JAVA_BINPREFIX= ${LOCALBASE}/bin/${_JAVA_NAME.${_PKG_JVM}}
f76f69c Initial cut at java.mk that completely replaces the USE_JAVA-handling co...
jlam authored
310
49603e6 Automatically substitute for JAVA_HOME and PKG_JAVA_HOME in PLISTs.
jlam authored
311 PLIST_SUBST+= PKG_JAVA_HOME=${PKG_JAVA_HOME:Q}
312 FILES_SUBST+= PKG_JAVA_HOME=${PKG_JAVA_HOME:Q}
313
9f0238b Move java.mk to java-vm.mk to avoid name conflict with devel/mk-files as
jlam authored
314 .endif # JAVA_VM_MK
Something went wrong with that request. Please try again.