From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-puzzle/xwelltris/, games-puzzle/xwelltris/files/
Date: Sun, 4 Apr 2021 06:33:03 +0000 (UTC) [thread overview]
Message-ID: <1617517963.85eba6f45253bfbb0e3797e2c4c71f5a4162a088.sam@gentoo> (raw)
commit: 85eba6f45253bfbb0e3797e2c4c71f5a4162a088
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 4 04:52:04 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 4 06:32:43 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85eba6f4
games-puzzle/xwelltris: port to EAPI 7, games.eclass--
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/xwelltris-1.0.1-scorefile-dir.patch | 16 +++++++
games-puzzle/xwelltris/xwelltris-1.0.1.ebuild | 52 ++++++++++++++++------
2 files changed, 55 insertions(+), 13 deletions(-)
diff --git a/games-puzzle/xwelltris/files/xwelltris-1.0.1-scorefile-dir.patch b/games-puzzle/xwelltris/files/xwelltris-1.0.1-scorefile-dir.patch
new file mode 100644
index 00000000000..67f832ae372
--- /dev/null
+++ b/games-puzzle/xwelltris/files/xwelltris-1.0.1-scorefile-dir.patch
@@ -0,0 +1,16 @@
+--- a/src/commonfuncs.cxx
++++ b/src/commonfuncs.cxx
+@@ -41,7 +41,12 @@ bool find_full_path_for_file(char* name, char* ret_full_pathname, FMode mode)
+
+ do
+ {
+- sprintf(ret_full_pathname,"%s/%s",GLOBAL_SEARCH,name); //First check in GLOBAL_SEARCH dir
++ sprintf(ret_full_pathname,"%s/%s","@GENTOO_PORTAGE_EPREFIX@/var/lib/xwelltris",name); // First check in /var/lib/xwelltris
++ fd=open(ret_full_pathname,fmode);
++ if(fd>0)
++ break;
++
++ sprintf(ret_full_pathname,"%s/%s",GLOBAL_SEARCH,name); // Then in GLOBAL_SEARCH dir
+ fd=open(ret_full_pathname,fmode);
+ if(fd>0)
+ break;
diff --git a/games-puzzle/xwelltris/xwelltris-1.0.1.ebuild b/games-puzzle/xwelltris/xwelltris-1.0.1.ebuild
index eb2e02cbf21..36c39e67014 100644
--- a/games-puzzle/xwelltris/xwelltris-1.0.1.ebuild
+++ b/games-puzzle/xwelltris/xwelltris-1.0.1.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit games
+EAPI=7
+
+inherit toolchain-funcs prefix
DESCRIPTION="2.5D tetris like game"
HOMEPAGE="http://xnc.jinr.ru/xwelltris/"
@@ -11,24 +12,41 @@ SRC_URI="http://xnc.jinr.ru/xwelltris/src/${P}.src.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
-DEPEND="media-libs/libsdl[video]
- media-libs/sdl-image[gif]"
-RDEPEND=${DEPEND}
+DEPEND="
+ media-libs/libsdl[video]
+ media-libs/sdl-image[gif]
+"
+RDEPEND="
+ ${DEPEND}
+ acct-group/gamestat
+"
+
+PATCHES=(
+ # Look in ${EPREFIX}/var/lib/xwelltris for score file
+ "${FILESDIR}"/${PN}-1.0.1-scorefile-dir.patch
+)
src_prepare() {
+ default
+
sed -i \
-e '/INSTALL_PROGRAM/s/-s //' \
src/Make.common.in || die
+
sed -i \
- -e "/GLOBAL_SEARCH/s:\".*\":\"${GAMES_DATADIR}/${PN}\":" \
+ -e "/GLOBAL_SEARCH/s:\".*\":\"/usr/share/${PN}\":" \
src/include/globals.h.in || die
+
+ # Ensure we look in ${EPREFIX}/var/lib/${PN} for score file
+ eprefixify src/commonfuncs.cxx
}
src_configure() {
+ tc-export CC CXX
+
# configure/build process is pretty messed up
- egamesconf --with-sdl
+ econf --with-sdl
}
src_compile() {
@@ -36,11 +54,19 @@ src_compile() {
}
src_install() {
- dodir "${GAMES_BINDIR}" "${GAMES_DATADIR}/${PN}" /usr/share/man
+ dodir /usr/bin /usr/share/${PN} /var/lib/${PN} /usr/share/man
+
emake install \
- INSTDIR="${D}/${GAMES_BINDIR}" \
- INSTLIB="${D}/${GAMES_DATADIR}/${PN}" \
+ INSTDIR="${D}/usr/bin" \
+ INSTLIB="${D}/usr/share/${PN}" \
INSTMAN=/usr/share/man
+
dodoc AUTHORS Changelog README*
- prepgamesdirs
+
+ # Move score file to our location
+ mv "${ED}"/usr/share/${PN}/welltris.scores "${ED}"/var/lib/${PN}/welltris.scores || die
+
+ fowners root:gamestat /var/lib/${PN}/welltris.scores
+ fperms 660 /var/lib/${PN}/welltris.scores
+ fperms g+s /usr/bin/${PN}
}
next reply other threads:[~2021-04-04 6:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-04 6:33 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-05-02 20:19 [gentoo-commits] repo/gentoo:master commit in: games-puzzle/xwelltris/, games-puzzle/xwelltris/files/ Sergei Trofimovich
2023-03-05 3:16 Sam James
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=1617517963.85eba6f45253bfbb0e3797e2c4c71f5a4162a088.sam@gentoo \
--to=sam@gentoo.org \
--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