summaryrefslogtreecommitdiff
path: root/games-engines/scrap-engine
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /games-engines/scrap-engine
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'games-engines/scrap-engine')
-rw-r--r--games-engines/scrap-engine/Manifest4
-rw-r--r--games-engines/scrap-engine/files/scrap-engine-tests.patch12
-rw-r--r--games-engines/scrap-engine/metadata.xml12
-rw-r--r--games-engines/scrap-engine/scrap-engine-1.2.0.ebuild47
4 files changed, 75 insertions, 0 deletions
diff --git a/games-engines/scrap-engine/Manifest b/games-engines/scrap-engine/Manifest
new file mode 100644
index 000000000000..1d4fff9a9eba
--- /dev/null
+++ b/games-engines/scrap-engine/Manifest
@@ -0,0 +1,4 @@
+AUX scrap-engine-tests.patch 365 BLAKE2B 2e412320782d2d5b66935fed5eaceae9b4a59e6b7bd36b8cc5d29b3fa86f002efcd60c1d202f6d2486ecc92e1b06ea619291d0583747524f5afda29a1f02e724 SHA512 d66afa79eb1a433920d6285fe0819fcb87726f3d20949966651f8af8eb99d378f4ddfa022009a98b2324429ae9fef1167922dda8ffc72dc5c03131c5765778e7
+DIST scrap-engine-1.2.0.gh.tar.gz 381529 BLAKE2B a482bc45900a4294be69e22308114fcdaa4a8bcaa22bce96e3436080ca7dbd2a546253ed8d1faefe2fa5c2ec57a2c6b2a63cbd7b42de39d9990968f9b34614d7 SHA512 5d1ec65eed4515e07f3c3a32f0423bcf41d7ba594508391024d22623f27d052464b5a3dc887b0ff6bea6c8f7d7fe54c30373460449b9977f0f95a9e2b1f978da
+EBUILD scrap-engine-1.2.0.ebuild 916 BLAKE2B 163524439aa8160c551c1dc2939247817e8c3bf7586475d7af89436dc1bee021aa4b72d97053ba686ea5d8132965e7f87f2d9de4c0d2051adcd8e87ede62ef77 SHA512 844339bdc412cf6bafc4e5bd1defc4c759cb8ba7d049072d3f6dbfaa24b2603f943daeba8c2b571a15bfd181fc87e59cf504834c1d7409c5108b5431ece03b53
+MISC metadata.xml 392 BLAKE2B cb5d6dc8dacc8ae1f02acdced4ca0a08531451779da2e4d309367657b2a91c7c8eed0fa2faba58c16bd01324132e372516829f0f2a7a9570ce1a7bc7be418612 SHA512 61909625eb2c0923c9d41faf41841e161868277af02e43d5ddae3e75c452f21ce929bbf1059d3919a5c673f5dd0da418e00148f81ce94f0c40945261ccf615bb
diff --git a/games-engines/scrap-engine/files/scrap-engine-tests.patch b/games-engines/scrap-engine/files/scrap-engine-tests.patch
new file mode 100644
index 000000000000..5e7960574094
--- /dev/null
+++ b/games-engines/scrap-engine/files/scrap-engine-tests.patch
@@ -0,0 +1,12 @@
+diff -Naur a/tests/scrap_bench.py b/tests/scrap_bench.py
+--- a/tests/scrap_bench.py 2022-01-05 17:13:26.000000000 +0000
++++ b/tests/scrap_bench.py 2022-06-24 14:33:10.215047579 +0100
+@@ -22,7 +22,7 @@
+ time2 = 0
+
+ b_map.show()
+- while True:
++ for _ in range(100):
+ time0 = time.time()
+ times += time2
+ for ob in rectangle.obs:
diff --git a/games-engines/scrap-engine/metadata.xml b/games-engines/scrap-engine/metadata.xml
new file mode 100644
index 000000000000..680b374c830b
--- /dev/null
+++ b/games-engines/scrap-engine/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://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">lxgr-linux/scrap_engine</remote-id>
+ <remote-id type="pypi">scrap-engine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-engines/scrap-engine/scrap-engine-1.2.0.ebuild b/games-engines/scrap-engine/scrap-engine-1.2.0.ebuild
new file mode 100644
index 000000000000..05b7700f5b2a
--- /dev/null
+++ b/games-engines/scrap-engine/scrap-engine-1.2.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+MY_PN="${PN//-/_}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Terminal-based Python game engine involving objects on a map"
+HOMEPAGE="https://github.com/lxgr-linux/scrap_engine"
+SRC_URI="https://github.com/lxgr-linux/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-tests.patch
+)
+
+DOCS=(
+ README.md
+ docs/DOCS.md
+ pics/example1.jpg
+)
+
+src_prepare() {
+ default
+
+ # PEP 517 needs this metadata.
+ echo "Version: ${PV}" > "${S}"/PKG-INFO || die
+
+ # Adjust doc resource paths.
+ sed -i "s:\.\./pics/::g" docs/DOCS.md || die
+}
+
+python_test() {
+ for TEST in "${S}"/tests/*.py; do
+ "${EPYTHON}" "${TEST}" || die
+ done
+}