commit:     5dac15d5b505c322615552565f76432378dcc475
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  3 15:59:04 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Thu Aug  3 19:03:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dac15d5

app-emulation/uxn: bump to 0_p20230803

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 app-emulation/uxn/Manifest               |  1 +
 app-emulation/uxn/uxn-0_p20230803.ebuild | 56 ++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/app-emulation/uxn/Manifest b/app-emulation/uxn/Manifest
index aca2c94379d9..cefef0231cc8 100644
--- a/app-emulation/uxn/Manifest
+++ b/app-emulation/uxn/Manifest
@@ -1 +1,2 @@
 DIST uxn-0_p20230609.tar.gz 289620 BLAKE2B 
35d9cdc8266012d5762641b739099aef9ecd1619dd9c650aba3fc8ad285aa80e9a77dc2d7f53a6e8d56f05936a49f561b53cc4d50720be2bf8028f7479efe4ba
 SHA512 
862be7246597fb54e759eee39d2d4a06ca1e6f8a42c1a336c25c5e2d7657ea086a546c9346da911cc4ec73705274794879b22f6da5f7ce88b66210cc1649dc39
+DIST uxn-0_p20230803.tar.gz 293291 BLAKE2B 
2e295f83bc695861732ad0412900435900bd10c08a99b0a6e88a5a5e10fde3f462b8ff35261365bfec1f7777306e1684eb1dac767cf7a1f83b3e30e36e79d98e
 SHA512 
89b666b11099037404e48cd6cc7467bcbc84fb90c24cc3df183996f26f2a6817d84fe47857d2d9777acd0aed9885e17c726f3b2f32253d0ba3a77f32b46f8abf

diff --git a/app-emulation/uxn/uxn-0_p20230803.ebuild 
b/app-emulation/uxn/uxn-0_p20230803.ebuild
new file mode 100644
index 000000000000..17ab33829f65
--- /dev/null
+++ b/app-emulation/uxn/uxn-0_p20230803.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="An assembler and emulator for the Uxn stack-machine, written in 
ANSI C"
+HOMEPAGE="https://wiki.xxiivv.com/site/uxn.html
+       https://git.sr.ht/~rabbits/uxn/";
+
+if [[ ${PV} == *9999* ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://git.sr.ht/~rabbits/uxn";
+elif [[ ${PV} == *_p20230803 ]] ; then
+       COMMIT=2ddc20b1b6acc05a1ce8ab468e407d138ccee581
+       SRC_URI="https://git.sr.ht/~rabbits/uxn/archive/${COMMIT}.tar.gz
+               -> ${P}.tar.gz"
+       S="${WORKDIR}"/uxn-${COMMIT}
+       KEYWORDS="~amd64 ~x86"
+else
+       die "wrong package version (PV), given: ${PV}"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND="media-libs/libsdl2:="
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/uxn-0_p20230609-build.sh.patch )
+
+src_compile() {
+       CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" ./build.sh --no-run ||
+               die "building with \"build.sh\" failed"
+
+       local f
+       local f_base
+       for f in ./projects/{examples/*,software,utils}/*.tal ; do
+               f_base="$(basename "${f}" .tal)"
+               ebegin "Assembling ROM ${f_base}"
+               ./bin/uxnasm "${f}" "$(dirname "${f}")"/"${f_base}".rom
+               eend ${?} ||  die "failed to assemble ${f}"
+       done
+}
+
+src_install() {
+       exeinto /usr/bin
+       doexe bin/uxn*
+
+       insinto /usr/share/uxn
+       doins bin/*.rom
+       doins -r projects
+
+       einstalldocs
+}

Reply via email to