Unnamed Fossil Project

Diff
Login

Diff

Differences From Artifact [1bb44aeca1]:

To Artifact [4f75cb395c]:


269
270
271
272
273
274
275
276

277
278
279
280

281
282
283
284
285
286
287



288
289
290
291
292
293
294
295










296
297
298
299
300
301
302
269
270
271
272
273
274
275

276




277
278
279





280
281
282








283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299







-
+
-
-
-
-
+


-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+








.		for A_JAVA_PORT in ${_JAVA_PORTS_ALL}
A_JAVA_PORT_INFO:=			${A_JAVA_PORT:S/^/\${_/:S/$/_INFO}/}
A_JAVA_PORT_HOME=			${A_JAVA_PORT_INFO:MHOME=*:S,HOME=,,}
A_JAVA_PORT_VERSION=		${A_JAVA_PORT_INFO:MVERSION=*:C/VERSION=([0-9])\.([0-9])(.*)/\1.\2/}
A_JAVA_PORT_OS=				${A_JAVA_PORT_INFO:MOS=*:S,OS=,,}
A_JAVA_PORT_VENDOR=			${A_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,}
.if !defined(_JAVA_PORTS_INSTALLED)
.if !defined(_JAVA_PORTS_INSTALLED) && exists(${A_JAVA_PORT_HOME}/${_JDK_FILE})
A_JAVA_PORT_INSTALLED!=		${TEST} -x "${A_JAVA_PORT_HOME}/${_JDK_FILE}" \
							&& ${ECHO_CMD} "${A_JAVA_PORT}" \
							|| ${TRUE}
__JAVA_PORTS_INSTALLED!=	${ECHO_CMD} "${__JAVA_PORTS_INSTALLED} ${A_JAVA_PORT_INSTALLED}"
__JAVA_PORTS_INSTALLED+=	${A_JAVA_PORT}
.endif

# The magic here is that we want to test for a substring using only shell builtins (to avoid forking)
# Our shell does not have an explicit substring operator, but we can build one by using the '#'
# deletion operator ('%' would also work).  We try to delete the pattern "*${substr}*" and compare it
# to the original string.  If they differ, the substring matched.
# 
# Because variables inside for loops are special (directly replaced as strings), we are allowed
# to use them inside modifiers, where normally ${FOO:M${BAR}} is not allowed.
#
# We can't do this in make because it doesn't allow nested modifiers ${foo:${bar}}
#
A_JAVA_PORT_POSSIBLE!=		ver="${_JAVA_VERSION}"; os="${_JAVA_OS}"; vendor="${_JAVA_VENDOR}"; \
				${TEST} "$${ver\#*${A_JAVA_PORT_VERSION}*}" != "${_JAVA_VERSION}" -a \
				"$${os\#*${A_JAVA_PORT_OS}*}" != "${_JAVA_OS}" -a \
				"$${vendor\#*${A_JAVA_PORT_VENDOR}*}" != "${_JAVA_VENDOR}" && \
				${ECHO_CMD} "${A_JAVA_PORT}" || ${TRUE}
__JAVA_PORTS_POSSIBLE:=		${__JAVA_PORTS_POSSIBLE} ${A_JAVA_PORT_POSSIBLE}
.for ver in ${A_JAVA_PORT_VERSION}
.for os in ${A_JAVA_PORT_OS}
.for vendor in ${A_JAVA_PORT_VENDOR}
.if ${_JAVA_VERSION:M${ver}} && ${_JAVA_OS:M${os}} && ${_JAVA_VENDOR:M${vendor}}
__JAVA_PORTS_POSSIBLE+=		${A_JAVA_PORT}
.endif
.endfor
.endfor
.endfor

.		endfor
.if !defined(_JAVA_PORTS_INSTALLED)
_JAVA_PORTS_INSTALLED=		${__JAVA_PORTS_INSTALLED:C/ [ ]+/ /g}
.endif
_JAVA_PORTS_POSSIBLE=		${__JAVA_PORTS_POSSIBLE:C/ [ ]+/ /g}