games-puzzle/triptych: Move from triptych-demo, SRC_URI fix, EAPI 7
authorJames Le Cuirot <chewi@gentoo.org>
Sun, 17 Jun 2018 21:49:51 +0000 (22:49 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Sun, 17 Jun 2018 21:54:25 +0000 (22:54 +0100)
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

games-puzzle/triptych-demo/triptych-demo-0.ebuild [deleted file]
games-puzzle/triptych/Manifest [moved from games-puzzle/triptych-demo/Manifest with 100% similarity]
games-puzzle/triptych/metadata.xml [moved from games-puzzle/triptych-demo/metadata.xml with 100% similarity]
games-puzzle/triptych/triptych-1.16.ebuild [new file with mode: 0644]
profiles/updates/2Q-2018

diff --git a/games-puzzle/triptych-demo/triptych-demo-0.ebuild b/games-puzzle/triptych-demo/triptych-demo-0.ebuild
deleted file mode 100644 (file)
index fcf9d96..0000000
+++ /dev/null
@@ -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
-}
diff --git a/games-puzzle/triptych/triptych-1.16.ebuild b/games-puzzle/triptych/triptych-1.16.ebuild
new file mode 100644 (file)
index 0000000..e2257e1
--- /dev/null
@@ -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[@]}"
+}
index 67ce071015163e79a4394e42e775fd2aa6ec150a..f1d5ae0a4b122cf2e2f57114a7fd5b7b5e271665 100644 (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