games-arcade/jazz2-data: New package
authorJames Le Cuirot <chewi@gentoo.org>
Thu, 26 Mar 2020 22:42:58 +0000 (22:42 +0000)
committerJames Le Cuirot <chewi@gentoo.org>
Fri, 27 Mar 2020 09:12:20 +0000 (09:12 +0000)
Package-Manager: Portage-2.3.96, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
games-arcade/jazz2-data/Manifest [new file with mode: 0644]
games-arcade/jazz2-data/jazz2-data-0-r20200327.ebuild [new file with mode: 0644]
games-arcade/jazz2-data/metadata.xml [new file with mode: 0644]

diff --git a/games-arcade/jazz2-data/Manifest b/games-arcade/jazz2-data/Manifest
new file mode 100644 (file)
index 0000000..9864985
--- /dev/null
@@ -0,0 +1,4 @@
+DIST jazz2-shareware-demo.zip 7658261 BLAKE2B b2b4412cd62feba07878a091a2a47d432a10d09f5f552eeb49095938d9ca6f97e94ab31e9cc8545019d9bdd8e5f97270dd9c1b25ba2099b260ff731dee5847c6 SHA512 208aedbb581f001c8215932166c71e5a160c70af6343d06aa35211558f898f18c47f066c896f016372aaefc8dbc495bc28ace18ce5fcbb729a9d2444a445d9ce
+DIST jj2plus-v1.zip 153487 BLAKE2B 49867cd3d30ee26e8795a7983657f7092710d43b0b8f083853bd0284fc5e1917954951a796747f4700ab43f82633886eb7fa229950fcc003c798f24fd9c33209 SHA512 139b8f98a6c4b8bb7067893e4387af540e7c15d1e633c5f964d7a6ae64320ad1a432434403a74aa4b4af36e3d4eb5245e74ade395ea473c8fd2e3fc37cef06a5
+DIST setup_jazz_jackrabbit_2_1.24hf_(16886).exe 58050816 BLAKE2B 6a6492aedc3d7387e5ef5bfc641d54c46dbe850f65f9269268c962cf963164dcd98c2f2651e9dc3b7c2d0ea9ea00836e9cc1332a158b08c34f8fa9fbfb44859e SHA512 df6fc47abf24aaa1895df5f897f698b53865fdc499e2454e07b273eddc8fcdeeebe8fc2992292fb27e077da252d3d5728823ce6a2e83412c150fb8742a52116f
+DIST setup_jazz_jackrabbit_2_cc_1.2x_(16742).exe 57273872 BLAKE2B 85cd51fbe706bd6a040931d084102cf46c13d3508653ac429f721b93b8bcef131bea688a1d49cc6e789fa108fed5611e2bd476a2f50ceee4ac0c16531d49795a SHA512 fafce9bb318903970b8ba8e3c08cd261c748180158c162db4f67408d12b436a1a091b2423e2df0859e6c65df5ffe1e7e07d370089b6ebf70f8fc32ff5c260a86
diff --git a/games-arcade/jazz2-data/jazz2-data-0-r20200327.ebuild b/games-arcade/jazz2-data/jazz2-data-0-r20200327.ebuild
new file mode 100644 (file)
index 0000000..8e09e36
--- /dev/null
@@ -0,0 +1,79 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DEATTK="http://deat.tk/jazz2/misc"
+JJ2PLUS="${DEATTK}/jj2plus-v1.zip"
+
+DESCRIPTION="Jazz Jackrabbit 2 data files imported for games-arcade/jazz2"
+HOMEPAGE="https://www.gog.com/game/jazz_jackrabbit_2_collection"
+
+# Order is significant!
+SRC_URI="
+       ${JJ2PLUS}
+       demo? (
+               ${DEATTK}/shareware-demo.zip -> jazz2-shareware-demo.zip
+       )
+       !demo? (
+               cc? ( setup_jazz_jackrabbit_2_cc_1.2x_(16742).exe )
+               setup_jazz_jackrabbit_2_1.24hf_(16886).exe
+       )
+"
+
+LICENSE="free-noncomm GOG-EULA"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+cc demo gles2-only"
+RESTRICT="!demo? ( bindist fetch )"
+
+RDEPEND="games-arcade/jazz2:=[gles2-only=]"
+
+DEPEND="
+       ${RDEPEND}
+       !demo? ( app-arch/innoextract )
+"
+
+DIR="/usr/share/jazz2"
+S="${WORKDIR}"
+
+pkg_nofetch() {
+       local a
+       einfo "Please place the following files in your distfiles directory."
+       einfo
+       einfo "  Go to https://www.gog.com/game/jazz_jackrabbit_2_collection,"
+       einfo "  purchase the game, and download:"
+       for a in ${A}; do
+               [[ ${SRC_URI} == */${a}* ]] && continue
+               einfo "    - ${a}"
+       done
+       einfo
+       einfo "  You must also download:"
+       einfo "    - ${JJ2PLUS}"
+}
+
+src_unpack() {
+       ln -snf "${DISTDIR}/${JJ2PLUS##*/}" || die
+
+       if use demo; then
+               ln -snf "${DISTDIR}"/jazz2-shareware-demo.zip shareware-demo.zip || die
+       else
+               local EXE
+               for EXE in ${A}; do
+                       [[ ${EXE} == *.exe ]] || continue
+                       innoextract -e -s -p0 -I app -d "${EXE}" "${DISTDIR}/${EXE}" || die
+               done
+       fi
+}
+
+src_install() {
+       if use demo; then
+               jazz2-import /no-wait /output "${ED}${DIR}" || die
+       else
+               local EXE
+               for EXE in ${A}; do
+                       [[ ${EXE} == *.exe ]] || continue
+                       jazz2-import /no-wait /output "${ED}${DIR}" "${EXE}"/app || die
+               done
+       fi
+}
diff --git a/games-arcade/jazz2-data/metadata.xml b/games-arcade/jazz2-data/metadata.xml
new file mode 100644 (file)
index 0000000..9ac6d5d
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="project">
+               <email>games@gentoo.org</email>
+               <name>Gentoo Games Project</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">deathkiller/jazz2</remote-id>
+       </upstream>
+       <use>
+               <flag name="cc">Install The Christmas Chronicles additional data</flag>
+               <flag name="demo">Use the free demo data instead of the full retail game data</flag>
+               <flag name="gles2-only">Use GLES 2.0 or later instead of full OpenGL 2.1</flag>
+       </use>
+</pkgmetadata>