From d230a89bd3ecc0f2c0b91976013a58d161d35393 Mon Sep 17 00:00:00 2001 From: nathanw Date: Fri, 5 Feb 1999 07:38:14 +0000 Subject: Initial import of XCopilot package, a PalmPilot (tm) emulator. --- emulators/xcopilot/Makefile | 18 +++++++++ emulators/xcopilot/files/md5 | 3 ++ emulators/xcopilot/patches/patch-aa | 13 +++++++ emulators/xcopilot/patches/patch-ab | 13 +++++++ emulators/xcopilot/patches/patch-ac | 74 +++++++++++++++++++++++++++++++++++++ emulators/xcopilot/pkg/COMMENT | 1 + emulators/xcopilot/pkg/DESCR | 6 +++ emulators/xcopilot/pkg/PLIST | 3 ++ 8 files changed, 131 insertions(+) create mode 100644 emulators/xcopilot/Makefile create mode 100644 emulators/xcopilot/files/md5 create mode 100644 emulators/xcopilot/patches/patch-aa create mode 100644 emulators/xcopilot/patches/patch-ab create mode 100644 emulators/xcopilot/patches/patch-ac create mode 100644 emulators/xcopilot/pkg/COMMENT create mode 100644 emulators/xcopilot/pkg/DESCR create mode 100644 emulators/xcopilot/pkg/PLIST (limited to 'emulators') diff --git a/emulators/xcopilot/Makefile b/emulators/xcopilot/Makefile new file mode 100644 index 00000000000..1768860e814 --- /dev/null +++ b/emulators/xcopilot/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1.1.1 1999/02/05 07:38:14 nathanw Exp $ +# + +DISTNAME= xcopilot-0.6.6 +CATEGORIES= emulators +MASTER_SITES= http://xcopilot.cuspy.com/build/ + +MAINTAINER= nathanw@netbsd.org +HOMEPAGE= http://xcopilot.cuspy.com/ + +DEPENDS+= xpm-3.4k:../../graphics/xpm + +NOT_FOR_ARCHS= alpha # suspected LP64 bugs + +GNU_CONFIGURE= yes +USE_X11= yes + +.include "../../mk/bsd.pkg.mk" diff --git a/emulators/xcopilot/files/md5 b/emulators/xcopilot/files/md5 new file mode 100644 index 00000000000..3e9eace34bc --- /dev/null +++ b/emulators/xcopilot/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 1999/02/05 07:38:14 nathanw Exp $ + +MD5 (xcopilot-0.6.6.tar.gz) = 26f71da5d04d3ecffb60e5423b5ff95c diff --git a/emulators/xcopilot/patches/patch-aa b/emulators/xcopilot/patches/patch-aa new file mode 100644 index 00000000000..2462dd36084 --- /dev/null +++ b/emulators/xcopilot/patches/patch-aa @@ -0,0 +1,13 @@ +$NetBSD: patch-aa,v 1.1.1.1 1999/02/05 07:38:15 nathanw Exp $ + +--- Makefile.in.orig Wed Feb 3 11:22:56 1999 ++++ Makefile.in Wed Feb 3 11:27:24 1999 +@@ -93,7 +93,7 @@ + xcopilot_DEPENDENCIES = mc68k/libmc68k.a mx/libmx.a + xcopilot_LDFLAGS = + CFLAGS = @CFLAGS@ +-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) ++COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(X_CFLAGS) $(CFLAGS) + LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ + man1dir = $(mandir)/man1 + MANS = $(man_MANS) diff --git a/emulators/xcopilot/patches/patch-ab b/emulators/xcopilot/patches/patch-ab new file mode 100644 index 00000000000..623bc455bd4 --- /dev/null +++ b/emulators/xcopilot/patches/patch-ab @@ -0,0 +1,13 @@ +$NetBSD: patch-ab,v 1.1.1.1 1999/02/05 07:38:15 nathanw Exp $ + +--- mx/Makefile.in.orig Wed Feb 3 11:27:46 1999 ++++ mx/Makefile.in Wed Feb 3 11:27:07 1999 +@@ -102,7 +102,7 @@ + test_filesel_DEPENDENCIES = libmx.a + test_filesel_LDFLAGS = + CFLAGS = @CFLAGS@ +-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) ++COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(X_CFLAGS) $(CFLAGS) + LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ + DIST_COMMON = Makefile.am Makefile.in + diff --git a/emulators/xcopilot/patches/patch-ac b/emulators/xcopilot/patches/patch-ac new file mode 100644 index 00000000000..ac3f560abe4 --- /dev/null +++ b/emulators/xcopilot/patches/patch-ac @@ -0,0 +1,74 @@ +$NetBSD: patch-ac,v 1.1.1.1 1999/02/05 07:38:15 nathanw Exp $ + +--- mc68k/memory.c.orig Wed Feb 3 14:11:09 1999 ++++ mc68k/memory.c Fri Feb 5 01:28:39 1999 +@@ -377,6 +377,7 @@ + int i; + char *rombuf; + char *resetv; ++ void *tmpmemory; + int f; + struct stat st; + +@@ -405,12 +406,24 @@ + rom_size = pow_of_2; + } + +- rommemory = (UWORD*)mmap(0, rom_size, PROT_READ|PROT_WRITE, +- MAP_FILE|MAP_PRIVATE, f, 0); +- if (rommemory == (UWORD *)-1) { ++ /* mmap'ing a larger region than the underlying object does not work. ++ * Instead, mmap the actual object and copy into a power-of-two sized ++ * buffer. ++ */ ++ tmpmemory = mmap(0, st.st_size, PROT_READ|PROT_WRITE, ++ MAP_FILE|MAP_PRIVATE, f, 0); ++ if (tmpmemory == (void *)-1) { + return PILOTCPU_ERROR_LOADING_ROM; + } +- ++ ++ /* We want the end of the buffer to be zero-filled */ ++ rommemory = (UWORD *) calloc(1, rom_size); ++ if (rommemory == 0) { ++ return PILOTCPU_ERROR_LOADING_ROM; ++ } ++ memcpy(rommemory, tmpmemory, st.st_size); ++ munmap(tmpmemory, st.st_size); ++ + if (!nocheck) { + /* Check if the reset vector looks plausible */ + resetv = (char *)rommemory + +@@ -430,23 +443,15 @@ + offset = resetv - find_entrypoint((char *)rommemory); + } + +- /* Did we find it? If not, lets go with the original. */ +- if ((char *)offset != resetv) { +- /* It may not always be page aligned... */ +- pageoffset = ((offset-1) & ~(getpagesize() - 1)) + getpagesize(); +- +- if ((st.st_size + offset) > rom_size) +- rom_size <<= 1; +- +- rommemory = (UWORD *)mmap((void*)(rommemory + pageoffset), +- rom_size - pageoffset, +- PROT_READ | PROT_WRITE, +- MAP_FILE | MAP_PRIVATE | MAP_FIXED, f, 0); +- if (rommemory == (UWORD *)-1) +- return PILOTCPU_ERROR_LOADING_ROM; +- +- memcpy(((char *)rommemory) - offset, rommemory, 256); +- ((char *)rommemory) -= offset; ++ if (offset != 0) { ++ if ((st.st_size + offset) > rom_size) { ++ rom_size <<= 1; ++ rommemory = realloc(rommemory, rom_size); ++ if (rommemory == 0) ++ return PILOTCPU_ERROR_LOADING_ROM; ++ } ++ ++ memmove((char *)rommemory + offset, rommemory, st.st_size); + } + } + } diff --git a/emulators/xcopilot/pkg/COMMENT b/emulators/xcopilot/pkg/COMMENT new file mode 100644 index 00000000000..aeed95791d8 --- /dev/null +++ b/emulators/xcopilot/pkg/COMMENT @@ -0,0 +1 @@ +PalmPilot emulator for X. diff --git a/emulators/xcopilot/pkg/DESCR b/emulators/xcopilot/pkg/DESCR new file mode 100644 index 00000000000..3d75d6507a1 --- /dev/null +++ b/emulators/xcopilot/pkg/DESCR @@ -0,0 +1,6 @@ +XCopilot is an emulator for the 3Com/USRobotics +Pilot/PalmPilot/PalmIII that runs on Unix systems under X11. + +XCopilot is a Unix/X11 port of the copilot emulator, which was +originally written for Windows95. Greg Hewgill wrote copilot. +Ivan A. Curtis created XCopilot. diff --git a/emulators/xcopilot/pkg/PLIST b/emulators/xcopilot/pkg/PLIST new file mode 100644 index 00000000000..1d697b04187 --- /dev/null +++ b/emulators/xcopilot/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 1999/02/05 07:38:15 nathanw Exp $ +bin/xcopilot +man/man1/xcopilot.1 -- cgit v1.2.3