summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Schmitz <ercpe@gentoo.org>2013-09-10 17:26:05 +0000
committerJohann Schmitz <ercpe@gentoo.org>2013-09-10 17:26:05 +0000
commitb941c330f867a53ee21127962c4f2fceb5022da4 (patch)
treecb3dae6c98a66abd59b3a176aecaf88bfc580b03 /dev-java/hamcrest-library
parentCleanup old. (diff)
downloadgentoo-2-b941c330f867a53ee21127962c4f2fceb5022da4.tar.gz
gentoo-2-b941c330f867a53ee21127962c4f2fceb5022da4.tar.bz2
gentoo-2-b941c330f867a53ee21127962c4f2fceb5022da4.zip
Ebuild for hamcrest-library (bug #287775) - dependency of ganttproject et al
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 77C501ED)
Diffstat (limited to 'dev-java/hamcrest-library')
-rw-r--r--dev-java/hamcrest-library/ChangeLog9
-rw-r--r--dev-java/hamcrest-library/files/1.3-remove-targets.patch47
-rw-r--r--dev-java/hamcrest-library/hamcrest-library-1.3.ebuild53
-rw-r--r--dev-java/hamcrest-library/metadata.xml9
4 files changed, 118 insertions, 0 deletions
diff --git a/dev-java/hamcrest-library/ChangeLog b/dev-java/hamcrest-library/ChangeLog
new file mode 100644
index 000000000000..507c3f665881
--- /dev/null
+++ b/dev-java/hamcrest-library/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-java/hamcrest-library
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/hamcrest-library/ChangeLog,v 1.1 2013/09/10 17:26:05 ercpe Exp $
+
+*hamcrest-library-1.3 (10 Sep 2013)
+
+ 10 Sep 2013; Johann Schmitz <ercpe@gentoo.org>
+ +files/1.3-remove-targets.patch, +hamcrest-library-1.3.ebuild, +metadata.xml:
+ Ebuild for hamcrest-library (bug #287775) - dependency of ganttproject et al
diff --git a/dev-java/hamcrest-library/files/1.3-remove-targets.patch b/dev-java/hamcrest-library/files/1.3-remove-targets.patch
new file mode 100644
index 000000000000..6923b0bcc68e
--- /dev/null
+++ b/dev-java/hamcrest-library/files/1.3-remove-targets.patch
@@ -0,0 +1,47 @@
+diff --git a/build.xml b/build.xml
+index 1cfd4fb..185c563 100644
+--- a/build.xml
++++ b/build.xml
+@@ -12,42 +12,9 @@
+ </target>
+
+ <target name="generator" description="Build code generator tool">
+- <java-to-jar srcdir="hamcrest-generator/src/main/java"
+- modulename="hamcrest-generator-nodeps"
+- classpath="lib/generator/qdox-1.12.jar"/>
+-
+- <!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
+- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar-1.3.jar"/>
+- <jarjar jarfile="build/hamcrest-generator-${version}.jar">
+- <zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
+- <zipfileset src="lib/generator/qdox-1.12.jar"/>
+- <rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
+- </jarjar>
+- <copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
+ </target>
+
+ <target name="core" depends="generator" description="Build core Hamcrest library">
+- <java-to-jar srcdir="hamcrest-core/src/main/java" modulename="hamcrest-core"/>
+-
+- <!-- Generate one class with all static imports -->
+- <mkdir dir="build/temp/hamcrest-core/generated-code"/>
+-
+- <java classname="org.hamcrest.generator.config.XmlConfigurator"
+- fork="yes"
+- failonerror="yes"
+- classpath="
+- build/hamcrest-core-${version}.jar;
+- build/hamcrest-generator-${version}.jar;
+- ">
+- <arg value="core-matchers.xml"/>
+- <arg value="hamcrest-core/src/main/java"/>
+- <arg value="org.hamcrest.CoreMatchers"/>
+- <arg value="build/temp/hamcrest-core/generated-code"/>
+- </java>
+- <!-- Append to core jar -->
+- <java-to-jar srcdir="build/temp/hamcrest-core/generated-code"
+- modulename="hamcrest-core"
+- classpath="build/hamcrest-core-${version}.jar"/>
+ </target>
+
+ <target name="library"
diff --git a/dev-java/hamcrest-library/hamcrest-library-1.3.ebuild b/dev-java/hamcrest-library/hamcrest-library-1.3.ebuild
new file mode 100644
index 000000000000..9bc239a2a1b2
--- /dev/null
+++ b/dev-java/hamcrest-library/hamcrest-library-1.3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/hamcrest-library/hamcrest-library-1.3.ebuild,v 1.1 2013/09/10 17:26:05 ercpe Exp $
+
+EAPI="5"
+
+JAVA_PKG_IUSE="source"
+
+inherit java-pkg-2 java-ant-2
+
+MY_PN=${PN/-library}
+MY_P="${MY_PN}-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Core library of matchers for building test expressions."
+HOMEPAGE="http://code.google.com/p/${MY_PN}/"
+SRC_URI="http://${MY_PN}.googlecode.com/files/${MY_P}.tgz"
+
+LICENSE="BSD-2"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+
+CDEPEND="
+ ~dev-java/hamcrest-generator-${PV}
+ ~dev-java/hamcrest-core-${PV}
+ dev-java/qdox:1.12
+"
+DEPEND=">=virtual/jdk-1.5
+ userland_GNU? ( sys-apps/findutils )
+ ${CDEPEND}"
+
+RDEPEND=">=virtual/jre-1.5
+ ${CDEPEND}"
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+JAVA_ANT_CLASSPATH_TAGS="${JAVA_ANT_CLASSPATH_TAGS} java java-to-jar"
+EANT_GENTOO_CLASSPATH="hamcrest-generator-${SLOT},hamcrest-core-${SLOT},qdox-1.12"
+EANT_BUILD_TARGET="library"
+EANT_EXTRA_ARGS="-Dversion=${PV}"
+EANT_GENTOO_CLASSPATH_EXTRA="build/${P}.jar"
+
+java_prepare() {
+ # remove core+generator target as they are already built.
+ epatch "${FILESDIR}/${PV}-remove-targets.patch"
+
+ find -iname "*.jar" -exec rm -v {} + || die "Unable to clean bundled JAR files"
+}
+
+src_install() {
+ java-pkg_newjar build/${PN/core/library}-${PV}.jar ${PN/core/library}.jar
+
+ use source && java-pkg_dosrc ${PN}/src/main/java/org
+}
diff --git a/dev-java/hamcrest-library/metadata.xml b/dev-java/hamcrest-library/metadata.xml
new file mode 100644
index 000000000000..314c8dd8ca46
--- /dev/null
+++ b/dev-java/hamcrest-library/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <upstream>
+ <remote-id type="google-code">hamcrest</remote-id>
+ </upstream>
+</pkgmetadata>
+