public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Nicola Smaniotto" <smaniotto.nicola@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: games-rpg/open-adventure/
Date: Mon, 27 Nov 2023 18:11:55 +0000 (UTC)	[thread overview]
Message-ID: <1701108685.019f1a2752e9e2ff0e3b8b03be4059e161498c77.smaniotto.nicola@gentoo> (raw)

commit:     019f1a2752e9e2ff0e3b8b03be4059e161498c77
Author:     Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
AuthorDate: Mon Nov 27 17:55:01 2023 +0000
Commit:     Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
CommitDate: Mon Nov 27 18:11:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=019f1a27

games-rpg/open-adventure: expose compilation flags

Signed-off-by: Nicola Smaniotto <smaniotto.nicola <AT> gmail.com>

 games-rpg/open-adventure/metadata.xml              |  4 ++++
 .../open-adventure/open-adventure-1.16.ebuild      | 25 +++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/games-rpg/open-adventure/metadata.xml b/games-rpg/open-adventure/metadata.xml
index a4448d805b..31d3db3238 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 051da13c62..2fde826c47 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
 }
 


             reply	other threads:[~2023-11-27 18:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 18:11 Nicola Smaniotto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-10 11:06 [gentoo-commits] repo/proj/guru:dev commit in: games-rpg/open-adventure/ Nicola Smaniotto
2024-03-26 11:50 Nicola Smaniotto
2024-02-09 13:58 Nicola Smaniotto
2024-02-08 15:25 Nicola Smaniotto
2024-02-07 10:26 Nicola Smaniotto
2024-01-03  8:22 Nicola Smaniotto
2023-12-11  8:28 Nicola Smaniotto
2023-12-04 21:59 Nicola Smaniotto
2023-11-27 18:11 Nicola Smaniotto
2023-11-27  8:53 Nicola Smaniotto
2023-11-23 10:44 Nicola Smaniotto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1701108685.019f1a2752e9e2ff0e3b8b03be4059e161498c77.smaniotto.nicola@gentoo \
    --to=smaniotto.nicola@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox