Date: Sat, 6 Dec 2003 18:11:52 GMT From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Aristedes Maniatis <ari@ish.com.au> Subject: ports/59993: databases/mysql-connector-java requires JDK 1.4.x to build Message-ID: <200312061811.hB6IBqSi042032@happy-idiot-talk.infracaninophile.co.uk> Resent-Message-ID: <200312061820.hB6IKG7i024845@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 59993 >Category: ports >Synopsis: databases/mysql-connector-java requires JDK 1.4.x to build >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Dec 06 10:20:15 PST 2003 >Closed-Date: >Last-Modified: >Originator: Matthew Seaman >Release: FreeBSD 4.9-STABLE i386 >Organization: Infracaninophile >Environment: System: FreeBSD happy-idiot-talk.infracaninophile.co.uk 4.9-STABLE FreeBSD 4.9-STABLE #42: Sat Nov 29 22:16:52 GMT 2003 root@happy-idiot-talk.infracaninophile.co.uk:/usr/obj/usr/src/sys/HAPPY-IDIOT-TALK i386 >Description: Noticed by: Aristedes Maniatis As documented at http://www.mysql.com/documentation/connector-j/index.html#id2800748 MySQL Connector/J really does need JDK 1.4.x to compile. Use of apache-ant appears to side-step all of the effects of the USE_JAVA knob from bsd.java.mk, so all previous testing was actually using JDK 1.4.2 to do the compilation step. Since the distfile contains a pre-compiled .jar file, which will work with any Java-2 JVM, provide a WITHOUT_BUILD option >How-To-Repeat: >Fix: --- mysql-connector-java.diff begins here --- diff -Nur /usr/ports/databases/mysql-connector-java/Makefile mysql-connector-java/Makefile --- /usr/ports/databases/mysql-connector-java/Makefile Mon Nov 17 19:53:19 2003 +++ mysql-connector-java/Makefile Sat Dec 6 18:09:44 2003 @@ -26,15 +26,25 @@ MAINTAINER= m.seaman@infracaninophile.co.uk COMMENT= MySQL Connector/J: JDBC interface for MySQL +.if !defined(WITHOUT_COMPILE) + BUILD_DEPENDS= ${ANT}:${PORTSDIR}/devel/apache-ant \ ${LOCALBASE}/share/java/classes/junit.jar:${PORTSDIR}/java/junit -USE_JAVA= 1.2+ +USE_JAVA= 1.4+ NEED_JAVAC= YES ANT?= ${LOCALBASE}/bin/ant ANT_TARGET= clean compile-driver -APIDOCSDIR= ${DOCSDIR}/javadoc BUILDDIR= ${WRKDIR}/build-mysql-jdbc/${DISTNAME} + +.else + +USE_JAVA= 1.2+ +BUILDDIR= ${WRKDIR}/${DISTNAME} + +.endif + +APIDOCSDIR= ${DOCSDIR}/javadoc DESTJARFILE= ${PORTNAME}.jar EXTRAJARS= jdbc2_0-stdext.jar jta-spec1_0_1.jar EXTRADOCS= README CHANGES @@ -45,8 +55,20 @@ PORTDOCS= * .endif +pre-fetch: + @${ECHO} "" + @${ECHO} "You may use the following build options:" + @${ECHO} "" + @${ECHO} " WITHOUT_COMPILE-yes Install the pre-compiled .jar file" + @${ECHO} "" + @${ECHO} "This port requires JDK 1.4.x or better to compile, but the" + @${ECHO} "JDBC driver will operate with JVM 1.2.x or better" + @${ECHO} "" + do-build: +.if !defined(WITHOUT_COMPILE) @cd ${WRKSRC} && ${ANT} ${ANT_TARGET} +.endif .if !defined(NOPORTDOCS) @${MKDIR} ${BUILDDIR}/doc && cd ${WRKSRC} && \ ${JAVADOC} -d ${BUILDDIR}/doc -package \ --- mysql-connector-java.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312061811.hB6IBqSi042032>