games-puzzle/triptych: Move from triptych-demo, SRC_URI fix, EAPI 7

The full version and demo version are actually the same. You obtain
registration details by ordering online.

This is not a version bump. The previous ebuild used the same tarball
but had version 0 despite the game reporting 1.16.

Closes: https://bugs.gentoo.org/640572
Package-Manager: Portage-2.3.40, Repoman-2.3.9
This commit is contained in:
James Le Cuirot
2018-06-17 22:49:51 +01:00
parent 0bc244a237
commit d281cb6b05
5 changed files with 64 additions and 49 deletions

View File

@@ -1,49 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils games
DESCRIPTION="fast-paced tetris-like puzzler"
HOMEPAGE="http://www.chroniclogic.com/triptych.htm"
SRC_URI="http://s159260531.onlinehome.us/demos/triptych.tar.gz"
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~x86"
IUSE=""
RESTRICT="mirror bindist strip"
DEPEND="x11-libs/libXext
media-libs/libsdl[opengl,sound,video]
virtual/opengl"
RDEPEND=${DEPEND}
QA_PREBUILT="${GAMES_PREFIX_OPT}/${PN}/triptych ${GAMES_PREFIX_OPT}/${PN}/setup"
S=${WORKDIR}/triptych
src_install() {
local dir=${GAMES_PREFIX_OPT}/${PN}
dodir "${dir}"
cp -pPR * "${D}"/${dir}/ || die
games_make_wrapper triptych ./triptych "${dir}"
prepgamesdirs
}
pkg_postinst() {
games_pkg_postinst
# Fix perms on status files #74217
local f
for f in triptych.{clr,cnt,scr} ; do
f="${ROOT}/${GAMES_PREFIX_OPT}/${PN}/${f}"
if [[ ! -e ${f} ]] ; then
touch "${f}" \
&& chmod 660 "${f}" \
&& chown ${GAMES_USER}:${GAMES_GROUP} "${f}" \
|| die
fi
done
}

View File

@@ -0,0 +1,63 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit desktop eutils user
DESCRIPTION="Fast-paced Tetris-like puzzler"
HOMEPAGE="http://www.chroniclogic.com/triptych.htm"
SRC_URI="http://www.chroniclogic.com/demos/${PN}.tar.gz"
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
RESTRICT="bindist mirror strip"
RDEPEND=">=media-libs/libsdl-1.2[abi_x86_32,opengl,sound,video]
virtual/opengl[abi_x86_32]
x11-libs/libX11[abi_x86_32]
x11-libs/libXext[abi_x86_32]"
QA_PREBUILT="opt/${PN}/${PN}
opt/${PN}/setup"
S="${WORKDIR}/${PN}"
DIR="/opt/${PN}"
WRITABLE=( "${EROOT}${DIR}"/{hwconfig.cfg,${PN}.{clr,cnt,scr}} )
pkg_setup() {
enewgroup gamestat 36
}
src_prepare() {
default
rm -v *.dll || die
}
src_install() {
local EXES=( ${PN} setup )
insinto "${DIR}"
doins -r .
exeinto "${DIR}"
doexe "${EXES[@]}"
fowners root:gamestat "${EXES[@]/#/${DIR}/}" || die
fperms g+s "${EXES[@]/#/${DIR}/}" || die
make_wrapper ${PN} ./${PN} "${DIR}"
make_wrapper ${PN}-setup ./setup "${DIR}"
}
pkg_postinst() {
touch "${WRITABLE[@]}" || die
chown root:gamestat "${WRITABLE[@]}" || die
chmod 0664 "${WRITABLE[@]}" || die
}
pkg_prerm() {
[[ -z ${REPLACED_BY_VERSION} ]] &&
rm -v "${WRITABLE[@]}"
}

View File

@@ -13,3 +13,4 @@ move media-libs/vulkan-tools dev-util/vulkan-tools
move games-strategy/ufo-ai games-strategy/ufoai
slotmove =net-mail/getmail-5.4 4 0
move kde-apps/okteta app-editors/okteta
move games-puzzle/triptych-demo games-puzzle/triptych