summaryrefslogtreecommitdiff
path: root/emulators/xtrs
diff options
context:
space:
mode:
authoris <is>2013-01-13 20:54:30 +0000
committeris <is>2013-01-13 20:54:30 +0000
commit9ffba280ec42deb6888a22b28195cdd341f0e897 (patch)
treef3b475cc32543c3576bee6982ed3e96ee6f3216d /emulators/xtrs
parentab335d8340f7e5802b7cb400f45b54d5bd14955f (diff)
downloadpkgsrc-9ffba280ec42deb6888a22b28195cdd341f0e897.tar.gz
Update to xtrs-4.9dnb1: enable sound support through OSS.
Diffstat (limited to 'emulators/xtrs')
-rw-r--r--emulators/xtrs/Makefile20
-rw-r--r--emulators/xtrs/PLIST3
-rw-r--r--emulators/xtrs/distinfo4
-rw-r--r--emulators/xtrs/patches/patch-trs_cassette.c11
4 files changed, 28 insertions, 10 deletions
diff --git a/emulators/xtrs/Makefile b/emulators/xtrs/Makefile
index 523c7a045b7..4dbf45eeff9 100644
--- a/emulators/xtrs/Makefile
+++ b/emulators/xtrs/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.17 2013/01/12 19:07:55 is Exp $
+# $NetBSD: Makefile,v 1.18 2013/01/13 20:54:30 is Exp $
#
DISTNAME= xtrs-4.9d
-#PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://www.tim-mann.org/trs80/
@@ -12,6 +12,8 @@ COMMENT= TRS-80 Model I/III/4 Emulator for Unix
BUILD_TARGET= default
+.include "../../mk/oss.buildlink3.mk"
+
SUBST_CLASSES+= mf
SUBST_STAGE.mf= post-patch
SUBST_FILES.mf= Makefile.local
@@ -19,17 +21,31 @@ SUBST_SED.mf= -e 's|/usr/local|${PREFIX}|g' \
-e 's|/usr/X11/|${X11PREFIX}/|g' \
-e 's|/usr/include/X11|${X11BASE}/include|g' \
-e 's|^\(LDFLAGS = \)-L/usr/X11R6/lib|\1-Wl,-R${X11BASE}/lib -L${X11BASE}/lib|g' \
+ -e 's|^\#EXTRALIBS.*|EXTRALIBS=${BUILDLINK_LDADD.oss}|'\
-e 's|/share/man|/man|g'
+SUBST_CLASSES+= oss
+SUBST_STAGE.oss= post-patch
+SUBST_FILES.oss= trs_cassette.c cassette
+.if ${OSS_TYPE} != none
+SUBST_SED.oss= -e 's|/dev/dsp|${DEVOSSSOUND}|g' \
+ -e 's|if __linux|if 1|'
+.endif
+
+
INSTALL_MAKE_FLAGS+= BINDIR=${DESTDIR}${PREFIX}/bin \
MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR}
INSTALLATION_DIRS= bin lib/xtrs ${PKGMANDIR}/man1 share/doc/xtrs share/xtrs
+pre-patch:
+ mv ${WRKSRC}/cassette.sh ${WRKSRC}/cassette
+
post-install:
${INSTALL_DATA} ${WRKSRC}/xtrsrom4p.hex ${DESTDIR}${PREFIX}/lib/xtrs/romimage.m4p
${INSTALL_DATA} ${WRKSRC}/xtrsrom4p.README ${DESTDIR}${PREFIX}/share/doc/xtrs
${INSTALL_DATA} ${WRKSRC}/utility.dsk ${DESTDIR}${PREFIX}/share/xtrs
${INSTALL_DATA} ${WRKSRC}/cpmutil.dsk ${DESTDIR}${PREFIX}/share/xtrs
+ ${INSTALL_SCRIPT} ${WRKSRC}/cassette ${DESTDIR}${PREFIX}/bin
.include "../../devel/ncurses/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
diff --git a/emulators/xtrs/PLIST b/emulators/xtrs/PLIST
index 13445877922..06935bda12a 100644
--- a/emulators/xtrs/PLIST
+++ b/emulators/xtrs/PLIST
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST,v 1.3 2013/01/12 19:26:51 is Exp $
+@comment $NetBSD: PLIST,v 1.4 2013/01/13 20:54:30 is Exp $
+bin/cassette
bin/cmddump
bin/hex2cmd
bin/mkdisk
diff --git a/emulators/xtrs/distinfo b/emulators/xtrs/distinfo
index 7178e8a04ea..4aecf253f64 100644
--- a/emulators/xtrs/distinfo
+++ b/emulators/xtrs/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.6 2013/01/12 19:07:55 is Exp $
+$NetBSD: distinfo,v 1.7 2013/01/13 20:54:30 is Exp $
SHA1 (xtrs-4.9d.tar.gz) = 72b99ede6e8024b8ade4f8aa22eb073078576e74
RMD160 (xtrs-4.9d.tar.gz) = 009786b70fe1006d552b1d89ac2b74247b17e03f
Size (xtrs-4.9d.tar.gz) = 455355 bytes
-SHA1 (patch-trs_cassette.c) = 44c1a8617a4b9d984aa1b740ca14b5a471acad79
+SHA1 (patch-trs_cassette.c) = 1f129feecf54b2165d993f0fa2dbfac63bdb146f
SHA1 (patch-trs_disk.c) = b43c7592db9a183b69bc2b17a7ddc4a1e32713e4
SHA1 (patch-trs_xinterface.c) = e2190ea74f38d2cfc8fb7e8d17c5e889490aaa48
diff --git a/emulators/xtrs/patches/patch-trs_cassette.c b/emulators/xtrs/patches/patch-trs_cassette.c
index 145412004fb..31552ff0eca 100644
--- a/emulators/xtrs/patches/patch-trs_cassette.c
+++ b/emulators/xtrs/patches/patch-trs_cassette.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-trs_cassette.c,v 1.1 2013/01/12 19:07:55 is Exp $
+$NetBSD: patch-trs_cassette.c,v 1.2 2013/01/13 20:54:31 is Exp $
--- trs_cassette.c.orig 2008-06-26 04:40:13.000000000 +0000
+++ trs_cassette.c
-@@ -234,15 +234,17 @@ static long wave_dataid_offset = WAVE_DA
+@@ -234,15 +234,19 @@ static long wave_dataid_offset = WAVE_DA
static long wave_datasize_offset = WAVE_DATASIZE_OFFSET;
static long wave_data_offset = WAVE_DATA_OFFSET;
@@ -15,13 +15,14 @@ $NetBSD: patch-trs_cassette.c,v 1.1 2013/01/12 19:07:55 is Exp $
/* ioport of the SoundBlaster command register. 0 means none */
static unsigned char sb_cassette_volume[4];
static unsigned char sb_sound_volume[2];
--#endif /*SB_SOUND*/
+ #endif /*SB_SOUND*/
++#if SB_SOUND || OSS_SOUND
static unsigned int sb_address=0;
-+#endif /*SB_SOUND*/
++#endif
static int sb_volume = 0;
/* Put a 2-byte quantity to a file in little-endian order */
-@@ -1221,11 +1223,13 @@ trs_sound_out(int value)
+@@ -1221,11 +1225,13 @@ trs_sound_out(int value)
#endif
}