diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2023-01-21 10:06:41 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-03-11 17:15:07 +0000 |
commit | 7a77562191c39c59311648690f33f285694a6551 (patch) | |
tree | 9a98cdb0e001e413c96634df2d88a042acaa7817 /games-strategy/freecol | |
parent | x11-misc/shutter: add 0.99.4 (diff) | |
download | gentoo-7a77562191c39c59311648690f33f285694a6551.tar.gz gentoo-7a77562191c39c59311648690f33f285694a6551.tar.bz2 gentoo-7a77562191c39c59311648690f33f285694a6551.zip |
games-strategy/freecol: add 1.0.0
Thanks to tkzv (vopros4@inbox.ru) for the excellent ebuild attached to
https://bugs.gentoo.org/890497.
Some improvements applied here:
- EAPI=8
- HTTPS for HOMEPAGE
- avoid redirect of SRC_URI
- adds findbugs-annotations to CP_DEPEND
- switches to source 11
- java-pkg_clean instead of "rm -v jars/* || die"
- adds JAVA_PKG_IUSE="doc source test"
- switches to java-pkg-simple.eclass for easier handling of tests and
javadoc
- adds DOCS array
- enables tests
Closes: https://bugs.gentoo.org/890497
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-strategy/freecol')
-rw-r--r-- | games-strategy/freecol/Manifest | 1 | ||||
-rw-r--r-- | games-strategy/freecol/freecol-1.0.0.ebuild | 76 |
2 files changed, 77 insertions, 0 deletions
diff --git a/games-strategy/freecol/Manifest b/games-strategy/freecol/Manifest index bb4d63f2b73b..e1c4293517ee 100644 --- a/games-strategy/freecol/Manifest +++ b/games-strategy/freecol/Manifest @@ -1 +1,2 @@ DIST freecol-0.11.6-src.zip 45002451 BLAKE2B 1d0e56b43f63557e3a520d6d30b8831db6c0284ac6cfebf68f3a11264d8bcfc80b883c8d4fe82e4fbd992f02a82ffdf36ed102613010d28375b61cfa30874f68 SHA512 fbfec95ad7128477d631be92b750d639d42bde3e052c94265590933e841adf66e670d5e1b2f6e8ef05629afeafded60cbb495ef93272ebc14ce7fd2f2eaa53de +DIST freecol-1.0.0-src.zip 159875314 BLAKE2B 6153be9553ded4c2a1f9635d67e48165d07b5d1634f26a44d2f01195e1610d6cb525ffa60368f3225cdf62ffd7751242942fd86b5735455e7396deca68d8350d SHA512 68b313b42fc38e6ea95a4a04ca5af534c4487709fb036018d6d09f6de3455325031ad1fd0ae4c6415cbbeebd3f181e598a2602ad7be6cca9150ad9523b8bb3c2 diff --git a/games-strategy/freecol/freecol-1.0.0.ebuild b/games-strategy/freecol/freecol-1.0.0.ebuild new file mode 100644 index 000000000000..11a7bf783240 --- /dev/null +++ b/games-strategy/freecol/freecol-1.0.0.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit desktop java-pkg-2 java-pkg-simple + +DESCRIPTION="An open source clone of the game Colonization" +HOMEPAGE="https://www.freecol.org/" +SRC_URI="mirror://sourceforge/project/freecol/freecol/freecol-${PV}/freecol-${PV}-src.zip" +S="${WORKDIR}/${PN}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +CP_DEPEND=" + dev-java/commons-cli:1 + dev-java/cortado:0 + dev-java/findbugs-annotations:0 + dev-java/miglayout:5 +" + +DEPEND=">=virtual/jdk-11:* + ${CP_DEPEND}" + +# error: variables in try-with-resources are not supported in -source 8 +RDEPEND=">=virtual/jre-11:* + ${CP_DEPEND}" + +BDEPEND="app-arch/unzip" + +DOCS=( + CHANGELOG.md + COPYING + README + README.md + SECURITY.md +) + +JAVA_JAR_FILENAME="FreeCol.jar" +JAVA_RESOURCE_DIRS="resources" +JAVA_SRC_DIR="src" +JAVA_TEST_GENTOO_CLASSPATH="junit-4" +JAVA_TEST_RUN_ONLY="net.sf.freecol.AllTests" +JAVA_TEST_SRC_DIR="test/src" + +src_prepare() { + java-pkg-2_src_prepare + java-pkg_clean + mkdir -p "${JAVA_RESOURCE_DIRS}/META-INF" || die + cp build/splash.jpg "${JAVA_RESOURCE_DIRS}" || die + grep Main-Class src/MANIFEST.MF \ + > "${JAVA_RESOURCE_DIRS}/META-INF/MANIFEST.MF" || die +} + +src_install() { + java-pkg-simple_src_install + + local datadir=/usr/share/${PN} + + # launcher of java-pkg-simple.eclass seems not to support --pwd + java-pkg_dolauncher ${PN} \ + --pwd ${datadir} \ + --main net.sf.freecol.FreeCol \ + --java_args -Xmx2000M + + insinto ${datadir} + doins -r data schema + + doicon data/${PN}.png + make_desktop_entry ${PN} FreeCol +} |