Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 349341
Collapse All | Expand All

(-)/usr/portage/games-strategy/triplea/triplea-1.0.0.3.ebuild (-27 / +28 lines)
Lines 1-6 Link Here
1
# Copyright 1999-2008 Gentoo Foundation
1
# Copyright 1999-2011 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: /var/cvsroot/gentoo-x86/games-strategy/triplea/triplea-1.0.0.3.ebuild,v 1.1 2008/07/08 19:26:10 mr_bones_ Exp $
3
# $Id: $
4
5
EAPI=2
4
6
5
inherit eutils java-pkg-2 java-ant-2 versionator games
7
inherit eutils java-pkg-2 java-ant-2 versionator games
6
8
Lines 14-54 Link Here
14
KEYWORDS="~amd64 ~ppc ~x86"
16
KEYWORDS="~amd64 ~ppc ~x86"
15
IUSE=""
17
IUSE=""
16
18
17
RDEPEND="=dev-java/jgoodies-looks-2*
19
RDEPEND="dev-java/jgoodies-looks:2.0
18
	=dev-java/commons-httpclient-3*
20
	dev-java/commons-httpclient:3
19
	dev-java/apple-java-extensions-bin
21
	dev-java/apple-java-extensions-bin
20
	dev-java/commons-logging
22
	dev-java/commons-logging
21
	dev-java/commons-codec
23
	dev-java/commons-codec
22
	=dev-java/junit-3.8*"
24
	=dev-java/junit-3.8*"
23
DEPEND="${RDEPEND}
25
DEPEND="${RDEPEND}
24
	>=virtual/jdk-1.5
26
	virtual/jdk:1.6
25
	app-arch/unzip"
27
	app-arch/unzip"
26
RDEPEND="${RDEPEND}
28
RDEPEND="${RDEPEND}
27
	>=virtual/jre-1.5"
29
	virtual/jre:1.6"
28
30
29
S=${WORKDIR}/${PN}_${MY_PV}
31
S="${WORKDIR}/${PN}_${MY_PV}"
30
32
31
pkg_setup() {
33
pkg_setup() {
32
	games_pkg_setup
34
	games_pkg_setup
33
	java-pkg-2_pkg_setup
35
	java-pkg-2_pkg_setup
34
}
36
}
35
37
36
src_unpack() {
38
src_prepare() {
37
	unpack ${A}
38
	cd "${S}"
39
40
	sed -i \
41
		-e 's/getWindows/getMyWindows/' \
42
		src/games/strategy/debug/Console.java \
43
		|| die "sed Console.java failed"
44
45
	sed -i \
39
	sed -i \
46
		-e 's:/triplea/:/.triplea/:' \
40
		-e 's:"triplea":".triplea":g' \
47
		src/games/strategy/engine/framework/ui/SaveGameFileChooser.java \
41
		src/games/strategy/engine/framework/GameRunner.java \
48
		|| die "sed SaveGameFileChooser.java failed"
42
		|| die "sed GameRunner.java failed"
49
43
50
	rm -f lib/{junit.jar,derby_10_1_2.jar,looks-2.1.4.jar,AppleJavaExtensions.jar}
44
	rm -f lib/derby_10_1_2.jar
51
	java-pkg_jar-from jgoodies-looks-2.0 looks.jar lib/looks-2.1.4.jar
52
	java-pkg_jar-from apple-java-extensions-bin AppleJavaExtensions.jar \
45
	java-pkg_jar-from apple-java-extensions-bin AppleJavaExtensions.jar \
53
		lib/AppleJavaExtensions.jar
46
		lib/AppleJavaExtensions.jar
54
	java-pkg_jar-from commons-httpclient-3 commons-httpclient.jar \
47
	java-pkg_jar-from commons-httpclient-3 commons-httpclient.jar \
Lines 57-70 Link Here
57
		lib/commons-logging-1.1.jar
50
		lib/commons-logging-1.1.jar
58
	java-pkg_jar-from commons-codec commons-codec.jar \
51
	java-pkg_jar-from commons-codec commons-codec.jar \
59
		lib/commons-codec-1.3.jar
52
		lib/commons-codec-1.3.jar
53
  # Needs the substance package
54
	#java-pkg_jar-from substance substance.jar \
55
	#	lib/substance_5_3.jar
60
	# installs the test files
56
	# installs the test files
61
	java-pkg_jar-from --into lib junit
57
	java-pkg_jar-from --into lib junit
62
	java-pkg_ensure-no-bundled-jars
58
	#java-pkg_ensure-no-bundled-jars
63
}
59
}
64
60
65
src_compile() {
61
src_compile() {
66
	eant || die
62
	eant || die
67
	echo "triplea.saveGamesInHomeDir=true" > classes/triplea.properties
63
	echo "triplea.saveGamesInHomeDir=true" > data/triplea.properties
68
	# The only target creating this is zip which does unjar etc
64
	# The only target creating this is zip which does unjar etc
69
	mkdir bin
65
	mkdir bin
70
	cd classes
66
	cd classes
Lines 80-94 Link Here
80
76
81
src_install() {
77
src_install() {
82
	insinto "${GAMES_DATADIR}"/${PN}
78
	insinto "${GAMES_DATADIR}"/${PN}
83
	doins -r bin data games images maps || die "doins failed"
79
	doins -r bin data dice_servers images maps || die "doins failed"
84
80
85
	java-pkg_regjar "${D}/${GAMES_DATADIR}"/${PN}/bin/*.jar
81
	java-pkg_regjar "${D}/${GAMES_DATADIR}"/${PN}/bin/*.jar
86
	# TODO: add server launcher (see run-server.sh)
82
	java-pkg_dolauncher ${PN} -into "${GAMES_PREFIX}" \
87
	java-pkg_dolauncher ${PN} -into "${GAMES_PREFIX}" --main \
83
		--java_args "-Xmx256m" --main \
88
		games.strategy.engine.framework.GameRunner
84
		games.strategy.engine.framework.GameRunner
85
	java-pkg_dolauncher ${PN}-server -into "${GAMES_PREFIX}" \
86
		--java_args "-server -Xmx64m -Dtriplea.lobby.port=3303 -Dtriplea.lobby.console=true" \
87
		--main games.strategy.engine.lobby.server.LobbyServer
89
88
90
	newicon data/games/strategy/engine/framework/ta_icon.png ${PN}.png
89
	newicon icons/triplea_icon.png ${PN}.png
90
	newicon icons/triplea_icon.png ${PN}-server.png
91
	make_desktop_entry ${PN} TripleA
91
	make_desktop_entry ${PN} TripleA
92
	make_desktop_entry ${PN}-server TripleA-server
92
93
93
	dodoc changelog.txt || die
94
	dodoc changelog.txt || die
94
	dohtml -r doc/* readme.html || die
95
	dohtml -r doc/* readme.html || die

Return to bug 349341