]> git.draconx.ca Git - gentoo-draconx.git/blob - games-puzzle/spacechem/spacechem-1016.ebuild
games-puzzle/spacechem: New ebuild.
[gentoo-draconx.git] / games-puzzle / spacechem / spacechem-1016.ebuild
1 # Copyright © 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=8
7
8 inherit desktop wrapper xdg
9
10 DESCRIPTION="Sci-fi visual programming puzzle game"
11 HOMEPAGE="https://www.zachtronics.com/spacechem/ https://www.gog.com/game/spacechem"
12 SRC_URI="spacechem_1016_40617.sh"
13
14 RESTRICT="fetch"
15
16 LICENSE="spacechem"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19
20 RDEPEND="dev-lang/mono
21         media-libs/libsdl2[opengl]
22         media-libs/sdl2-mixer[vorbis]
23         media-libs/sdl2-image[png]"
24 BDEPEND="app-arch/unzip"
25
26 src_unpack () {
27         unzip -qd "$P" "$DISTDIR/$A"
28
29         case $? in
30         0|1) :;;
31         *) die "failed to unpack archive" ;;
32         esac
33 }
34
35 src_install () {
36         insinto "/opt/$PN"
37         doins data/noarch/game/[!gL]*.* data/noarch/game/mono*
38         doins -r data/noarch/game/{fonts,images,lang,music,sounds,text}
39
40         exeinto "/opt/$PN"
41         doexe data/noarch/game/{SpaceChem,rgb2theora}
42
43         dodoc data/noarch/game/LICENSE.txt
44
45         newicon -s 128 data/noarch/game/images/icon.png spacechem.png
46         make_wrapper "spacechem" "mono SpaceChem.exe" "/opt/$PN"
47         make_desktop_entry spacechem
48 }