summaryrefslogtreecommitdiff
path: root/dev-java/swingx-ws/swingx-ws-1.0_p20110515-r2.ebuild
blob: fb902a0a9f6ba17c81e79fbb0c4fb627adeeb8dd (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
73
74
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

MY_P="${PN}-2011_05_15-src"
JAVA_PKG_IUSE="doc source"

inherit java-pkg-2 java-pkg-simple

DESCRIPTION="Utilities and widgets to integrate Swing GUIs with web applications"
HOMEPAGE="https://java.net/projects/swingx-ws/"
SRC_URI="https://downloads.sourceforge.net/bt747/Development/${MY_P}.zip"
LICENSE="LGPL-2.1"
SLOT="bt747"
KEYWORDS="~amd64"

CP_DEPEND="
	dev-java/jakarta-xml-soap-api:1
	dev-java/jdom:0
	dev-java/json:0
	dev-java/rome:0
	dev-java/jtidy:0
	dev-java/xerces:2
	dev-java/swingx:1.6
	dev-java/swing-layout:1
	dev-java/swingx-beaninfo:0
	dev-java/commons-httpclient:3
	dev-java/xml-commons-external:1.4"

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

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

BDEPEND="
	app-arch/unzip"

S="${WORKDIR}/${MY_P}/src"
JAVA_SRC_DIR=( "beaninfo" "java" )

PATCHES=(
	"${FILESDIR}/${P}-replace-sun.misc-classes-for-java-9+.patch"
)

src_prepare() {
	default
	java-pkg_clean "${WORKDIR}"

	# SwingWorker has been built-in since Java 6.
	find java -name "*.java" -exec sed -i -r "s:org\.jdesktop\.swingworker\.:javax.swing.:g" {} + || die

	# Fixes for newer swingx-beaninfo.
	sed -i "s:BeanInfoSupport:org.jdesktop.beans.\0:g" beaninfo/org/jdesktop/swingx/*.java || die
	find beaninfo -name "*.java" -exec sed -i -r "s:org\.jdesktop\.swingx\.(editors|BeanInfoSupport|EnumerationValue):org.jdesktop.beans.\1:g" {} + || die

	# GraphicsUtilities moved in later SwingX versions.
	sed -i "s:org\.jdesktop\.swingx\.graphics\.GraphicsUtilities:org.jdesktop.swingx.util.GraphicsUtilities:g" \
		java/org/jdesktop/swingx/mapviewer/AbstractTileFactory.java || die

	java-pkg-2_src_prepare
}

src_compile() {
	java-pkg-simple_src_compile

	local DIR
	for DIR in "${JAVA_SRC_DIR[@]}"; do
		java-pkg_addres ${PN}.jar ${DIR}
	done
}