From e8581bc9765b9cac42f08f2c8f0767ee3ca63b4a Mon Sep 17 00:00:00 2001 From: ryoon Date: Tue, 31 Dec 2013 22:56:12 +0000 Subject: [PATCH] Update to 0.11.1 * Convert to build from source to configure the localtion of configuration.xml. Prebuild binary requires /var/opengrok directory. This package requires the directory inside ${PREFIX}/share/opengrok only. * Update HOMEPAGE Changelog: 0.12-rc5: differentiate between raw and download #578 add H A D links to directory listing #573 fix dtags.eftar file descriptor leak #535 do not unnecessarily create 2 File objects when returning eftar reader #539 0.12-rc4: highlight line number with anchor (#702) timeout for command execution (#429, #487) fix for definitions search displays comment lines (#294) 0.12-rc3: Lucene 4.6.0 Mercurial rename regression fix (#683) let sendToConfigHost body use the parameter "env" to keep align with its signature and other methods 0.12-rc2: bug #672 need double-quotes to specify path bug #625 xref links containing \u don't seem to be working follow-up fixes for Mercurial renamed files handling (fixes #666) Support for Surround SCM history lucene 4.5 (requires full reindex from 0.12-rc1) generate history of files renamed in Mercurial repo separately (fixes #22) 0.12-rc1: JDK7 + tomcat7 tested, JDK6 unsupported! lucene 4.4 -> A LOT faster engine, no spellindex needed, regexp search supported (see help) pl/sql, scala, uuencode languages/analyzers support php analyzers improved monotone, mercurial SCM support improved AccuRev SCM added to supported SCMs new config options in OpenGrok script new search by analyzer/language Changelog for <0.12 is not available. --- devel/opengrok/DESCR | 2 + devel/opengrok/MESSAGE | 33 ++++++++ devel/opengrok/Makefile | 79 +++++++++---------- devel/opengrok/PLIST | 28 +++---- devel/opengrok/distinfo | 13 +-- devel/opengrok/options.mk | 18 +---- devel/opengrok/patches/patch-OpenGrok | 44 +++++++++++ devel/opengrok/patches/patch-aa | 12 --- devel/opengrok/patches/patch-ab | 12 --- devel/opengrok/patches/patch-build.xml | 13 +++ .../patches/patch-web_WEB-INF_web.xml | 13 +++ 11 files changed, 166 insertions(+), 101 deletions(-) create mode 100644 devel/opengrok/MESSAGE create mode 100644 devel/opengrok/patches/patch-OpenGrok delete mode 100644 devel/opengrok/patches/patch-aa delete mode 100644 devel/opengrok/patches/patch-ab create mode 100644 devel/opengrok/patches/patch-build.xml create mode 100644 devel/opengrok/patches/patch-web_WEB-INF_web.xml diff --git a/devel/opengrok/DESCR b/devel/opengrok/DESCR index 17cc16bf2f9e8..27c2ba5752132 100644 --- a/devel/opengrok/DESCR +++ b/devel/opengrok/DESCR @@ -3,3 +3,5 @@ It helps you search, cross-reference and navigate your source tree. It can understand various program file formats and version control histories like SCCS, RCS, CVS and Subversion. In other words it lets you grok (profoundly understand) the open source, hence the name OpenGrok. It is written in Java. + +With this package, OpenGrok is built from source. diff --git a/devel/opengrok/MESSAGE b/devel/opengrok/MESSAGE new file mode 100644 index 0000000000000..b4adef5e08a62 --- /dev/null +++ b/devel/opengrok/MESSAGE @@ -0,0 +1,33 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1 2013/12/31 22:56:12 ryoon Exp $ + +To use OpenGrok with your code repository, you will need to perform +the following steps. + +1. Install version control software that is used for your code repository. + +2. Install Apache Tomcat 7 from pkgsrc/www/apache-tomcat7. + +3. Run ${PREFIX}/share/opengrok/bin/OpenGrok with the following options + to install source.war to ${PREFIX}/share/tomcat/webapps. + + # JAVA_HOME=/usr/pkg/java/openjdk7 \ + OPENGROK_WAR_TARGET_TOMCAT=${PREFIX}/share/tomcat/webapps \ + ${PREFIX}/share/opengrok/bin/OpenGrok deploy + +4. Prepare your code repository in ${PREFIX}/share/opengrok/var/opengrok + directory. + # mkdir -p ${PREFIX}/share/opengrok/var/opengrok/src + $ cd ${PREFIX}/share/opengrok/var/opengrok/src + $ git clone your-repository.git + +5. Run ${PREFIX}/share/opengrok/bin/OpenGrok with the following options + to index your code repository. + + # JAVA_HOME=${PREFIX}/java/openjdk7 \ + ${PREFIX}/share/opengrok/bin/OpenGrok update + +6. Start Apache Tomcat 7 server. + +7. Access http://localhost:8080/source/ . +=========================================================================== diff --git a/devel/opengrok/Makefile b/devel/opengrok/Makefile index 642819239070f..0e3d4880808f6 100644 --- a/devel/opengrok/Makefile +++ b/devel/opengrok/Makefile @@ -1,69 +1,66 @@ -# $NetBSD: Makefile,v 1.28 2013/12/01 10:18:03 ryoon Exp $ +# $NetBSD: Makefile,v 1.29 2013/12/31 22:56:12 ryoon Exp $ # -DISTNAME= opengrok-0.8.1 -PKGREVISION= 12 +DISTNAME= OpenGrok-0.12-rc5 +PKGNAME= ${DISTNAME:tl:S/-rc/rc/} CATEGORIES= devel -MASTER_SITES= http://hub.opensolaris.org/bin/download/Project+opengrok/files/ +MASTER_SITES= -https://github.com/OpenGrok/OpenGrok/archive/0.12-rc5.tar.gz MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= http://hub.opensolaris.org/bin/view/Project+opengrok/ +HOMEPAGE= http://opengrok.github.io/OpenGrok/ COMMENT= Fast and usable source code search and cross reference engine +LICENSE= cddl-1.0 + +FETCH_USING= curl +EXTRACT_USING= bsdtar DEPENDS+= exctags-[0-9]*:../../devel/exctags +DEPENDS+= jflex-[0-9]*:../../devel/jflex +DEPENDS+= apache-ant-[0-9]*:../../devel/apache-ant -.include "options.mk" +SUBST_CLASSES+= vcs +SUBST_FILES.vcs+= OpenGrok +SUBST_MESSAGE.vcs= Set VCS program pathes. +SUBST_STAGE.vcs= pre-configure +SUBST_VARS.vcs= PREFIX + +SUBST_CLASSES+= conf +SUBST_FILES.conf+= web/WEB-INF/web.xml +SUBST_MESSAGE.conf= Set configuration.xml location +SUBST_STAGE.conf= pre-configure +SUBST_VARS.conf= PREFIX -.if empty(PKG_OPTIONS:Mopengrok-build) -NO_BUILD= YES -.endif +.include "options.mk" -USE_JAVA= run +USE_JAVA= yes USE_JAVA2= yes USE_TOOLS+= unzip:run zip:run CONF_FILES= ${PREFIX}/share/examples/opengrok/paths.tsv \ - ${PREFIX}/share/opengrok/paths.tsv - -SUBST_CLASSES+= run -SUBST_STAGE.run= post-patch -SUBST_FILES.run= run.sh run-quiet.sh -SUBST_SED.run= -e "s|/usr/local/bin/ctags|${PREFIX}/bin/exctags|g" -SUBST_SED.run+= -e "s|java|${PKG_JAVA_HOME}/bin/java|g" -SUBST_SED.run+= -e "s|@PREFIX@|${PREFIX}|g" -SUBST_MESSAGE.run= Fixing hardcoded paths. + ${PREFIX}/share/opengrok/var/opengrok/paths.tsv -pre-build: - ${CP} ${PREFIX}/lib/java/JFlex.jar ${WRKSRC}/lib +INSTALLATION_DIRS+= share/opengrok/bin \ + share/opengrok/lib/lib \ + share/examples/opengrok \ + share/opengrok/var/opengrok do-build: - cd ${WRKSRC} && ${PREFIX}/bin/ant - -post-build: - ${RM} -f ${WRKSRC}/lib/*.jar - ${CP} ${WRKSRC}/dist/lib/*.jar ${WRKSRC}/lib - ${CP} ${WRKSRC}/dist/opengrok.jar ${WRKSRC} - ${CP} ${WRKSRC}/dist/source.war ${WRKSRC} + cd ${WRKSRC} && \ + CLASSPATH=${PREFIX}/lib/java/JFlex.jar ${PREFIX}/bin/ant do-install: - ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/opengrok - ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/opengrok/lib - ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/opengrok - + ${INSTALL_SCRIPT} ${WRKSRC}/OpenGrok \ + ${DESTDIR}${PREFIX}/share/opengrok/bin ${INSTALL_DATA} ${WRKSRC}/README.txt \ ${DESTDIR}${PREFIX}/share/opengrok - ${INSTALL_DATA} ${WRKSRC}/opengrok.jar \ - ${DESTDIR}${PREFIX}/share/opengrok - ${INSTALL_DATA} ${WRKSRC}/source.war \ - ${DESTDIR}${PREFIX}/share/opengrok - ${INSTALL_DATA} ${WRKSRC}/lib/*.jar \ + ${INSTALL_DATA} ${WRKSRC}/dist/opengrok.jar \ ${DESTDIR}${PREFIX}/share/opengrok/lib + ${INSTALL_DATA} ${WRKSRC}/dist/source.war \ + ${DESTDIR}${PREFIX}/share/opengrok/lib + ${INSTALL_DATA} ${WRKSRC}/dist/lib/*.jar \ + ${DESTDIR}${PREFIX}/share/opengrok/lib/lib ${INSTALL_DATA} ${WRKSRC}/paths.tsv \ ${DESTDIR}${PREFIX}/share/examples/opengrok - ${INSTALL_SCRIPT} ${WRKSRC}/run.sh \ - ${DESTDIR}${PREFIX}/share/opengrok - ${INSTALL_SCRIPT} ${WRKSRC}/run-quiet.sh \ - ${DESTDIR}${PREFIX}/share/opengrok .include "../../mk/java-vm.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/opengrok/PLIST b/devel/opengrok/PLIST index a1ab5376f586c..e687de47ec546 100644 --- a/devel/opengrok/PLIST +++ b/devel/opengrok/PLIST @@ -1,16 +1,16 @@ -@comment $NetBSD: PLIST,v 1.6 2010/04/29 19:50:24 ahoka Exp $ +@comment $NetBSD: PLIST,v 1.7 2013/12/31 22:56:12 ryoon Exp $ share/examples/opengrok/paths.tsv share/opengrok/README.txt -share/opengrok/lib/ant.jar -share/opengrok/lib/bcel-5.1.jar -share/opengrok/lib/jakarta-oro-2.0.8.jar -share/opengrok/lib/jmxremote_optional.jar -share/opengrok/lib/lucene-core-2.4.1.jar -share/opengrok/lib/lucene-spellchecker-2.4.1.jar -share/opengrok/lib/org.apache.commons.jrcs.diff.jar -share/opengrok/lib/org.apache.commons.jrcs.rcs.jar -share/opengrok/lib/swing-layout-0.9.jar -share/opengrok/opengrok.jar -share/opengrok/run-quiet.sh -share/opengrok/run.sh -share/opengrok/source.war +share/opengrok/bin/OpenGrok +share/opengrok/lib/lib/ant.jar +share/opengrok/lib/lib/bcel-5.2.jar +share/opengrok/lib/lib/jrcs.jar +share/opengrok/lib/lib/lucene-analyzers-common-4.6.0.jar +share/opengrok/lib/lib/lucene-core-4.6.0.jar +share/opengrok/lib/lib/lucene-queryparser-4.6.0.jar +share/opengrok/lib/lib/lucene-suggest-4.6.0.jar +share/opengrok/lib/lib/servlet-api.jar +share/opengrok/lib/lib/swing-layout-0.9.jar +share/opengrok/lib/opengrok.jar +share/opengrok/lib/source.war +@pkgdir share/opengrok/var/opengrok diff --git a/devel/opengrok/distinfo b/devel/opengrok/distinfo index c80130885511d..76a076f59b8de 100644 --- a/devel/opengrok/distinfo +++ b/devel/opengrok/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.7 2010/04/29 19:50:24 ahoka Exp $ +$NetBSD: distinfo,v 1.8 2013/12/31 22:56:12 ryoon Exp $ -SHA1 (opengrok-0.8.1.tar.gz) = e3c54c09d8f516a0af44e90283ffcff3a55b7ae6 -RMD160 (opengrok-0.8.1.tar.gz) = 3634ddb2731f7562441b22afaaa6d812b6baf51c -Size (opengrok-0.8.1.tar.gz) = 6513865 bytes -SHA1 (patch-aa) = 22c1e946fc90f7cfbc05ad97541eb3bbc2c03cfe -SHA1 (patch-ab) = a5bb3931713207adaa6303eb533c2cddc39b8fb0 +SHA1 (OpenGrok-0.12-rc5.tar.gz) = 0e52ae39f9c470949c83cc4d9cf8a7c3f1610818 +RMD160 (OpenGrok-0.12-rc5.tar.gz) = d4163cac0b399b49ad810d2ff4bca0f9e32771cf +Size (OpenGrok-0.12-rc5.tar.gz) = 1534049 bytes +SHA1 (patch-OpenGrok) = 0771b0aec425538b9141addfa6c9a040b1562614 +SHA1 (patch-build.xml) = ff098c5c024c74c0ff59575d67b232d9425b5d21 +SHA1 (patch-web_WEB-INF_web.xml) = 1cae9b9e2d3863406a9cb0ca34f3d1693e276dc2 diff --git a/devel/opengrok/options.mk b/devel/opengrok/options.mk index 48d73fa60812b..ed1765cfe5bbf 100644 --- a/devel/opengrok/options.mk +++ b/devel/opengrok/options.mk @@ -1,8 +1,8 @@ -# $NetBSD: options.mk,v 1.2 2008/10/25 18:11:16 adrianp Exp $ +# $NetBSD: options.mk,v 1.3 2013/12/31 22:56:12 ryoon Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.opengrok -PKG_SUPPORTED_OPTIONS= svn opengrok-build +PKG_SUPPORTED_OPTIONS= svn .include "../../mk/bsd.options.mk" @@ -13,17 +13,3 @@ PKG_SUPPORTED_OPTIONS= svn opengrok-build . include "../../devel/subversion-base/buildlink3.mk" BUILDLINK_API_DEPENDS.subversion-base+= subversion-base>=1.3.0 .endif - -### -### Rebuild OpenGrok -### -.if !empty(PKG_OPTIONS:Mopengrok-build) -DEPENDS+= jflex-[0-9]*:../../devel/jflex -DEPENDS+= apache-ant-[0-9]*:../../devel/apache-ant -USE_JAVA= yes - -OPENGROK_SOURCES= ${PKGNAME_NOREV}-src${EXTRACT_SUFX} -DISTFILES+= ${OPENGROK_SOURCES} -EXTRACT_ONLY+= ${OPENGROK_SOURCES} -WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}-src -.endif diff --git a/devel/opengrok/patches/patch-OpenGrok b/devel/opengrok/patches/patch-OpenGrok new file mode 100644 index 0000000000000..9b5ad505717c0 --- /dev/null +++ b/devel/opengrok/patches/patch-OpenGrok @@ -0,0 +1,44 @@ +$NetBSD: patch-OpenGrok,v 1.1 2013/12/31 22:56:12 ryoon Exp $ + +--- OpenGrok.orig 2012-03-30 13:36:59.000000000 +0000 ++++ OpenGrok +@@ -121,7 +121,7 @@ DefaultInstanceConfiguration() + # operating systems, if you have any reasonably generic + # improvements please feel free to submit a patch. + +- OPENGROK_INSTANCE_BASE="${OPENGROK_INSTANCE_BASE:-/var/opengrok}" ++ OPENGROK_INSTANCE_BASE="${OPENGROK_INSTANCE_BASE:-@PREFIX@/share/opengrok/var/opengrok}" + + LOGGER_CONFIG_FILE="logging.properties" + +@@ -247,7 +247,7 @@ DefaultInstanceConfiguration() + WEBAPP_CONFIG="" + if [ -n "${OPENGROK_WEBAPP_CFGADDR}" ]; then + WEBAPP_CONFIG_ADDRESS=${OPENGROK_WEBAPP_CFGADDR} +- if [ "${OPENGROK_WEBAPP_CFGADDR}" == "none" ]; then ++ if [ "${OPENGROK_WEBAPP_CFGADDR}" = "none" ]; then + WEBAPP_CONFIG_ADDRESS="" + fi + else +@@ -262,15 +262,15 @@ DefaultInstanceConfiguration() + JAVA_OPTS="${JAVA_OPTS:--Xmx2048m}" + + # OPTIONAL: Full Path to History Utilities +- HG="`Which hg`" +- CVS="`Which cvs`" +- SVN="`Which svn`" ++ HG="@PREFIX@/bin/hg" ++ CVS="/usr/bin/cvs" ++ SVN="@PREFIX@/bin/svn" + SCCS="`Which sccs`" + CLEARCASE="`Which cleartool`" +- GIT="`Which git`" ++ GIT="@PREFIX@/bin/git" + P4="`Which p4`" +- MTN="`Which mtn`" +- BZR="`Which bzr`" ++ MTN="@PREFIX@/bin/mtn" ++ BZR="@PREFIX@/bin/bzr" + + # OPTIONAL: Override Built-in Properties + # Assumption: We should not set properties to the empty string diff --git a/devel/opengrok/patches/patch-aa b/devel/opengrok/patches/patch-aa deleted file mode 100644 index 310b677c9bed5..0000000000000 --- a/devel/opengrok/patches/patch-aa +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-aa,v 1.1.1.1 2007/04/08 16:59:41 adrianp Exp $ - ---- run.sh.orig 2007-04-08 16:52:59.000000000 +0100 -+++ run.sh -@@ -1,6 +1,6 @@ - #!/bin/sh - --PROGDIR=`dirname $0` -+PROGDIR=@PREFIX@/share/opengrok - - # REQUIRED The root of your source tree - SRC_ROOT=/your/src/tree/ diff --git a/devel/opengrok/patches/patch-ab b/devel/opengrok/patches/patch-ab deleted file mode 100644 index e3a01f0e5e997..0000000000000 --- a/devel/opengrok/patches/patch-ab +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ab,v 1.1.1.1 2007/04/08 16:59:41 adrianp Exp $ - ---- run-quiet.sh.orig 2007-04-08 16:52:59.000000000 +0100 -+++ run-quiet.sh -@@ -1,6 +1,6 @@ - #!/bin/sh - --PROGDIR=`dirname $0` -+PROGDIR=@PREFIX@/share/opengrok - - # REQUIRED The root of your source tree - SRC_ROOT=/your/src/tree/ diff --git a/devel/opengrok/patches/patch-build.xml b/devel/opengrok/patches/patch-build.xml new file mode 100644 index 0000000000000..969c154c3ae84 --- /dev/null +++ b/devel/opengrok/patches/patch-build.xml @@ -0,0 +1,13 @@ +$NetBSD: patch-build.xml,v 1.1 2013/12/31 22:56:12 ryoon Exp $ + +--- build.xml.orig 2013-12-20 16:10:15.000000000 +0000 ++++ build.xml +@@ -243,7 +243,7 @@ Copyright (c) 2005, 2011, Oracle and/or + + + ++ depends="-get-changeset-from-command"> + + diff --git a/devel/opengrok/patches/patch-web_WEB-INF_web.xml b/devel/opengrok/patches/patch-web_WEB-INF_web.xml new file mode 100644 index 0000000000000..e6d61b87b91fe --- /dev/null +++ b/devel/opengrok/patches/patch-web_WEB-INF_web.xml @@ -0,0 +1,13 @@ +$NetBSD: patch-web_WEB-INF_web.xml,v 1.1 2013/12/31 22:56:12 ryoon Exp $ + +--- web/WEB-INF/web.xml.orig 2012-03-30 13:36:59.000000000 +0000 ++++ web/WEB-INF/web.xml +@@ -5,7 +5,7 @@ + A wicked fast source browser + + CONFIGURATION +- /var/opengrok/etc/configuration.xml ++ @PREFIX@/share/opengrok/var/opengrok/etc/configuration.xml + Full path to the configuration file where OpenGrok can read it's configuration + +