diff options
author | jlam <jlam@pkgsrc.org> | 2002-10-13 09:38:58 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-10-13 09:38:58 +0000 |
commit | 94fedbecad700fb429c12a358272a279f0abec99 (patch) | |
tree | 9412a665ad1524e410d76d0b6da8bf61ef325f54 /mk/bsd.pkg.mk | |
parent | b813c8f4d2509a23987698730aa9ad4593010233 (diff) | |
download | pkgsrc-94fedbecad700fb429c12a358272a279f0abec99.tar.gz |
Reorder EVAL_PREFIX, PKG_JAVA_HOME, and CLASSPATH sections so that
EVAL_PREFIX is evaluated at the correct time so that the variables it
defines are usable by the CLASSPATH code and the buildlink2 code.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r-- | mk/bsd.pkg.mk | 87 |
1 files changed, 47 insertions, 40 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 2bf3723570d..aad762753c8 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1066 2002/10/13 08:01:27 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1067 2002/10/13 09:38:58 jlam Exp $ # # This file is in the public domain. # @@ -65,6 +65,7 @@ PKGDIR?= ${.CURDIR} INTERACTIVE_STAGE?= none +.if !defined(JAVA_MK) .if defined(USE_JAVA) BUILD_DEFS+= PKG_JVM . if !defined(PKG_JVM) @@ -136,7 +137,16 @@ DEPENDS+= kaffe-[0-9]*:../../lang/kaffe . endif . undef _UNUSED_DEPENDS EVAL_PREFIX+= _JAVA_HOME=${_JAVA_PKGBASE} + +PKG_JAVA_HOME?= ${_JAVA_HOME} +BUILD_DEFS+= PKG_JAVA_HOME +MAKE_ENV+= JAVA_HOME=${PKG_JAVA_HOME} +CONFIGURE_ENV+= JAVA_HOME=${PKG_JAVA_HOME} +SCRIPTS_ENV+= JAVA_HOME=${PKG_JAVA_HOME} + +PATH:= ${PKG_JAVA_HOME}/bin:${PATH} .endif +.endif ! JAVA_MK # Set the default BUILDLINK_DIR, BUILDLINK_X11PKG_DIR, BUILDLINK_X11_DIR so # that if no buildlink.mk files are included, then they still point to @@ -787,6 +797,42 @@ RMAN?= ${X11BASE}/bin/rman . endif .endif +.if defined(EVAL_PREFIX) +. for def in ${EVAL_PREFIX} +. if !defined(${def:C/=.*//}_DEFAULT) +${def:C/=.*//}_DEFAULT= ${X11PREFIX} +. endif +. if !defined(${def:C/=.*//}) +_depend_${def:C/=.*//} != ${PKG_INFO} -e ${def:C/.*=//} 2>/dev/null; ${ECHO} +. if (${_depend_${def:C/=.*//}} == "") +${def:C/=.*//}=${${def:C/=.*//}_DEFAULT} +. else +_dir_${def:C/=.*//} != (${PKG_INFO} -qp ${def:C/.*=//} 2>/dev/null) | ${AWK} '{ print $$2; exit }' +${def:C/=.*//}=${_dir_${def:C/=.*//}} +MAKEFLAGS+= ${def:C/=.*//}=${_dir_${def:C/=.*//}} +. endif +. endif +. endfor +.endif + +# Set the CLASSPATH for Java packages. This must come after EVAL_PREFIX +# is evaluated because PKG_JAVA_HOME is used in a .if.endif conditional, +# and it's value is indirectly set by EVAL_PREFIX. +# +.if defined(USE_JAVA) +. if exists(${PKG_JAVA_HOME}/lib/classes.zip) +_JAVA_CLASSES_ZIP= ${PKG_JAVA_HOME}/lib/classes.zip: +. endif +. if exists(${PKG_JAVA_HOME}/lib/tools.jar) +_JAVA_TOOLS_JAR= ${PKG_JAVA_HOME}/lib/tools.jar: +. endif +CLASSPATH?= ${_JAVA_CLASSES_ZIP}${_JAVA_TOOLS_JAR}. + +MAKE_ENV+= CLASSPATH=${CLASSPATH} +CONFIGURE_ENV+= CLASSPATH=${CLASSPATH} +SCRIPTS_ENV+= CLASSPATH=${CLASSPATH} +.endif + # Popular master sites MASTER_SITE_XCONTRIB+= \ ftp://uiarchive.uiuc.edu/pub/ftp/ftp.x.org/contrib/ \ @@ -1548,45 +1594,6 @@ show-installed-depends: . endif .endif -.if defined(EVAL_PREFIX) -. for def in ${EVAL_PREFIX} -. if !defined(${def:C/=.*//}_DEFAULT) -${def:C/=.*//}_DEFAULT= ${X11PREFIX} -. endif -. if !defined(${def:C/=.*//}) -_depend_${def:C/=.*//} != ${PKG_INFO} -e ${def:C/.*=//} 2>/dev/null; ${ECHO} -. if (${_depend_${def:C/=.*//}} == "") -${def:C/=.*//}=${${def:C/=.*//}_DEFAULT} -. else -_dir_${def:C/=.*//} != (${PKG_INFO} -qp ${def:C/.*=//} 2>/dev/null) | ${AWK} '{ print $$2; exit }' -${def:C/=.*//}=${_dir_${def:C/=.*//}} -MAKEFLAGS+= ${def:C/=.*//}=${_dir_${def:C/=.*//}} -. endif -. endif -. endfor -.endif - -.if defined(USE_JAVA) -PKG_JAVA_HOME?= ${_JAVA_HOME} -BUILD_DEFS+= PKG_JAVA_HOME -. if exists(${PKG_JAVA_HOME}/lib/classes.zip) -_JAVA_CLASSES_ZIP= ${PKG_JAVA_HOME}/lib/classes.zip: -. endif -. if exists(${PKG_JAVA_HOME}/lib/tools.jar) -_JAVA_TOOLS_JAR= ${PKG_JAVA_HOME}/lib/tools.jar: -. endif -CLASSPATH?= ${_JAVA_CLASSES_ZIP}${_JAVA_TOOLS_JAR}. -PATH:= ${PKG_JAVA_HOME}/bin:${PATH} - -MAKE_ENV+= JAVA_HOME=${PKG_JAVA_HOME} -CONFIGURE_ENV+= JAVA_HOME=${PKG_JAVA_HOME} -SCRIPTS_ENV+= JAVA_HOME=${PKG_JAVA_HOME} - -MAKE_ENV+= CLASSPATH=${CLASSPATH} -CONFIGURE_ENV+= CLASSPATH=${CLASSPATH} -SCRIPTS_ENV+= CLASSPATH=${CLASSPATH} -.endif - .if !target(show-pkgsrc-dir) show-pkgsrc-dir: . if defined(IGNORE) |