1 |
commit: 67c465b8d9b5e57c24827c89f3ee04933f8a6914 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 31 17:15:42 2018 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 31 17:15:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67c465b8 |
7 |
|
8 |
games-fps/duke3d-data: Stop using games.eclass |
9 |
|
10 |
Package-Manager: Portage-2.3.38, Repoman-2.3.9 |
11 |
|
12 |
games-fps/duke3d-data/duke3d-data-1.0-r4.ebuild | 75 +++++++++++++++++++++++++ |
13 |
1 file changed, 75 insertions(+) |
14 |
|
15 |
diff --git a/games-fps/duke3d-data/duke3d-data-1.0-r4.ebuild b/games-fps/duke3d-data/duke3d-data-1.0-r4.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..100efef9882 |
18 |
--- /dev/null |
19 |
+++ b/games-fps/duke3d-data/duke3d-data-1.0-r4.ebuild |
20 |
@@ -0,0 +1,75 @@ |
21 |
+# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=5 |
25 |
+ |
26 |
+CDROM_OPTIONAL="yes" |
27 |
+inherit eutils cdrom unpacker |
28 |
+ |
29 |
+GOG_FILE="gog_duke_nukem_3d_atomic_edition_2.0.0.9.sh" |
30 |
+DESCRIPTION="Duke Nukem 3D data files" |
31 |
+HOMEPAGE="http://www.3drealms.com/" |
32 |
+SRC_URI="gog? ( ${GOG_FILE} )" |
33 |
+ |
34 |
+LICENSE="DUKE3D gog? ( GOG-EULA )" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~amd64 ~hppa ~x86" |
37 |
+IUSE="gog" |
38 |
+REQUIRED_USE="^^ ( cdinstall gog )" |
39 |
+RESTRICT="mirror bindist gog? ( fetch )" |
40 |
+ |
41 |
+RDEPEND="|| ( games-fps/eduke32 games-fps/duke3d )" |
42 |
+DEPEND="gog? ( app-arch/unzip )" |
43 |
+ |
44 |
+S=${WORKDIR} |
45 |
+ |
46 |
+pkg_nofetch() { |
47 |
+ einfo "Please download ${GOG_FILE} from your GOG.com account after buying Duke Nukem 3d" |
48 |
+ einfo "and put it into ${DISTDIR}." |
49 |
+} |
50 |
+ |
51 |
+src_unpack() { |
52 |
+ if use cdinstall ; then |
53 |
+ export CDROM_NAME_SET=( |
54 |
+ "Existing Install" |
55 |
+ "Duke Nukem 3D CD" |
56 |
+ "Duke Nukem 3D Atomic Edition CD" |
57 |
+ ) |
58 |
+ cdrom_get_cds duke3d.grp:dvd/dn3dinst/duke3d.grp:atominst/duke3d.grp |
59 |
+ |
60 |
+ if [[ ${CDROM_SET} -ne 0 |
61 |
+ && ${CDROM_SET} -ne 1 |
62 |
+ && ${CDROM_SET} -ne 2 ]] |
63 |
+ then |
64 |
+ die "Error locating data files."; |
65 |
+ fi |
66 |
+ else |
67 |
+ unpack_zip "${DISTDIR}"/${GOG_FILE} |
68 |
+ cd data/noarch/data || die |
69 |
+ |
70 |
+ # convert to lowercase |
71 |
+ find . -type f \ |
72 |
+ -execdir sh -c 'echo "converting ${1} to lowercase" |
73 |
+ lower="`echo "${1}" | tr [:upper:] [:lower:]`" |
74 |
+ [ "${1}" = "${lower}" ] || mv "${1}" "${lower}"' - {} \; |
75 |
+ fi |
76 |
+} |
77 |
+ |
78 |
+src_install() { |
79 |
+ local DATAROOT |
80 |
+ |
81 |
+ insinto /usr/share/duke3d |
82 |
+ |
83 |
+ if use cdinstall ; then |
84 |
+ case ${CDROM_SET} in |
85 |
+ 0) DATAROOT="" ;; |
86 |
+ 1) DATAROOT="dn3dinst/" ;; |
87 |
+ 2) DATAROOT="atominst/" ;; |
88 |
+ esac |
89 |
+ |
90 |
+ # avoid double slash |
91 |
+ doins "${CDROM_ROOT}"/${DATAROOT}{duke3d.grp,duke.rts,game.con,user.con,demo?.dmo,defs.con} |
92 |
+ else |
93 |
+ doins data/noarch/data/{duke3d.grp,duke.rts,game.con,user.con,demo?.dmo,defs.con} |
94 |
+ fi |
95 |
+} |