summaryrefslogtreecommitdiff
path: root/app-emulation/uxn/uxn-0_p20230803.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-08-03 22:54:31 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-08-03 22:54:31 +0100
commitb0ebd12de22226fd7b69140ccd700efda3eb5fa6 (patch)
treeefcf8d59607e53b8bf2fb453629b05bea28cc3ce /app-emulation/uxn/uxn-0_p20230803.ebuild
parent99547b97ff461f107e03ed5323b6286a66677bce (diff)
gentoo auto-resync : 03:08:2023 - 22:54:30
Diffstat (limited to 'app-emulation/uxn/uxn-0_p20230803.ebuild')
-rw-r--r--app-emulation/uxn/uxn-0_p20230803.ebuild56
1 files changed, 56 insertions, 0 deletions
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
+}