commit:     1a3a9601f757c56bf61fcf73119eccc015792055
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  7 16:28:24 2026 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Mar  7 16:31:21 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a3a9601

app-emulation/xtrs: add 4.9d_p20250819

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-emulation/xtrs/Manifest                   |  1 +
 app-emulation/xtrs/xtrs-4.9d_p20250819.ebuild | 99 +++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)

diff --git a/app-emulation/xtrs/Manifest b/app-emulation/xtrs/Manifest
index 2be59bff6621..80b93e468140 100644
--- a/app-emulation/xtrs/Manifest
+++ b/app-emulation/xtrs/Manifest
@@ -1,3 +1,4 @@
 DIST ld4-631.zip 106955 BLAKE2B 
1c0e04186f14fcc840568521b09c7b55318a87dc49e394d516aa742fe7e5c499ac79771782f9b7ee687cdf55df159cef09897d19976879d4c60fff2a33f7f7c6
 SHA512 
8c6a24bc0af9326b5b935d7cdb1932b4cb714ab336167fed36f4f6d976cd80fe1d4d6a76e6374366fdc3fce623b2bdd6f9059a964bd6d29f59d6a052a1924c4a
 DIST ld4-631l.xd3 692 BLAKE2B 
7870135e999cd358d7a3e5c254908757fa059a61654403ba146b8b866bda450b53fd1821dd3e3f8fc5c0acd17d0935d83b5df814c8e12eb5748bfcdf5688c509
 SHA512 
401d36fdfbceaf90673c5e9f821d26aa0a58b901d7e950d34361e5cde3252a070ff902019fcc1eb820fb1b2d3277e4c1da57ccc442ee407b0be4e5ca26dc2d13
 DIST xtrs-4.9d.tar.gz 455355 BLAKE2B 
b7ffda48f9a9bb534e33711b85c02734b7d3f8cee8d3cf2c2bc0a801954dcc1851b12451da03a14a7196368a9066cbaea953e871e8b68b4951f7439412e9e34e
 SHA512 
5d6a2e1d4c2f2df63eaec8d015ea9e485615d82b7923af5c03c394862a31b1e6be2329aca18c0fa0c7d6b984164bb9b4d18f94a3d8cd140a683c5197ddff2249
+DIST xtrs-4.9d_p20250819.tar.gz 426016 BLAKE2B 
6095f7bcc91a7823c325aca668f3ce1fba75dd4fe432262c2502ae53356690d4bd128d10fc0b4d0024383fbbb58ab587459917ec5214ef2fdff95b009bca2a78
 SHA512 
d22f7baf89c3ecb86a59bb39359b3274a4e6fe291d3d46b74721fe5c7067fb1ac315953458338a3d02ca6f869c199fb6005ea0337a9677cb1928541ca4d68238

diff --git a/app-emulation/xtrs/xtrs-4.9d_p20250819.ebuild 
b/app-emulation/xtrs/xtrs-4.9d_p20250819.ebuild
new file mode 100644
index 000000000000..d313250acd98
--- /dev/null
+++ b/app-emulation/xtrs/xtrs-4.9d_p20250819.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit eapi9-ver flag-o-matic toolchain-funcs readme.gentoo-r1
+
+COMMIT="3a2180c063811a715faa28d39a94739c33e0abd0"
+DESCRIPTION="Radio Shack TRS-80 emulator"
+HOMEPAGE="https://www.tim-mann.org/xtrs.html";
+SRC_URI="https://github.com/TimothyPMann/${PN}/archive/${COMMIT}.tar.gz -> 
${P}.tar.gz
+       ls-dos? (
+               https://www.tim-mann.org/trs80/ld4-631.zip
+               https://dev.gentoo.org/~ulm/distfiles/ld4-631l.xd3
+       )"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="xtrs ls-dos? ( freedist )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ls-dos"
+RESTRICT="ls-dos? ( bindist )"
+
+RDEPEND="sys-libs/ncurses:0=
+       sys-libs/readline:0=
+       x11-libs/libX11"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-embedded/zmac
+       ls-dos? ( app-arch/unzip dev-util/xdelta:3 )"
+
+src_prepare() {
+       default
+
+       if use ls-dos; then
+               cd "${WORKDIR}" || die
+               xdelta3 -d -s ld4-631.dsk "${DISTDIR}"/ld4-631l.xd3 out.dsk || 
die
+               mv out.dsk ld4-631.dsk || die
+       fi
+}
+
+src_compile() {
+       append-flags -std=gnu17
+       case $(tc-endian) in
+               little) ;;
+               big) append-flags -Dbig_endian ;;
+               *) die ;;
+       esac
+
+       emake \
+               CC="$(tc-getCC)" \
+               DEBUG="${CFLAGS}" \
+               LDFLAGS="${LDFLAGS}" \
+               ZMACFLAGS="-h -l" \
+               HTMLDOCS=
+}
+
+src_install() {
+       emake DESTDIR="${ED}" install-progs
+
+       insinto /usr/share/xtrs/disks
+       insopts -m0444
+       doins cpmutil.dsk utility.dsk
+
+       if use ls-dos; then
+               doins "${WORKDIR}"/ld4-631.dsk
+               dosym disks/ld4-631.dsk /usr/share/xtrs/disk4p-0
+               dosym disks/utility.dsk /usr/share/xtrs/disk4p-1
+       fi
+
+       local f
+       for f in xtrs cassette mkdisk cmddump hex2cmd; do
+               newman ${f}.man ${f}.1
+       done
+
+       dodoc AUTHORS ChangeLog README xtrsrom4p.README cpmutil.html 
dskspec.html
+
+       local DOC_CONTENTS="For copyright reasons, xtrs does not include actual
+               ROM images. Because of this, unless you supply your own ROM, 
xtrs
+               will not function in any mode except 'Model 4p' mode (a minimal
+               free ROM is included for this), which can be run like this:
+               \n\nxtrs -model 4p -diskdir /usr/share/xtrs
+               \n\nIf you already own a copy of the ROM software (e.g., if you 
have
+               a TRS-80 with this ROM), then you can make yourself a copy of 
this
+               for use with xtrs, using utilities available on the web. To load
+               your own ROM, specify the '-romfile1' option, or the 
'Xtrs.romfile1'
+               X resource. ROM files can be in Intel hex or binary format."
+       readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+
+       if ver_replacing -lt 4.9d_p; then
+               elog "The option and X resource to load a ROM file for the 
Model I"
+               elog "have been renamed:"
+               elog "'-romfile1' (instead of '-romfile') for the option,"
+               elog "'Xtrs.romfile1' (instead of 'Xtrs.romfile') for the X 
resource"
+       fi
+}

Reply via email to