1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit flag-o-matic toolchain-funcs readme.gentoo
9 DESCRIPTION="Radio Shack TRS-80 emulator"
10 HOMEPAGE="http://www.tim-mann.org/xtrs.html"
11 SRC_URI="http://www.tim-mann.org/trs80/${P}.tar.gz
13 http://www.tim-mann.org/trs80/ld4-631.zip
14 https://dev.gentoo.org/~ulm/distfiles/ld4-631l.xd3
17 LICENSE="xtrs ls-dos? ( freedist )"
19 KEYWORDS="amd64 ppc x86 ~x86-fbsd"
21 RESTRICT="ls-dos? ( bindist )"
23 RDEPEND="sys-libs/ncurses
25 >=x11-libs/libX11-1.0.0"
27 ls-dos? ( app-arch/unzip dev-util/xdelta:3 )"
30 sed -i -e 's/$(CC) -o/$(CC) $(LDFLAGS) -o/' Makefile || die
32 cd "${WORKDIR}" || die
33 xdelta3 -d -s ld4-631.dsk "${DISTDIR}"/ld4-631l.xd3 out.dsk || die
34 mv out.dsk ld4-631.dsk || die
39 use ppc && append-flags -Dbig_endian
40 emake CC="$(tc-getCC)" DEBUG="${CFLAGS}" LDFLAGS="${LDFLAGS}"
44 dodir /usr/bin /usr/share/xtrs/disks /usr/share/man/man1
45 emake PREFIX="${D}"/usr install
48 insinto /usr/share/xtrs/disks
49 doins cpmutil.dsk utility.dsk
52 doins "${WORKDIR}"/ld4-631.dsk
53 dosym disks/ld4-631.dsk /usr/share/xtrs/disk4p-0
54 dosym disks/utility.dsk /usr/share/xtrs/disk4p-1
57 dodoc ChangeLog README xtrsrom4p.README cpmutil.html dskspec.html
59 DOC_CONTENTS="For copyright reasons, xtrs does not include actual ROM
60 images. Because of this, unless you supply your own ROM, xtrs will
61 not function in any mode except 'Model 4p' mode (a minimal free ROM
62 is included for this), which can be run like this:
63 \n\nxtrs -model 4p -diskdir /usr/share/xtrs
64 \n\nIf you already own a copy of the ROM software (e.g., if you have
65 a TRS-80 with this ROM), then you can make yourself a copy of this
66 for use with xtrs, using utilities available on the web. To load
67 your own ROM, specify the '-romfile' option, or the 'Xtrs.romfile'
68 X resource. ROM files can be in Intel hex or binary format."
69 readme.gentoo_create_doc