diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2007-12-29 02:35:55 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2007-12-29 02:35:55 +0000 |
commit | 2714ede4a37ea1a8e4fbe5cecc5493db2cd9c667 (patch) | |
tree | 8c812411a50bdd0d67adc2d624cb7e56db2d2729 /dev-util/checkstyle/checkstyle-4.4.ebuild | |
parent | Masked dev-java/quartz (diff) | |
download | gentoo-2-2714ede4a37ea1a8e4fbe5cecc5493db2cd9c667.tar.gz gentoo-2-2714ede4a37ea1a8e4fbe5cecc5493db2cd9c667.tar.bz2 gentoo-2-2714ede4a37ea1a8e4fbe5cecc5493db2cd9c667.zip |
Version bump. Tests now work with 1.5.
(Portage version: 2.1.4_rc11)
Diffstat (limited to 'dev-util/checkstyle/checkstyle-4.4.ebuild')
-rw-r--r-- | dev-util/checkstyle/checkstyle-4.4.ebuild | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/dev-util/checkstyle/checkstyle-4.4.ebuild b/dev-util/checkstyle/checkstyle-4.4.ebuild new file mode 100644 index 000000000000..2116d404ec18 --- /dev/null +++ b/dev-util/checkstyle/checkstyle-4.4.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/checkstyle/checkstyle-4.4.ebuild,v 1.1 2007/12/29 02:35:54 betelgeuse Exp $ + +WANT_ANT_TASKS="ant-antlr ant-nodeps" +JAVA_PKG_IUSE="doc source test" + +inherit java-pkg-2 java-ant-2 + +MY_P="${PN}-src-${PV}" +DESCRIPTION="A development tool to help programmers write Java code that adheres to a coding standard." +HOMEPAGE="http://checkstyle.sourceforge.net" +SRC_URI="mirror://sourceforge/checkstyle/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +COMMON_DEP="dev-java/antlr + =dev-java/commons-beanutils-1.7* + =dev-java/commons-cli-1* + dev-java/commons-logging + dev-java/commons-collections" + +RDEPEND=">=virtual/jre-1.4 + ${COMMON_DEP}" + +DEPEND="!test? ( >=virtual/jdk-1.4 ) + test? ( >=virtual/jdk-1.5 ) + ${COMMON_DEP} + test? ( + dev-java/ant-junit + dev-java/ant-trax + dev-java/emma + )" + +S="${WORKDIR}/${MY_P}" + +# So that we can generate 1.4 bytecode for dist +# and 1.5 for tests +JAVA_PKG_BSFIX="off" + +src_unpack() { + unpack ${A} + cd "${S}/lib" + rm -v *.jar || die + java-pkg_jar-from antlr + java-pkg_jar-from commons-beanutils-1.7 + java-pkg_jar-from commons-cli-1 + java-pkg_jar-from commons-logging + java-pkg_jar-from commons-collections +} + +src_compile() { + eant compile.checkstyle $(use_doc) + jar cfm ${PN}.jar config/manifest.mf -C target/checkstyle . || die "jar failed" +} + +src_test() { + java-pkg_jar-from --build-only --into lib junit + java-pkg_jar-from --build-only --into lib emma + ANT_TASKS="emma ant-nodeps ant-junit ant-trax" eant run.tests +} + +src_install() { + java-pkg_dojar ${PN}.jar + + dodoc README RIGHTS.antlr || die + use doc && java-pkg_dojavadoc target/docs/api + use source && java-pkg_dosrc src/${PN}/com + + # Install check files + insinto /usr/share/checkstyle/checks + for file in *.xml; do + [[ "${file}" != build.xml ]] && doins ${file} + done + + # Install extra files + insinto /usr/share/checkstyle/contrib + doins -r contrib/* + + java-pkg_dolauncher ${PN} \ + --main com.puppycrawl.tools.checkstyle.Main + + java-pkg_dolauncher ${PN}-gui \ + --main com.puppycrawl.tools.checkstyle.gui.Main + + # Make the ant tasks available to ant + java-pkg_register-ant-task +} + +pkg_postinst() { + elog "Checkstyle is located at /usr/bin/checkstyle" + elog "Check files are located in /usr/share/checkstyle/checks/" +} |