diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2007-05-25 21:05:12 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2007-05-25 21:05:12 +0000 |
commit | 48f2cac2ce861cec84d7fb827980f7962f2082a6 (patch) | |
tree | 4fd8d137711132c37eed64a7d3f7d1519249a3b2 /games-strategy | |
parent | added new version to match gnat-2007 (diff) | |
download | gentoo-2-48f2cac2ce861cec84d7fb827980f7962f2082a6.tar.gz gentoo-2-48f2cac2ce861cec84d7fb827980f7962f2082a6.tar.bz2 gentoo-2-48f2cac2ce861cec84d7fb827980f7962f2082a6.zip |
Add a pkg_setup that calls both games_pkg_setup and java-pkg-2_pkg_setup. Ensure that no bundled jars are used and add src_test.
(Portage version: 2.1.2.7)
Diffstat (limited to 'games-strategy')
-rw-r--r-- | games-strategy/freecol/ChangeLog | 7 | ||||
-rw-r--r-- | games-strategy/freecol/files/freecol-0.6.1-installer-taskdefs.patch | 88 | ||||
-rw-r--r-- | games-strategy/freecol/freecol-0.6.1.ebuild | 34 |
3 files changed, 120 insertions, 9 deletions
diff --git a/games-strategy/freecol/ChangeLog b/games-strategy/freecol/ChangeLog index 49955c44d132..27d652c05cba 100644 --- a/games-strategy/freecol/ChangeLog +++ b/games-strategy/freecol/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for games-strategy/freecol # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/freecol/ChangeLog,v 1.17 2007/05/04 13:46:35 beandog Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-strategy/freecol/ChangeLog,v 1.18 2007/05/25 21:05:12 betelgeuse Exp $ + + 25 May 2007; Petteri Räty <betelgeuse@gentoo.org> + +files/freecol-0.6.1-installer-taskdefs.patch, freecol-0.6.1.ebuild: + Add a pkg_setup that calls both games_pkg_setup and java-pkg-2_pkg_setup. + Ensure that no bundled jars are used and add src_test. 04 May 2007; Steve Dibb <beandog@gentoo.org> freecol-0.5.3.ebuild: amd64 stable, bug 174770 diff --git a/games-strategy/freecol/files/freecol-0.6.1-installer-taskdefs.patch b/games-strategy/freecol/files/freecol-0.6.1-installer-taskdefs.patch new file mode 100644 index 000000000000..a872b846f28e --- /dev/null +++ b/games-strategy/freecol/files/freecol-0.6.1-installer-taskdefs.patch @@ -0,0 +1,88 @@ +http://sourceforge.net/tracker/index.php?func=detail&aid=1725840&group_id=43225&atid=435580 + +Index: build.xml +=================================================================== +RCS file: /cvsroot/freecol/freecol/build.xml,v +retrieving revision 1.46 +diff -u -r1.46 build.xml +--- build.xml 21 May 2007 09:08:19 -0000 1.46 ++++ build.xml 25 May 2007 20:48:17 -0000 +@@ -49,23 +49,12 @@ + </condition> + + +- <!-- TASK DEFINITIONS --> +- <taskdef name="jsmoothgen" +- classname="net.charabia.jsmoothgen.ant.JSmoothGen" +- classpath="${freecol.build.dir}/jars/jsmoothgen-ant.jar" +- /> +- <taskdef name="izpack" +- classname="com.izforge.izpack.ant.IzPackTask" +- classpath="${freecol.build.dir}/jars/standalone-compiler.jar" +- /> +- +- <!-- JarBundler is a feature-rich Ant task which will create a Mac OS X +- application bundle from a list of Jar files and a main class name. +- (GPL-Software) -> http://informagen.com/JarBundler/ --> +- <taskdef name="jarbundler" +- classname="net.sourceforge.jarbundler.JarBundler" +- classpath="${freecol.build.dir}/jars/jarbundler.jar" +- /> ++ <target name="define-jsmoothgen"> ++ <taskdef name="jsmoothgen" ++ classname="net.charabia.jsmoothgen.ant.JSmoothGen" ++ classpath="${freecol.build.dir}/jars/jsmoothgen-ant.jar" ++ /> ++ </target> + + <target name="init" unless="TSTAMP"> + <tstamp/> +@@ -223,7 +212,7 @@ + </copy> + </target> + +- <target name="prepareWinFiles" depends="initDist"> ++ <target name="prepareWinFiles" depends="initDist,define-jsmoothgen"> + <jsmoothgen project="${freecol.build.dir}/startup.jsmooth" skeletonroot="${freecol.build.dir}/skeletons"/> + <move todir="${freecol.release.dir}/win/${freecol.name}"> + <fileset dir="${freecol.build.dir}" includes="freecol.exe"/> +@@ -264,7 +253,12 @@ + </target> + + <target name="javaInstallerBundle" unless="skip.dist.installer" description="Builds a platform independent installer" +- depends="initDist,prepareWinFiles,prepareManual,prepareBaseFiles,prepareSourceFiles"> ++ depends="initDist,prepareWinFiles,prepareManual,prepareBaseFiles,prepareSourceFiles"> ++ <taskdef name="izpack" ++ classname="com.izforge.izpack.ant.IzPackTask" ++ classpath="${freecol.build.dir}/jars/standalone-compiler.jar" ++ /> ++ + <izpack output="${freecol.release.dir}/${freecol.release.name}-installer.jar" + installerType="standard" + basedir="${freecol.release.dir}/" +@@ -332,7 +326,7 @@ + </target> + + <target name="winInstallerBundle" unless="skip.dist.installer" description="Builds a windows installer" +- depends="initDist,javaInstallerBundle"> ++ depends="initDist,javaInstallerBundle,define-jsmoothgen"> + + <copy todir="${freecol.release.dir}"> + <fileset dir="${freecol.build.dir}" includes="installer.jsmooth"/> +@@ -349,7 +343,15 @@ + </target> + + <!-- Builds a doubleclickable application bundle running on Mac OS X --> +- <target name="macJavaBundle" unless="skip.dist.mac" depends="prepareManual,prepareBaseFiles"> ++ <target name="macJavaBundle" unless="skip.dist.mac" depends="prepareManual,prepareBaseFiles"> ++ <!-- JarBundler is a feature-rich Ant task which will create a Mac OS X ++ application bundle from a list of Jar files and a main class name. ++ (GPL-Software) -> http://informagen.com/JarBundler/ --> ++ <taskdef name="jarbundler" ++ classname="net.sourceforge.jarbundler.JarBundler" ++ classpath="${freecol.build.dir}/jars/jarbundler.jar" ++ /> ++ + <jarbundler dir="${freecol.release.dir}" + name="FreeCol" + mainclass="net.sf.freecol.FreeCol" diff --git a/games-strategy/freecol/freecol-0.6.1.ebuild b/games-strategy/freecol/freecol-0.6.1.ebuild index 14acad3206f5..100a9d621425 100644 --- a/games-strategy/freecol/freecol-0.6.1.ebuild +++ b/games-strategy/freecol/freecol-0.6.1.ebuild @@ -1,6 +1,8 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/freecol/freecol-0.6.1.ebuild,v 1.1 2007/04/30 16:18:25 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-strategy/freecol/freecol-0.6.1.ebuild,v 1.2 2007/05/25 21:05:12 betelgeuse Exp $ + +WANT_ANT_TASKS="ant-nodeps" inherit eutils java-pkg-2 java-ant-2 games @@ -11,23 +13,33 @@ SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="test" RDEPEND="dev-java/higlayout" DEPEND="${RDEPEND} - >=virtual/jdk-1.6 - dev-java/ant" + test? ( + dev-java/ant-junit + dev-java/ant-trax + ) + >=virtual/jdk-1.6" RDEPEND="${RDEPEND} >=virtual/jre-1.6" S=${WORKDIR}/${PN} +pkg_setup() { + games_pkg_setup + java-pkg-2_pkg_setup +} + src_unpack() { unpack ${A} cd "${S}" - rm -rf FreeCol.jar src/classes jars/* + rm -v FreeCol.jar jars/* */*/*.jar || die epatch "${FILESDIR}"/${P}-home.patch + # http://sourceforge.net/tracker/index.php?func=detail&aid=1725840&group_id=43225&atid=435580 + epatch "${FILESDIR}"/${PN}-0.6.1-installer-taskdefs.patch sed -i "/Class-Path/s:jars/.*$:$(java-pkg_getjars higlayout):" \ src/MANIFEST.MF \ @@ -37,10 +49,16 @@ src_unpack() { java-pkg_jar-from higlayout } +# default would be from games src_compile() { eant } +src_test() { + java-pkg_jar-from --into test/lib junit + ANT_TASKS="ant-junit ant-trax ant-nodeps" eant testall +} + src_install () { insinto "${GAMES_DATADIR}"/${PN} doins -r data || die "doins failed" @@ -53,8 +71,8 @@ src_install () { --pwd "${GAMES_DATADIR}"/${PN} \ --java_args -Xmx512M - dodoc README - doicon ${PN}.xpm - make_desktop_entry ${PN} FreeCol ${PN}.xpm + dodoc README || die + doicon ${PN}.xpm || die + make_desktop_entry ${PN} FreeCol ${PN}.xpm || die prepgamesdirs } |