summaryrefslogtreecommitdiff
path: root/emulators/x48
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2003-07-09 07:40:20 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2003-07-09 07:40:20 +0000
commit8006b733b5e5cd3adf47f262eee691b54c26bcaf (patch)
tree956895fc7bacccda9e8ab1b5013992094f2294c8 /emulators/x48
parentupdate to spambnc-20030223 (diff)
update emulators/x48: enhancements to emulators/x48
PR: 53912 Submitted by: Pedro F. Giffuni <giffunip@yahoo.com>
Notes
Notes: svn path=/head/; revision=84508
Diffstat (limited to 'emulators/x48')
-rw-r--r--emulators/x48/Makefile16
-rw-r--r--emulators/x48/distinfo2
-rw-r--r--emulators/x48/files/patch-Imakefile (renamed from emulators/x48/files/patch-ac)4
-rw-r--r--emulators/x48/files/patch-ae11
-rw-r--r--emulators/x48/files/patch-config.h (renamed from emulators/x48/files/patch-ab)4
-rw-r--r--emulators/x48/files/patch-src+X48.ad13
-rw-r--r--emulators/x48/files/patch-src+dump2rom.c12
-rw-r--r--emulators/x48/files/patch-src+hp48.h11
-rw-r--r--emulators/x48/files/patch-src+serial.c (renamed from emulators/x48/files/patch-ad)37
-rw-r--r--emulators/x48/files/patch-src+x48_x11.c19
-rw-r--r--emulators/x48/files/src+X48.ad19
-rw-r--r--emulators/x48/pkg-descr12
-rw-r--r--emulators/x48/pkg-plist2
13 files changed, 122 insertions, 40 deletions
diff --git a/emulators/x48/Makefile b/emulators/x48/Makefile
index 590397875bf3..97288bd99290 100644
--- a/emulators/x48/Makefile
+++ b/emulators/x48/Makefile
@@ -9,18 +9,28 @@ PORTNAME= x48
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 --git a/emulators/x48/distinfo b/emulators/x48/distinfo
index 11e2fa5a0413..ce2fa7aab94e 100644
--- a/emulators/x48/distinfo
+++ b/emulators/x48/distinfo
@@ -1 +1,3 @@
MD5 (x48-041e.tgz) = 0f03da2cea0ca3fd690dcae00f088faa
+MD5 (gxrom-r.zip) = e4ec80ac325313b006b8c94d9be8db5a
+MD5 (sxrom-j.zip) = 8f61e9ee00562e94c485028eac311cf8
diff --git a/emulators/x48/files/patch-ac b/emulators/x48/files/patch-Imakefile
index 156e1db6a27a..3513e6ecee95 100644
--- a/emulators/x48/files/patch-ac
+++ b/emulators/x48/files/patch-Imakefile
@@ -1,5 +1,5 @@
---- src/Imakefile.orig Thu Jun 17 00:32:19 1999
-+++ src/Imakefile Sat Oct 14 13:22:30 2000
+--- 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
diff --git a/emulators/x48/files/patch-ae b/emulators/x48/files/patch-ae
deleted file mode 100644
index 8e0e422c140a..000000000000
--- a/emulators/x48/files/patch-ae
+++ /dev/null
@@ -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 --git a/emulators/x48/files/patch-ab b/emulators/x48/files/patch-config.h
index b4a39a868171..540baa943b11 100644
--- a/emulators/x48/files/patch-ab
+++ b/emulators/x48/files/patch-config.h
@@ -1,5 +1,5 @@
---- config.h.orig Tue Jun 29 07:36:58 1999
-+++ config.h Tue Aug 15 20:52:55 2000
+--- 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:
diff --git a/emulators/x48/files/patch-src+X48.ad b/emulators/x48/files/patch-src+X48.ad
new file mode 100644
index 000000000000..25880923ee81
--- /dev/null
+++ b/emulators/x48/files/patch-src+X48.ad
@@ -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 --git a/emulators/x48/files/patch-src+dump2rom.c b/emulators/x48/files/patch-src+dump2rom.c
new file mode 100644
index 000000000000..f104d279fe97
--- /dev/null
+++ b/emulators/x48/files/patch-src+dump2rom.c
@@ -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 --git a/emulators/x48/files/patch-src+hp48.h b/emulators/x48/files/patch-src+hp48.h
new file mode 100644
index 000000000000..602a5b37f4e3
--- /dev/null
+++ b/emulators/x48/files/patch-src+hp48.h
@@ -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 --git a/emulators/x48/files/patch-ad b/emulators/x48/files/patch-src+serial.c
index b86e6e6e4f10..bcc52d4d5c65 100644
--- a/emulators/x48/files/patch-ad
+++ b/emulators/x48/files/patch-src+serial.c
@@ -1,11 +1,20 @@
---- src/serial.c.orig Tue Jun 29 07:12:29 1999
-+++ src/serial.c Tue Aug 15 20:46:02 2000
+--- 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(__FreeBSD__) || defined (__bsdi__)
++#if defined(SOLARIS) || defined(CSRG_BASED)
#include <sys/termios.h>
#endif
@@ -14,7 +23,7 @@
if (ttyp >= 0)
{
-#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined(__FreeBSD__) || defined (__bsdi__)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
if (tcgetattr(ttyp, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
@@ -23,7 +32,7 @@
if (ttyp >= 0)
{
-#if defined(SUNOS) || defined (HPUX)
-+#if defined(SUNOS) || defined (HPUX) || defined(__FreeBSD__) || defined (__bsdi__)
++#if defined(SUNOS) || defined (HPUX) || defined(CSRG_BASED)
if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0)
@@ -32,7 +41,7 @@
if (ir_fd >= 0)
{
-#if defined(SUNOS) || defined (HPUX)
-+#if defined(SUNOS) || defined (HPUX) || defined (__FreeBSD__) || defined (__bsdi__)
++#if defined(SUNOS) || defined (HPUX) || defined (CSRG_BASED)
if (tcgetattr(ir_fd, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
@@ -41,7 +50,7 @@
if (ir_fd >= 0)
{
-#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined (__bsdi__)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
@@ -50,7 +59,7 @@
if (ir_fd >= 0)
{
-#if defined(SUNOS) || defined (HPUX)
-+#if defined(SUNOS) || defined (HPUX) || defined (__FreeBSD__) || defined (__bsdi__)
++#if defined(SUNOS) || defined (HPUX) || defined (CSRG_BASED)
if (tcgetattr(ir_fd, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
@@ -58,7 +67,7 @@
}
}
-+#if defined(__FreeBSD__) || defined(__bsdi__)
++#if defined(CSRG_BASED)
+ cfsetspeed(&ttybuf, baud);
+#else
+
@@ -69,12 +78,12 @@
ttybuf.c_cflag |= B9600;
}
-+#endif /* FreeBSD */
++#endif /* CSRG_BASED */
+
if (ir_fd >= 0)
{
-#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined(__bsdi__)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
@@ -83,7 +92,7 @@
if (ttyp >= 0)
{
-#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined(__bsdi__)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
if (tcgetattr(ttyp, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
@@ -91,7 +100,7 @@
}
}
-+#if defined(__FreeBSD__) || defined(__bsdi__)
++#if defined(CSRG_BASED)
+ cfsetspeed(&ttybuf, baud);
+#else
ttybuf.c_cflag &= ~CBAUD;
@@ -106,7 +115,7 @@
if (ttyp >= 0)
{
-#if defined(SUNOS) || defined(HPUX)
-+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined(__bsdi__)
++#if defined(SUNOS) || defined(HPUX) || defined (CSRG_BASED)
if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0)
diff --git a/emulators/x48/files/patch-src+x48_x11.c b/emulators/x48/files/patch-src+x48_x11.c
new file mode 100644
index 000000000000..a094232d7873
--- /dev/null
+++ b/emulators/x48/files/patch-src+x48_x11.c
@@ -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 --git a/emulators/x48/files/src+X48.ad b/emulators/x48/files/src+X48.ad
new file mode 100644
index 000000000000..812729cd00bf
--- /dev/null
+++ b/emulators/x48/files/src+X48.ad
@@ -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 --git a/emulators/x48/pkg-descr b/emulators/x48/pkg-descr
index 2a0f4f8aeeab..3d1ff83944ec 100644
--- a/emulators/x48/pkg-descr
+++ b/emulators/x48/pkg-descr
@@ -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 --git a/emulators/x48/pkg-plist b/emulators/x48/pkg-plist
index ce19656354ec..dda3be31352d 100644
--- a/emulators/x48/pkg-plist
+++ b/emulators/x48/pkg-plist
@@ -3,6 +3,8 @@ bin/dump2rom
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