Diff hamcrest-core-1.1-r4 with a hamcrest-core-1.3-r3

/usr/portage/dev-java/hamcrest-core/hamcrest-core-1.3-r3.ebuild 2023-10-09 14:52:29.420368348 +0300
1 1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6 6
JAVA_PKG_IUSE="doc source"
7
MAVEN_ID="org.hamcrest:hamcrest-core:1.3"
7 8

  
8 9
inherit java-pkg-2 java-pkg-simple
9 10

  
10
MY_PN="hamcrest"
11
MY_P="${MY_PN}-${PV}"
12

  
13
DESCRIPTION="Library of matchers for building test expressions"
11
DESCRIPTION="Core library of matchers for building test expressions"
14 12
HOMEPAGE="https://hamcrest.org/JavaHamcrest/"
15
SRC_URI="https://github.com/${MY_PN}/JavaHamcrest/archive/${MY_PN}-java-${PV}.tar.gz -> ${P}.tar.gz"
13
SRC_URI="https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-${PV}.tar.gz"
16 14

  
17 15
LICENSE="BSD-2"
18
SLOT="0"
19
KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x64-solaris"
20

  
21
RDEPEND="
22
	>=virtual/jre-1.8:*"
23

  
24
DEPEND="
25
	>=virtual/jdk-1.8:*
26
	source? ( app-arch/zip )"
16
SLOT="${PV}"
17
KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x64-solaris"
27 18

  
28
S="${WORKDIR}/JavaHamcrest-${MY_PN}-java-${PV}"
19
DEPEND=">=virtual/jdk-1.8:*"
20
RDEPEND=">=virtual/jre-1.8:*"
21
BDEPEND="dev-java/hamcrest-generator:1.3"
29 22

  
30
JAVA_SRC_DIR="${PN}/src"
23
DOCS=( {CHANGES,LICENSE,README}.txt )
31 24

  
32 25
PATCHES=(
33 26
	# https://bugs.gentoo.org/751379
34
	"${FILESDIR}"/hamcrest-core-1.1-java-11.patch
27
	"${FILESDIR}"/hamcrest-core-1.3-r3-java-11.patch
35 28
)
36 29

  
30
S="${WORKDIR}/JavaHamcrest-hamcrest-java-${PV}"
31

  
32
JAVA_SRC_DIR="${PN}/src"
33

  
37 34
src_prepare() {
38 35
	default
39 36
	java-pkg_clean
40 37
}
38

  
39
src_compile() {
40
	java-pkg-simple_src_compile
41

  
42
	# Need to add this in order to generate "CoreMatchers.java" as with java-ant-2 was triggered by "build.xml"
43
	"$(java-config -J)" \
44
		-cp $(java-config --with-dependencies --classpath hamcrest-generator:1.3):${PN}.jar \
45
		org.hamcrest.generator.config.XmlConfigurator \
46
		core-matchers.xml \
47
		hamcrest-core/src/main/java \
48
		org.hamcrest.CoreMatchers \
49
		hamcrest-core/src/main/java
50

  
51
	# Compile again, this time including the freshly generated "CoreMatchers.java"
52
	java-pkg-simple_src_compile
53
}
Thank you!