summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2022-08-16 21:48:41 +0200
committerMaciej Barć <xgqt@gentoo.org>2022-08-16 21:50:01 +0200
commit5dc5013c0447f3062ddfee2379a0eb73ce35c116 (patch)
tree1894cd281ee5c4039940d49f9f8f7a147b5529f9 /app-emulation/uxn
parentgui-libs/wlroots: Stabilize 0.15.1 amd64, #865415 (diff)
downloadgentoo-5dc5013c0447f3062ddfee2379a0eb73ce35c116.tar.gz
gentoo-5dc5013c0447f3062ddfee2379a0eb73ce35c116.tar.bz2
gentoo-5dc5013c0447f3062ddfee2379a0eb73ce35c116.zip
app-emulation/uxn: new package; add version 0_p20220815 and live
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-emulation/uxn')
-rw-r--r--app-emulation/uxn/Manifest1
-rw-r--r--app-emulation/uxn/files/uxn-build.sh.patch11
-rw-r--r--app-emulation/uxn/metadata.xml15
-rw-r--r--app-emulation/uxn/uxn-0_p20220815.ebuild53
-rw-r--r--app-emulation/uxn/uxn-9999.ebuild53
5 files changed, 133 insertions, 0 deletions
diff --git a/app-emulation/uxn/Manifest b/app-emulation/uxn/Manifest
new file mode 100644
index 000000000000..9f90f4c25b63
--- /dev/null
+++ b/app-emulation/uxn/Manifest
@@ -0,0 +1 @@
+DIST uxn-0_p20220815.tar.gz 286763 BLAKE2B d50e52da1614fdd2939ad09d5c372c103cbfa074b10e1a17560baa3ad5e09a81b9627efdc5f17c7572798d06f1e6a388cb473348950cef5ba45c7d40b3716ec6 SHA512 237c6d633783006d8503b6b4726aaa1d8ed22209c0c6368e78a3da0703d92cb8b1e9c5c7372faecc374082be56608ac1857efc0629e0dff6e374a2adbf1d20ea
diff --git a/app-emulation/uxn/files/uxn-build.sh.patch b/app-emulation/uxn/files/uxn-build.sh.patch
new file mode 100644
index 000000000000..a99ed23d737e
--- /dev/null
+++ b/app-emulation/uxn/files/uxn-build.sh.patch
@@ -0,0 +1,11 @@
+--- a/build.sh
++++ b/build.sh
+@@ -94,7 +94,7 @@ then
+ CFLAGS="${CFLAGS} -DDEBUG -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined"
+ CORE='src/uxn.c'
+ else
+- CFLAGS="${CFLAGS} -DNDEBUG -Os -g0 -s"
++ CFLAGS="${CFLAGS} -DNDEBUG"
+ CORE='src/uxn.c'
+ fi
+
diff --git a/app-emulation/uxn/metadata.xml b/app-emulation/uxn/metadata.xml
new file mode 100644
index 000000000000..e7efab8c0508
--- /dev/null
+++ b/app-emulation/uxn/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="person">
+ <email>xgqt@gentoo.org</email>
+ <name>Maciej Barć</name>
+ </maintainer>
+ <longdescription>
+ Uxn is a virtual machine with 32 instructions. This one-page computer is
+ capable of hosting small applications, programmable in a unique language.
+ It was designed with an implementation-first mindset with a focus on
+ creating portable tools and games.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-emulation/uxn/uxn-0_p20220815.ebuild b/app-emulation/uxn/uxn-0_p20220815.ebuild
new file mode 100644
index 000000000000..ada1e5c54013
--- /dev/null
+++ b/app-emulation/uxn/uxn-0_p20220815.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+H=85ae1f6ebea635f35974218be8faf7557390a7e9
+
+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.git"
+else
+ SRC_URI="https://git.sr.ht/~rabbits/uxn/archive/${H}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}"/${PN}-${H}
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND="media-libs/libsdl2:="
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/uxn-build.sh.patch )
+
+src_compile() {
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" ./build.sh --no-run ||
+ die "build failed"
+
+ local f
+ for f in ./projects/{examples/*,software,utils}/*.tal ; do
+ ./bin/uxnasm "${f}" "$(dirname "${f}")"/"$(basename "${f}" .tal)".rom ||
+ 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
+}
diff --git a/app-emulation/uxn/uxn-9999.ebuild b/app-emulation/uxn/uxn-9999.ebuild
new file mode 100644
index 000000000000..ada1e5c54013
--- /dev/null
+++ b/app-emulation/uxn/uxn-9999.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+H=85ae1f6ebea635f35974218be8faf7557390a7e9
+
+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.git"
+else
+ SRC_URI="https://git.sr.ht/~rabbits/uxn/archive/${H}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}"/${PN}-${H}
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND="media-libs/libsdl2:="
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/uxn-build.sh.patch )
+
+src_compile() {
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" ./build.sh --no-run ||
+ die "build failed"
+
+ local f
+ for f in ./projects/{examples/*,software,utils}/*.tal ; do
+ ./bin/uxnasm "${f}" "$(dirname "${f}")"/"$(basename "${f}" .tal)".rom ||
+ 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
+}