aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2011-09-11 20:04:20 +0800
committercrees <crees@FreeBSD.org>2011-09-11 20:04:20 +0800
commit968249406f3aed3c24549bbacc93f0306408349f (patch)
treeb05dfd1e1e7a5bc1af61cf12f85cc62c802fad03
parent3b081ab86ec67072ebbea2107b3e7ecac3823237 (diff)
downloadfreebsd-ports-gnome-968249406f3aed3c24549bbacc93f0306408349f.tar.gz
freebsd-ports-gnome-968249406f3aed3c24549bbacc93f0306408349f.tar.zst
freebsd-ports-gnome-968249406f3aed3c24549bbacc93f0306408349f.zip
- Allow user to add flags for startup case only
- (while here, stop using '::' in patchfile names) PR: ports/160571 Submitted by: Phil Phillips <pphillips@experts-exchange.com> Approved by: Jason Helfman <jhelfman@e-e.com> (maintainer)
-rw-r--r--www/tomcat55/Makefile2
-rw-r--r--www/tomcat55/files/patch-conf-server.xml (renamed from www/tomcat55/files/patch-conf::server.xml)2
-rw-r--r--www/tomcat55/files/tomcat55.sh.in21
3 files changed, 19 insertions, 6 deletions
diff --git a/www/tomcat55/Makefile b/www/tomcat55/Makefile
index ff290efd08b7..5fae2fd6b3cf 100644
--- a/www/tomcat55/Makefile
+++ b/www/tomcat55/Makefile
@@ -7,7 +7,7 @@
PORTNAME= tomcat
PORTVERSION= 5.5.33
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www java
MASTER_SITES= ${MASTER_SITE_APACHE}
MASTER_SITE_SUBDIR= tomcat/tomcat-5/v${PORTVERSION}/bin
diff --git a/www/tomcat55/files/patch-conf::server.xml b/www/tomcat55/files/patch-conf-server.xml
index 93c4a1f82e0e..b07f1d03df0b 100644
--- a/www/tomcat55/files/patch-conf::server.xml
+++ b/www/tomcat55/files/patch-conf-server.xml
@@ -1,3 +1,5 @@
+$FreeBSD$
+
--- ./conf/server.xml.orig 2010-09-04 21:54:16.000000000 +0200
+++ ./conf/server.xml 2010-10-01 23:00:25.000000000 +0200
@@ -27,7 +27,7 @@
diff --git a/www/tomcat55/files/tomcat55.sh.in b/www/tomcat55/files/tomcat55.sh.in
index 26fa2b615d28..e8f514f4e117 100644
--- a/www/tomcat55/files/tomcat55.sh.in
+++ b/www/tomcat55/files/tomcat55.sh.in
@@ -58,6 +58,10 @@
# Set to "" by default.
# Java VM args to use.
#
+# tomcat%%TOMCAT_VERSION%%_java_start_opts (str):
+# Set to "" by default.
+# Additional Java VM args to use when starting tomcat.
+#
tomcat%%TOMCAT_VERSION%%_enable="${tomcat%%TOMCAT_VERSION%%_enable:-"NO"}"
tomcat%%TOMCAT_VERSION%%_java_version="${tomcat%%TOMCAT_VERSION%%_java_version:-"%%JAVA_VERSION%%"}"
@@ -93,15 +97,22 @@ if [ -n "${tomcat%%TOMCAT_VERSION%%_java_os}" ] ; then
export JAVA_OS="${tomcat%%TOMCAT_VERSION%%_java_os}"
fi
-java_command="%%LOCALBASE%%/bin/java \
- ${tomcat%%TOMCAT_VERSION%%_java_opts} \
- -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \
+java_args="-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \
-classpath %%TOMCAT_HOME%%/%%JAR_FILE%%:%%TOMCAT_HOME%%/bin/commons-logging-api.jar:${tomcat%%TOMCAT_VERSION%%_classpath} \
-Dcatalina.base=${tomcat%%TOMCAT_VERSION%%_catalina_base} \
-Dcatalina.home=${tomcat%%TOMCAT_VERSION%%_catalina_home} \
-Djava.io.tmpdir=${tomcat%%TOMCAT_VERSION%%_catalina_tmpdir} \
org.apache.catalina.startup.Bootstrap"
+java_start_command="%%LOCALBASE%%/bin/java \
+ ${tomcat%%TOMCAT_VERSION%%_java_opts} \
+ ${tomcat%%TOMCAT_VERSION%%_java_start_opts} \
+ ${java_args}"
+
+java_stop_command="%%LOCALBASE%%/bin/java \
+ ${tomcat%%TOMCAT_VERSION%%_java_opts} \
+ ${java_args}"
+
log_args="%%LOG_ARGS%%"
# Subvert the check_pid_file procname check.
@@ -118,7 +129,7 @@ fi
required_files="${tomcat%%TOMCAT_VERSION%%_catalina_home}/conf/server.xml"
command="/usr/sbin/daemon"
-flags="-p ${pidfile} ${java_command} start ${tomcat%%TOMCAT_VERSION%%_flags} ${log_args}"
+flags="-p ${pidfile} ${java_start_command} start ${tomcat%%TOMCAT_VERSION%%_flags} ${log_args}"
start_precmd=pid_touch
stop_cmd="tomcat%%TOMCAT_VERSION%%_stop"
@@ -137,7 +148,7 @@ tomcat%%TOMCAT_VERSION%%_stop() {
fi
echo "Stopping ${name}."
- ${java_command} stop
+ ${java_stop_command} stop
tomcat_wait_max_for_pid ${tomcat%%TOMCAT_VERSION%%_stop_timeout} `cat $pidfile`
kill -KILL `cat $pidfile` 2> /dev/null && echo "Killed."
rm -f ${pidfile}