summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-06-03 01:55:20 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-06-03 02:07:38 -0400
commitbec2289ff608900d9c0cceb46a246109dd0881be (patch)
treeaeb6326d46bedd36f7c75a5d8b32180ac67b5759 /games-rpg/freedroidrpg
parentwww-apache/passenger: add 6.0.9 (diff)
downloadgentoo-bec2289ff608900d9c0cceb46a246109dd0881be.tar.gz
gentoo-bec2289ff608900d9c0cceb46a246109dd0881be.tar.bz2
gentoo-bec2289ff608900d9c0cceb46a246109dd0881be.zip
games-rpg/freedroidrpg: revamp ebuild, unbundle lua
- add python3_9 and 3_10 compat - add media-libs/glew dep for USE=opengl (bug #701412) - remove sed given package respects docdir, no -pipe line exist, and pkgs/ subdirs allows the package to install its icons plus own .desktop file normally (fixes bug #700546) - remove -ffast-math filter, upstream discourages it but still keeps an option to enable it (shouldn't just force it off) - enable USE=sound by default and drop sanitize lua5-3 unbundling also fixes AR issues (bug #742497) --with-embedded-lua was due to slotted 5-3 former unavailability Closes: https://bugs.gentoo.org/700546 Closes: https://bugs.gentoo.org/701412 Closes: https://bugs.gentoo.org/742497 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-rpg/freedroidrpg')
-rw-r--r--games-rpg/freedroidrpg/freedroidrpg-1.0_rc2-r1.ebuild88
1 files changed, 88 insertions, 0 deletions
diff --git a/games-rpg/freedroidrpg/freedroidrpg-1.0_rc2-r1.ebuild b/games-rpg/freedroidrpg/freedroidrpg-1.0_rc2-r1.ebuild
new file mode 100644
index 000000000000..07f51263644e
--- /dev/null
+++ b/games-rpg/freedroidrpg/freedroidrpg-1.0_rc2-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-3 )
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit lua-single python-any-r1 xdg
+
+MY_PV=$(ver_rs 2 '')
+
+DESCRIPTION="Modification of the classical Freedroid engine into an RPG"
+HOMEPAGE="https://www.freedroid.org"
+SRC_URI="ftp://ftp.osuosl.org/pub/freedroid/freedroidRPG-$(ver_cut 1-2)/freedroidRPG-${MY_PV}.tar.gz"
+S="${WORKDIR}/${PN}-${MY_PV^^}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug devtools nls opengl profile +sound"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RDEPEND="
+ ${LUA_DEPS}
+ media-libs/libpng:=
+ media-libs/libsdl[opengl?,sound?,video]
+ >=media-libs/sdl-gfx-2.0.21:=
+ media-libs/sdl-image[jpeg,png]
+ sys-libs/zlib:=
+ devtools? ( media-libs/sdl-ttf )
+ nls? ( virtual/libintl )
+ opengl? (
+ media-libs/glew:0=
+ virtual/opengl
+ )
+ sound? (
+ media-libs/libogg
+ media-libs/libvorbis
+ media-libs/sdl-mixer[vorbis]
+ )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fnocommon.patch"
+)
+
+pkg_setup() {
+ lua-single_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ python_fix_shebang src/gen_savestruct.py
+ rm data/sound/speak.py || die # unused, prevent installing
+}
+
+src_configure() {
+ local econfargs=(
+ $(use_enable debug backtrace)
+ $(use_enable debug)
+ $(use_enable devtools dev-tools)
+ $(use_enable nls)
+ $(use_enable opengl)
+ $(use_enable profile rtprof)
+ $(use_enable sound)
+ $(use_with debug extra-warnings)
+ )
+ econf "${econfargs[@]}"
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ if [[ ${REPLACING_VERSIONS} ]]; then
+ local min="1.0_rc1"
+ if ver_test ${REPLACING_VERSIONS} -lt ${min}; then
+ elog "${P} is not compatible with save games before ${min}."
+ elog "Please start a new character."
+ fi
+ fi
+}