commit:     b609f751acf7e4e636e4ce119193be94cf54b79a
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 13 17:54:20 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Wed Nov 13 18:07:09 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b609f751

app-emulation/uxn: bump to 0_p20241112

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

 app-emulation/uxn/Manifest               |  1 +
 app-emulation/uxn/uxn-0_p20241112.ebuild | 74 ++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/app-emulation/uxn/Manifest b/app-emulation/uxn/Manifest
index 4d0cba24998c..ce4250cfc6a5 100644
--- a/app-emulation/uxn/Manifest
+++ b/app-emulation/uxn/Manifest
@@ -1 +1,2 @@
 DIST uxn-0_p20240304.tar.gz 307083 BLAKE2B 
2b3a556c5094fd777d82d75c87f721d1a9ea136334cdbc8553662281ae498beb79514e9e567e79b84a625b2fe60b486aa7f6892594cbd08abbbfeb4c9a50b2e9
 SHA512 
048e24e33de04913e03fbf1b242837dd1ad190f52ede16c302cf436399f0ee478afca545236dd438e03d8dfc29252478c2d79c9b6d3e8d34bb83c99f1930d026
+DIST uxn-0_p20241112.tar.gz 303651 BLAKE2B 
d632d59bb6b271b8dd9e03ff9efc6e4cf822793b06c3f95278d9e9b0be2242c615611ba87560b5ce9c6cde549752b6f4f578ad4872682665b3c019fcf07efeb5
 SHA512 
66b3c8ccdd6a79f507f6672161660b3d2f491ac1a186bff963f156e322cdf11494269e73d4bb08b22bb1fe7c7bacb59cb5ba850fef6cb4fe183777fdd8cba2ac

diff --git a/app-emulation/uxn/uxn-0_p20241112.ebuild 
b/app-emulation/uxn/uxn-0_p20241112.ebuild
new file mode 100644
index 000000000000..a9ad05873add
--- /dev/null
+++ b/app-emulation/uxn/uxn-0_p20241112.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2024 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/${PN}";
+elif [[ "${PV}" == *_p20241112 ]] ; then
+       COMMIT="1538b1bf7255b975dbd87e813d0cca491810fbba"
+
+       SRC_URI="https://git.sr.ht/~rabbits/${PN}/archive/${COMMIT}.tar.gz
+               -> ${P}.tar.gz"
+       S="${WORKDIR}/uxn-${COMMIT}"
+
+       KEYWORDS="~amd64 ~x86"
+else
+       die "Wrong package version, please update the ebuild, given: ${PV}"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND="
+       media-libs/libsdl2:=
+"
+DEPEND="
+       ${RDEPEND}
+"
+
+PATCHES=(
+       "${FILESDIR}/uxn-0_p20230609-build.sh.patch"
+)
+
+src_compile() {
+       env CC="$(tc-getCC)" \
+               CFLAGS="${CFLAGS} ${LDFLAGS}" \
+               ./build.sh --no-run \
+               || die "building with \"build.sh\" failed"
+
+       # Fails to assemble via following loop.
+       # Possibly not mean to be assembled by hand.
+       rm -rf ./projects/library ./projects/software/{asma,launcher}.tal || die
+
+       local tal_file=""
+       local tal_file_base=""
+
+       while read -r tal_file ; do
+               tal_file_base="$(basename "${tal_file}" .tal)"
+
+               ebegin "Assembling ROM ${tal_file_base}"
+               bin/uxnasm "${tal_file}" "$(dirname 
"${tal_file}")/${tal_file_base}.rom"
+               eend ${?} || die "failed to assemble ${tal_file}"
+       done \
+               < <(find projects -type f -name "*.tal")
+}
+
+src_install() {
+       insinto /usr/bin
+       doins bin/uxn{asm,cli,emu}
+       fperms 0755 /usr/bin/uxn{asm,cli,emu}
+
+       insinto /usr/share/uxn
+       doins -r projects
+
+       einstalldocs
+}

Reply via email to