diff --git a/games-rpg/pcgen/pcgen-6.09.06.ebuild b/games-rpg/pcgen/pcgen-6.09.06.ebuild new file mode 100644 index 0000000000000000000000000000000000000000..8746db0201ca496a8f2ebf4098874768c8cbbd9f --- /dev/null +++ b/games-rpg/pcgen/pcgen-6.09.06.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop wrapper + +# PCGen naming conventions are different than Gentoo's +MY_PV=${PV/_rc/RC} +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="D&D character generator" +HOMEPAGE="http://pcgen.org/" +SRC_URI="https://github.com/PCGen/pcgen/releases/download/${MY_PV}/image-linux-x64.zip -> ${P}-linux-x64.zip" +S="${WORKDIR}/${PN}-linux-x64" + +LICENSE="LGPL-2.1 OGL-1.0a" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=">=virtual/jre-11:*" +BDEPEND="app-arch/unzip" + +dir=/opt/${PN} +QA_PREBUILT="*" + +src_prepare() { + default + + # fix Anti-Aliasing and "enable preview" + sed -i "s/DEFAULT_JVM_OPTS='/DEFAULT_JVM_OPTS='-Dawt.useSystemAAFontSettings=on --enable-preview /g" ${PN} || die + + # fix logging + sed -i "s/pcgen.system.LoggingRecorder.pattern = /pcgen.system.LoggingRecorder.pattern = \/tmp\//g" logging.properties || die + + rm -r LICENSE ${PN}.{bat,exe} || die + +} + +src_install() { + + insinto ${dir} + doins -r . + + exeinto ${dir} + doexe ${PN} + + exeinto ${dir}/bin + doexe bin/* + + # fix main config file + dosym /tmp/pcgen.ini ${dir}/config.ini + + newicon system/icons/pcgen_128x128.png ${PN}.png + make_wrapper ${PN} ./${PN} "${dir}" "${dir}" + make_desktop_entry ${PN} PCGen +}