From owner-freebsd-ports-bugs@FreeBSD.ORG Tue May 2 13:30:19 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D1A816A418 for ; Tue, 2 May 2006 13:30:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AC2A43D62 for ; Tue, 2 May 2006 13:30:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k42DUGOa057941 for ; Tue, 2 May 2006 13:30:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k42DUGVQ057938; Tue, 2 May 2006 13:30:16 GMT (envelope-from gnats) Resent-Date: Tue, 2 May 2006 13:30:16 GMT Resent-Message-Id: <200605021330.k42DUGVQ057938@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Herve Quiroz Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F11516A423 for ; Tue, 2 May 2006 13:27:55 +0000 (UTC) (envelope-from rv@arabica.esil.univ-mrs.fr) Received: from arabica.esil.univ-mrs.fr (arabica.esil.univ-mrs.fr [139.124.41.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDD5143D49 for ; Tue, 2 May 2006 13:27:54 +0000 (GMT) (envelope-from rv@arabica.esil.univ-mrs.fr) Received: from arabica.esil.univ-mrs.fr (localhost [127.0.0.1]) by arabica.esil.univ-mrs.fr (8.13.4/8.13.4) with ESMTP id k42DRNiH027462; Tue, 2 May 2006 15:27:23 +0200 (CEST) (envelope-from rv@arabica.esil.univ-mrs.fr) Received: (from rv@localhost) by arabica.esil.univ-mrs.fr (8.13.4/8.13.4/Submit) id k42DRNpS027461; Tue, 2 May 2006 15:27:23 +0200 (CEST) (envelope-from rv) Message-Id: <200605021327.k42DRNpS027461@arabica.esil.univ-mrs.fr> Date: Tue, 2 May 2006 15:27:23 +0200 (CEST) From: Herve Quiroz To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: jbq@caraldi.com Subject: ports/96659: [PATCH] devel/maven: Improve launcher shell script X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 May 2006 13:30:19 -0000 >Number: 96659 >Category: ports >Synopsis: [PATCH] devel/maven: Improve launcher shell script >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: Tue May 02 13:30:16 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Herve Quiroz >Release: FreeBSD 6.1-PRERELEASE i386 >Organization: >Environment: System: FreeBSD arabica.esil.univ-mrs.fr 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Wed Mar 1 10:26:16 CET >Description: With this patch, the launcher shell script will set JAVA_HOME if no value is defined. The default value is the JDK that got chosen by the ports system at install time. We will be able to improve the script further when ports/96050 gets commited. To reduce the complexity of the launcher, it is now a plain new shell script, configured via SUB_FILES. While I was here, I also switched pkg-message to SUB_FILES (although its content could now be altered given ${JAVA_HOME} is not mandatory to run Maven anymore). PORTREVISION bumped. Added file(s): - files/maven.sh.in - files/pkg-message.in Removed file(s): - pkg-message - files/patch-maven-home Port maintainer (jbq@caraldi.com) is cc'd. Generated with FreeBSD Port Tools 0.75 >How-To-Repeat: >Fix: --- maven-1.0.2_1.patch begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/devel/maven/Makefile,v retrieving revision 1.9 diff -u -u -r1.9 Makefile --- Makefile 4 Apr 2006 08:08:47 -0000 1.9 +++ Makefile 2 May 2006 13:21:41 -0000 @@ -7,6 +7,7 @@ PORTNAME= maven PORTVERSION= 1.0.2 +PORTREVISION= 1 CATEGORIES= devel java MASTER_SITES= ${MASTER_SITE_APACHE} MASTER_SITE_SUBDIR= ${PORTNAME}/binaries @@ -19,21 +20,17 @@ JAVA_VERSION= 1.3+ NO_BUILD= yes DATADIR= ${JAVASHAREDIR}/${PORTNAME} -PKGMESSAGE= ${WRKDIR}/pkg-message -SUBSTITUTIONS= -e 's,%%DATADIR%%,${DATADIR},g' -REINPLACE_FILES= ${WRKSRC}/bin/maven -post-configure: - @${SED} ${SUBSTITUTIONS} pkg-message > ${PKGMESSAGE} - @${REINPLACE_CMD} ${SUBSTITUTIONS} ${REINPLACE_FILES} +SUB_FILES= maven.sh \ + pkg-message +SUB_LIST= JAVA_HOME=${JAVA_HOME} -BINFILES= install_repo.sh maven DIRECTORIES= lib lib/endorsed plugins + do-install: ${MKDIR} ${DATADIR}/bin -.for file in ${BINFILES} - ${INSTALL_SCRIPT} ${WRKSRC}/bin/${file} ${DATADIR}/bin -.endfor + ${INSTALL_SCRIPT} ${WRKSRC}/bin/install_repo.sh ${DATADIR}/bin + ${INSTALL_SCRIPT} ${WRKDIR}/maven.sh ${DATADIR}/bin/maven ${LN} -fs ${DATADIR}/bin/maven ${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/bin/forehead.conf ${DATADIR}/bin ${INSTALL_DATA} ${WRKSRC}/*.xsd ${DATADIR} Index: pkg-message =================================================================== RCS file: pkg-message diff -N pkg-message --- pkg-message 4 Apr 2006 08:08:47 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ - -To work with Maven you need to set the following environment variable: - * JAVA_HOME - Set it to the base directory of your java installation. - -Then, you should initialize your repository with: - %%DATADIR%%/bin/install_repo.sh ~/.maven/repository - -If you are behind a proxy, create a ~/.mavenrc file with something like: - MAVEN_OPTS="$MAVEN_OPTS -Dmaven.proxy.host=YOUR_PROXY_HOSTNAME - -Dmaven.proxy.port=YOUR_PROXY_PORT" Index: files/maven.sh.in =================================================================== RCS file: files/maven.sh.in diff -N files/maven.sh.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/maven.sh.in 2 May 2006 13:21:41 -0000 @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD$ + +FOREHEAD_VERSION="1.0-beta-5" + +if [ -z "${MAVEN_OPTS}" ] ; then + MAVEN_OPTS="-Xmx256m" +fi + +if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc +fi + +if [ -f "${HOME}/.mavenrc" ] ; then + . "${HOME}/.mavenrc" +fi + +MAVEN_HOME="${MAVEN_HOME:-"%%DATADIR%%"}" +JAVA_HOME="${JAVA_HOME:-"%%JAVA_HOME%%"}" +MAVEN_ENDORSED="${JAVA_HOME}/lib/endorsed:${MAVEN_HOME}/lib/endorsed" +TOOLS_JAR="${JAVA_HOME}/lib/tools.jar" +MAIN_CLASS="com.werken.forehead.Forehead" + +if [ -n "${MAVEN_HOME_LOCAL}" ]; then + MAVEN_OPTS="${MAVEN_OPTS} -Dmaven.home.local=${MAVEN_HOME_LOCAL}" +fi + +JAVA_HOME="${JAVA_HOME}" \ + exec "%%LOCALBASE%%/bin/java" \ + ${MAVEN_OPTS} \ + "-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl" \ + "-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" \ + "-Djava.endorsed.dirs=${MAVEN_ENDORSED}" \ + -classpath "${MAVEN_HOME}/lib/forehead-${FOREHEAD_VERSION}.jar" \ + "-Dforehead.conf.file=${MAVEN_HOME}/bin/forehead.conf" \ + "-Dtools.jar=${TOOLS_JAR}" \ + "-Dmaven.home=${MAVEN_HOME}" \ + "${MAIN_CLASS}" "$@" Index: files/patch-maven-home =================================================================== RCS file: files/patch-maven-home diff -N files/patch-maven-home --- files/patch-maven-home 4 Apr 2006 08:08:47 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,10 +0,0 @@ ---- bin/maven.orig Tue Dec 7 12:13:46 2004 -+++ bin/maven Sat Apr 1 00:07:23 2006 -@@ -19,6 +19,7 @@ - # reserved. - - FOREHEAD_VERSION=1.0-beta-5 -+MAVEN_HOME=%%DATADIR%% - - if [ -z "$MAVEN_OPTS" ] ; then - MAVEN_OPTS="-Xmx256m" Index: files/pkg-message.in =================================================================== RCS file: files/pkg-message.in diff -N files/pkg-message.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/pkg-message.in 2 May 2006 13:21:41 -0000 @@ -0,0 +1,11 @@ + +To work with Maven you need to set the following environment variable: + * JAVA_HOME + Set it to the base directory of your java installation. + +Then, you should initialize your repository with: + %%DATADIR%%/bin/install_repo.sh ~/.maven/repository + +If you are behind a proxy, create a ~/.mavenrc file with something like: + MAVEN_OPTS="$MAVEN_OPTS -Dmaven.proxy.host=YOUR_PROXY_HOSTNAME + -Dmaven.proxy.port=YOUR_PROXY_PORT" --- maven-1.0.2_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: