summaryrefslogtreecommitdiff
path: root/dev-java/rome/rome-0.9-r4.ebuild
blob: 58f961d200e57f514c6a02b026e9c654bc2589bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

JAVA_PKG_IUSE="doc source test"
JAVA_TESTING_FRAMEWORKS="junit-4"

inherit java-pkg-2 java-pkg-simple

DESCRIPTION="Java framework for RSS and Atom feeds"
HOMEPAGE="https://rometools.github.io/rome/"
SRC_URI="mirror://gentoo/${P}.zip"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"

CP_DEPEND="dev-java/jdom:0"

DEPEND="
	${CP_DEPEND}
	>=virtual/jdk-1.8:*"

RDEPEND="
	${CP_DEPEND}
	>=virtual/jre-1.8:*"

BDEPEND="app-arch/unzip"

JAVA_ENCODING="ISO-8859-1"
JAVA_SRC_DIR="src/java"
JAVA_RESOURCE_DIRS="res/java"

JAVA_TEST_SRC_DIRS="src/test"
JAVA_TEST_RESOURCE_DIRS="src/data"
JAVA_TEST_GENTOO_CLASSPATH="junit-4"

JAVA_TEST_EXCLUDES=(
	# 1) testParse(com.sun.syndication.unittest.TestDateParser)
	# junit.framework.AssertionFailedError
	com.sun.syndication.unittest.TestDateParser
	# 2) warning(junit.framework.TestSuite$1)
	# junit.framework.AssertionFailedError: Class com.sun.syndication.unittest.FeedOpsTest has no public constructor TestCase(String name) or TestCase()
	# 	at junit.framework.Assert.fail(Assert.java:57)
	com.sun.syndication.unittest.FeedOpsTest
	# 3) warning(junit.framework.TestSuite$1)
	# junit.framework.AssertionFailedError: Class com.sun.syndication.unittest.FeedTest has no public constructor TestCase(String name) or TestCase()
	# 	at junit.framework.Assert.fail(Assert.java:57)
	com.sun.syndication.unittest.FeedTest
	# 4) warning(junit.framework.TestSuite$1)
	# junit.framework.AssertionFailedError: Class com.sun.syndication.unittest.SyndFeedTest has no public constructor TestCase(String name) or TestCase()
	# 	at junit.framework.Assert.fail(Assert.java:57)
	com.sun.syndication.unittest.SyndFeedTest
)

S="${WORKDIR}/${P}"

src_prepare() {
	default
	mkdir -p res/java/com/sun/syndication || die
	cp {src,res}/java/com/sun/syndication/rome.properties || die

	sed -e 's:\(public \)\(Module\):\1com.sun.syndication.feed.module.\2:' \
		-e 's:\(,\)\(Module\):\1com.sun.syndication.feed.module.\2:' \
		-i src/java/com/sun/syndication/feed/synd/Synd{Feed,Entry}Impl.java || die
}

src_install() {
	default # https://bugs.gentoo.org/789582
	java-pkg-simple_src_install
}