From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Oct 29 12:20:26 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B35B16A569 for ; Fri, 29 Oct 2004 12:20:26 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 161E943D39 for ; Fri, 29 Oct 2004 12:20:26 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i9TCKPmF044074 for ; Fri, 29 Oct 2004 12:20:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9TCKPr6044072; Fri, 29 Oct 2004 12:20:25 GMT (envelope-from gnats) Resent-Date: Fri, 29 Oct 2004 12:20:25 GMT Resent-Message-Id: <200410291220.i9TCKPr6044072@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Herve Quiroz Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2269016A4CE for ; Fri, 29 Oct 2004 12:16:30 +0000 (GMT) Received: from arabica.esil.univ-mrs.fr (arabica.esil.univ-mrs.fr [139.124.41.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7141743D41 for ; Fri, 29 Oct 2004 12:16:29 +0000 (GMT) (envelope-from rv@arabica.esil.univ-mrs.fr) Received: from arabica.esil.univ-mrs.fr (localhost.esil.univ-mrs.fr [127.0.0.1])i9TCGRui064781; Fri, 29 Oct 2004 14:16:27 +0200 (CEST) (envelope-from rv@arabica.esil.univ-mrs.fr) Received: (from rv@localhost)i9TCGQf6064780; Fri, 29 Oct 2004 14:16:26 +0200 (CEST) (envelope-from rv) Message-Id: <200410291216.i9TCGQf6064780@arabica.esil.univ-mrs.fr> Date: Fri, 29 Oct 2004 14:16:26 +0200 (CEST) From: Herve Quiroz To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: dglo@ssec.wisc.edu Subject: ports/73284: [PATCH] java/java-checkstyle: Install 'checkstyle' script and improvements X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2004 12:20:26 -0000 >Number: 73284 >Category: ports >Synopsis: [PATCH] java/java-checkstyle: Install 'checkstyle' script and improvements >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Oct 29 12:20:25 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Herve Quiroz >Release: FreeBSD 5.2.1-RELEASE-p11 i386 >Organization: >Environment: System: FreeBSD arabica.esil.univ-mrs.fr 5.2.1-RELEASE-p11 FreeBSD 5.2.1-RELEASE-p11 #8: Fri Oct 15 15:12:37 CEST 2004 >Description: - Install 'checkstyle' script [1] - Update to bsd.java.mk 2.0 - Use USE_ANT - Cleanup unused variables - Do not remove JAVAJARDIR - Remove some sed magic in dynamic plist process (make will perform most of these substitutions) - Use PLIST_FILES and %%JAVAJARDIR%% to reduce plist build process - Bumped PORTREVISION as a new file is installed [1] Suggested by Ernst in java/43947 Added file(s): - files/checkstyle.sh NOTE: I was also thinking about having samples installed in ${EXAMPLESDIR} but I'll let that to the maintainer's appreciation. Port maintainer (dglo@ssec.wisc.edu) is cc'd. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- java-checkstyle-3.4_1.patch begins here --- Index: Makefile =================================================================== RCS file: /var/fcvs/ports/java/java-checkstyle/Makefile,v retrieving revision 1.11 diff -u -u -r1.11 Makefile --- Makefile 2 May 2004 17:13:53 -0000 1.11 +++ Makefile 29 Oct 2004 12:06:58 -0000 @@ -7,6 +7,7 @@ PORTNAME= checkstyle PORTVERSION= 3.4 +PORTREVISION= 1 CATEGORIES= java devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -16,59 +17,53 @@ MAINTAINER= dglo@ssec.wisc.edu COMMENT= Java style checker -BUILD_DEPENDS= ${LOCALBASE}/bin/ant:${PORTSDIR}/devel/apache-ant +RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper -USE_JAVA= 1.4+ +USE_JAVA= yes +JAVA_VERSION= 1.4+ +USE_ANT= yes +ALL_TARGET= build.bindist PLIST= ${WRKDIR}/PLIST -JAVALIBNAME= ${PORTNAME}-${PORTVERSION} STYLEDIR= ${JAVASHAREDIR}/${PORTNAME} +PLIST_FILES= bin/checkstyle %%JAVAJARDIR%%/${PORTNAME}.jar %%JAVAJARDIR%%/${PORTNAME}-optional.jar .if !defined(NOPORTDOCS) -BUILTDOCSDIR= ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION} -BUILTDOCS= README LICENSE* TODO RIGHTS* docs -PORTDOCS= * +BUILDDIR= ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION} +PORTDOCS= README LICENSE* TODO RIGHTS* docs .endif -do-build: - @cd ${WRKSRC} && \ - ${SETENV} JAVA_HOME=${JAVA_HOME} ant build.bindist +do-configure: + @${SED} -e 's,%%LOCALBASE%%,${LOCALBASE},g ; s,%%JAVAJARDIR%%,${JAVAJARDIR},g' \ + ${FILESDIR}/checkstyle.sh > ${WRKSRC}/checkstyle pre-install: @${RM} -f ${PLIST} @${TOUCH} ${PLIST} - @${ECHO} ${JAVAJARDIR}/${PORTNAME}.jar | \ - ${SED} "s,${PREFIX}/*,," >> ${PLIST} - @${ECHO} ${JAVAJARDIR}/${PORTNAME}-optional.jar | \ - ${SED} "s,${PREFIX}/*,," >> ${PLIST} - @${ECHO} "@unexec ${RMDIR} ${JAVAJARDIR} 2>/dev/null || true" | \ - ${SED} "s,${PREFIX}/*,," >> ${PLIST} - @${FIND} ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/contrib/ \ - -type f -print | \ - ${SED} "s,${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/contrib/,${STYLEDIR}/," | \ - ${SED} "s,${PREFIX}/*,," >> ${PLIST} - @${FIND} ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/contrib/ \ - -type d -print | ${SORT} -r | \ - ${SED} "s,${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/contrib/,${STYLEDIR}/," | \ - ${SED} -e "s,${PREFIX}/*,," -e "s,^,@dirrm ,g" >> ${PLIST} + @${FIND} ${BUILDDIR}/contrib/ -type f -print | \ + ${SED} "s,^${BUILDDIR}/contrib,${STYLEDIR:S,${PREFIX}/,,}," >> ${PLIST} + @${FIND} ${BUILDDIR}/contrib/ -type d -print | ${SORT} -r | \ + ${SED} -e "s,^${BUILDDIR}/contrib,@dirrm ${STYLEDIR:S,${PREFIX}/,,}," >> ${PLIST} do-install: do-install-jar do-install-data do-install-apidocs + @${INSTALL_SCRIPT} ${WRKSRC}/checkstyle ${PREFIX}/bin/checkstyle do-install-jar: @${MKDIR} ${JAVAJARDIR} - @${INSTALL_DATA} ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/${PORTNAME}-all-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}.jar - @${INSTALL_DATA} ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/${PORTNAME}-optional-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}-optional.jar + @${INSTALL_DATA} ${BUILDDIR}/${PORTNAME}-all-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}.jar + @${INSTALL_DATA} ${BUILDDIR}/${PORTNAME}-optional-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}-optional.jar do-install-data: @${MKDIR} ${STYLEDIR} - @${CP} -r ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/contrib/* ${STYLEDIR} + @${CP} -r ${BUILDDIR}/contrib/* ${STYLEDIR} + @${CHOWN} -h -R ${SHAREOWN}:${SHAREGRP} ${STYLEDIR} do-install-apidocs: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} -.for DOCFILE in ${BUILTDOCS} - @${CP} -r ${BUILTDOCSDIR}/${DOCFILE} ${DOCSDIR}/ +.for DOCFILE in ${PORTDOCS} + @${CP} -r ${BUILDDIR}/${DOCFILE} ${DOCSDIR}/ .endfor @${CHOWN} -h -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} .endif Index: files/checkstyle.sh =================================================================== RCS file: files/checkstyle.sh diff -N files/checkstyle.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/checkstyle.sh 29 Oct 2004 12:06:12 -0000 @@ -0,0 +1,5 @@ +#!/bin/sh +# +# $FreeBSD$ + +%%LOCALBASE%%/bin/javavm -cp "%%JAVAJARDIR%%/checkstyle.jar:%%JAVAJARDIR%%/checkstyle-optional.jar" com.puppycrawl.tools.checkstyle.Main $@ --- java-checkstyle-3.4_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: