From 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 28 Apr 2021 20:21:43 +0100 Subject: gentoo resync : 28.04.2021 --- games-puzzle/xwelltris/Manifest | 3 +- .../files/xwelltris-1.0.1-scorefile-dir.patch | 16 +++++++ games-puzzle/xwelltris/xwelltris-1.0.1.ebuild | 52 ++++++++++++++++------ 3 files changed, 57 insertions(+), 14 deletions(-) create mode 100644 games-puzzle/xwelltris/files/xwelltris-1.0.1-scorefile-dir.patch (limited to 'games-puzzle/xwelltris') diff --git a/games-puzzle/xwelltris/Manifest b/games-puzzle/xwelltris/Manifest index 08340532ade4..8eb5847cb7b5 100644 --- a/games-puzzle/xwelltris/Manifest +++ b/games-puzzle/xwelltris/Manifest @@ -1,3 +1,4 @@ +AUX xwelltris-1.0.1-scorefile-dir.patch 615 BLAKE2B 77dd21fa7650bb2d940422aebf80bd9c82188c577bf7a498e7537b88218dbbfae3be8309588798b03e7590a002a317a8171202b9b0aa411421160d776109a7c1 SHA512 3bc2e6ef0b44ead08103441e9e4e13263b108986461d263a30fc0125b25d687e74e7e49d3610fc2207a370125aaf79c839e41584e97e989b2e6dceb1478a4919 DIST xwelltris-1.0.1.src.tar.gz 422822 BLAKE2B c6eda0d294e79c5715bcaa593776ecfb0cdc734386fc4e9a6825dd090340c2744a251ad1e753421865151928608e4aebdd5050b0091a0799b7d1da5a0b3bdd60 SHA512 6b1080c6e6d1b579c441d1f42bb6454dafed62a63790d5798e83cf137db7ff2ddc07db7e89b34402a5249770697cc3f8ad5e6222266142c7b43f6936828f2536 -EBUILD xwelltris-1.0.1.ebuild 974 BLAKE2B b76648e2ae47cd20b40c8b76f5a64b40afa8c6733ecdd9c165a5a835e324610e73d838c4e781fcda77a0c1acdca82247864ff6d52ca6984833a212c9967ee12e SHA512 cfc4027ef6409246fcf2d477e6a0653f470c24cb74f2409cf3c43470eabc91f1db4e5f1a711538814a04a2587eabd92f3ad8590c922b622987596640dc975e52 +EBUILD xwelltris-1.0.1.ebuild 1458 BLAKE2B 5dbc829ef675a29f4d2a4e1210bbad57e114e450c29ffbc3e69ae5dbaa86cba99494151dbca0ce7e40d431b4748e63caeef7e9c03e6de916ba22107b0163b74e SHA512 d36e400a6430c6f7c2dba88b8850ce92db240ff9e7e5ed94bd9f6bdac3a136f6b2eb5ec5c86c788f8572ff619369f253224f0202eec5ff8b4db8a55fe84710bc MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 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 000000000000..67f832ae372c --- /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 eb2e02cbf21d..36c39e67014c 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} } -- cgit v1.2.3