summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2011-11-20 14:13:58 +0000
committerRalph Sennhauser <sera@gentoo.org>2011-11-20 14:13:58 +0000
commit25420dceeb3d502187b1657062265806ca588d16 (patch)
tree12ca72919ad85f501eb00d964444a2268084a50c /dev-util/checkstyle
parentVersion bump, drop old (diff)
downloadgentoo-2-25420dceeb3d502187b1657062265806ca588d16.tar.gz
gentoo-2-25420dceeb3d502187b1657062265806ca588d16.tar.bz2
gentoo-2-25420dceeb3d502187b1657062265806ca588d16.zip
Version bump. Bug #390457
(Portage version: 2.1.10.35/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/checkstyle')
-rw-r--r--dev-util/checkstyle/ChangeLog7
-rw-r--r--dev-util/checkstyle/checkstyle-5.5.ebuild85
2 files changed, 91 insertions, 1 deletions
diff --git a/dev-util/checkstyle/ChangeLog b/dev-util/checkstyle/ChangeLog
index 6e488c945363..32f6a6fccaed 100644
--- a/dev-util/checkstyle/ChangeLog
+++ b/dev-util/checkstyle/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-util/checkstyle
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/checkstyle/ChangeLog,v 1.42 2011/11/09 19:23:15 sera Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/checkstyle/ChangeLog,v 1.43 2011/11/20 14:13:58 sera Exp $
+
+*checkstyle-5.5 (20 Nov 2011)
+
+ 20 Nov 2011; Ralph Sennhauser <sera@gentoo.org> +checkstyle-5.5.ebuild:
+ Version bump. Bug #390457
*checkstyle-5.4 (09 Nov 2011)
diff --git a/dev-util/checkstyle/checkstyle-5.5.ebuild b/dev-util/checkstyle/checkstyle-5.5.ebuild
new file mode 100644
index 000000000000..81c29bb5b00a
--- /dev/null
+++ b/dev-util/checkstyle/checkstyle-5.5.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/checkstyle/checkstyle-5.5.ebuild,v 1.1 2011/11/20 14:13:58 sera Exp $
+
+EAPI="4"
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2
+
+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/${P}-src.tar.gz
+ http://dev.gentoo.org/~sera/distfiles/${PN}-5.4-maven-build.xml.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEP="
+ dev-java/ant-core:0
+ >=dev-java/antlr-2.7.7:0[java]
+ dev-java/commons-beanutils:1.7
+ dev-java/commons-cli:1
+ dev-java/commons-logging:0
+ dev-java/guava:0"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.5"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.5
+ dev-java/ant-nodeps:0
+ test? (
+ dev-java/ant-junit
+ dev-java/junit:4
+ )"
+
+java_prepare() {
+ cp ../${PN}-5.4/maven-build.xml . || die
+ echo "maven.build.finalName=${P}" > maven-build.properties || die
+
+ epatch "${WORKDIR}"/maven-build.xml.patch
+
+ # maven ant:ant can't handle it.
+ pushd src/checkstyle/com/puppycrawl/tools/checkstyle/grammars > /dev/null || die
+ java -cp $(java-pkg_getjars antlr) antlr.Tool java.g || die
+ popd > /dev/null
+}
+
+JAVA_PKG_BSFIX_NAME="maven-build.xml"
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_ANT_CLASSPATH_TAGS="${JAVA_ANT_CLASSPATH_TAGS} javadoc"
+JAVA_ANT_ENCODING="iso-8859-1"
+
+EANT_BUILD_XML="maven-build.xml"
+EANT_GENTOO_CLASSPATH="ant-core,antlr,commons-beanutils-1.7,commons-cli-1,commons-logging,guava"
+EANT_BUILD_TARGET="package"
+EANT_ANT_TASKS="ant-nodeps"
+
+src_test() {
+ EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar target/${P}.jar
+
+ dodoc README
+ use doc && java-pkg_dojavadoc target/site/apidocs
+ use source && java-pkg_dosrc src/${PN}/com
+
+ # Install check files
+ insinto /usr/share/checkstyle/checks
+ doins suppressions.xml sun_checks.xml import-control.xml checkstyle_checks.xml
+
+ # 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
+}