games-strategy/hedgewars: Fix build with Qt 5.15
[gentoo.git] / games-strategy / freecol / freecol-0.11.6-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit desktop java-pkg-2 java-ant-2
7
8 DESCRIPTION="An open source clone of the game Colonization"
9 HOMEPAGE="http://www.freecol.org/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
11 LICENSE="GPL-2+"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14
15 # Rightly or wrongly, jogg and jorbis are bundled within Cortado but we
16 # don't have packages for them anyway.
17
18 CP_DEPEND="
19         dev-java/commons-cli:1
20         dev-java/cortado:0
21         dev-java/miglayout:0
22 "
23
24 DEPEND=">=virtual/jdk-1.8
25         app-arch/unzip
26         ${CP_DEPEND}"
27
28 RDEPEND=">=virtual/jre-1.8
29         ${CP_DEPEND}"
30
31 S="${WORKDIR}/${PN}"
32
33 PATCHES=(
34         "${FILESDIR}"/commons-cli-1.3.patch
35         "${FILESDIR}"/${P}-gentoo.patch
36 )
37
38 JAVA_ANT_REWRITE_CLASSPATH=true
39 EANT_BUILD_TARGET=package
40
41 src_prepare() {
42         default
43         rm -v jars/* || die
44         java-pkg-2_src_prepare
45 }
46
47 src_install() {
48         local datadir=/usr/share/${PN}
49
50         java-pkg_dojar FreeCol.jar
51         java-pkg_dolauncher ${PN} \
52                 --pwd ${datadir} \
53                 --main net.sf.freecol.FreeCol \
54                 --java_args -Xmx512M
55
56         insinto ${datadir}
57         doins -r data schema
58
59         doicon data/${PN}.png
60         make_desktop_entry ${PN} FreeCol
61
62         dodoc README
63 }