]> git.draconx.ca Git - gentoo-draconx.git/blob - games-strategy/moo2-data/moo2-data-1.31-r3.ebuild
games-strategy/moo2-data: Update for games.eclass removal.
[gentoo-draconx.git] / games-strategy / moo2-data / moo2-data-1.31-r3.ebuild
1 # Copyright © 2013, 2015, 2021 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or any later version.
3 # This is free software: you are free to change and redistribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
5
6 EAPI=7
7
8 inherit desktop
9
10 DESCRIPTION="Master of Orion 2 Data Files"
11 SRC_URI="gog_master_of_orion_2_2.0.0.6.sh"
12
13 LICENSE="GOG-EULA"
14 SLOT="0"
15 KEYWORDS="~amd64"
16
17 RESTRICT="fetch"
18
19 BDEPEND="app-arch/unzip
20         media-gfx/icoutils
21         || ( media-gfx/graphicsmagick media-gfx/imagemagick )"
22
23 src_unpack () {
24         ( unzip -LLqd $P "$DISTDIR/$A" || exit $(($?>1)) ) ||
25                 die "Failed to extract $A"
26 }
27
28 src_compile () {
29         wrestool -t 14 -x -o orion95.ico data/noarch/data/orion95.exe || die
30         convert=`has_version media-gfx/graphicsmagick && echo 'gm'`
31         convert=${convert:+"$convert "}convert
32
33         einfo "$convert"
34         $convert orion95.ico moo2.png || die
35 }
36
37 src_install() {
38         insinto "/usr/share/$PN"
39         doins data/noarch/data/*.lbx
40
41         doicon -s 32 moo2.png
42         newicon -s 256 data/noarch/support/icon.png moo2.png
43 }