From 6cc29500d37e5b6805cf5096c8bf8c466b3c060c Mon Sep 17 00:00:00 2001 From: jasper Date: Wed, 31 Aug 2011 20:00:56 +0000 Subject: [PATCH] Implement MODJAVA_BUILD, and add MODJAVA_BUILD_{DIR,FILE,TARGET}. When MODJAVA_BUILD is set to 'ant' this adds the correct build dependencies, as well as providing a do-build target (if not already set by the port). discussed with and ok kurt@ --- devel/jdk/java.port.mk | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/devel/jdk/java.port.mk b/devel/jdk/java.port.mk index eb09b2934a6..cb8f2b66e9f 100644 --- a/devel/jdk/java.port.mk +++ b/devel/jdk/java.port.mk @@ -1,4 +1,4 @@ -# $OpenBSD: java.port.mk,v 1.22 2011/08/30 17:16:10 jasper Exp $ +# $OpenBSD: java.port.mk,v 1.23 2011/08/31 20:00:56 jasper Exp $ # Set MODJAVA_VER to x.y or x.y+ based on the version # of the jdk needed for the port. x.y means any x.y jdk. @@ -102,3 +102,20 @@ RUN_DEPENDS+= ${MODJAVA_RUN_DEPENDS} # Append 'java' to the list of categories. CATEGORIES+= java + +# Allow ports to that use devel/apache-ant to set MODJAVA_BUILD=ant +# In case a non-standard build target, build file or build directory are +# needed, set MODJAVA_BUILD_TARGET, MODJAVA_BUILD_FILE or MODJAVA_BUILD_DIR +# respectively. +.if defined(MODJAVA_BUILD) && ${MODJAVA_BUILD:L} == "ant" + BUILD_DEPENDS += devel/apache-ant + MODJAVA_BUILD_TARGET ?= + MODJAVA_BUILD_FILE ?= build.xml + MODJAVA_BUILD_DIR ?= ${WRKSRC} +. if !target(do-build) +do-build: + cd ${MODJAVA_BUILD_DIR} && \ + ${SETENV} ${MAKE_ENV} ${LOCALBASE}/bin/ant \ + -buildfile ${MODJAVA_BUILD_FILE} ${MODJAVA_BUILD_TARGET} +. endif +.endif