Bug 174100

Summary: add tomcat-7 support to devel/opengrok
Product: Ports & Packages Reporter: Ashley <ashley.wil>
Component: Individual Port(s)Assignee: Tom Judge <tj>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Ashley 2012-12-04 02:50:00 UTC
Please add tomcat-7 support to devel/opengrok

Fix: 

OPTIONS_SINGLE=        AS
-OPTIONS_SINGLE_AS=     TOMCAT5 TOMCAT6 RESIN3
+OPTIONS_SINGLE_AS=     TOMCAT7 TOMCAT5 TOMCAT6 RESIN3
 OPTIONS_DEFAULT=       TOMCAT6

 .include <bsd.port.pre.mk>
@@ -45,6 +45,12 @@ LIBFILES=    ant.jar \
                lucene-spellchecker-3.0.2.jar \
                swing-layout-0.9.jar

+.if ${PORT_OPTIONS:MTOMCAT7}
+WEBAPP_DIRS=   apache-tomcat-7.0
+BUILD_DEPENDS+=        ${LOCALBASE}/apache-tomcat-7.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
+RUN_DEPENDS+=  ${LOCALBASE}/apache-tomcat-7.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
+.endif
+
 .if ${PORT_OPTIONS:MTOMCAT6}
 WEBAPP_DIRS=   apache-tomcat-6.0
 BUILD_DEPENDS+=        ${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6--u7mdxdID8nHPxogedfZMFEpqOf9Yzjiu8PSx2aTlfuxbbTM2
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.orig       2012-12-04 12:36:14.000000000 +1000
+++ Makefile    2012-12-04 12:38:21.000000000 +1000
@@ -31,7 +31,7 @@ PLIST_SUB=    T=${WEBAPP_DIRS:S|^${LOCALBAS
 CONF_EXT=      sample
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-12-04 02:50:32 UTC
Responsible Changed
From-To: freebsd-ports-bugs->tj

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Jason Helfman freebsd_committer freebsd_triage 2012-12-04 05:02:39 UTC
Can you please also remove TOMCAT5 in this update, as it is approaching
EOL, and I am on a campaign to remove all tomcat55 dependencies.

Also note that the origin for the dependencies for tomcat7 are incorrect
here.

Thanks for the update!

Thanks tj
-jgh

--
Jason Helfman          | FreeBSD Committer
jgh@FreeBSD.org     | http://people.freebsd.org/~jgh  | The Power to Serve



On Mon, Dec 3, 2012 at 6:44 PM, Ashley <ashley.wil@gmail.com> wrote:

>
> >Number:         174100
> >Category:       ports
> >Synopsis:       add tomcat-7 support to devel/opengrok
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       low
> >Responsible:    freebsd-ports-bugs
> >State:          open
> >Quarter:
> >Keywords:
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Tue Dec 04 02:50:00 UTC 2012
> >Closed-Date:
> >Last-Modified:
> >Originator:     Ashley
> >Release:        FreeBSD 9.1
> >Organization:
> >Environment:
> FreeBSD shikai 9.0-RELEASE FreeBSD 9.0-RELEASE #7: Tue Jan 17 20:46:27 EST
> 2012     root@shikai:/usr/obj/usr/src/sys/SHIKAI  amd64
>
> >Description:
> Please add tomcat-7 support to devel/opengrok
> >How-To-Repeat:
>
> >Fix:
> --- Makefile.orig       2012-12-04 12:36:14.000000000 +1000
> +++ Makefile    2012-12-04 12:38:21.000000000 +1000
> @@ -31,7 +31,7 @@ PLIST_SUB=    T=${WEBAPP_DIRS:S|^${LOCALBAS
>  CONF_EXT=      sample
>
>  OPTIONS_SINGLE=        AS
> -OPTIONS_SINGLE_AS=     TOMCAT5 TOMCAT6 RESIN3
> +OPTIONS_SINGLE_AS=     TOMCAT7 TOMCAT5 TOMCAT6 RESIN3
>  OPTIONS_DEFAULT=       TOMCAT6
>
>  .include <bsd.port.pre.mk>
> @@ -45,6 +45,12 @@ LIBFILES=    ant.jar \
>                 lucene-spellchecker-3.0.2.jar \
>                 swing-layout-0.9.jar
>
> +.if ${PORT_OPTIONS:MTOMCAT7}
> +WEBAPP_DIRS=   apache-tomcat-7.0
> +BUILD_DEPENDS+=
>  ${LOCALBASE}/apache-tomcat-7.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
> +RUN_DEPENDS+=
>  ${LOCALBASE}/apache-tomcat-7.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
> +.endif
> +
>  .if ${PORT_OPTIONS:MTOMCAT6}
>  WEBAPP_DIRS=   apache-tomcat-6.0
>  BUILD_DEPENDS+=
>  ${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
>
>
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
> _______________________________________________
> freebsd-ports-bugs@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
> To unsubscribe, send any mail to "
> freebsd-ports-bugs-unsubscribe@freebsd.org"
>
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-01-29 16:20:22 UTC
Author: tj
Date: Tue Jan 29 16:20:00 2013
New Revision: 311170
URL: http://svnweb.freebsd.org/changeset/ports/311170

Log:
  * Drop tomcat55 support
  * Add tomcat7 support
  * Allow customization of application server installation path
  * Small plist fix
  
  PR:		ports/170597
  PR:		ports/174100
  PR:		ports/174529
  Submitted by:	Yuri Pankov <yuri.pankov@gmail.com>
  Submitted by:	Ashley <ashley.wil@gmail.com>
  Submitted by:	jgh

Modified:
  head/devel/opengrok/Makefile   (contents, props changed)
  head/devel/opengrok/pkg-plist   (contents, props changed)

Modified: head/devel/opengrok/Makefile
==============================================================================
--- head/devel/opengrok/Makefile	Tue Jan 29 15:49:10 2013	(r311169)
+++ head/devel/opengrok/Makefile	Tue Jan 29 16:20:00 2013	(r311170)
@@ -1,12 +1,9 @@
-# New ports collection makefile for:	opengrok
-# Date created:		10/13/2009
-# Whom:			stas
-#
+# Create by: stas
 # $FreeBSD$
-#
 
 PORTNAME=	opengrok
 PORTVERSION=	0.11.1
+PORTREVISION=	1
 CATEGORIES=	devel java
 MASTER_SITES=	http://hub.opensolaris.org/bin/download/Project+opengrok/files/
 
@@ -26,12 +23,12 @@ NO_BUILD=	yes
 SUB_FILES=	opengrok
 SUB_LIST+=	LIBFILES="${LIBFILES:S,^,${DATADIR}/,}" \
 		JARFILE="${JARFILE}"
-PLIST_SUB=	T=${WEBAPP_DIRS:S|^${LOCALBASE}/||} \
+PLIST_SUB=	T=${WEBAPP_HOME:S|^${LOCALBASE}/||} \
 		CONF_EXT=${CONF_EXT}
 CONF_EXT=	sample
 
 OPTIONS_SINGLE=	AS
-OPTIONS_SINGLE_AS=	TOMCAT5 TOMCAT6 RESIN3
+OPTIONS_SINGLE_AS=	TOMCAT7 TOMCAT6 RESIN3
 OPTIONS_DEFAULT=	TOMCAT6
 
 .include <bsd.port.pre.mk>
@@ -45,24 +42,26 @@ LIBFILES=	ant.jar \
 		lucene-spellchecker-3.0.2.jar \
 		swing-layout-0.9.jar
 
-.if ${PORT_OPTIONS:MTOMCAT6}
-WEBAPP_DIRS=	apache-tomcat-6.0
-BUILD_DEPENDS+=	${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
-RUN_DEPENDS+=	${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
+.if ${PORT_OPTIONS:MTOMCAT7}
+WEBAPP_HOME?=	${LOCALBASE}/apache-tomcat-7.0
+BUILD_DEPENDS+=	${WEBAPP_HOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat7
+RUN_DEPENDS+=	${WEBAPP_HOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat7
 .endif
 
-.if ${PORT_OPTIONS:MTOMCAT5}
-WEBAPP_DIRS=	tomcat5.5
-BUILD_DEPENDS+=	${LOCALBASE}/tomcat5.5/bin/bootstrap.jar:${PORTSDIR}/www/tomcat55
-RUN_DEPENDS+=	${LOCALBASE}/tomcat5.5/bin/bootstrap.jar:${PORTSDIR}/www/tomcat55
+.if ${PORT_OPTIONS:MTOMCAT6}
+WEBAPP_HOME?=	${LOCALBASE}/apache-tomcat-6.0
+BUILD_DEPENDS+=	${WEBAPP_HOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
+RUN_DEPENDS+=	${WEBAPP_HOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
 .endif
 
 .if ${PORT_OPTIONS:MRESIN3}
-WEBAPP_DIRS=	resin3
-BUILD_DEPENDS+=	${LOCALBASE}/resin3/lib/resin.jar:${PORTSDIR}/www/resin3
-RUN_DEPENDS+=	${LOCALBASE}/resin3/lib/resin.jar:${PORTSDIR}/www/resin3
+WEBAPP_HOME?=	${LOCALBASE}/resin3
+BUILD_DEPENDS+=	${WEBAPP_HOME}/lib/resin.jar:${PORTSDIR}/www/resin3
+RUN_DEPENDS+=	${WEBAPP_HOME}/lib/resin.jar:${PORTSDIR}/www/resin3
 .endif
 
+WEBAPPS_DIR=	${WEBAPP_HOME:S|^${LOCALBASE}/||}/webapps
+
 pre-everything::
 .if ${PREFIX}!=${LOCALBASE}
 	@${ECHO_MSG} "Warning: you changed prefix to ${PREFIX}"
@@ -75,17 +74,17 @@ post-extract:
 	@${TAR} xf ${WRKSRC}/lib/source.war -C ${WRKSRC}/lib/${PORTNAME}
 
 do-install:
-	${INSTALL} -d -o ${WWWOWN} -g ${WWWGRP} ${PREFIX}/${WEBAPP_DIRS}/webapps/${PORTNAME}
+	${INSTALL} -d -o ${WWWOWN} -g ${WWWGRP} ${PREFIX}/${WEBAPPS_DIR}/${PORTNAME}
 	@${MV} ${WRKSRC}/lib/${PORTNAME}/WEB-INF/web.xml ${WRKSRC}/lib/${PORTNAME}/WEB-INF/web.xml.${CONF_EXT}
-	@cd ${WRKSRC}/lib/${PORTNAME} && ${COPYTREE_SHARE} \* ${PREFIX}/${WEBAPP_DIRS}/webapps/${PORTNAME}
+	@cd ${WRKSRC}/lib/${PORTNAME} && ${COPYTREE_SHARE} \* ${PREFIX}/${WEBAPPS_DIR}/${PORTNAME}
 
-	@if [ ! -e "${PREFIX}/${WEBAPP_DIRS}/webapps/${PORTNAME}/WEB-INF/web.xml" ]; then \
-			${ECHO_MSG} "	Installing local configuration file: ${PREFIX}/${WEBAPP_DIRS}/webapps/${PORTNAME}/WEB-INF/web.xml"; \
-			${INSTALL_DATA} ${WRKSRC}/lib/${PORTNAME}/WEB-INF/web.xml.${CONF_EXT} ${PREFIX}/${WEBAPP_DIRS}/webapps/${PORTNAME}/WEB-INF/web.xml; \
+	@if [ ! -e "${PREFIX}/${WEBAPPS_DIR}/${PORTNAME}/WEB-INF/web.xml" ]; then \
+			${ECHO_MSG} "	Installing local configuration file: ${PREFIX}/${WEBAPPS_DIR}/${PORTNAME}/WEB-INF/web.xml"; \
+			${INSTALL_DATA} ${WRKSRC}/lib/${PORTNAME}/WEB-INF/web.xml.${CONF_EXT} ${PREFIX}/${WEBAPPS_DIR}/${PORTNAME}/WEB-INF/web.xml; \
 		else \
-			${ECHO_MSG} "	Preserving local configuration file: ${PREFIX}/${WEBAPP_DIRS}/webapps/${PORTNAME}/WEB-INF/web.xml"; \
+			${ECHO_MSG} "	Preserving local configuration file: ${PREFIX}/${WEBAPPS_DIR}/${PORTNAME}/WEB-INF/web.xml"; \
 	fi;
-	${INSTALL_DATA} ${WRKSRC}/lib/${PORTNAME}/WEB-INF/web.xml.${CONF_EXT} ${PREFIX}/${WEBAPP_DIRS}/webapps/${PORTNAME}/WEB-INF
+	${INSTALL_DATA} ${WRKSRC}/lib/${PORTNAME}/WEB-INF/web.xml.${CONF_EXT} ${PREFIX}/${WEBAPPS_DIR}/${PORTNAME}/WEB-INF
 
 	${MKDIR} ${DATADIR}/lib
 	${INSTALL_DATA} ${LIBFILES:S,^,${WRKSRC}/lib/lib/,} ${DATADIR}/lib/

Modified: head/devel/opengrok/pkg-plist
==============================================================================
--- head/devel/opengrok/pkg-plist	Tue Jan 29 15:49:10 2013	(r311169)
+++ head/devel/opengrok/pkg-plist	Tue Jan 29 16:20:00 2013	(r311170)
@@ -1,4 +1,4 @@
-@unexec if cmp -s %D%/%%T%%/webapps/opengrok/WEB-INF/web.xml %D%/%%T%%/webapps/opengrok/WEB-INF/web.xml.%%CONF_EXT%%; then rm -f %D%/%%T%%/webapps/opengrok/WEB-INF/web.xml; fi
+@unexec if cmp -s %D/%%T%%/webapps/opengrok/WEB-INF/web.xml %D/%%T%%/webapps/opengrok/WEB-INF/web.xml.%%CONF_EXT%%; then rm -f %D/%%T%%/webapps/opengrok/WEB-INF/web.xml; fi
 bin/opengrok
 %%PORTDOCS%%%%DOCSDIR%%/CHANGES.txt
 %%PORTDOCS%%%%DOCSDIR%%/EXAMPLE.txt
@@ -19,7 +19,7 @@ bin/opengrok
 %%T%%/webapps/opengrok/WEB-INF/lib/opengrok.jar
 %%T%%/webapps/opengrok/WEB-INF/lib/swing-layout-0.9.jar
 %%T%%/webapps/opengrok/WEB-INF/web.xml.%%CONF_EXT%%
-@exec if [ ! -f %D%/%%T%%/webapps/opengrok/WEB-INF/web.xml ]; then cp %D%/%%T%%/webapps/opengrok/WEB-INF/web.xml.%%CONF_EXT%% %D%/%%T%%/webapps/opengrok/WEB-INF/web.xml; fi
+@exec if [ ! -f %D/%%T%%/webapps/opengrok/WEB-INF/web.xml ]; then cp %D/%%T%%/webapps/opengrok/WEB-INF/web.xml.%%CONF_EXT%% %D/%%T%%/webapps/opengrok/WEB-INF/web.xml; fi
 %%T%%/webapps/opengrok/default/img/Logo.png
 %%T%%/webapps/opengrok/default/img/bg.png
 %%T%%/webapps/opengrok/default/img/button1.png
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Tom Judge freebsd_committer freebsd_triage 2013-01-29 16:20:58 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!