Page MenuHomeFreeBSD

devel/opengrok: update to 1.0 and takeover maintainership

Authored by ultima on Jun 25 2017, 5:37 PM.


  • Updated to 1.0
  • New maintainer Jov <>
  • New options, TOMCAT 8 and 85, 8 is the new default


PR\: 220082
Sumitted by\: Jov <> (maintainer)
Reviewed by\: lifanov (mentor), matthew (mentor)
Approved by\: lifanov (mentor), matthew (mentor)
Differential Revision\:

Test Plan

portlint -AC:
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
0 fatal errors and 1 warning found.


Diff Detail

rP FreeBSD ports repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

6 ↗(On Diff #30065)

USE_GITHUB isn't being used because this is precompiled.

60 ↗(On Diff #30065)

This whole chunk should be:

TOMCAT85_VARS=    WEBAPP_HOME?= ${LOCALBASE}/apache-tomcat-8.5
64 ↗(On Diff #30065)
TOMCAT8_VARS=    WEBAPP_HOME?= ${LOCALBASE}/apache-tomcat-8.0
68 ↗(On Diff #30065)
TOMCAT7_VARS=    WEBAPP_HOME?= ${LOCALBASE}/apache-tomcat-7.0
72 ↗(On Diff #30065)
TOMCAT6_VARS=    WEBAPP_HOME?= ${LOCALBASE}/apache-tomcat-6.0
76 ↗(On Diff #30065)

Nowadays, any time you see:


you can 99% of the time replace it with one of the constructs documented in ${PORTSDIR}/MK/

You can still fetch it from GitHub and build it. This should be preferable to fetching precompiled jar files.

Other than the comments about ${OPTION}_VARS this all looks OK to me.

This revision is now accepted and ready to land.Jun 26 2017, 7:35 AM

Other than the comments about ${OPTION}_VARS this all looks OK to me.

I just added these and it will no longer build. First guess, OPT_VARS must be parsed after OPT_BUILD_DEPENDS/RUN_DEPENDS. Unless i'm doing something obviously wrong that I'm not seeing.

[103amd64-test-job-01] Extracting tomcat8-8.0.43: .......... done
===>   opengrok-1.0 depends on file: /bin/bootstrap.jar - not found
*** Error code 1
svn diff devel/opengrok/Makefile                                                                                                                                                                    
Index: devel/opengrok/Makefile                                                                                                                                                                                                                
--- devel/opengrok/Makefile     (revision 444305)                                                                                                                                                                                             
+++ devel/opengrok/Makefile     (working copy)                                                                                                                                                                                                
@@ -1,25 +1,26 @@                                                                                                                                                                                                                             
 # $FreeBSD$                                                                                                                                                                                                                                  
 PORTNAME=      opengrok                                                                                                                                                                                                                      
+PORTVERSION=   1.0                                                                                                                                                                                                                           
 CATEGORIES=    devel java                                                                                                                                                                                                                    
 COMMENT=       Fast and powerful code search and cross-reference engine                                                                                                                                                                      
 LICENSE=       CDDL APACHE20                                                                                                                                                                                                                 
 LICENSE_COMB=  multi                                                                                                                                                                                                                         
+LICENSE_FILE=  ${WRKSRC}/doc/LICENSE.txt                                                                                                                                                                                                     
 RUN_DEPENDS=   exctags:devel/ctags                                                                                                                                                                                                           
 USE_JAVA=      yes                                                                                                                                                                                                                           
-JAVA_VERSION=  1.7+                                                                                                                                                                                                                          
+JAVA_VERSION=  1.8+                                                                                                                                                                                                                          
 SHAREOWN=      www                                                                                                                                                                                                                           
 SHAREGRP=      www                                                                                                                                                                                                                           
 NO_BUILD=      yes                                                                                                                                                                                                                           
 NO_ARCH=       yes                                                                                                                                                                                                                           
-PORTDOCS=      CHANGES.txt EXAMPLE.txt LICENSE.txt                                                                                                                                                                                           
+PORTDOCS=      CHANGES.txt EXAMPLE.txt README.txt NOTICE.txt                                                                                                                                                                                 
 SUB_FILES=     opengrok                                                                                                                                                                                                                      
 SUB_LIST+=     LIBFILES="${LIBFILES:S,^,${DATADIR}/lib/,}" \                                                                                                                                                                                 
@@ -28,40 +29,39 @@                                                                                                                                                                                                                           
 OPTIONS_DEFINE=                DOCS                                                                                                                                                                                                          
 OPTIONS_SINGLE=                AS                                                                                                                                                                                                            
-OPTIONS_SINGLE_AS=     TOMCAT7 TOMCAT6 RESIN3                                                                                                                                                                                                
-OPTIONS_DEFAULT=       TOMCAT6                                                                                                                                                                                                               
+OPTIONS_SINGLE_AS=     TOMCAT85 TOMCAT8 TOMCAT7 TOMCAT6 RESIN3                                                                                                                                                                               
+OPTIONS_DEFAULT=       TOMCAT8                                                                                                                                                                                                               
+TOMCAT8_DESC=          Tomcat 8.x support                                                                                                                                                                                                    
+TOMCAT85_DESC=         Tomcat 8.5.x support                                                                                                                                                                                                  
+TOMCAT6_VARS=          WEBAPP_HOME?=${LOCALBASE}/apache-tomcat-6.0                                                                                                                                                                           
 TOMCAT6_BUILD_DEPENDS= ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat6                                                                                                                                                                          
 TOMCAT6_RUN_DEPENDS=   ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat6                                                                                                                                                                          
+TOMCAT7_VARS=          WEBAPP_HOME?=${LOCALBASE}/apache-tomcat-7.0                                                                                                                                                                           
 TOMCAT7_BUILD_DEPENDS= ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat7                                                                                                                                                                          
 TOMCAT7_RUN_DEPENDS=   ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat7                                                                                                                                                                          
+TOMCAT8_VARS=          WEBAPP_HOME?=${LOCALBASE}/apache-tomcat-8.0                                                                                                                                                                           
+TOMCAT8_BUILD_DEPENDS= ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat8                                                                                                                                                                          
+TOMCAT8_RUN_DEPENDS=   ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat8                                                                                                                                                                          
+TOMCAT85_VARS=         WEBAPP_HOME?=${LOCALBASE}/apache-tomcat-8.5                                                                                                                                                                           
+TOMCAT85_BUILD_DEPENDS=        ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat85                                                                                                                                                                 
+TOMCAT85_RUN_DEPENDS=  ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat85                                                                                                                                                                         
+RESIN3_VARS=           WEBAPP_HOME?=${LOCALBASE}/resin3                                                                                                                                                                                      
 RESIN3_BUILD_DEPENDS=  ${WEBAPP_HOME}/lib/resin.jar:www/resin3                                                                                                                                                                               
 RESIN3_RUN_DEPENDS=    ${WEBAPP_HOME}/lib/resin.jar:www/resin3                                                                                                                                                                               
 JARFILE=       ${DATADIR}/opengrok.jar                                                                                                                                                                                                       
 LIBFILES=      ant.jar \                                                                                                                                                                                                                     
-               bcel-5.2.jar \                                                                                                                                                                                                                
+               bcel-6.0.jar \                                                                                                                                                                                                                
                jrcs.jar \                                                                                                                                                                                                                    
-               lucene-analyzers-common-4.7.1.jar \                                                                                                                                                                                           
-               lucene-core-4.7.1.jar \                                                                                                                                                                                                       
-               lucene-queryparser-4.7.1.jar \                                                                                                                                                                                                
-               lucene-suggest-4.7.1.jar \                                                                                                                                                                                                    
-               swing-layout-0.9.jar                                                                                                                                                                                                          
+               lucene-analyzers-common-6.5.0.jar \                                                                                                                                                                                           
+               lucene-core-6.5.0.jar \                                                                                                                                                                                                       
+               lucene-queryparser-6.5.0.jar \                                                                                                                                                                                                
+               lucene-suggest-6.5.0.jar \                                                                                                                                                                                                    
+               swing-layout-0.9.jar \                                                                                                                                                                                                        
+               json-simple-1.1.1.jar                                                                                                                                                                                                         
-.include <>                                                                                                                                                                                                               
-.if ${PORT_OPTIONS:MTOMCAT7}                                                                                                                                                                                                                 
-WEBAPP_HOME?=  ${LOCALBASE}/apache-tomcat-7.0                                                                                                                                                                                                
-.if ${PORT_OPTIONS:MTOMCAT6}                                                                                                                                                                                                                 
-WEBAPP_HOME?=  ${LOCALBASE}/apache-tomcat-6.0                                                                                                                                                                                                
-.if ${PORT_OPTIONS:MRESIN3}                                                                                                                                                                                                                  
-WEBAPP_HOME?=  ${LOCALBASE}/resin3                                                                                                                                                                                                           
 WEBAPPS_DIR=   ${WEBAPP_HOME:S|^${LOCALBASE}/||}/webapps                                                                                                                                                                                     

You can still fetch it from GitHub and build it. This should be preferable to fetching precompiled jar files.

I agree, I'll ask the new maintainer to make this move as it is definitely prefered! I think it would be best to leave it out of the update commit though. I suspect it to be a small challenge due to port not being created in this way, but as I have not made a deep dive, I have no real clue.

You can triple-backquote (`) text block to paste it into Phabricator, like so:

* goes here

Yes, that is much better thanks!

lifanov requested changes to this revision.Jun 26 2017, 5:45 PM

Also, it's an ordering issue. This works:

.include <>

TOMCAT85_VARS=  WEBAPP_HOME?=   ${LOCALBASE}/apache-tomcat-8.5
TOMCAT8_VARS=   WEBAPP_HOME?=   ${LOCALBASE}/apache-tomcat-8.0
TOMCAT7_VARS=   WEBAPP_HOME?=   ${LOCALBASE}/apache-tomcat-7.0
TOMCAT6_VARS=   WEBAPP_HOME?=   ${LOCALBASE}/apache-tomcat-6.0

TOMCAT6_BUILD_DEPENDS=  ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat6
TOMCAT6_RUN_DEPENDS=    ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat6
TOMCAT7_BUILD_DEPENDS=  ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat7
TOMCAT7_RUN_DEPENDS=    ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat7
TOMCAT8_BUILD_DEPENDS=  ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat8
TOMCAT8_RUN_DEPENDS=    ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat8
TOMCAT85_BUILD_DEPENDS= ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat85
TOMCAT85_RUN_DEPENDS=   ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat85
RESIN3_BUILD_DEPENDS=   ${WEBAPP_HOME}/lib/resin.jar:www/resin3
RESIN3_RUN_DEPENDS=     ${WEBAPP_HOME}/lib/resin.jar:www/resin3
This revision now requires changes to proceed.Jun 26 2017, 5:45 PM

Note that is included before VARS are used.

Note that is included before VARS are used.

I thought that include wasnt necessary in the modern format which is why I left it out. This fixes the parsing issue, however a new issue arises, the WEBAPPS_DIR= ${WEBAPP_HOME:S|^${LOCALBASE}/||}/webapps is being parsed before OPT_VARS is set.

Actually, this is incorrect, the BUILD_DEPEND/RUN_DEPEND isn't even being added now. I'm going to try and move some stuff around.


Umm, you're right! The options include is not necessary when using helpers.
Also, this works:

TOMCAT85_VARS=  WEBAPP_HOME=${LOCALBASE}/apache-tomcat-8.5
TOMCAT8_VARS=   WEBAPP_HOME=${LOCALBASE}/apache-tomcat-8.0
TOMCAT7_VARS=   WEBAPP_HOME=${LOCALBASE}/apache-tomcat-7.0
TOMCAT6_VARS=   WEBAPP_HOME=${LOCALBASE}/apache-tomcat-6.0

The helper just doesn't parse "?=" correctly.

$ make BATCH=y -VPLIST_SUB                                                     
T=apache-tomcat-8.0  OWNER=www GROUP=www JAVASHAREDIR="share/java"  JAVAJARDIR="share/java/classes" OSREL=12.0 PREFIX=%D LOCALBASE=/usr/local  RESETPREFIX=/usr/local PORTDOCS="" PORTEXAMPLES="" LIB32DIR=lib DOCSDIR="share/doc/opengrok"  EXAMPLESDIR="share/examples/opengrok"  DATADIR="share/opengrok"  WWWDIR="www/opengrok"  ETCDIR="etc/opengrok"
ultima edited edge metadata.

Ah ha! so thats the culprit. Would it be acceptable to remove the ability to export WEBAPP_HOME? I will say yes as the tomcat8 port as no similar option.

I don't believe this port would even work if the user overrides WEBAPP_HOME to something other than the one from OPTIONS.

OK, It looks good to me as-is. Make sure that the maintainer is still fine with it and you can commit it.

This revision is now accepted and ready to land.Jun 27 2017, 3:00 PM
This revision was automatically updated to reflect the committed changes.