diff options
author | Joe Peterson <lavajoe@gentoo.org> | 2008-06-26 23:50:49 +0000 |
---|---|---|
committer | Joe Peterson <lavajoe@gentoo.org> | 2008-06-26 23:50:49 +0000 |
commit | 59688b197e26440a6afa51f1baec05eb0d25d625 (patch) | |
tree | f273aaeebdf3615b7542a1d0cd9b90515cbfd16d /app-emulation/xtrs | |
parent | Version bump, bug #146871 (diff) | |
download | gentoo-2-59688b197e26440a6afa51f1baec05eb0d25d625.tar.gz gentoo-2-59688b197e26440a6afa51f1baec05eb0d25d625.tar.bz2 gentoo-2-59688b197e26440a6afa51f1baec05eb0d25d625.zip |
Add upstream fix for kbwait; disable SIGIO; change default model back to 1
(Portage version: 2.1.4.4)
Diffstat (limited to 'app-emulation/xtrs')
-rw-r--r-- | app-emulation/xtrs/ChangeLog | 8 | ||||
-rw-r--r-- | app-emulation/xtrs/files/xtrs-4.9c-r2-gentoo.patch | 60 | ||||
-rw-r--r-- | app-emulation/xtrs/xtrs-4.9c-r2.ebuild | 66 |
3 files changed, 133 insertions, 1 deletions
diff --git a/app-emulation/xtrs/ChangeLog b/app-emulation/xtrs/ChangeLog index ba4c08093b3b..1457702de00c 100644 --- a/app-emulation/xtrs/ChangeLog +++ b/app-emulation/xtrs/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-emulation/xtrs # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/ChangeLog,v 1.27 2008/05/01 09:37:15 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/ChangeLog,v 1.28 2008/06/26 23:50:48 lavajoe Exp $ + +*xtrs-4.9c-r2 (26 Jun 2008) + + 26 Jun 2008; Joe Peterson <lavajoe@gentoo.org> + +files/xtrs-4.9c-r2-gentoo.patch, +xtrs-4.9c-r2.ebuild: + Add upstream fix for kbwait; disable SIGIO; change default model back to 1 01 May 2008; Ulrich Mueller <ulm@gentoo.org> -xtrs-4.9c.ebuild: Remove old. diff --git a/app-emulation/xtrs/files/xtrs-4.9c-r2-gentoo.patch b/app-emulation/xtrs/files/xtrs-4.9c-r2-gentoo.patch new file mode 100644 index 000000000000..27f1ee1a0fcc --- /dev/null +++ b/app-emulation/xtrs/files/xtrs-4.9c-r2-gentoo.patch @@ -0,0 +1,60 @@ +diff -Nurp xtrs-4.9c-orig/ChangeLog xtrs-4.9c/ChangeLog +--- xtrs-4.9c-orig/ChangeLog 2006-05-14 18:55:28.000000000 -0600 ++++ xtrs-4.9c/ChangeLog 2008-06-26 16:57:23.000000000 -0600 +@@ -1,3 +1,13 @@ ++4.9c-Gentoo -- Thu Jun 26 16:57:16 MDT 2008 -- Joe Peterson <joe@skyrush.com> ++ ++* Patched for Gentoo ebuild ++ - Added assignment to volatile variable in the z80 delay loop ++ (allows near-actual speed emulation with optimization) ++ - Fixed keyboard wait issue that caused CPU spinning (i.e. max ++ CPU usage) after using F10 (reset), F7, F8, or F9. ++ - Disable SIGIO ++ - Added NEWDOS/80 system date/time auto-initialization ++ + 4.9c -- Sun May 14 17:54:25 PDT 2006 -- Tim Mann + + * Fixed the new -e flag on import/cmd and export/cmd to actually +diff -Nurp xtrs-4.9c-orig/Makefile xtrs-4.9c/Makefile +--- xtrs-4.9c-orig/Makefile 2006-05-13 15:10:25.000000000 -0600 ++++ xtrs-4.9c/Makefile 2008-06-26 16:48:15.000000000 -0600 +@@ -143,7 +143,7 @@ z80code: $(Z80CODE) + include Makefile.local + + CFLAGS = $(DEBUG) $(ENDIAN) $(DEFAULT_ROM) $(READLINE) $(DISKDIR) $(IFLAGS) \ +- $(APPDEFAULTS) -DKBWAIT -DHAVE_SIGIO ++ $(APPDEFAULTS) -DKBWAIT + LIBS = $(XLIB) $(READLINELIBS) $(EXTRALIBS) + + ZMACFLAGS = -h +diff -Nurp xtrs-4.9c-orig/trs_keyboard.c xtrs-4.9c/trs_keyboard.c +--- xtrs-4.9c-orig/trs_keyboard.c 2006-05-13 14:50:17.000000000 -0600 ++++ xtrs-4.9c/trs_keyboard.c 2008-06-26 16:46:03.000000000 -0600 +@@ -998,12 +998,12 @@ int trs_next_key(int wait) + if ((z80_state.nmi && !z80_state.nmi_seen) || + (z80_state.irq && z80_state.iff1) || + trs_event_scheduled() || key_immediate) { ++ key_immediate = 0; + rval = -1; + break; + } + trs_paused = 1; +- pause(); /* Wait for SIGALRM or SIGIO */ +- key_immediate = 0; ++ pause(); /* Wait for SIGALRM */ + trs_get_event(0); + } + return rval; +diff -Nurp xtrs-4.9c-orig/z80.c xtrs-4.9c/z80.c +--- xtrs-4.9c-orig/z80.c 2005-05-22 00:57:01.000000000 -0600 ++++ xtrs-4.9c/z80.c 2008-06-26 16:44:32.000000000 -0600 +@@ -3027,7 +3027,8 @@ int z80_run(int continuous) + #endif + /* Speed control */ + if ((i = z80_state.delay)) { +- while (--i) /*nothing*/; ++ volatile int dummy; ++ while (--i) dummy = i; + } + + instruction = mem_read(REG_PC++); diff --git a/app-emulation/xtrs/xtrs-4.9c-r2.ebuild b/app-emulation/xtrs/xtrs-4.9c-r2.ebuild new file mode 100644 index 000000000000..63ee9a47c0e8 --- /dev/null +++ b/app-emulation/xtrs/xtrs-4.9c-r2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/xtrs-4.9c-r2.ebuild,v 1.1 2008/06/26 23:50:48 lavajoe Exp $ + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Radio Shack TRS-80 emulator" +HOMEPAGE="http://www.tim-mann.org/xtrs.html" +SRC_URI="http://www.tim-mann.org/trs80/${P}.tar.gz + http://home.gwi.net/~plemon/support/disks/xtrs/ld4-631.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" +IUSE="" + +DEPEND="sys-libs/ncurses + sys-libs/readline + >=x11-libs/libX11-1.0.0" + +src_unpack() { + unpack ${P}.tar.gz + tar xzf "${DISTDIR}/ld4-631.tar.gz" disks || die "tar failed" + + cd "${S}" + epatch "${FILESDIR}/${PF}-gentoo.patch" + epatch "${FILESDIR}/${P}-newdos-datetime.patch" +} + +src_compile() { + use ppc && append-flags -Dbig_endian + emake CC="$(tc-getCC)" DEBUG="${CFLAGS}" \ + DISKDIR="-DDISKDIR='\"/usr/share/xtrs\"'" \ + DEFAULT_ROM="-DDEFAULT_ROM='\"/usr/share/xtrs/romimage\"' \ + -DDEFAULT_ROM3='\"/usr/share/xtrs/romimage.m3\"' \ + -DDEFAULT_ROM4P='\"/usr/share/xtrs/romimage.m4p\"'" \ + || die "emake failed" +} + +src_install() { + dodir /usr/bin /usr/share/xtrs/disks /usr/share/man/man1 + emake PREFIX="${D}"/usr install || die "emake install failed" + + insopts -m0444 + insinto /usr/share/xtrs/disks + doins cpmutil.dsk utility.dsk "${WORKDIR}"/disks/ld4-631.dsk + dosym disks/ld4-631.dsk /usr/share/xtrs/disk4p-0 + dosym disks/utility.dsk /usr/share/xtrs/disk4p-1 + + dodoc ChangeLog README xtrsrom4p.README cpmutil.html dskspec.html \ + || die "dodoc failed" +} + +pkg_postinst() { + ewarn "For copyright reasons, xtrs does not include actual ROM images." + ewarn "Because of this, unless you supply your own ROM, xtrs will" + ewarn "not function in any mode except 'Model 4p' mode (a minimal" + ewarn "free ROM is included for this), which can be run like this:" + ewarn " xtrs -model 4p" + elog "" + elog "If you already own a copy of the ROM software (e.g., if you have" + elog "a TRS-80 with this ROM), then you can make yourself a copy of this" + elog "for use with xtrs using utilities available on the web. You can" + elog "also often find various ROMs elsewhere. To load your own ROM," + elog "specify the '-romfile' option." +} |