1 |
commit: 0bcaa85b99c8c86b97a69e7cc3aec4718814d76f |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 26 22:46:23 2017 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 27 19:44:12 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bcaa85b |
7 |
|
8 |
games-action/rune: remove deprecated games eclass |
9 |
|
10 |
Also update to EAPI 6 |
11 |
|
12 |
Gentoo-Bug: https://bugs.gentoo.org/574082 |
13 |
|
14 |
Package-Manager: Portage-2.3.2, Repoman-2.3.1 |
15 |
|
16 |
games-action/rune/rune-1.07-r3.ebuild | 130 ++++++++++++++++++++++++++++++++++ |
17 |
1 file changed, 130 insertions(+) |
18 |
|
19 |
diff --git a/games-action/rune/rune-1.07-r3.ebuild b/games-action/rune/rune-1.07-r3.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000..efd46df |
22 |
--- /dev/null |
23 |
+++ b/games-action/rune/rune-1.07-r3.ebuild |
24 |
@@ -0,0 +1,130 @@ |
25 |
+# Copyright 1999-2017 Gentoo Foundation |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+# $Id$ |
28 |
+ |
29 |
+EAPI=6 |
30 |
+inherit eutils cdrom |
31 |
+ |
32 |
+DESCRIPTION="Viking hack and slay game" |
33 |
+HOMEPAGE="http://www.runegame.com" |
34 |
+SRC_URI="mirror://gentoo/rune-all-0.2.tar.bz2" |
35 |
+ |
36 |
+LICENSE="LOKI-EULA" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~x86" |
39 |
+IUSE="" |
40 |
+RESTRICT="strip" |
41 |
+ |
42 |
+RDEPEND="dev-util/xdelta:0 |
43 |
+ >=media-libs/libsdl-1.2.9-r1[abi_x86_32(-)] |
44 |
+ x11-libs/libXext[abi_x86_32(-)] |
45 |
+ x11-libs/libX11[abi_x86_32(-)] |
46 |
+ virtual/opengl[abi_x86_32(-)]" |
47 |
+ |
48 |
+S=${WORKDIR} |
49 |
+ |
50 |
+dir=/opt/${PN} |
51 |
+Ddir=${D}/${dir} |
52 |
+ |
53 |
+src_unpack() { |
54 |
+ export CDROM_SET_NAMES=("Linux Rune CD" "Windows Rune CD") |
55 |
+ cdrom_get_cds System/rune-bin:System/Rune.exe |
56 |
+ dodir "${dir}" |
57 |
+ if [[ ${CDROM_SET} -eq 0 ]] |
58 |
+ then |
59 |
+ # unpack the data files |
60 |
+ tar xzf "${CDROM_ROOT}"/data.tar.gz || die |
61 |
+ elif [[ ${CDROM_SET} -eq 1 ]] |
62 |
+ then |
63 |
+ # unpack the runelinuxfiles.tar.gz |
64 |
+ unpack ${A} |
65 |
+ fi |
66 |
+} |
67 |
+ |
68 |
+src_install() { |
69 |
+ insinto "${dir}" |
70 |
+ exeinto "${dir}" |
71 |
+ einfo "Copying files... this may take a while..." |
72 |
+ |
73 |
+ case ${CDROM_SET} in |
74 |
+ 0) |
75 |
+ for x in Help Maps Meshes Sounds System Textures Web |
76 |
+ do |
77 |
+ doins -r $x |
78 |
+ done |
79 |
+ |
80 |
+ # copy linux specific files |
81 |
+ doins -r "${CDROM_ROOT}"/System |
82 |
+ |
83 |
+ # the most important things: rune and ucc :) |
84 |
+ doexe "${CDROM_ROOT}"/bin/x86/rune |
85 |
+ fperms 750 "${dir}"/System/{ucc{,-bin},rune-bin} |
86 |
+ |
87 |
+ # installing documentation/icon |
88 |
+ dodoc "${CDROM_ROOT}"/{README,CREDITS} |
89 |
+ newicon "${CDROM_ROOT}"/icon.xpm rune.xpm |
90 |
+ ;; |
91 |
+ 1) |
92 |
+ # copying Maps Sounds and Web |
93 |
+ for x in Maps Sounds Web |
94 |
+ do |
95 |
+ doins -r "${CDROM_ROOT}"/$x |
96 |
+ done |
97 |
+ |
98 |
+ # copying the texture files |
99 |
+ dodir "${dir}"/Textures |
100 |
+ for x in $(find "${CDROM_ROOT}"/Textures/ -type f -printf '%f ') |
101 |
+ do |
102 |
+ echo -ne '\271\325\036\214' | cat - "${CDROM_ROOT}"/Textures/$x \ |
103 |
+ | sed -e '1 s/\(....\)..../\1/' > "${Ddir}"/Textures/$x \ |
104 |
+ || die |
105 |
+ done |
106 |
+ |
107 |
+ doins -r "${S}"/System |
108 |
+ doins -r "${S}"/Help |
109 |
+ sed -e "s:.*\(\w+/\w+\)\w:\1:" |
110 |
+ for x in $(ls "${S}"/patch/{System,Maps,Meshes} | sed -e \ |
111 |
+ "s:.*/\([^/]\+/[^/]\+\).patch$:\1:") |
112 |
+ do |
113 |
+ xdelta patch "${S}"/patch/${x}.patch "${CDROM_ROOT}"/${x} "${S}"/patch/${x} |
114 |
+ doins "${S}"/patch/${x} |
115 |
+ done |
116 |
+ |
117 |
+ insinto "${dir}"/System |
118 |
+ |
119 |
+ # copying system files from the Windows CD |
120 |
+ for x in "${CDROM_ROOT}"/System/*.{int,u,url}; do |
121 |
+ doins $x |
122 |
+ done |
123 |
+ |
124 |
+ # modify the files |
125 |
+ mv "${Ddir}"/System/OpenGlDrv.int "${Ddir}"/System/OpenGLDrv.int \ |
126 |
+ || die |
127 |
+ mv "${Ddir}"/Textures/bloodFX.utx "${Ddir}"/Textures/BloodFX.utx \ |
128 |
+ || die |
129 |
+ mv "${Ddir}"/Textures/RUNESTONES.UTX "${Ddir}"/Textures/RUNESTONES.utx \ |
130 |
+ || die |
131 |
+ mv "${Ddir}"/Textures/tedd.utx "${Ddir}"/Textures/Tedd.utx \ |
132 |
+ || die |
133 |
+ mv "${Ddir}"/Textures/UNDERANCIENT.utx "${Ddir}"/Textures/UnderAncient.utx \ |
134 |
+ || die |
135 |
+ rm "${Ddir}"/System/{Setup.int,SGLDrv.int,MeTaLDrv.int,Manifest.int,D3DDrv.int,Galaxy.int,SoftDrv.int,WinDrv.int,Window.int} \ |
136 |
+ || die |
137 |
+ |
138 |
+ # the most important things: rune and ucc :) |
139 |
+ doexe "${S}"/bin/x86/rune |
140 |
+ fperms 750 "${dir}"/System/{ucc,ucc-bin,rune-bin} |
141 |
+ |
142 |
+ # installing documentation/icon |
143 |
+ dodoc "${S}"/{README,CREDITS} |
144 |
+ doicon "${S}"/rune.xpm rune.xpm |
145 |
+ ;; |
146 |
+ esac |
147 |
+ |
148 |
+ use amd64 && mv "${Ddir}"/System/libSDL-1.2.so.0 \ |
149 |
+ "${Ddir}"/System/libSDL-1.2.so.0.backup |
150 |
+ |
151 |
+ make_wrapper rune ./rune "${dir}" "${dir}" |
152 |
+ make_desktop_entry rune "Rune" rune |
153 |
+ find "${Ddir}" -exec touch '{}' \; || die |
154 |
+} |