| 1 |
# Copyright 1999-2010 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/xtrs-4.9d.ebuild,v 1.6 2010/09/18 15:01:37 ulm Exp $
|
| 4 |
|
| 5 |
EAPI=3
|
| 6 |
|
| 7 |
inherit flag-o-matic toolchain-funcs
|
| 8 |
|
| 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
|
| 12 |
http://www.tim-mann.org/trs80/ld4-631.zip"
|
| 13 |
|
| 14 |
LICENSE="as-is"
|
| 15 |
SLOT="0"
|
| 16 |
KEYWORDS="amd64 ppc x86 ~x86-fbsd"
|
| 17 |
IUSE=""
|
| 18 |
|
| 19 |
DEPEND="sys-libs/ncurses
|
| 20 |
sys-libs/readline
|
| 21 |
>=x11-libs/libX11-1.0.0"
|
| 22 |
RDEPEND="${DEPEND}"
|
| 23 |
|
| 24 |
src_prepare() {
|
| 25 |
sed -i -e 's/$(CC) -o/$(CC) $(LDFLAGS) -o/' Makefile || die
|
| 26 |
}
|
| 27 |
|
| 28 |
src_compile() {
|
| 29 |
use ppc && append-flags -Dbig_endian
|
| 30 |
emake CC="$(tc-getCC)" DEBUG="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
|
| 31 |
DISKDIR="-DDISKDIR='\"/usr/share/xtrs\"'" \
|
| 32 |
DEFAULT_ROM="-DDEFAULT_ROM='\"/usr/share/xtrs/romimage\"' \
|
| 33 |
-DDEFAULT_ROM3='\"/usr/share/xtrs/romimage.m3\"' \
|
| 34 |
-DDEFAULT_ROM4P='\"/usr/share/xtrs/romimage.m4p\"'" \
|
| 35 |
|| die "emake failed"
|
| 36 |
}
|
| 37 |
|
| 38 |
src_install() {
|
| 39 |
dodir /usr/bin /usr/share/xtrs/disks /usr/share/man/man1
|
| 40 |
emake PREFIX="${D}"/usr install || die "emake install failed"
|
| 41 |
|
| 42 |
insopts -m0444
|
| 43 |
insinto /usr/share/xtrs/disks
|
| 44 |
doins cpmutil.dsk utility.dsk "${WORKDIR}"/ld4-631.dsk
|
| 45 |
dosym disks/ld4-631.dsk /usr/share/xtrs/disk4p-0
|
| 46 |
dosym disks/utility.dsk /usr/share/xtrs/disk4p-1
|
| 47 |
|
| 48 |
dodoc ChangeLog README xtrsrom4p.README cpmutil.html dskspec.html \
|
| 49 |
|| die "dodoc failed"
|
| 50 |
}
|
| 51 |
|
| 52 |
pkg_postinst() {
|
| 53 |
ewarn "For copyright reasons, xtrs does not include actual ROM images."
|
| 54 |
ewarn "Because of this, unless you supply your own ROM, xtrs will"
|
| 55 |
ewarn "not function in any mode except 'Model 4p' mode (a minimal"
|
| 56 |
ewarn "free ROM is included for this), which can be run like this:"
|
| 57 |
ewarn " xtrs -model 4p"
|
| 58 |
elog ""
|
| 59 |
elog "If you already own a copy of the ROM software (e.g., if you have"
|
| 60 |
elog "a TRS-80 with this ROM), then you can make yourself a copy of this"
|
| 61 |
elog "for use with xtrs using utilities available on the web. You can"
|
| 62 |
elog "also often find various ROMs elsewhere. To load your own ROM,"
|
| 63 |
elog "specify the '-romfile' option."
|
| 64 |
}
|