Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Apr 2004 10:51:53 +0200 (CEST)
From:      Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        znerd@FreeBSD.org
Subject:   ports/65063: [PATCH] devel/apache-ant: portlint compliance and javavmwrapper's 'classpath'
Message-ID:  <200404020851.i328prrc036107@arabica.esil.univ-mrs.fr>
Resent-Message-ID: <200404020900.i3290TYr090688@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         65063
>Category:       ports
>Synopsis:       [PATCH] devel/apache-ant: portlint compliance and javavmwrapper's 'classpath'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 02 01:00:28 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Herve Quiroz
>Release:        FreeBSD 5.2.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD arabica.esil.univ-mrs.fr 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Fri Feb 27 11:36:17 CET 2004
>Description:

- fixed the location of EXTRACT_ONLY in Makefile so now portlint does not
  complain
- changed the 'ant(1)' script so that it now uses the 'classpath' command
  provided by java/javavmwrapper (command added recently)

NOTE: This port does not comply to the NOPORTDOCS macro. I could provide a
patch for this if you want. Anyway, I think the port documentation should be
located in ${DOCSDIR} rather than ${PREFIX}/ant/doc. I would also rather move
ANT_HOME to ${JAVASHAREDIR}/ant (not to make an exception with Ant compared to
other Java ports -- think of devel/maven or games/pcgen for instance).

NOTE2: use of PORTDOCS macro could reduce the ports tree size by about 80Kb...

NOTE3: I can provide patch/fixes for everything I mention in this PR if you
want: I am currently in heavy Java coding stage at work so I can find the time
to send PRs between coding sessions (especially when those PRs may ease my
coding sessions).

Port maintainer (znerd@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:

--- apache-ant-1.6.1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/apache-ant.original/Makefile /usr/ports/devel/apache-ant/Makefile
--- /usr/ports/devel/apache-ant.original/Makefile	Fri Apr  2 10:23:52 2004
+++ /usr/ports/devel/apache-ant/Makefile	Fri Apr  2 10:29:12 2004
@@ -15,14 +15,16 @@
 		http://www.esil.univ-mrs.fr/~hquiroz/:man
 DISTFILES=	${ANT_DISTFILE}:bin \
 		${MANPAGE_DISTFILE}:man
+EXTRACT_ONLY=	${ANT_DISTFILE}
 
 MAINTAINER=	znerd@FreeBSD.org
 COMMENT=	Java- and XML-based build tool, conceptually similar to make
 
+RUN_DEPENDS=	classpath:${PORTSDIR}/java/javavmwrapper
+
 ANT_DISTFILE=	${PORTNAME}-${PORTVERSION}-bin.tar.bz2
 MANPAGE_DISTFILE=	${PORTNAME}-manpage-${MANPAGE_VERSION}.tgz
 MANPAGE_VERSION=	20030908
-EXTRACT_ONLY=	${ANT_DISTFILE}
 USE_BZIP2=	yes
 USE_JAVA=	1.2+
 
diff -ruN --exclude=CVS /usr/ports/devel/apache-ant.original/files/ant /usr/ports/devel/apache-ant/files/ant
--- /usr/ports/devel/apache-ant.original/files/ant	Fri Apr  2 10:23:52 2004
+++ /usr/ports/devel/apache-ant/files/ant	Fri Apr  2 10:24:45 2004
@@ -69,17 +69,15 @@
 
 # FreeBSD-specific: Add the .jar files from ${PREFIX}/share/java/classes
 if [ "${ANT_INCLUDE_SHARED_JARS}" = "YES" ]; then
-	for JAR_FILE in "%%PREFIX%%/share/java/classes"/*.jar; do
-
-		# If the directory is empty, then the input string is returned
-		if [ -f "${JAR_FILE}" ]; then
-			if [ -z "${LOCALCLASSPATH}" ]; then
-				LOCALCLASSPATH="${JAR_FILE}"
-			else
-				LOCALCLASSPATH="${JAR_FILE}":"${LOCALCLASSPATH}"
-			fi
-		fi
-	done
+	CLASSPATH_CMD=/usr/local/bin/classpath
+	if [ -x "${CLASSPATH_CMD}" ]; then
+		SHARED_JARS=`${CLASSPATH_CMD}`
+		LOCALCLASSPATH=${SHARED_JARS}:"${LOCALCLASSPATH}"
+	else
+		echo "Error: ${CLASSPATH_CMD} is not present on your system"
+		echo "       you should install the java/javavmwrapper port"
+		exit 1
+	fi
 fi
 
 
--- apache-ant-1.6.1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404020851.i328prrc036107>