Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/trine/
Date: Sun, 25 Mar 2018 16:33:38
Message-Id: 1521995585.eb3ca553bf3b86a2d4890837b6f32f24641d41c0.chewi@gentoo
1 commit: eb3ca553bf3b86a2d4890837b6f32f24641d41c0
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 25 13:47:25 2018 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 25 16:33:05 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb3ca553
7
8 games-action/trine: Fix dependencies, cleanup, launcher USE flag
9
10 I did a bad job of unbundling the libraries before.
11
12 This adds a compatibility symlink now that the package has been
13 renamed from trine-bin.
14
15 Adds missing icon cache handling.
16
17 Closes: https://bugs.gentoo.org/364293
18 Package-Manager: Portage-2.3.24, Repoman-2.3.6
19
20 games-action/trine/metadata.xml | 11 ++--
21 games-action/trine/trine-1.08-r2.ebuild | 77 --------------------------
22 games-action/trine/trine-1.08-r3.ebuild | 97 +++++++++++++++++++++++++++++++++
23 3 files changed, 104 insertions(+), 81 deletions(-)
24
25 diff --git a/games-action/trine/metadata.xml b/games-action/trine/metadata.xml
26 index 78274e0fa55..b26a6baa412 100644
27 --- a/games-action/trine/metadata.xml
28 +++ b/games-action/trine/metadata.xml
29 @@ -1,8 +1,11 @@
30 <?xml version="1.0" encoding="UTF-8"?>
31 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
32 <pkgmetadata>
33 -<maintainer type="project">
34 - <email>games@g.o</email>
35 - <name>Gentoo Games Project</name>
36 -</maintainer>
37 + <maintainer type="project">
38 + <email>games@g.o</email>
39 + <name>Gentoo Games Project</name>
40 + </maintainer>
41 + <use>
42 + <flag name="launcher">Install GTK+ launcher</flag>
43 + </use>
44 </pkgmetadata>
45
46 diff --git a/games-action/trine/trine-1.08-r2.ebuild b/games-action/trine/trine-1.08-r2.ebuild
47 deleted file mode 100644
48 index 99503c9efac..00000000000
49 --- a/games-action/trine/trine-1.08-r2.ebuild
50 +++ /dev/null
51 @@ -1,77 +0,0 @@
52 -# Copyright 1999-2018 Gentoo Foundation
53 -# Distributed under the terms of the GNU General Public License v2
54 -
55 -EAPI=6
56 -
57 -inherit desktop eutils unpacker
58 -
59 -DESCRIPTION="A physics-based action game with character-dependent solutions to challenges"
60 -HOMEPAGE="http://trine-thegame.com/"
61 -SRC_URI="TrineUpdate4.64.run"
62 -
63 -LICENSE="frozenbyte-eula"
64 -SLOT="0"
65 -KEYWORDS="-* ~amd64 ~x86"
66 -RESTRICT="fetch strip"
67 -
68 -DEPEND="
69 - app-admin/chrpath
70 - app-arch/unzip
71 -"
72 -
73 -RDEPEND="
74 - dev-libs/glib:2
75 - dev-libs/libx86
76 - gnome-base/libglade:2.0
77 - media-libs/libogg
78 - media-libs/libpng:1.2
79 - >=media-libs/libsdl-1.2[opengl,sound,video]
80 - >=media-libs/libvorbis-1.3
81 - >=media-libs/openal-1.15
82 - >=media-libs/tiff-3.9:3
83 - >=sys-devel/gcc-4.3.0
84 - >=sys-libs/glibc-2.4
85 - virtual/jpeg:62
86 - x11-libs/gtk+:2
87 -"
88 -
89 -S="${WORKDIR}"
90 -d="/opt/${PN}"
91 -QA_PREBUILT="*"
92 -
93 -pkg_nofetch() {
94 - einfo "Fetch ${SRC_URI} and put it into ${DISTDIR}"
95 - einfo "See http://www.humblebundle.com/ for more info."
96 -}
97 -
98 -src_unpack() {
99 - unpack_zip ${A}
100 -}
101 -
102 -src_prepare() {
103 - default
104 - rm -v lib*/lib{gcc_s,jpeg,m,ogg,openal,png*,rt,SDL*,selinux,stdc++,tiff,vorbis*}.* || die
105 - chrpath --replace "${EPREFIX}${d}"/lib trine-{bin,launcher}$(usex x86 32 64) || die
106 -}
107 -
108 -src_install() {
109 - local b bb
110 - local sfx=$(usex x86 32 64)
111 -
112 - doicon Trine.xpm
113 - for b in bin launcher ; do
114 - bb="trine-${b}"
115 - exeinto ${d}
116 - newexe ${bb}${sfx} ${bb}
117 - make_wrapper ${bb} "./${bb}" "${d}"
118 - make_desktop_entry ${bb} "Trine ${b}" Trine
119 - done
120 -
121 - exeinto ${d}/lib
122 - doexe lib${sfx}/*
123 -
124 - insinto ${d}
125 - doins -r binds config data dev profiles *.fbz *.glade trine-logo.png
126 -
127 - dodoc Trine_Manual_linux.pdf Trine_updates.txt
128 -}
129
130 diff --git a/games-action/trine/trine-1.08-r3.ebuild b/games-action/trine/trine-1.08-r3.ebuild
131 new file mode 100644
132 index 00000000000..f9b9673cdd4
133 --- /dev/null
134 +++ b/games-action/trine/trine-1.08-r3.ebuild
135 @@ -0,0 +1,97 @@
136 +# Copyright 1999-2018 Gentoo Foundation
137 +# Distributed under the terms of the GNU General Public License v2
138 +
139 +EAPI=6
140 +
141 +inherit desktop eutils gnome2-utils unpacker
142 +
143 +DESCRIPTION="A physics-based action game with character-dependent solutions to challenges"
144 +HOMEPAGE="https://www.frozenbyte.com/games/trine-enchanted-edition"
145 +SRC_URI="TrineUpdate4.64.run"
146 +LICENSE="frozenbyte-eula"
147 +SLOT="0"
148 +KEYWORDS="-* ~amd64 ~x86"
149 +IUSE="+launcher"
150 +RESTRICT="bindist fetch strip"
151 +
152 +QA_PREBUILT="opt/${PN}/${PN}*
153 + opt/${PN}/lib/*"
154 +
155 +DEPEND="
156 + app-admin/chrpath
157 + app-arch/unzip
158 +"
159 +
160 +RDEPEND="
161 + media-gfx/nvidia-cg-toolkit
162 + >=media-libs/libsdl-1.2[opengl,video]
163 + >=media-libs/sdl-image-1.2
164 + >=media-libs/sdl-ttf-2.0
165 + >=media-libs/libvorbis-1.3
166 + >=media-libs/openal-1.15
167 + >=sys-devel/gcc-4.3.0
168 + >=sys-libs/glibc-2.4
169 + sys-libs/zlib
170 + x11-libs/gtk+:2
171 + launcher? (
172 + dev-libs/glib:2
173 + gnome-base/libglade:2.0
174 + )"
175 +
176 +S="${WORKDIR}"
177 +dir="/opt/${PN}"
178 +
179 +pkg_nofetch() {
180 + einfo "Fetch ${SRC_URI} and put it into your distfiles directory."
181 + einfo "It is no longer available to purchase but you can still download it"
182 + einfo "from https://www.humblebundle.com if you bought it previously."
183 + einfo "Otherwise install ${CATEGORY}/trine-enchanted-edition instead."
184 +}
185 +
186 +src_unpack() {
187 + unpack_zip ${A}
188 +}
189 +
190 +src_prepare() {
191 + default
192 + use launcher || rm -v lib*/lib{boost*,icu*}.* || die
193 + rm -v lib*/lib{Cg*,direct*,fusion*,gcc_s,jpeg,m,ogg,openal,png*,rt,SDL*,selinux,stdc++,tiff,vga,vorbis*}.* || die
194 + chrpath --replace "${EPREFIX}${dir}"/lib trine-{bin,launcher}$(usex x86 32 64) || die
195 +}
196 +
197 +src_install() {
198 + local sfx=$(usex x86 32 64)
199 +
200 + insinto "${dir}"
201 + doins -r binds config data dev profiles *.fbz *.glade trine-logo.png
202 +
203 + exeinto "${dir}/lib"
204 + doexe lib${sfx}/*
205 +
206 + exeinto "${dir}"
207 + newexe trine-bin${sfx} ${PN}
208 +
209 + make_wrapper ${PN} ./${PN} "${dir}"
210 + make_desktop_entry ${PN} "Trine"
211 +
212 + # Compatibility with trine-bin.
213 + dosym ${PN} /usr/bin/${PN}-bin
214 +
215 + if use launcher ; then
216 + exeinto "${dir}"
217 + newexe trine-launcher${sfx} ${PN}-launcher
218 +
219 + dosym {"../..${dir}",/usr/bin}/${PN}-launcher
220 + make_desktop_entry ${PN}-launcher "Trine (launcher)"
221 +
222 + # Launcher binary has hardcoded the game path.
223 + dosym ${PN} "${dir}"/${PN}-bin
224 + fi
225 +
226 + newicon -s 512 Trine.xpm ${PN}.xpm
227 + dodoc Trine_Manual_linux.pdf Trine_updates.txt
228 +}
229 +
230 +pkg_preinst() { gnome2_icon_savelist; }
231 +pkg_postinst() { gnome2_icon_cache_update; }
232 +pkg_postrm() { gnome2_icon_cache_update; }