Bug 53912

Summary: Enhancements to emulators/x48
Product: Ports & Packages Reporter: Pedro F. Giffuni <giffunip>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Pedro F. Giffuni 2003-06-30 02:00:08 UTC
ROMs for the HP48G and HP48SX were made available freely by HP
around year 2000! Some other packages (the MacOSX port of x48,
notably) include several ROMS with the emulator.

As a proud owner of one of these, I found the process of
obtaining the ROM image very unconfortable so I added the ROM to
the package.

While here, I also looked around the NetBSD and OpenBSD ports
(or packages) and I added some patches from them.

Fix: ______________________________________________________________________
Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il filtro Anti-spam
http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/
--0-49313006-1056934261=:73191
Content-Type: text/plain; name=patch-x48
Content-Description: patch-x48
Content-Disposition: inline; filename=patch-x48



--0-49313006-1056934261=:73191----jgvHxsbdcTN5oDpgioU3y3n43vRNB7sCM4INdq7gDSmNcH0H
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -ruN x48.orig/Makefile x48/Makefile
--- x48.orig/Makefile	Fri Jun 27 22:25:02 2003
+++ x48/Makefile	Sun Jun 29 19:27:30 2003
@@ -9,18 +9,28 @@
 PORTVERSION=	0.4.1e
 CATEGORIES=	emulators
 MASTER_SITES=	http://www.hpcalc.org/hp48/pc/emulators/
-DISTNAME=	${PORTNAME}-${PORTVERSION:S/.//g}
-EXTRACT_SUFX=	.tgz
+DISTFILES=	${PORTNAME}-${PORTVERSION:S/.//g}.tgz \
+		gxrom-r.zip
+EXTRACT_ONLY=	${PORTNAME}-${PORTVERSION:S/.//g}.tgz
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	An HP48sx emulator
+COMMENT=	A HP48 SX/GX calculator emulator
+
+BUILD_DEPENDS=	unzip:${PORTSDIR}/archivers/unzip
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S/e//}
 
 USE_IMAKE=	yes
 NO_INSTALL_MANPAGES=	yes
+USE_REINPLACE=	yes
+ROMPATH=	${PREFIX}/share/x48
 
+post-patch:
+	@${REINPLACE_CMD} -e 's+rom.dump+${ROMPATH}/gxrom-r+' \
+		${WRKSRC}/src/dump2rom.c ${WRKSRC}/src/X48.ad
 post-install:
+	@${MKDIR} ${ROMPATH}
+	@unzip ${DISTDIR}/${DISTSUBDIR}/gxrom-r	-d ${ROMPATH}
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 .for file in README doc/CARDS.doc doc/ROMDump.doc
diff -ruN x48.orig/distinfo x48/distinfo
--- x48.orig/distinfo	Fri Jun 27 22:25:02 2003
+++ x48/distinfo	Sat Jun 28 18:42:10 2003
@@ -1 +1,3 @@
 MD5 (x48-041e.tgz) = 0f03da2cea0ca3fd690dcae00f088faa
+MD5 (gxrom-r.zip) = e4ec80ac325313b006b8c94d9be8db5a
+MD5 (sxrom-j.zip) = 8f61e9ee00562e94c485028eac311cf8
diff -ruN x48.orig/files/patch-Imakefile x48/files/patch-Imakefile
--- x48.orig/files/patch-Imakefile	Wed Dec 31 19:00:00 1969
+++ x48/files/patch-Imakefile	Sat Jun 28 20:41:20 2003
@@ -0,0 +1,49 @@
+--- src/Imakefile.orig	Sun Jul  4 17:04:21 1999
++++ src/Imakefile	Sat Jun 28 19:01:04 2003
+@@ -60,7 +60,7 @@
+       LDOPTIONS = LDOPTIONS_DEF
+ #endif
+ 
+-        DEFINES = -I/usr/openwin/include UNIX_DEF XSHM_DEF READLINE_DEF
++        DEFINES = UNIX_DEF XSHM_DEF READLINE_DEF
+            HDRS = annunc.h append.h buttons.h constants.h debugger.h \
+                   device.h disasm.h errors.h global.h hp.h hp48.h \
+                   hp48_emu.h hp48char.h icon.h mmu.h options.h resources.h \
+@@ -87,9 +87,9 @@
+              CO = co -l
+        TARFILES = Imakefile X48.ad $(TARS1) $(SRCS2) $(SRCS3) $(SRCS4) $(HDRS)
+ 
+-all:: $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard
++all:: x48 dump2rom checkrom mkcard
+ 
+-       PROGRAMS = $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard
++       PROGRAMS = x48 dump2rom checkrom mkcard
+ 
+ depend:: version.c X48.ad.h
+ 
+@@ -102,16 +102,20 @@
+ 	RemoveTargetProgram($@)                                         @@\
+ 	$(CC) -o $@ $(LDOPTIONS) $(OBJS4) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+                                                                         @@\
+-SaberProgramTarget(program,$(SRCS4),$(OBJS4),locallib,syslib)           @@\
+                                                                         @@\
+ InstallProgram(program,$(BINDIR))                                       @@\
+ InstallManPage(program,$(MANDIR))
+ #endif /* ComplexProgramTarget_4 */
+ 
+-ComplexProgramTarget_1($(BIN)/x48, $(X48LIBS),)
+-ComplexProgramTarget_2($(BIN)/dump2rom,,)
+-ComplexProgramTarget_3($(BIN)/checkrom,,)
+-ComplexProgramTarget_4($(BIN)/mkcard,,)
++NormalProgramTarget(x48, $(OBJS1),, $(X48LIBS),)
++NormalProgramTarget(dump2rom, $(OBJS2),,,)
++NormalProgramTarget(checkrom, $(OBJS3),,,)
++NormalProgramTarget(mkcard, $(OBJS4),,,)
++
++InstallProgram(x48, $(BINDIR))
++InstallProgram(dump2rom, $(BINDIR))
++InstallProgram(checkrom, $(BINDIR))
++InstallProgram(mkcard, $(BINDIR))
+ 
+ InstallAppDefaults(X48)
+ 
diff -ruN x48.orig/files/patch-ab x48/files/patch-ab
--- x48.orig/files/patch-ab	Fri Jun 27 22:25:02 2003
+++ x48/files/patch-ab	Wed Dec 31 19:00:00 1969
@@ -1,17 +0,0 @@
---- config.h.orig	Tue Jun 29 07:36:58 1999
-+++ config.h	Tue Aug 15 20:52:55 2000
-@@ -56,12 +56,12 @@
- /*
-  * Which Compiler to use:
-  */
--#define CC_DEF gcc
-+/* #define CC_DEF gcc */
- 
- /*
-  * Which Optimization Flags:
-  */
--#define CDEBUGFLAGS_DEF -O6 -Wall
-+/* #define CDEBUGFLAGS_DEF -O6 -Wall */
- 
- /*
-  * Which Flags to pass to the Linker:
diff -ruN x48.orig/files/patch-ac x48/files/patch-ac
--- x48.orig/files/patch-ac	Fri Jun 27 22:25:02 2003
+++ x48/files/patch-ac	Wed Dec 31 19:00:00 1969
@@ -1,49 +0,0 @@
---- src/Imakefile.orig	Thu Jun 17 00:32:19 1999
-+++ src/Imakefile	Sat Oct 14 13:22:30 2000
-@@ -60,7 +60,7 @@
-       LDOPTIONS = LDOPTIONS_DEF
- #endif
- 
--        DEFINES = -I/usr/openwin/include UNIX_DEF XSHM_DEF READLINE_DEF
-+        DEFINES = UNIX_DEF XSHM_DEF READLINE_DEF
-            HDRS = annunc.h append.h buttons.h constants.h debugger.h \
-                   device.h disasm.h errors.h global.h hp.h hp48.h \
-                   hp48_emu.h hp48char.h icon.h mmu.h options.h resources.h \
-@@ -87,9 +87,9 @@
-              CO = co -l
-        TARFILES = Imakefile X48.ad $(TARS1) $(SRCS2) $(SRCS3) $(SRCS4) $(HDRS)
- 
--all:: $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard
-+all:: x48 dump2rom checkrom mkcard
- 
--       PROGRAMS = $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard
-+       PROGRAMS = x48 dump2rom checkrom mkcard
- 
- depend:: version.c X48.ad.h
- 
-@@ -102,16 +102,20 @@
- 	RemoveTargetProgram($@)                                         @@\
- 	$(CC) -o $@ $(LDOPTIONS) $(OBJS4) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
-                                                                         @@\
--SaberProgramTarget(program,$(SRCS4),$(OBJS4),locallib,syslib)           @@\
-                                                                         @@\
- InstallProgram(program,$(BINDIR))                                       @@\
- InstallManPage(program,$(MANDIR))
- #endif /* ComplexProgramTarget_4 */
- 
--ComplexProgramTarget_1($(BIN)/x48, $(X48LIBS),)
--ComplexProgramTarget_2($(BIN)/dump2rom,,)
--ComplexProgramTarget_3($(BIN)/checkrom,,)
--ComplexProgramTarget_4($(BIN)/mkcard,,)
-+NormalProgramTarget(x48, $(OBJS1),, $(X48LIBS),)
-+NormalProgramTarget(dump2rom, $(OBJS2),,,)
-+NormalProgramTarget(checkrom, $(OBJS3),,,)
-+NormalProgramTarget(mkcard, $(OBJS4),,,)
-+
-+InstallProgram(x48, $(BINDIR))
-+InstallProgram(dump2rom, $(BINDIR))
-+InstallProgram(checkrom, $(BINDIR))
-+InstallProgram(mkcard, $(BINDIR))
- 
- InstallAppDefaults(X48)
- 
diff -ruN x48.orig/files/patch-ad x48/files/patch-ad
--- x48.orig/files/patch-ad	Fri Jun 27 22:25:02 2003
+++ x48/files/patch-ad	Wed Dec 31 19:00:00 1969
@@ -1,112 +0,0 @@
---- src/serial.c.orig	Tue Jun 29 07:12:29 1999
-+++ src/serial.c	Tue Aug 15 20:46:02 2000
-@@ -77,6 +77,8 @@
- #ifdef SOLARIS
- #include <sys/stream.h>
- #include <sys/stropts.h>
-+#endif
-+#if defined(SOLARIS) || defined(__FreeBSD__) || defined (__bsdi__)
- #include <sys/termios.h>
- #endif
- 
-@@ -238,7 +240,7 @@
- 
-   if (ttyp >= 0)
-     {
--#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined(__FreeBSD__) || defined (__bsdi__)
-       if (tcgetattr(ttyp, &ttybuf) < 0)
- #else
-       if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
-@@ -263,7 +265,7 @@
- 
-   if (ttyp >= 0)
-     {
--#if defined(SUNOS) || defined (HPUX)
-+#if defined(SUNOS) || defined (HPUX) || defined(__FreeBSD__) || defined (__bsdi__)
-       if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0)
- #else
-       if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0)
-@@ -291,7 +293,7 @@
- 
-   if (ir_fd >= 0)
-     {
--#if defined(SUNOS) || defined (HPUX)
-+#if defined(SUNOS) || defined (HPUX) || defined (__FreeBSD__) || defined (__bsdi__)
-       if (tcgetattr(ir_fd, &ttybuf) < 0)
- #else
-       if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
-@@ -315,7 +317,7 @@
- 
-   if (ir_fd >= 0)
-     {
--#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined (__bsdi__)
-       if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
- #else
-       if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
-@@ -344,7 +346,7 @@
- 
-   if (ir_fd >= 0)
-     {
--#if defined(SUNOS) || defined (HPUX)
-+#if defined(SUNOS) || defined (HPUX) || defined (__FreeBSD__) || defined (__bsdi__)
-       if (tcgetattr(ir_fd, &ttybuf) < 0)
- #else
-       if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
-@@ -358,6 +360,10 @@
-         }
-     }
- 
-+#if defined(__FreeBSD__) || defined(__bsdi__)
-+  cfsetspeed(&ttybuf, baud);
-+#else
-+
-   ttybuf.c_cflag &= ~CBAUD;
- 
-   baud &= 0x7;
-@@ -404,9 +410,11 @@
-       ttybuf.c_cflag |= B9600;
-     }
- 
-+#endif /* FreeBSD */
-+
-   if (ir_fd >= 0)
-     {
--#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined(__bsdi__)
-       if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
- #else
-       if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
-@@ -422,7 +430,7 @@
- 
-   if (ttyp >= 0)
-     {
--#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined(__bsdi__)
-       if (tcgetattr(ttyp, &ttybuf) < 0)
- #else
-       if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
-@@ -437,6 +445,9 @@
-         }
-     }
- 
-+#if defined(__FreeBSD__) || defined(__bsdi__)
-+  cfsetspeed(&ttybuf, baud);
-+#else
-   ttybuf.c_cflag &= ~CBAUD;
- 
-   baud &= 0x7;
-@@ -482,10 +493,11 @@
-         fprintf(stderr, "%s: can\'t set baud rate, using 9600\n", progname);
-       ttybuf.c_cflag |= B9600;
-     }
-+#endif
- 
-   if (ttyp >= 0)
-     {
--#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined(__bsdi__)
-       if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0)
- #else
-       if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0)
diff -ruN x48.orig/files/patch-ae x48/files/patch-ae
--- x48.orig/files/patch-ae	Fri Jun 27 22:25:02 2003
+++ x48/files/patch-ae	Wed Dec 31 19:00:00 1969
@@ -1,11 +0,0 @@
---- src/x48_x11.c.orig	Tue Jun 29 07:12:29 1999
-+++ src/x48_x11.c	Tue Aug 15 22:30:17 2000
-@@ -3605,6 +3605,8 @@
-       break;
-     case XK_Alt_L:
-     case XK_Alt_R:
-+    case XK_Meta_L:
-+    case XK_Meta_R:
-       key_event(BUTTON_ALPHA, xev);
-       wake = 1;
-       break;
diff -ruN x48.orig/files/patch-config.h x48/files/patch-config.h
--- x48.orig/files/patch-config.h	Wed Dec 31 19:00:00 1969
+++ x48/files/patch-config.h	Sat Jun 28 21:41:09 2003
@@ -0,0 +1,17 @@
+--- config.h.orig	Mon Jun 28 17:36:58 1999
++++ config.h	Sat Jun 28 21:40:54 2003
+@@ -56,12 +56,12 @@
+ /*
+  * Which Compiler to use:
+  */
+-#define CC_DEF gcc
++/* #define CC_DEF gcc */
+ 
+ /*
+  * Which Optimization Flags:
+  */
+-#define CDEBUGFLAGS_DEF -O6 -Wall
++/* #define CDEBUGFLAGS_DEF -O6 -Wall */
+ 
+ /*
+  * Which Flags to pass to the Linker:
diff -ruN x48.orig/files/patch-src+X48.ad x48/files/patch-src+X48.ad
--- x48.orig/files/patch-src+X48.ad	Wed Dec 31 19:00:00 1969
+++ x48/files/patch-src+X48.ad	Sun Jun 29 10:47:28 2003
@@ -0,0 +1,13 @@
+--- src/X48.ad.orig	Wed Jan 11 13:24:05 1995
++++ src/X48.ad	Sun Jun 29 10:46:17 2003
+@@ -49,8 +49,8 @@
+ ! resources controlling the connections
+ !
+ *useTerminal:		True
+-*useSerial:		False
+-*serialLine:		/dev/ttyS0
++*useSerial:		True
++*serialLine:		/dev/cuaa0
+ 
+ !
+ ! stuff controlling initialization
diff -ruN x48.orig/files/patch-src+dump2rom.c x48/files/patch-src+dump2rom.c
--- x48.orig/files/patch-src+dump2rom.c	Wed Dec 31 19:00:00 1969
+++ x48/files/patch-src+dump2rom.c	Sun Jun 29 10:44:56 2003
@@ -0,0 +1,12 @@
+--- src/dump2rom.c.orig	Tue Sep  7 10:41:48 1999
++++ src/dump2rom.c	Sun Jun 29 10:44:05 2003
+@@ -130,8 +130,7 @@
+ {
+   FILE *dump;
+   long addr, size;
+-  char ch;
+-  int i, gx, error;
++  int ch, i, gx, error;
+ 
+   if (argc < 2) {
+     fprintf(stderr, "usage: %s hp48-dump-file\n", argv[0]);
diff -ruN x48.orig/files/patch-src+hp48.h x48/files/patch-src+hp48.h
--- x48.orig/files/patch-src+hp48.h	Wed Dec 31 19:00:00 1969
+++ x48/files/patch-src+hp48.h	Sat Jun 28 20:53:13 2003
@@ -0,0 +1,11 @@
+--- src/hp48.h.orig	Sat Jun 28 20:50:52 2003
++++ src/hp48.h	Sat Jun 28 20:52:14 2003
+@@ -246,7 +246,7 @@
+ 
+   word_8	unknown2;
+ 
+-  char		timer1;		/* may NOT be unsigned !!! */
++  signed char	timer1;		/* may NOT be unsigned !!! */
+   word_32	timer2;
+ 
+   long		t1_instr;
diff -ruN x48.orig/files/patch-src+serial.c x48/files/patch-src+serial.c
--- x48.orig/files/patch-src+serial.c	Wed Dec 31 19:00:00 1969
+++ x48/files/patch-src+serial.c	Sat Jun 28 21:27:34 2003
@@ -0,0 +1,121 @@
+--- src/serial.c.orig	Tue Sep  7 10:41:48 1999
++++ src/serial.c	Sat Jun 28 21:27:06 2003
+@@ -69,7 +69,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <sys/time.h>
+-#if defined(LINUX) || defined(HPUX)
++#if defined(LINUX) || defined(HPUX) || defined(CSRG_BASED)
+ #include <sys/ioctl.h>
+ #endif
+ #include <unistd.h>
+@@ -77,6 +77,8 @@
+ #ifdef SOLARIS
+ #include <sys/stream.h>
+ #include <sys/stropts.h>
++#endif
++#if defined(SOLARIS) || defined(CSRG_BASED)
+ #include <sys/termios.h>
+ #endif
+ 
+@@ -238,7 +240,7 @@
+ 
+   if (ttyp >= 0)
+     {
+-#if defined(SUNOS) || defined(HPUX)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
+       if (tcgetattr(ttyp, &ttybuf) < 0)
+ #else
+       if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
+@@ -263,7 +265,7 @@
+ 
+   if (ttyp >= 0)
+     {
+-#if defined(SUNOS) || defined (HPUX)
++#if defined(SUNOS) || defined (HPUX) || defined(CSRG_BASED)
+       if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0)
+ #else
+       if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0)
+@@ -291,7 +293,7 @@
+ 
+   if (ir_fd >= 0)
+     {
+-#if defined(SUNOS) || defined (HPUX)
++#if defined(SUNOS) || defined (HPUX) || defined (CSRG_BASED)
+       if (tcgetattr(ir_fd, &ttybuf) < 0)
+ #else
+       if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
+@@ -315,7 +317,7 @@
+ 
+   if (ir_fd >= 0)
+     {
+-#if defined(SUNOS) || defined(HPUX)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
+       if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
+ #else
+       if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
+@@ -344,7 +346,7 @@
+ 
+   if (ir_fd >= 0)
+     {
+-#if defined(SUNOS) || defined (HPUX)
++#if defined(SUNOS) || defined (HPUX) || defined (CSRG_BASED)
+       if (tcgetattr(ir_fd, &ttybuf) < 0)
+ #else
+       if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
+@@ -358,6 +360,10 @@
+         }
+     }
+ 
++#if defined(CSRG_BASED)
++  cfsetspeed(&ttybuf, baud);
++#else
++
+   ttybuf.c_cflag &= ~CBAUD;
+ 
+   baud &= 0x7;
+@@ -404,9 +410,11 @@
+       ttybuf.c_cflag |= B9600;
+     }
+ 
++#endif /* CSRG_BASED */
++
+   if (ir_fd >= 0)
+     {
+-#if defined(SUNOS) || defined(HPUX)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
+       if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
+ #else
+       if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
+@@ -422,7 +430,7 @@
+ 
+   if (ttyp >= 0)
+     {
+-#if defined(SUNOS) || defined(HPUX)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
+       if (tcgetattr(ttyp, &ttybuf) < 0)
+ #else
+       if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
+@@ -437,6 +445,9 @@
+         }
+     }
+ 
++#if defined(CSRG_BASED)
++  cfsetspeed(&ttybuf, baud);
++#else
+   ttybuf.c_cflag &= ~CBAUD;
+ 
+   baud &= 0x7;
+@@ -482,10 +493,11 @@
+         fprintf(stderr, "%s: can\'t set baud rate, using 9600\n", progname);
+       ttybuf.c_cflag |= B9600;
+     }
++#endif
+ 
+   if (ttyp >= 0)
+     {
+-#if defined(SUNOS) || defined(HPUX)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
+       if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0)
+ #else
+       if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0)
diff -ruN x48.orig/files/patch-src+x48_x11.c x48/files/patch-src+x48_x11.c
--- x48.orig/files/patch-src+x48_x11.c	Wed Dec 31 19:00:00 1969
+++ x48/files/patch-src+x48_x11.c	Sat Jun 28 20:57:02 2003
@@ -0,0 +1,19 @@
+--- src/x48_x11.c.orig	Thu Sep  9 01:05:58 1999
++++ src/x48_x11.c	Sat Jun 28 20:55:35 2003
+@@ -4108,6 +4108,7 @@
+       break;
+     case XK_KP_Add:
+     case XK_plus:
++    case XK_equal:
+       key_event(BUTTON_PLUS, xev);
+       wake = 1;
+       break;
+@@ -4168,6 +4169,8 @@
+       break;
+     case XK_Alt_L:
+     case XK_Alt_R:
++    case XK_Meta_L:
++    case XK_Meta_R:
+       key_event(BUTTON_ALPHA, xev);
+       wake = 1;
+       break;
diff -ruN x48.orig/files/src+X48.ad x48/files/src+X48.ad
--- x48.orig/files/src+X48.ad	Wed Dec 31 19:00:00 1969
+++ x48/files/src+X48.ad	Sat Jun 28 22:27:40 2003
@@ -0,0 +1,19 @@
+--- src/X48.ad.orig	Sat Jun 28 22:22:06 2003
++++ src/X48.ad	Sat Jun 28 22:26:22 2003
+@@ -50,14 +50,14 @@
+ !
+ *useTerminal:		True
+ *useSerial:		False
+-*serialLine:		/dev/ttyS0
++*serialLine:		/dev/cuaa0
+ 
+ !
+ ! stuff controlling initialization
+ !
+ *completeInitialize:	False
+ *resetOnStartup:	False
+-*romFileName:		rom.dump
++*romFileName:		gxrom-r
+ *homeDirectory:		.hp48
+ 
+ !
diff -ruN x48.orig/pkg-descr x48/pkg-descr
--- x48.orig/pkg-descr	Fri Jun 27 22:25:02 2003
+++ x48/pkg-descr	Sun Jun 29 19:26:36 2003
@@ -1,10 +1,6 @@
 This emulator is capable of providing a faithful replication of the
-HP48. In order to do so, it requires a copy of the ROM software
-from YOUR calculator. In order to avoid breaking copyright laws,
-and upsetting HP, you MUST BE THE PROUD OWNER OF AN HP48 before
-running this program. Of course you can run this program without a
-copy of the ROM software in order to write trivial machine code
-programs but you will not be able to access any of the calculator
-functionality.
+HP48. 
+Around mid 2000, Hewlett Packard has gratituoslys made available the 
+ROMs required to run package.
 
-WWW: http://home.earthlink.net/~rmmlgetz/
+WWW:	http://www.hp.com/calculators
diff -ruN x48.orig/pkg-plist x48/pkg-plist
--- x48.orig/pkg-plist	Fri Jun 27 22:25:02 2003
+++ x48/pkg-plist	Sun Jun 29 11:06:31 2003
@@ -3,6 +3,8 @@
 bin/mkcard
 bin/x48
 lib/X11/app-defaults/X48
+share/x48/gxrom-r
+@dirrm share/x48
 %%PORTDOCS%%share/doc/x48/CARDS.doc
 %%PORTDOCS%%share/doc/x48/README
 %%PORTDOCS%%share/doc/x48/ROMDump.doc
How-To-Repeat: 
I found at least one remaining bug though: the latest 48SX rom
(rev. j) coredumps in mem_nibble_sx (or something like that).
Comment 1 Daichi GOTO freebsd_committer freebsd_triage 2003-07-09 08:40:32 UTC
State Changed
From-To: open->closed

Committed. Thanks!