summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2019-04-13 22:15:07 +0100
committerJames Le Cuirot <chewi@gentoo.org>2019-04-13 22:16:43 +0100
commit122bf2097ea89b489863b49d84fbc38ee0061731 (patch)
treea3b260187438bd72bd987fa31377c15516a165bc /games-strategy
parentdev-vcs/hub: 2.11.1 bump (diff)
downloadgentoo-122bf2097ea89b489863b49d84fbc38ee0061731.tar.gz
gentoo-122bf2097ea89b489863b49d84fbc38ee0061731.tar.bz2
gentoo-122bf2097ea89b489863b49d84fbc38ee0061731.zip
games-strategy/freecol: Fix commons-cli issue, simplify build, EAPI 7
Thanks to Debian for the commons-cli patch. Closes: https://bugs.gentoo.org/654564 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-strategy')
-rw-r--r--games-strategy/freecol/files/commons-cli-1.3.patch22
-rw-r--r--games-strategy/freecol/files/freecol-0.11.6-gentoo.patch37
-rw-r--r--games-strategy/freecol/freecol-0.11.6-r1.ebuild63
-rw-r--r--games-strategy/freecol/freecol-0.11.6.ebuild79
4 files changed, 99 insertions, 102 deletions
diff --git a/games-strategy/freecol/files/commons-cli-1.3.patch b/games-strategy/freecol/files/commons-cli-1.3.patch
new file mode 100644
index 000000000000..84fc6e5064c1
--- /dev/null
+++ b/games-strategy/freecol/files/commons-cli-1.3.patch
@@ -0,0 +1,22 @@
+From: Markus Koschany <apo@debian.org>
+Date: Sun, 20 Dec 2015 18:49:11 +0100
+Subject: commons-cli 1.3
+
+Forwarded: not-needed
+---
+ src/net/sf/freecol/FreeCol.java | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/net/sf/freecol/FreeCol.java b/src/net/sf/freecol/FreeCol.java
+index d05ae3d..99b9cdc 100644
+--- a/src/net/sf/freecol/FreeCol.java
++++ b/src/net/sf/freecol/FreeCol.java
+@@ -426,7 +426,7 @@ public final class FreeCol {
+ private static void handleArgs(String[] args) {
+ Options options = new Options();
+ final String help = Messages.message("cli.help");
+- final File dummy = new File("dummy");
++ final Class dummy = null;
+ final String argDirectory = Messages.message("cli.arg.directory");
+
+ // Help options.
diff --git a/games-strategy/freecol/files/freecol-0.11.6-gentoo.patch b/games-strategy/freecol/files/freecol-0.11.6-gentoo.patch
index c087193eb8c5..770279b69030 100644
--- a/games-strategy/freecol/files/freecol-0.11.6-gentoo.patch
+++ b/games-strategy/freecol/files/freecol-0.11.6-gentoo.patch
@@ -1,27 +1,18 @@
---- build.xml.orig 2015-12-09 21:10:08.272361404 -0500
-+++ build.xml 2015-12-09 21:11:26.189663216 -0500
-@@ -36,12 +36,11 @@
-
- <path id="libraries.classpath">
- <!-- MigLayout manager -->
-- <pathelement location="${basedir}/${miglayout-swing.jar}"/>
-- <pathelement location="${basedir}/${miglayout-core.jar}"/>
-+ <pathelement location="${miglayout.jar}"/>
- <!-- Command line processor -->
-- <pathelement location="${basedir}/${cli.jar}"/>
-+ <pathelement location="${cli.jar}"/>
- <!-- Cortado Video Applet -->
-- <pathelement location="${basedir}/${cortado.jar}"/>
-+ <pathelement location="${cortado.jar}"/>
- <!-- JOgg/JOrbis libraries -->
- <pathelement location="${basedir}/jars/jogg-0.0.17.jar"/>
- <pathelement location="${basedir}/jars/jorbis-0.0.17.jar"/>
-@@ -162,7 +161,7 @@
+diff -Naur a/build.xml b/build.xml
+--- a/build.xml 2015-10-17 07:54:48.000000000 +0100
++++ b/build.xml 2019-04-13 21:51:21.679100596 +0100
+@@ -162,14 +162,9 @@
<target name="manifest" depends="git-revision"
description="Creates the Manifest file.">
- <manifestclasspath property="jar.classpath"
-+ <manifestclasspath maxParentLevels="50" property="jar.classpath"
- jarfile="Freecol.jar">
- <classpath refid="libraries.classpath" />
- </manifestclasspath>
+- jarfile="Freecol.jar">
+- <classpath refid="libraries.classpath" />
+- </manifestclasspath>
+ <manifest file="${basedir}/src/MANIFEST.MF">
+ <attribute name="Created-By" value="FreeCol Team"/>
+ <attribute name="Main-Class" value="net.sf.freecol.FreeCol"/>
+- <attribute name="Class-Path" value="${jar.classpath}"/>
+ <attribute name="Product-Name" value="FreeCol"/>
+ <attribute name="Package-Title" value="FreeCol"/>
+ <attribute name="Package-Version" value="${FreeCol.Revision}"/>
diff --git a/games-strategy/freecol/freecol-0.11.6-r1.ebuild b/games-strategy/freecol/freecol-0.11.6-r1.ebuild
new file mode 100644
index 000000000000..fad44bf0d1eb
--- /dev/null
+++ b/games-strategy/freecol/freecol-0.11.6-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop java-pkg-2 java-ant-2
+
+DESCRIPTION="An open source clone of the game Colonization"
+HOMEPAGE="http://www.freecol.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# Rightly or wrongly, jogg and jorbis are bundled within Cortado but we
+# don't have packages for them anyway.
+
+CP_DEPEND="
+ dev-java/commons-cli:1
+ dev-java/cortado:0
+ dev-java/miglayout:0
+"
+
+DEPEND=">=virtual/jdk-1.8
+ app-arch/unzip
+ ${CP_DEPEND}"
+
+RDEPEND=">=virtual/jre-1.8
+ ${CP_DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+PATCHES=(
+ "${FILESDIR}"/commons-cli-1.3.patch
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+JAVA_ANT_REWRITE_CLASSPATH=true
+EANT_BUILD_TARGET=package
+
+src_prepare() {
+ default
+ rm -v jars/* || die
+ java-pkg-2_src_prepare
+}
+
+src_install() {
+ local datadir=/usr/share/${PN}
+
+ java-pkg_dojar FreeCol.jar
+ java-pkg_dolauncher ${PN} \
+ --pwd ${datadir} \
+ --main net.sf.freecol.FreeCol \
+ --java_args -Xmx512M
+
+ insinto ${datadir}
+ doins -r data schema
+
+ doicon data/${PN}.png
+ make_desktop_entry ${PN} FreeCol
+
+ dodoc README
+}
diff --git a/games-strategy/freecol/freecol-0.11.6.ebuild b/games-strategy/freecol/freecol-0.11.6.ebuild
deleted file mode 100644
index 8d7df3ab2726..000000000000
--- a/games-strategy/freecol/freecol-0.11.6.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils java-pkg-2 java-ant-2 games
-
-DESCRIPTION="An open source clone of the game Colonization"
-HOMEPAGE="http://www.freecol.org/"
-SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-COMMON_DEP="dev-java/jsr173
- dev-java/wstx:3.2
- dev-java/commons-cli:1
- dev-java/cortado
- dev-java/miglayout"
-DEPEND=">=virtual/jdk-1.8
- app-arch/unzip
- ${COMMON_DEP}"
-RDEPEND=">=virtual/jre-1.8
- ${COMMON_DEP}"
-
-S=${WORKDIR}/${PN}
-
-java_prepare() {
- # jorbis isn't in portage yet
- rm jars/{commons-cli-1.1,cortado-0.6.0,miglayout-core-4.2,miglayout-swing-4.2}.jar || die
- epatch "${FILESDIR}"/${P}-gentoo.patch
-}
-
-src_prepare() {
- java-pkg-2_src_prepare
-}
-
-src_configure() {
- java-ant-2_src_configure
-}
-
-src_compile() {
- EANT_BUILD_TARGET=package
- EANT_EXTRA_ARGS="
- -Dstax.jar=$(java-pkg_getjars jsr173)
- -Dwoodstox.jar=$(java-pkg_getjars wstx-3.2)
- -Dcli.jar=$(java-pkg_getjars commons-cli-1)
- -Dmiglayout.jar=$(java-pkg_getjars miglayout)
- -Dcortado.jar=$(java-pkg_getjars cortado)
- "
- java-pkg-2_src_compile
-}
-
-src_install() {
- java-pkg_jarinto "${GAMES_DATADIR}"/${PN}
- java-pkg_dojar FreeCol.jar
- java-pkg_dolauncher ${PN} \
- -into "${GAMES_PREFIX}" \
- --pwd "${GAMES_DATADIR}"/${PN} \
- --jar FreeCol.jar \
- --java_args -Xmx512M
- insinto "${GAMES_DATADIR}"/${PN}
- doins -r data schema
- doicon data/${PN}.png
- make_desktop_entry ${PN} FreeCol
- dodoc README
- prepgamesdirs
-}
-
-pkg_setup() {
- games_pkg_setup
- java-pkg-2_pkg_setup
-}
-
-pkg_preinst() {
- games_pkg_preinst
- java-pkg-2_pkg_preinst
-}