summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-19 03:48:22 +0000
committerSam James <sam@gentoo.org>2021-04-19 04:30:49 +0000
commitbea405bc9d76b0396a48b030a392a97ccb10de50 (patch)
tree31c095814d2ad306fbe60abc74c2e47a73cf923f
parentdev-games/poker-eval: port to EAPI 7, ltprune--, drop static-libs (diff)
downloadgentoo-bea405bc9d76b0396a48b030a392a97ccb10de50.tar.gz
gentoo-bea405bc9d76b0396a48b030a392a97ccb10de50.tar.bz2
gentoo-bea405bc9d76b0396a48b030a392a97ccb10de50.zip
games-strategy/triplea: port to EAPI 7
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--games-strategy/triplea/files/triplea-1.8.0.9-drop-ant-check.patch29
-rw-r--r--games-strategy/triplea/triplea-1.8.0.9-r2.ebuild (renamed from games-strategy/triplea/triplea-1.8.0.9-r1.ebuild)46
2 files changed, 58 insertions, 17 deletions
diff --git a/games-strategy/triplea/files/triplea-1.8.0.9-drop-ant-check.patch b/games-strategy/triplea/files/triplea-1.8.0.9-drop-ant-check.patch
new file mode 100644
index 000000000000..2a41521c4aed
--- /dev/null
+++ b/games-strategy/triplea/files/triplea-1.8.0.9-drop-ant-check.patch
@@ -0,0 +1,29 @@
+Fix version check failure with 1.10.9
+--- a/build.xml
++++ b/build.xml
+@@ -110,25 +110,6 @@
+
+ <!--checkBuildEnv -->
+ <target name="checkBuildEnv">
+- <!-- Check ant version first (pre-1.6.5 reports java version it was built
+- with, not what it's running under, so an ant built with 1.5 would report
+- that even if it's currently running under < 1.5). 1.6.5 was released in June
+- 2005, so it's fairly unlikely that anyone would be using an older version,
+- but checking it is still a good idea, and it only takes a tiny fraction of
+- a second. -->
+- <fail message="Ant version 1.6.5 or greater is required">
+- <condition>
+- <not>
+- <or>
+- <contains string="${ant.version}" substring="1.6.5" />
+- <contains string="${ant.version}" substring="1.7" />
+- <contains string="${ant.version}" substring="1.8" />
+- <contains string="${ant.version}" substring="1.9" />
+- </or>
+- </not>
+- </condition>
+- </fail>
+- <echo message="${ant.version}" />
+ <!-- we require jdk 1.6 or greater -->
+ <fail
+ message="jdk 1.6 or greater required, you are currently using: ${ant.java.version}">
diff --git a/games-strategy/triplea/triplea-1.8.0.9-r1.ebuild b/games-strategy/triplea/triplea-1.8.0.9-r2.ebuild
index 3291b29ff645..32eb7c5cbf3c 100644
--- a/games-strategy/triplea/triplea-1.8.0.9-r1.ebuild
+++ b/games-strategy/triplea/triplea-1.8.0.9-r2.ebuild
@@ -1,13 +1,17 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit desktop epatch java-pkg-2 java-ant-2 versionator
+EAPI=7
-MY_PV=$(replace_all_version_separators _)
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="apple-java-extensions-bin,commons-httpclient-3,oracle-javamail,osgi-core-api,upnplib"
+inherit desktop java-pkg-2 java-ant-2
+
+MY_PV=$(ver_rs 1- _)
DESCRIPTION="An open source clone of the popular Axis and Allies boardgame"
HOMEPAGE="http://triplea.sourceforge.net/"
SRC_URI="mirror://sourceforge/triplea/${PN}_${MY_PV}_source_code_only.zip"
+S="${WORKDIR}"/${PN}_${MY_PV}
LICENSE="GPL-2"
SLOT="0"
@@ -15,28 +19,36 @@ KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="test" # Needs X11 maybe use virtualx.eclass
-RDEPEND="dev-java/apple-java-extensions-bin:0
+DEPEND="
+ dev-java/apple-java-extensions-bin:0
dev-java/commons-httpclient:3
dev-java/oracle-javamail:0
dev-java/osgi-core-api:0
- dev-java/upnplib:0"
-DEPEND="${RDEPEND}
- >=virtual/jdk-1.7
+ dev-java/upnplib:0
+"
+RDEPEND="
+ ${DEPEND}
+ >=virtual/jre-1.8:*
+"
+DEPEND+=" >=virtual/jdk-1.8:*"
+BDEPEND="
app-arch/unzip
- test? ( dev-java/ant-junit:0 )"
-RDEPEND="${RDEPEND}
- >=virtual/jre-1.7"
+ test? ( dev-java/ant-junit:0 )
+"
-S=${WORKDIR}/${PN}_${MY_PV}
-
-JAVA_ANT_REWRITE_CLASSPATH="true"
-EANT_GENTOO_CLASSPATH="apple-java-extensions-bin,commons-httpclient-3,oracle-javamail,osgi-core-api,upnplib"
-
-java_prepare() {
+PATCHES=(
# Use ~/.triplea, not ~/triplea.
# Don't write server files under /usr/share or ${PWD}.
# Fix to build against our packaged upnplib.
- epatch "${FILESDIR}"/{paths,upnplib}.patch
+ "${FILESDIR}"/{paths,upnplib}.patch
+ # Fix build with newer Ant
+ "${FILESDIR}"/${PN}-1.8.0.9-drop-ant-check.patch
+)
+
+src_prepare() {
+ default
+
+ java-pkg-2_src_prepare
# Remove packaged or unneeded libs. Unfortunately Apache Derby was
# last-rited due to packaging issues. See bug #561410.