1 |
commit: 5dc5013c0447f3062ddfee2379a0eb73ce35c116 |
2 |
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 16 19:48:41 2022 +0000 |
4 |
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 16 19:50:01 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dc5013c |
7 |
|
8 |
app-emulation/uxn: new package; add version 0_p20220815 and live |
9 |
|
10 |
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org> |
11 |
|
12 |
app-emulation/uxn/Manifest | 1 + |
13 |
app-emulation/uxn/files/uxn-build.sh.patch | 11 +++++++ |
14 |
app-emulation/uxn/metadata.xml | 15 +++++++++ |
15 |
app-emulation/uxn/uxn-0_p20220815.ebuild | 53 ++++++++++++++++++++++++++++++ |
16 |
app-emulation/uxn/uxn-9999.ebuild | 53 ++++++++++++++++++++++++++++++ |
17 |
5 files changed, 133 insertions(+) |
18 |
|
19 |
diff --git a/app-emulation/uxn/Manifest b/app-emulation/uxn/Manifest |
20 |
new file mode 100644 |
21 |
index 000000000000..9f90f4c25b63 |
22 |
--- /dev/null |
23 |
+++ b/app-emulation/uxn/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST uxn-0_p20220815.tar.gz 286763 BLAKE2B d50e52da1614fdd2939ad09d5c372c103cbfa074b10e1a17560baa3ad5e09a81b9627efdc5f17c7572798d06f1e6a388cb473348950cef5ba45c7d40b3716ec6 SHA512 237c6d633783006d8503b6b4726aaa1d8ed22209c0c6368e78a3da0703d92cb8b1e9c5c7372faecc374082be56608ac1857efc0629e0dff6e374a2adbf1d20ea |
26 |
|
27 |
diff --git a/app-emulation/uxn/files/uxn-build.sh.patch b/app-emulation/uxn/files/uxn-build.sh.patch |
28 |
new file mode 100644 |
29 |
index 000000000000..a99ed23d737e |
30 |
--- /dev/null |
31 |
+++ b/app-emulation/uxn/files/uxn-build.sh.patch |
32 |
@@ -0,0 +1,11 @@ |
33 |
+--- a/build.sh |
34 |
++++ b/build.sh |
35 |
+@@ -94,7 +94,7 @@ then |
36 |
+ CFLAGS="${CFLAGS} -DDEBUG -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined" |
37 |
+ CORE='src/uxn.c' |
38 |
+ else |
39 |
+- CFLAGS="${CFLAGS} -DNDEBUG -Os -g0 -s" |
40 |
++ CFLAGS="${CFLAGS} -DNDEBUG" |
41 |
+ CORE='src/uxn.c' |
42 |
+ fi |
43 |
+ |
44 |
|
45 |
diff --git a/app-emulation/uxn/metadata.xml b/app-emulation/uxn/metadata.xml |
46 |
new file mode 100644 |
47 |
index 000000000000..e7efab8c0508 |
48 |
--- /dev/null |
49 |
+++ b/app-emulation/uxn/metadata.xml |
50 |
@@ -0,0 +1,15 @@ |
51 |
+<?xml version="1.0" encoding="UTF-8"?> |
52 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
53 |
+ |
54 |
+<pkgmetadata> |
55 |
+ <maintainer type="person"> |
56 |
+ <email>xgqt@g.o</email> |
57 |
+ <name>Maciej Barć</name> |
58 |
+ </maintainer> |
59 |
+ <longdescription> |
60 |
+ Uxn is a virtual machine with 32 instructions. This one-page computer is |
61 |
+ capable of hosting small applications, programmable in a unique language. |
62 |
+ It was designed with an implementation-first mindset with a focus on |
63 |
+ creating portable tools and games. |
64 |
+ </longdescription> |
65 |
+</pkgmetadata> |
66 |
|
67 |
diff --git a/app-emulation/uxn/uxn-0_p20220815.ebuild b/app-emulation/uxn/uxn-0_p20220815.ebuild |
68 |
new file mode 100644 |
69 |
index 000000000000..ada1e5c54013 |
70 |
--- /dev/null |
71 |
+++ b/app-emulation/uxn/uxn-0_p20220815.ebuild |
72 |
@@ -0,0 +1,53 @@ |
73 |
+# Copyright 1999-2022 Gentoo Authors |
74 |
+# Distributed under the terms of the GNU General Public License v2 |
75 |
+ |
76 |
+EAPI=8 |
77 |
+ |
78 |
+H=85ae1f6ebea635f35974218be8faf7557390a7e9 |
79 |
+ |
80 |
+inherit toolchain-funcs |
81 |
+ |
82 |
+DESCRIPTION="An assembler and emulator for the Uxn stack-machine, written in ANSI C" |
83 |
+HOMEPAGE=" |
84 |
+ https://wiki.xxiivv.com/site/uxn.html |
85 |
+ https://git.sr.ht/~rabbits/uxn/ |
86 |
+" |
87 |
+ |
88 |
+if [[ ${PV} == *9999* ]] ; then |
89 |
+ inherit git-r3 |
90 |
+ EGIT_REPO_URI="https://git.sr.ht/~rabbits/uxn.git" |
91 |
+else |
92 |
+ SRC_URI="https://git.sr.ht/~rabbits/uxn/archive/${H}.tar.gz -> ${P}.tar.gz" |
93 |
+ S="${WORKDIR}"/${PN}-${H} |
94 |
+ KEYWORDS="~amd64 ~x86" |
95 |
+fi |
96 |
+ |
97 |
+LICENSE="MIT" |
98 |
+SLOT="0" |
99 |
+ |
100 |
+RDEPEND="media-libs/libsdl2:=" |
101 |
+DEPEND="${RDEPEND}" |
102 |
+ |
103 |
+PATCHES=( "${FILESDIR}"/uxn-build.sh.patch ) |
104 |
+ |
105 |
+src_compile() { |
106 |
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" ./build.sh --no-run || |
107 |
+ die "build failed" |
108 |
+ |
109 |
+ local f |
110 |
+ for f in ./projects/{examples/*,software,utils}/*.tal ; do |
111 |
+ ./bin/uxnasm "${f}" "$(dirname "${f}")"/"$(basename "${f}" .tal)".rom || |
112 |
+ die "failed to assemble ${f}" |
113 |
+ done |
114 |
+} |
115 |
+ |
116 |
+src_install() { |
117 |
+ exeinto /usr/bin |
118 |
+ doexe bin/uxn* |
119 |
+ |
120 |
+ insinto /usr/share/uxn |
121 |
+ doins bin/*.rom |
122 |
+ doins -r projects |
123 |
+ |
124 |
+ einstalldocs |
125 |
+} |
126 |
|
127 |
diff --git a/app-emulation/uxn/uxn-9999.ebuild b/app-emulation/uxn/uxn-9999.ebuild |
128 |
new file mode 100644 |
129 |
index 000000000000..ada1e5c54013 |
130 |
--- /dev/null |
131 |
+++ b/app-emulation/uxn/uxn-9999.ebuild |
132 |
@@ -0,0 +1,53 @@ |
133 |
+# Copyright 1999-2022 Gentoo Authors |
134 |
+# Distributed under the terms of the GNU General Public License v2 |
135 |
+ |
136 |
+EAPI=8 |
137 |
+ |
138 |
+H=85ae1f6ebea635f35974218be8faf7557390a7e9 |
139 |
+ |
140 |
+inherit toolchain-funcs |
141 |
+ |
142 |
+DESCRIPTION="An assembler and emulator for the Uxn stack-machine, written in ANSI C" |
143 |
+HOMEPAGE=" |
144 |
+ https://wiki.xxiivv.com/site/uxn.html |
145 |
+ https://git.sr.ht/~rabbits/uxn/ |
146 |
+" |
147 |
+ |
148 |
+if [[ ${PV} == *9999* ]] ; then |
149 |
+ inherit git-r3 |
150 |
+ EGIT_REPO_URI="https://git.sr.ht/~rabbits/uxn.git" |
151 |
+else |
152 |
+ SRC_URI="https://git.sr.ht/~rabbits/uxn/archive/${H}.tar.gz -> ${P}.tar.gz" |
153 |
+ S="${WORKDIR}"/${PN}-${H} |
154 |
+ KEYWORDS="~amd64 ~x86" |
155 |
+fi |
156 |
+ |
157 |
+LICENSE="MIT" |
158 |
+SLOT="0" |
159 |
+ |
160 |
+RDEPEND="media-libs/libsdl2:=" |
161 |
+DEPEND="${RDEPEND}" |
162 |
+ |
163 |
+PATCHES=( "${FILESDIR}"/uxn-build.sh.patch ) |
164 |
+ |
165 |
+src_compile() { |
166 |
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" ./build.sh --no-run || |
167 |
+ die "build failed" |
168 |
+ |
169 |
+ local f |
170 |
+ for f in ./projects/{examples/*,software,utils}/*.tal ; do |
171 |
+ ./bin/uxnasm "${f}" "$(dirname "${f}")"/"$(basename "${f}" .tal)".rom || |
172 |
+ die "failed to assemble ${f}" |
173 |
+ done |
174 |
+} |
175 |
+ |
176 |
+src_install() { |
177 |
+ exeinto /usr/bin |
178 |
+ doexe bin/uxn* |
179 |
+ |
180 |
+ insinto /usr/share/uxn |
181 |
+ doins bin/*.rom |
182 |
+ doins -r projects |
183 |
+ |
184 |
+ einstalldocs |
185 |
+} |