[77248] trunk/dports/java/tomcat5/Portfile

blair at macports.org blair at macports.org
Thu Mar 24 09:39:46 PDT 2011


Revision: 77248
          http://trac.macports.org/changeset/77248
Author:   blair at macports.org
Date:     2011-03-24 09:39:46 -0700 (Thu, 24 Mar 2011)
Log Message:
-----------
tomcat5: whitespace cleanup.

Modified Paths:
--------------
    trunk/dports/java/tomcat5/Portfile

Modified: trunk/dports/java/tomcat5/Portfile
===================================================================
--- trunk/dports/java/tomcat5/Portfile	2011-03-24 16:35:12 UTC (rev 77247)
+++ trunk/dports/java/tomcat5/Portfile	2011-03-24 16:39:46 UTC (rev 77248)
@@ -2,231 +2,228 @@
 
 PortSystem 1.0
 
-name				tomcat5
-version				5.5.25
-revision            1
+name                    tomcat5
+version                 5.5.25
+revision                1
 
-categories			java www
-maintainers			nomaintainer
-platforms			darwin
+categories              java www
+maintainers             nomaintainer
+platforms               darwin
 
-description			Tomcat 5 HTTP Server and Java Servlet Container.
-long_description	Tomcat is the servlet container that is used in the official \
-					Reference Implementation for the Java Servlet and JavaServer \
-					Pages technologies.
-homepage			http://tomcat.apache.org/
+description             Tomcat 5 HTTP Server and Java Servlet Container.
+long_description        Tomcat is the servlet container that is used in \
+                        the official Reference Implementation for the Java \
+                        Servlet and JavaServer Pages technologies.
+homepage                http://tomcat.apache.org/
 
-distname			apache-tomcat-${version}-src
-master_sites		apache:tomcat/tomcat-5/v${version}/src/
-checksums			md5 2d6cc9a16aceeef4ec3610cd782d5c9d \
-					sha1 81ef41e25f805831aa63353f52e5b498c74a3414 
-					
-patchfiles			patch-catalina.sh
+distname                apache-tomcat-${version}-src
+master_sites            apache:tomcat/tomcat-5/v${version}/src/
+checksums               md5 2d6cc9a16aceeef4ec3610cd782d5c9d \
+                        sha1 81ef41e25f805831aa63353f52e5b498c74a3414 
+                                        
+patchfiles              patch-catalina.sh
 
-depends_build		bin:ant:apache-ant
-depends_lib			bin:java:kaffe \
-					bin:jsvc:commons-daemon \
-					port:jakarta-taglibs-standard-11 \
-					port:commons-beanutils \
-					port:commons-collections \
-					port:commons-launcher \
-					port:commons-daemon \
-					port:commons-digester \
-					port:commons-el \
-					port:commons-logging \
-					port:commons-modeler \
-					port:commons-httpclient \
-					port:commons-pool \
-					port:commons-dbcp \
-					port:commons-fileupload \
-					port:commons-io \
-					port:jakarta-regexp \
-					port:xercesj \
-					port:jakarta-log4j \
-					port:mx4j \
-					port:junit \
-					port:jaxen \
-					port:saxpath
-				
-worksrcdir			${distname}/build
+depends_build           bin:ant:apache-ant
+depends_lib             bin:java:kaffe \
+                        bin:jsvc:commons-daemon \
+                        port:jakarta-taglibs-standard-11 \
+                        port:commons-beanutils \
+                        port:commons-collections \
+                        port:commons-launcher \
+                        port:commons-daemon \
+                        port:commons-digester \
+                        port:commons-el \
+                        port:commons-logging \
+                        port:commons-modeler \
+                        port:commons-httpclient \
+                        port:commons-pool \
+                        port:commons-dbcp \
+                        port:commons-fileupload \
+                        port:commons-io \
+                        port:jakarta-regexp \
+                        port:xercesj \
+                        port:jakarta-log4j \
+                        port:mx4j \
+                        port:junit \
+                        port:jaxen \
+                        port:saxpath
+                                
+worksrcdir              ${distname}/build
 
-set javaLibs		${prefix}/share/java
-set home			share/java/tomcat5
-set tomcatuser		www
-set tomcatgroup		www
+set javaLibs            ${prefix}/share/java
+set home                share/java/tomcat5
+set tomcatuser          www
+set tomcatgroup         www
 
-use_configure		no
+use_configure           no
 
-build.cmd			ant
-build.target		download dist compat
-build.args			[join "
-					-Dbase.path=${worksrcpath}/Repository
-					-Dnsis.exe=${worksrcpath}/.bogus
-					-Dcommons-beanutils.jar=${javaLibs}/commons-beanutils.jar
-					-Dcommons-collections.jar=${javaLibs}/commons-collections.jar
-					-Dcommons-launcher.jar=${javaLibs}/commons-launcher.jar
-					-Dcommons-daemon.jar=${javaLibs}/commons-daemon.jar
-					-Dcommons-digester.jar=${javaLibs}/commons-digester.jar
-					-Dcommons-el.jar=${javaLibs}/commons-el.jar
-					-Dcommons-logging.jar=${javaLibs}/commons-logging.jar
-					-Dcommons-logging-api.jar=${javaLibs}/commons-logging-api.jar
-					-Dcommons-modeler.jar=${javaLibs}/commons-modeler.jar
-					-Dcommons-httpclient.jar=${javaLibs}/commons-httpclient.jar
-					-Dcommons-pool.jar=${javaLibs}/commons-pool.jar
-					-Dcommons-dbcp.jar=${javaLibs}/commons-dbcp.jar
-					-Dcommons-fileupload.jar=${javaLibs}/commons-fileupload.jar
-					-Dregexp.jar=${javaLibs}/jakarta-regexp.jar
-					-DxercesImpl.jar=${javaLibs}/xercesImpl.jar
-					-Dxml-apis.jar=${javaLibs}/xml-apis.jar
-					-Dlog4j.jar=${javaLibs}/jakarta-log4j.jar
-					-Djmx.lib=${javaLibs}
-					-Djunit.jar=${javaLibs}/junit.jar
-					-Djaxen.jar=${javaLibs}/jaxen.jar
-					-Dsaxpath.jar=${javaLibs}/saxpath.jar
-					-Djasper.home=${worksrcpath}/../jasper
-					"]
-#					-Dstruts.lib=${javaLibs}/struts/lib
+build.cmd               ant
+build.target            download dist compat
+build.args              [join "
+                                -Dbase.path=${worksrcpath}/Repository
+                                -Dnsis.exe=${worksrcpath}/.bogus
+                                -Dcommons-beanutils.jar=${javaLibs}/commons-beanutils.jar
+                                -Dcommons-collections.jar=${javaLibs}/commons-collections.jar
+                                -Dcommons-launcher.jar=${javaLibs}/commons-launcher.jar
+                                -Dcommons-daemon.jar=${javaLibs}/commons-daemon.jar
+                                -Dcommons-digester.jar=${javaLibs}/commons-digester.jar
+                                -Dcommons-el.jar=${javaLibs}/commons-el.jar
+                                -Dcommons-logging.jar=${javaLibs}/commons-logging.jar
+                                -Dcommons-logging-api.jar=${javaLibs}/commons-logging-api.jar
+                                -Dcommons-modeler.jar=${javaLibs}/commons-modeler.jar
+                                -Dcommons-httpclient.jar=${javaLibs}/commons-httpclient.jar
+                                -Dcommons-pool.jar=${javaLibs}/commons-pool.jar
+                                -Dcommons-dbcp.jar=${javaLibs}/commons-dbcp.jar
+                                -Dcommons-fileupload.jar=${javaLibs}/commons-fileupload.jar
+                                -Dregexp.jar=${javaLibs}/jakarta-regexp.jar
+                                -DxercesImpl.jar=${javaLibs}/xercesImpl.jar
+                                -Dxml-apis.jar=${javaLibs}/xml-apis.jar
+                                -Dlog4j.jar=${javaLibs}/jakarta-log4j.jar
+                                -Djmx.lib=${javaLibs}
+                                -Djunit.jar=${javaLibs}/junit.jar
+                                -Djaxen.jar=${javaLibs}/jaxen.jar
+                                -Dsaxpath.jar=${javaLibs}/saxpath.jar
+                                -Djasper.home=${worksrcpath}/../jasper
+                                "]
+#                               -Dstruts.lib=${javaLibs}/struts/lib
 
 # Remove compatibility for pre-JRE 1.5 systems
 variant nocompat {
-	build.target-delete compat
+        build.target-delete compat
 }
 
 pre-build {
-	#
-	# Tomcat in this version requires ant 1.6.2.
-	# If the current version of ant is not at least 1.6.2 then
-	# tell the user and fail.
-	#
-	if { [string length [auto_execok ant]] } {
-		set verOutput [exec ant -version]
-		regexp {version (\d+(\.\d+)*)} $verOutput -> antVersion
-		if { [rpm-vercomp $antVersion "1.6.2"] < 0 } {
-			return -code error "This version of tomcat requires ant version 1.6.2 or better. Please install a newer ant before proceeding."
-		}
-	}
+        #
+        # Tomcat in this version requires ant 1.6.2.
+        # If the current version of ant is not at least 1.6.2 then
+        # tell the user and fail.
+        #
+        if { [string length [auto_execok ant]] } {
+                set verOutput [exec ant -version]
+                regexp {version (\d+(\.\d+)*)} $verOutput -> antVersion
+                if { [rpm-vercomp $antVersion "1.6.2"] < 0 } {
+                        return -code error "This version of tomcat requires ant version 1.6.2 or better. Please install a newer ant before proceeding."
+                }
+        }
 
-	# Make a bogus file to prevent nsis.exe from downloading
-	system "touch ${worksrcpath}/.bogus"
+        # Make a bogus file to prevent nsis.exe from downloading
+        system "touch ${worksrcpath}/.bogus"
 }
 
 destroot {
-	set target ${destroot}${prefix}/${home}
+        set target ${destroot}${prefix}/${home}
 
-	# Ensure we've got needed directories
-	xinstall -m 755 -d \
-		${destroot}${prefix}/share/java \
-		${destroot}${prefix}/share/doc \
-		${destroot}${prefix}/etc/rc.d
-		
-	# Create the tomcat user
-	addgroup ${tomcatgroup}
-	set gid [existsgroup ${tomcatgroup}]
-	adduser ${tomcatuser} gid=${gid} realname=Web Server
-	
-	# Install Tomcat
-	file copy ${worksrcpath}/dist ${target}
-	
-	# Add compat files as needed
-	if { ! [variant_isset nocompat] } {
-		system "tar -cf - -C ${worksrcpath}/compat . | tar xpf - -C ${target}"
-	}
-	
-	# Add the jstl libs to tomcat5/shared/lib so that they're available to all
-	xinstall -m 644 \
-		${prefix}/share/java/jstl.jar \
-		${prefix}/share/java/standard.jar \
-		${target}/shared/lib
-		
-	# Remove unwanted files
-	foreach f [glob -directory ${target}/bin *.bat] { file delete $f }
-	
-	# Maintain empty directories
-	destroot.keepdirs-append \
-		${target}/logs \
-		${target}/temp \
-		${target}/work \
-		${target}/shared/classes \
-		${target}/common/classes
-		
-	# Install our scripts
-	xinstall -m 755 \
-		${filespath}/tomcatctl \
-		${filespath}/conf_setup.sh \
-		${filespath}/setenv.sh \
-		${target}/bin
-	xinstall -m 755 \
-		${filespath}/setenv.local \
-		${target}/conf
-	
-	# Don't install startup script, as we're now generating a startupitem
-	#xinstall -m 755 ${filespath}/tomcat5.sh \
-	#	${destroot}${prefix}/etc/rc.d
-	#reinplace s|TOMCATPREFIX=$|TOMCATPREFIX=${prefix}/${home}| ${destroot}${prefix}/etc/rc.d/tomcat5.sh
-		
-	# Add a symlink from bin directory to tomcatctl
-	system "cd ${destroot}${prefix}/bin && ln -s ../${home}/bin/tomcatctl"
-	
-	# Configure the scripts
-	reinplace s|PREFIX=$|PREFIX=${prefix}| ${target}/bin/tomcatctl
-	reinplace s|TOMCAT_USER=$|TOMCAT_USER=${tomcatuser}| ${target}/bin/tomcatctl
-	
-	# Rename certain files as .sample to avoid replacing them on update
-	# These will be "repaired" by conf_setup.sh on first run
-	foreach f 	"
-				catalina.policy
-				catalina.properties
-				server.xml
-				tomcat-users.xml
-				web.xml
-				setenv.local
-				" {
-		file rename ${target}/conf/${f} ${target}/conf/${f}.sample
-	}
+        # Ensure we've got needed directories
+        xinstall -m 755 -d \
+                ${destroot}${prefix}/share/java \
+                ${destroot}${prefix}/share/doc \
+                ${destroot}${prefix}/etc/rc.d
+                
+        # Create the tomcat user
+        addgroup ${tomcatgroup}
+        set gid [existsgroup ${tomcatgroup}]
+        adduser ${tomcatuser} gid=${gid} realname=Web Server
+        
+        # Install Tomcat
+        file copy ${worksrcpath}/dist ${target}
+        
+        # Add compat files as needed
+        if { ! [variant_isset nocompat] } {
+                system "tar -cf - -C ${worksrcpath}/compat . | tar xpf - -C ${target}"
+        }
+        
+        # Add the jstl libs to tomcat5/shared/lib so that they're available to all
+        xinstall -m 644 \
+                ${prefix}/share/java/jstl.jar \
+                ${prefix}/share/java/standard.jar \
+                ${target}/shared/lib
+                
+        # Remove unwanted files
+        foreach f [glob -directory ${target}/bin *.bat] { file delete $f }
+        
+        # Maintain empty directories
+        destroot.keepdirs-append \
+                ${target}/logs \
+                ${target}/temp \
+                ${target}/work \
+                ${target}/shared/classes \
+                ${target}/common/classes
+                
+        # Install our scripts
+        xinstall -m 755 \
+                ${filespath}/tomcatctl \
+                ${filespath}/conf_setup.sh \
+                ${filespath}/setenv.sh \
+                ${target}/bin
+        xinstall -m 755 \
+                ${filespath}/setenv.local \
+                ${target}/conf
+        
+        # Don't install startup script, as we're now generating a startupitem
+        #xinstall -m 755 ${filespath}/tomcat5.sh \
+        #        ${destroot}${prefix}/etc/rc.d
+        #reinplace s|TOMCATPREFIX=$|TOMCATPREFIX=${prefix}/${home}| ${destroot}${prefix}/etc/rc.d/tomcat5.sh
+                
+        # Add a symlink from bin directory to tomcatctl
+        system "cd ${destroot}${prefix}/bin && ln -s ../${home}/bin/tomcatctl"
+        
+        # Configure the scripts
+        reinplace s|PREFIX=$|PREFIX=${prefix}| ${target}/bin/tomcatctl
+        reinplace s|TOMCAT_USER=$|TOMCAT_USER=${tomcatuser}| ${target}/bin/tomcatctl
+        
+        # Rename certain files as .sample to avoid replacing them on update
+        # These will be "repaired" by conf_setup.sh on first run
+        foreach f         "
+                                catalina.policy
+                                catalina.properties
+                                server.xml
+                                tomcat-users.xml
+                                web.xml
+                                setenv.local
+                                " {
+                file rename ${target}/conf/${f} ${target}/conf/${f}.sample
+        }
 
-	# Fix ownership of some directories tomcat really needs to write to
-	system "chown -R ${tomcatuser}:${tomcatgroup} \
-		${target}/conf \
-		${target}/logs \
-		${target}/temp \
-		${target}/webapps \
-		${target}/work"
-	
-	# Install the docs
-	file copy ${worksrcpath}/build/docs \
-		${destroot}${prefix}/share/doc/${name}
+        # Fix ownership of some directories tomcat really needs to write to
+        system "chown -R ${tomcatuser}:${tomcatgroup} \
+                ${target}/conf \
+                ${target}/logs \
+                ${target}/temp \
+                ${target}/webapps \
+                ${target}/work"
+        
+        # Install the docs
+        file copy ${worksrcpath}/build/docs \
+                ${destroot}${prefix}/share/doc/${name}
 }
 
 
 post-install {
-	ui_msg "#"
-	ui_msg "# Configuration files in ${prefix}/${home}/conf have been"
-	ui_msg "# installed with a .sample extension so that they won't be replaced by a"
-	ui_msg "# port update. Each will be copied to its proper location during the"
-	ui_msg "# first startup of tomcat by catalina.sh or tomcatctl if you don't"
-	ui_msg "# do this yourself first. If this _is_ an update, you might do a diff to"
-	ui_msg "# verify that you're not missing anything in the newer .sample versions"
-	ui_msg "# of these files."
-	ui_msg "#"
-	ui_msg "# The script ${prefix}/${home}/bin/tomcatctl has been installed to"
-	ui_msg "# facilitate start and stop of tomcat using the jsvc utility, which allows you to"
-	ui_msg "# start tomcat as a true daemon process. Once tomcat has acquired its TCP socket,"
-	ui_msg "# jsvc will drop its root privileges and run as user ${tomcatuser}."
-	ui_msg "#"
-	ui_msg "# Under Apple Java, control over the Java version used to launch ${name} is"
-	ui_msg "# through the shell variable JAVA_JVM_VERSION. This variable should be set"
-	ui_msg "# to a java version such as 1.4, 1.5, or CurrentJDK (for the default version)."
-	ui_msg "# You may set JAVA_JVM_VERSION in ${prefix}/${home}/bin/setenv.sh."
-	ui_msg "#"
+        ui_msg "#"
+        ui_msg "# Configuration files in ${prefix}/${home}/conf have been"
+        ui_msg "# installed with a .sample extension so that they won't be replaced by a"
+        ui_msg "# port update. Each will be copied to its proper location during the"
+        ui_msg "# first startup of tomcat by catalina.sh or tomcatctl if you don't"
+        ui_msg "# do this yourself first. If this _is_ an update, you might do a diff to"
+        ui_msg "# verify that you're not missing anything in the newer .sample versions"
+        ui_msg "# of these files."
+        ui_msg "#"
+        ui_msg "# The script ${prefix}/${home}/bin/tomcatctl has been installed to"
+        ui_msg "# facilitate start and stop of tomcat using the jsvc utility, which allows you to"
+        ui_msg "# start tomcat as a true daemon process. Once tomcat has acquired its TCP socket,"
+        ui_msg "# jsvc will drop its root privileges and run as user ${tomcatuser}."
+        ui_msg "#"
+        ui_msg "# Under Apple Java, control over the Java version used to launch ${name} is"
+        ui_msg "# through the shell variable JAVA_JVM_VERSION. This variable should be set"
+        ui_msg "# to a java version such as 1.4, 1.5, or CurrentJDK (for the default version)."
+        ui_msg "# You may set JAVA_JVM_VERSION in ${prefix}/${home}/bin/setenv.sh."
+        ui_msg "#"
 }
 
+startupitem.create      yes
+startupitem.executable  "${prefix}/bin/tomcatctl" start
+startupitem.pidfile     clean "${prefix}/share/java/tomcat5/logs/${name}.pid"
 
-startupitem.create		yes
-startupitem.executable	"${prefix}/bin/tomcatctl" start
-startupitem.pidfile		clean "${prefix}/share/java/tomcat5/logs/${name}.pid"
-
-
-livecheck.type  regex
-livecheck.url   ${homepage}/download-55.cgi
-livecheck.regex "apache-tomcat-(\\d+\\.\\d+(\\.\\d+)?)-src.tar.gz"
-
+livecheck.type          regex
+livecheck.url           ${homepage}/download-55.cgi
+livecheck.regex         "apache-tomcat-(\\d+\\.\\d+(\\.\\d+)?)-src.tar.gz"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110324/c61756d2/attachment-0001.html>


More information about the macports-changes mailing list