Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gamerlay:master commit in: games-action/descent2-vertigo/
Date: Sat, 29 Apr 2017 20:04:45
Message-Id: 1493496070.d867d05bce3d2967a44caf850fec051fbbc5ffae.chewi@gentoo
1 commit: d867d05bce3d2967a44caf850fec051fbbc5ffae
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 29 20:01:10 2017 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 29 20:01:10 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/gamerlay.git/commit/?id=d867d05b
7
8 games-action/descent2-vertigo: Improved version in Gentoo, removing
9
10 .../descent2-vertigo/descent2-vertigo-1.0.ebuild | 111 ---------------------
11 1 file changed, 111 deletions(-)
12
13 diff --git a/games-action/descent2-vertigo/descent2-vertigo-1.0.ebuild b/games-action/descent2-vertigo/descent2-vertigo-1.0.ebuild
14 deleted file mode 100644
15 index 4726c2b..0000000
16 --- a/games-action/descent2-vertigo/descent2-vertigo-1.0.ebuild
17 +++ /dev/null
18 @@ -1,111 +0,0 @@
19 -# Copyright 1999-2013 Gentoo Foundation
20 -# Distributed under the terms of the GNU General Public License v2
21 -# $Header: $
22 -
23 -EAPI=5
24 -
25 -inherit cdrom eutils games
26 -
27 -DESCRIPTION="Data files for Descent 2: The Vertigo Series"
28 -HOMEPAGE="http://www.interplay.com/games/support.php?id=103"
29 -SRC_URI=""
30 -
31 -# See readme.txt
32 -LICENSE="${PN}"
33 -SLOT="0"
34 -KEYWORDS="amd64 ppc x86"
35 -IUSE="doc videos"
36 -
37 -RDEPEND=""
38 -DEPEND=""
39 -
40 -S=${WORKDIR}
41 -dir=${GAMES_DATADIR}/d2x
42 -
43 -# Function to handle copying and renaming files from installation directory
44 -copy_file() {
45 - local dest="${2}"
46 - local f=$(basename "${1}")
47 - if [ "${f:0:1}" == '*' -o ! -f "${1}" ]; then
48 - return 0
49 - else
50 - echo "Copying '${f}'"
51 - local d=$(echo ${f} | tr "[:upper:]" "[:lower:]")
52 - cp -f "${1}" "${dest}/${d}" || die "copy ${1} failed"
53 - return 0
54 - fi
55 -}
56 -
57 -pkg_setup() {
58 - games_pkg_setup
59 -
60 - # The Descent 2 CD, or an existing install (eg., for GOG), is needed
61 - CDROM_NAME_SET=( "CD-ROM Version" "CD-ROM" )
62 - cdrom_get_cds vertigo/d2x.hog:VERTIGO/D2X.HOG
63 - case ${CDROM_SET} in
64 - [01]) F_SOURCE='cd'
65 - F_ROOT="${CDROM_ROOT}/vertigo"
66 - einfo 'Found Descent II Vertigo Series CD' ;;
67 - *) die "Vertigo Series CD or files not found" ;;
68 - esac
69 -}
70 -
71 -src_unpack() {
72 - mkdir "${WORKDIR}/missions" || die "mkdir missions failed"
73 -
74 - # Copy index files
75 - for i in "${F_ROOT}"/{{hoard.ham,HOARD.HAM},*.{txt,TXT}}; do
76 - copy_file "$i" "${WORKDIR}"
77 - done
78 -
79 - # Copy mission files
80 - for i in "${F_ROOT}"/{d2x,D2X}.{hog,HOG,mn2,MN2}; do
81 - copy_file "$i" "${WORKDIR}/missions"
82 - done
83 -
84 - # Copy optional mission files
85 - for i in "${F_ROOT}"/{missions,MISSIONS}/*; do
86 - copy_file "$i" "${WORKDIR}/missions"
87 - done
88 -
89 - # Also copy video files if desired
90 - if use videos; then
91 - # Require high resolution movie files
92 - for i in "${F_ROOT}"/*-{h.mvl,H.MVL}; do
93 - copy_file "$i" "${WORKDIR}"
94 - done
95 - if [ ! -f "${WORKDIR}/d2x-h.mvl" ] ; then
96 - die "videos not found"
97 - fi
98 -
99 - # Also copy low resolution movie files (not available from GOG)
100 - # Would anyone really want low-res videos at this point? Probably not.
101 - #for i in "${F_ROOT}"/*-{l.mvl,L.MVL}; do
102 - # copy_file "$i" "${WORKDIR}"
103 - #done
104 - fi
105 -
106 - mkdir doc || die "mkdir doc failed"
107 - mv *.txt doc/ # ignore fail
108 -}
109 -
110 -src_install() {
111 - insinto "${dir}"
112 - doins *
113 -
114 - insinto "${dir}/missions"
115 - doins missions/*
116 -
117 - if use doc; then
118 - dodoc doc/*.txt
119 - fi
120 -
121 - prepgamesdirs
122 -}
123 -
124 -pkg_postinst() {
125 - games_pkg_postinst
126 -
127 - elog "A client is needed to run the game, e.g. games-action/d2x-rebirth."
128 - echo
129 -}