summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2007-05-25 21:47:15 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2007-05-25 21:47:15 +0000
commit496712f717748b6e02ce12062b9218ff69a70333 (patch)
tree2f99603a775e78fd255a822a0819576079dcf372 /games-strategy/triplea
parentReadd ~alpha wrt #176620 (diff)
downloadgentoo-2-496712f717748b6e02ce12062b9218ff69a70333.tar.gz
gentoo-2-496712f717748b6e02ce12062b9218ff69a70333.tar.bz2
gentoo-2-496712f717748b6e02ce12062b9218ff69a70333.zip
Migrate to splitted ant, add pkg_setup calling both games_pkg_setup and java-pkg-2_pkg_setup, and RDEPEND on junit because the test classes are installed by this package.
(Portage version: 2.1.2.7)
Diffstat (limited to 'games-strategy/triplea')
-rw-r--r--games-strategy/triplea/ChangeLog10
-rw-r--r--games-strategy/triplea/files/digest-triplea-0.9.0.2-r13
-rw-r--r--games-strategy/triplea/triplea-0.9.0.2-r1.ebuild93
3 files changed, 105 insertions, 1 deletions
diff --git a/games-strategy/triplea/ChangeLog b/games-strategy/triplea/ChangeLog
index 8bb8564df1f7..63ad7fac48dc 100644
--- a/games-strategy/triplea/ChangeLog
+++ b/games-strategy/triplea/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for games-strategy/triplea
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/triplea/ChangeLog,v 1.30 2007/05/09 08:50:16 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/triplea/ChangeLog,v 1.31 2007/05/25 21:47:15 betelgeuse Exp $
+
+*triplea-0.9.0.2-r1 (25 May 2007)
+
+ 25 May 2007; Petteri Räty <betelgeuse@gentoo.org>
+ +triplea-0.9.0.2-r1.ebuild:
+ Migrate to splitted ant, add pkg_setup calling both games_pkg_setup and
+ java-pkg-2_pkg_setup, and RDEPEND on junit because the test classes are
+ installed by this package.
09 May 2007; Vlastimil Babka <caster@gentoo.org> triplea-0.9.0.2.ebuild:
Add junit to DEPEND to fix building with java-strict. Tests don't seem
diff --git a/games-strategy/triplea/files/digest-triplea-0.9.0.2-r1 b/games-strategy/triplea/files/digest-triplea-0.9.0.2-r1
new file mode 100644
index 000000000000..0f31266f0b8f
--- /dev/null
+++ b/games-strategy/triplea/files/digest-triplea-0.9.0.2-r1
@@ -0,0 +1,3 @@
+MD5 f96255fe0501c8201b565011e4fc2600 triplea_0_9_0_2_source_code_only.zip 13624383
+RMD160 f1ba831a92a593e0d0f8b34ac324e1f7ffeeea37 triplea_0_9_0_2_source_code_only.zip 13624383
+SHA256 1ce749cf7c107ebe7aaac13b91a31c30b453e8414a7935755be2857561e1bce7 triplea_0_9_0_2_source_code_only.zip 13624383
diff --git a/games-strategy/triplea/triplea-0.9.0.2-r1.ebuild b/games-strategy/triplea/triplea-0.9.0.2-r1.ebuild
new file mode 100644
index 000000000000..5bf522492358
--- /dev/null
+++ b/games-strategy/triplea/triplea-0.9.0.2-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/triplea/triplea-0.9.0.2-r1.ebuild,v 1.1 2007/05/25 21:47:15 betelgeuse Exp $
+
+inherit eutils java-pkg-2 java-ant-2 versionator games
+
+MY_PV=$(replace_all_version_separators _)
+DESCRIPTION="An open source clone of the popular Axis and Allies boardgame"
+HOMEPAGE="http://triplea.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${MY_PV}_source_code_only.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="=dev-java/jgoodies-looks-2*
+ =dev-java/commons-httpclient-3*
+ dev-java/commons-logging
+ dev-java/commons-codec
+ dev-java/junit"
+DEPEND="${RDEPEND}
+ >=virtual/jdk-1.5
+ app-arch/unzip"
+RDEPEND="${RDEPEND}
+ >=virtual/jre-1.5"
+
+S=${WORKDIR}/${PN}_${MY_PV}
+
+pkg_setup() {
+ games_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -i \
+ -e 's/getWindows/getMyWindows/' \
+ src/games/strategy/debug/Console.java \
+ || die "sed Console.java failed"
+
+ sed -i \
+ -e 's:/triplea/:/.triplea/:' \
+ src/games/strategy/engine/framework/ui/SaveGameFileChooser.java \
+ || die "sed SaveGameFileChooser.java failed"
+
+ rm -f lib/{junit.jar,derby_10_1_2.jar}
+ java-pkg_jar-from jgoodies-looks-2.0 looks.jar lib/looks-2.0.4.jar
+ java-pkg_jar-from commons-httpclient-3 commons-httpclient.jar \
+ lib/commons-httpclient-3.0.1.jar
+ java-pkg_jar-from commons-logging commons-logging.jar \
+ lib/commons-logging-1.1.jar
+ java-pkg_jar-from commons-codec commons-codec.jar \
+ lib/commons-codec-1.3.jar
+ # installs the test files
+ java-pkg_jar-from --into lib junit
+ java-pkg_ensure-no-bundled-jars
+}
+
+src_compile() {
+ eant || die
+ echo "triplea.saveGamesInHomeDir=true" > classes/triplea.properties
+ # The only target creating this is zip which does unjar etc
+ mkdir bin
+ cd classes
+ jar cf ../bin/triplea.jar * || die
+ rm -fr * || die
+}
+
+# Needs X11 maybe use virtualx.eclass
+RESTRICT="test"
+src_test() {
+ ANT_TASKS="ant-junit" eant test
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r bin data games images maps || die "doins failed"
+
+ java-pkg_regjar "${D}/${GAMES_DATADIR}"/${PN}/bin/*.jar
+ # TODO: add server launcher (see run-server.sh)
+ java-pkg_dolauncher ${PN} -into "${GAMES_PREFIX}" --main \
+ games.strategy.engine.framework.GameRunner
+
+ newicon icons/triplea_icon.bmp ${PN}.bmp
+ make_desktop_entry ${PN} TripleA /usr/share/pixmaps/${PN}.bmp
+
+ dodoc changelog.txt || die
+ dohtml -r doc/* readme.html || die
+ prepgamesdirs
+}