diff options
author | Nicola Smaniotto <smaniotto.nicola@gmail.com> | 2023-11-27 18:55:01 +0100 |
---|---|---|
committer | Nicola Smaniotto <smaniotto.nicola@gmail.com> | 2023-11-27 19:11:25 +0100 |
commit | 019f1a2752e9e2ff0e3b8b03be4059e161498c77 (patch) | |
tree | 97f52d1a0e0c3a265b7e1b016109ee3c993c81f7 /games-rpg | |
parent | games-rpg/open-adventure: add dev-libs/libedit dependency (diff) | |
download | guru-019f1a2752e9e2ff0e3b8b03be4059e161498c77.tar.gz guru-019f1a2752e9e2ff0e3b8b03be4059e161498c77.tar.bz2 guru-019f1a2752e9e2ff0e3b8b03be4059e161498c77.zip |
games-rpg/open-adventure: expose compilation flags
Signed-off-by: Nicola Smaniotto <smaniotto.nicola@gmail.com>
Diffstat (limited to 'games-rpg')
-rw-r--r-- | games-rpg/open-adventure/metadata.xml | 4 | ||||
-rw-r--r-- | games-rpg/open-adventure/open-adventure-1.16.ebuild | 25 |
2 files changed, 28 insertions, 1 deletions
diff --git a/games-rpg/open-adventure/metadata.xml b/games-rpg/open-adventure/metadata.xml index a4448d805..31d3db323 100644 --- a/games-rpg/open-adventure/metadata.xml +++ b/games-rpg/open-adventure/metadata.xml @@ -5,6 +5,10 @@ <email>smaniotto.nicola@gmail.com</email> <name>Nicola Smaniotto</name> </maintainer> + <use> + <flag name="autosave">Build with auto-save/resume enabled</flag> + <flag name="nosave">Build with save/resume disabled</flag> + </use> <upstream> <remote-id type="gitlab">esr/open-adventure</remote-id> </upstream> diff --git a/games-rpg/open-adventure/open-adventure-1.16.ebuild b/games-rpg/open-adventure/open-adventure-1.16.ebuild index 051da13c6..2fde826c4 100644 --- a/games-rpg/open-adventure/open-adventure-1.16.ebuild +++ b/games-rpg/open-adventure/open-adventure-1.16.ebuild @@ -4,7 +4,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..12} ) -inherit desktop python-any-r1 +inherit desktop flag-o-matic python-any-r1 DESCRIPTION="Forward-port of the Crowther/Woods Adventure 2.5" HOMEPAGE="http://www.catb.org/~esr/open-adventure/" @@ -13,6 +13,14 @@ SRC_URI="https://gitlab.com/esr/${PN}/-/archive/${PV}/${P}.tar.bz2" LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64" +IUSE="autosave nosave test" +# autosave and nosave are mutually exclusive +# tests require that they are both disabled +REQUIRED_USE=" + ?? ( autosave nosave ) + test? ( !autosave !nosave ) +" +RESTRICT="!test? ( test )" DEPEND="dev-libs/libedit" RDEPEND="${DEPEND}" @@ -26,7 +34,22 @@ python_check_deps() { python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" } +src_prepare() { + eapply_user + + # Add missing semicolon + sed -e 's/rspeak(SAVERESUME_DISABLED)/rspeak(SAVERESUME_DISABLED);/' \ + -i saveresume.c +} + src_compile() { + if use autosave; then + append-cflags "-DADVENT_AUTOSAVE" + fi + if use nosave; then + append-cflags "-DADVENT_NOSAVE" + fi + emake advent advent.6 } |