Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 205489 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/local/portage/layman/java-overlay/dev-java/hamcrest/hamcrest-1.1.ebuild (-39 / +44 lines)
Lines 1-65 Link Here
1
# Copyright 1999-2007 Gentoo Foundation
1
# Copyright 1999-2009 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: $
3
# $Header: $
4
4
5
JAVA_PKG_IUSE="doc source test"
5
EAPI="2"
6
JAVA_PKG_IUSE="examples test"
6
inherit java-pkg-2 java-ant-2
7
inherit java-pkg-2 java-ant-2
8
7
DESCRIPTION="Library of matchers for building test expressions."
9
DESCRIPTION="Library of matchers for building test expressions."
8
HOMEPAGE="http://code.google.com/p/hamcrest/"
10
HOMEPAGE="http://code.google.com/p/${MY_PN}/"
9
SRC_URI="http://${PN}.googlecode.com/files/${P}.tgz"
11
SRC_URI="http://${PN}.googlecode.com/files/${P}.tgz"
10
LICENSE="BSD-2"
12
LICENSE="BSD-2"
11
SLOT="0"
13
SLOT="1.2"
12
KEYWORDS="~x86 ~amd64"
14
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
13
IUSE=""
15
IUSE=""
14
16
15
CDEPEND=">=dev-java/easymock-2.2
17
CDEPEND="
16
	>=dev-java/jmock-1.0
18
	~dev-java/hamcrest-core-${PV}
17
	=dev-java/qdox-1.6*"
19
	~dev-java/hamcrest-library-${PV}
20
	~dev-java/hamcrest-integration-${PV}"
18
DEPEND=">=virtual/jdk-1.5
21
DEPEND=">=virtual/jdk-1.5
22
	userland_GNU? ( sys-apps/findutils )
19
	test? (
23
	test? (
20
		dev-java/ant-junit
24
		~dev-java/hamcrest-generator-${PV}
21
		=dev-java/junit-3.8*
25
		dev-java/junit:4
26
		dev-java/ant-junit4
27
		dev-java/easymock:2
28
		dev-java/jmock:1.0
22
	)
29
	)
23
	>=dev-java/jarjar-0.9
24
	${CDEPEND}"
30
	${CDEPEND}"
25
RDEPEND=">=virtual/jre-1.5
31
RDEPEND=">=virtual/jre-1.5
26
	${CDEPEND}"
32
	${CDEPEND}"
27
33
28
src_unpack() {
34
JAVA_ANT_REWRITE_CLASSPATH=1
29
	unpack ${A}
35
JAVA_ANT_CLASSPATH_TAGS="${JAVA_ANT_CLASSPATH_TAGS} java-to-jar"
30
	cd ${S}
36
31
	find -name "*.jar" | xargs rm -v
37
java_prepare() {
32
	java-ant_rewrite-classpath
38
	# Don't include source in JAR.  If a Gentoo user wants the source the source
33
39
	# USE flag will be enabled
34
	# These jars must be symlinked as specifying them using gentoo.classpath
40
	epatch "${FILESDIR}/hamcrest-1.2-no_source_in_jar.patch"
35
	# does not work and both compilation and test fail
41
	# Empty out the contents of the generator target; it has already been built.
36
	java-pkg_jar-from --into lib/generator qdox-1.6 qdox.jar qdox-1.6.1.jar
42
	epatch "${FILESDIR}/hamcrest-1.2-empty_generator.patch"
37
	java-pkg_jar-from --into lib/integration easymock-2 easymock.jar easymock-2.2.jar
43
	# Empty out the contents of the core target; it has already been built.
38
	java-pkg_jar-from --into lib/integration jmock-1.0 jmock.jar jmock-1.10RC1.jar
44
	epatch "${FILESDIR}/hamcrest-1.2-empty_core.patch"
45
	# Empty out the contents of the library target; it has already been built.
46
	epatch "${FILESDIR}/hamcrest-1.2-empty_library.patch"
47
	# Empty out the contents of the integration target; it has already been built.
48
	epatch "${FILESDIR}/hamcrest-1.2-empty_integration.patch"
49
50
	find -iname "*.jar" -exec rm -v {} + || die "Failed to remove bundled JARs"
39
}
51
}
40
52
41
src_compile() {
53
src_compile() {
42
	# javadoc fails if these files and directories do not exist
54
	einfo "Nothing to do..."
43
	if use doc ; then
44
		mkdir -p ${S}/build/generated-code
45
		echo "<html><body></body></html>" > ${S}/overview.html
46
	fi
47
48
	ANT_TASKS="jarjar-1" eant bigjar $(use_doc javadoc) -Dversion=${PV}
49
}
55
}
50
56
51
src_test() {
57
src_test() {
52
	ANT_TASKS="ant-junit jarjar-1" eant unit-test \
58
	ANT_TASKS="ant-junit4"
53
		-Dgentoo.classpath=$(java-pkg_getjars --build-only junit)
59
	eant unit-test \
60
		-Dversion="${PV}" \
61
		-Dgentoo.classpath="$(java-pkg_getjars --build-only --with-dependencies hamcrest-generator-${SLOT}):\
62
			$(java-pkg_getjars hamcrest-core-${SLOT},hamcrest-library-${SLOT},hamcrest-integration-${SLOT}):\
63
			$(java-pkg_getjars --build-only junit-4,easymock-2,jmock-1.0)"
54
}
64
}
55
65
56
src_install() {
66
src_install() {
57
	for name in all core generator integration library text ; do
67
	dodoc README.txt CHANGES.txt
58
		java-pkg_newjar build/${PN}-${name}-${PV}.jar ${PN}-${name}.jar
68
59
	done
69
	use examples && java-pkg_doexamples ${PN}-examples
60
61
	use doc && java-pkg_dojavadoc build/javadoc
62
	use source && java-pkg_dosrc ${PN}-core/src/main/java/org ${PN}-generator/src/main/java/org \
63
		${PN}-integration/src/main/java/org ${PN}-library/src/main/java/org \
64
		${PN}-text/src/main/java/org
65
}
70
}

Return to bug 205489