diff options
author | hq <hq@FreeBSD.org> | 2004-11-25 11:28:11 +0800 |
---|---|---|
committer | hq <hq@FreeBSD.org> | 2004-11-25 11:28:11 +0800 |
commit | e93176771f3f8b5f45eec981db78c26f61f3cb54 (patch) | |
tree | 243c9548d0e91149f0c694e8ac5f107eaf1be34e /java/java-checkstyle | |
parent | d5daf62f30896923da034d806aca9ed0cb897f24 (diff) | |
download | freebsd-ports-gnome-e93176771f3f8b5f45eec981db78c26f61f3cb54.tar.gz freebsd-ports-gnome-e93176771f3f8b5f45eec981db78c26f61f3cb54.tar.zst freebsd-ports-gnome-e93176771f3f8b5f45eec981db78c26f61f3cb54.zip |
- Install 'checkstyle' launcher shell script [1]
- Update to bsd.java.mk 2.0
- Use USE_ANT
- Cleanup unused variables
- Do not try to 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
PR: ports/73284, java/43947 [1]
Suggested by: znerd [1]
Submitted by: me
Approved by: maintainer
Diffstat (limited to 'java/java-checkstyle')
-rw-r--r-- | java/java-checkstyle/Makefile | 51 | ||||
-rw-r--r-- | java/java-checkstyle/files/checkstyle.sh | 5 |
2 files changed, 28 insertions, 28 deletions
diff --git a/java/java-checkstyle/Makefile b/java/java-checkstyle/Makefile index 17188eaec124..a10efda2928a 100644 --- a/java/java-checkstyle/Makefile +++ b/java/java-checkstyle/Makefile @@ -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 @@ DISTNAME= ${PORTNAME}-src-${PORTVERSION} MAINTAINER= dglo@ssec.wisc.edu COMMENT= Java style checker -BUILD_DEPENDS= ${LOCALBASE}/bin/ant:${PORTSDIR}/devel/apache-ant +RUN_DEPENDS= java:${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 diff --git a/java/java-checkstyle/files/checkstyle.sh b/java/java-checkstyle/files/checkstyle.sh new file mode 100644 index 000000000000..d3796e75e80e --- /dev/null +++ b/java/java-checkstyle/files/checkstyle.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# +# $FreeBSD$ + +%%LOCALBASE%%/bin/java -cp "%%JAVAJARDIR%%/checkstyle.jar:%%JAVAJARDIR%%/checkstyle-optional.jar" com.puppycrawl.tools.checkstyle.Main "$@" |