]> git.draconx.ca Git - gentoo-draconx.git/blobdiff - games-puzzle/spacechem/spacechem-1016.ebuild
games-puzzle/spacechem: New ebuild.
[gentoo-draconx.git] / games-puzzle / spacechem / spacechem-1016.ebuild
diff --git a/games-puzzle/spacechem/spacechem-1016.ebuild b/games-puzzle/spacechem/spacechem-1016.ebuild
new file mode 100644 (file)
index 0000000..d4e06ed
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright © 2021 Nick Bowler
+# License GPLv3+: GNU General Public License version 3 or any later version.
+# This is free software: you are free to change and redistribute it.
+# There is NO WARRANTY, to the extent permitted by law.
+
+EAPI=8
+
+inherit desktop wrapper xdg
+
+DESCRIPTION="Sci-fi visual programming puzzle game"
+HOMEPAGE="https://www.zachtronics.com/spacechem/ https://www.gog.com/game/spacechem"
+SRC_URI="spacechem_1016_40617.sh"
+
+RESTRICT="fetch"
+
+LICENSE="spacechem"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-lang/mono
+       media-libs/libsdl2[opengl]
+       media-libs/sdl2-mixer[vorbis]
+       media-libs/sdl2-image[png]"
+BDEPEND="app-arch/unzip"
+
+src_unpack () {
+       unzip -qd "$P" "$DISTDIR/$A"
+
+       case $? in
+       0|1) :;;
+       *) die "failed to unpack archive" ;;
+       esac
+}
+
+src_install () {
+       insinto "/opt/$PN"
+       doins data/noarch/game/[!gL]*.* data/noarch/game/mono*
+       doins -r data/noarch/game/{fonts,images,lang,music,sounds,text}
+
+       exeinto "/opt/$PN"
+       doexe data/noarch/game/{SpaceChem,rgb2theora}
+
+       dodoc data/noarch/game/LICENSE.txt
+
+       newicon -s 128 data/noarch/game/images/icon.png spacechem.png
+       make_wrapper "spacechem" "mono SpaceChem.exe" "/opt/$PN"
+       make_desktop_entry spacechem
+}