aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorhq <hq@FreeBSD.org>2006-06-26 04:44:09 +0800
committerhq <hq@FreeBSD.org>2006-06-26 04:44:09 +0800
commit770ff767b75c4f40fa35189956bdd4f6a5763db6 (patch)
tree9ab39ab4f5ed85a28aa770d4a69705f875f5a1e2 /devel
parentf33661da5771c7552915225892ade333a5ae07f8 (diff)
downloadfreebsd-ports-gnome-770ff767b75c4f40fa35189956bdd4f6a5763db6.tar.gz
freebsd-ports-gnome-770ff767b75c4f40fa35189956bdd4f6a5763db6.tar.zst
freebsd-ports-gnome-770ff767b75c4f40fa35189956bdd4f6a5763db6.zip
- Use new features from javavmwrapper 2.2 to set a default value for JAVA_HOME
- Set a default value for MAVEN_HOME only when not already defined - Update pkg-message to reflect these changes PR: 96659 Submitted by: hq Approved by: maintainer
Diffstat (limited to 'devel')
-rw-r--r--devel/maven/Makefile7
-rw-r--r--devel/maven/files/patch-maven-home21
-rw-r--r--devel/maven/pkg-message6
3 files changed, 25 insertions, 9 deletions
diff --git a/devel/maven/Makefile b/devel/maven/Makefile
index 49c7d0e6e9f8..b0d3cfe9cd9c 100644
--- a/devel/maven/Makefile
+++ b/devel/maven/Makefile
@@ -14,13 +14,18 @@ MASTER_SITE_SUBDIR= ${PORTNAME}/binaries
MAINTAINER= jbq@caraldi.com
COMMENT= Java project management and project comprehension tool
+RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper
+
USE_BZIP2= yes
USE_JAVA= yes
JAVA_VERSION= 1.3+
NO_BUILD= yes
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
PKGMESSAGE= ${WRKDIR}/pkg-message
-SUBSTITUTIONS= -e 's,%%DATADIR%%,${DATADIR},g'
+SUBSTITUTIONS= -e 's,%%DATADIR%%,${DATADIR},g' \
+ -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
+ -e 's,%%GREP%%,${GREP},g' \
+ -e 's,%%CUT%%,${CUT},g'
REINPLACE_FILES= ${WRKSRC}/bin/maven
post-configure:
diff --git a/devel/maven/files/patch-maven-home b/devel/maven/files/patch-maven-home
index d57e7cdbcd9e..c8e1eb5b2d1a 100644
--- a/devel/maven/files/patch-maven-home
+++ b/devel/maven/files/patch-maven-home
@@ -1,10 +1,25 @@
+$FreeBSD$
+
+. Set default FreeBSD values for MAVEN_HOME and JAVA_HOME
+. Use 'exec' to launch the JVM
+
--- bin/maven.orig Tue Dec 7 12:13:46 2004
-+++ bin/maven Sat Apr 1 00:07:23 2006
-@@ -19,6 +19,7 @@
++++ bin/maven Mon Jun 19 17:31:50 2006
+@@ -19,6 +19,8 @@
# reserved.
FOREHEAD_VERSION=1.0-beta-5
-+MAVEN_HOME=%%DATADIR%%
++: ${MAVEN_HOME="%%DATADIR%%"}
++: ${JAVA_HOME="`JAVAVM_DRYRUN=yes %%LOCALBASE%%/bin/java | %%GREP%% '^JAVA_HOME' | %%CUT%% -d= -f2`"}
if [ -z "$MAVEN_OPTS" ] ; then
MAVEN_OPTS="-Xmx256m"
+@@ -150,7 +153,7 @@
+ MAVEN_OPTS="$MAVEN_OPTS -Dmaven.home.local=${MAVEN_HOME_LOCAL}"
+ fi
+
+-"$JAVACMD" \
++exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl \
+ -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl \
diff --git a/devel/maven/pkg-message b/devel/maven/pkg-message
index 6fc376fecdd4..052d46356652 100644
--- a/devel/maven/pkg-message
+++ b/devel/maven/pkg-message
@@ -1,9 +1,5 @@
-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:
+You may initialize your repository with:
%%DATADIR%%/bin/install_repo.sh ~/.maven/repository
If you are behind a proxy, create a ~/.mavenrc file with something like: