aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/x48
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2006-09-06 04:24:10 +0800
committerdanfe <danfe@FreeBSD.org>2006-09-06 04:24:10 +0800
commit6f658aeaaddd426929a05a3d5cf500c63b7ef003 (patch)
treee3e99ad42b8a69c1b6e12b7bd1c3e5faa16d3104 /emulators/x48
parent4ad7715aa91b91c5f9b7894b53fe4a8016ba30cc (diff)
downloadfreebsd-ports-gnome-6f658aeaaddd426929a05a3d5cf500c63b7ef003.tar.gz
freebsd-ports-gnome-6f658aeaaddd426929a05a3d5cf500c63b7ef003.tar.zst
freebsd-ports-gnome-6f658aeaaddd426929a05a3d5cf500c63b7ef003.zip
- Update to version 0.4.3 [1]
- Respect PREFIX better Submitted by: jylefort [1]
Diffstat (limited to 'emulators/x48')
-rw-r--r--emulators/x48/Makefile31
-rw-r--r--emulators/x48/distinfo18
-rw-r--r--emulators/x48/files/patch-Imakefile58
-rw-r--r--emulators/x48/files/patch-config.h17
-rw-r--r--emulators/x48/files/patch-src+Imakefile13
-rw-r--r--emulators/x48/files/patch-src+dump2rom.c12
-rw-r--r--emulators/x48/files/patch-src+serial.c137
-rw-r--r--emulators/x48/files/patch-src+x48_x11.c19
8 files changed, 56 insertions, 249 deletions
diff --git a/emulators/x48/Makefile b/emulators/x48/Makefile
index 89b5c3505c0d..6fab6564c976 100644
--- a/emulators/x48/Makefile
+++ b/emulators/x48/Makefile
@@ -6,21 +6,17 @@
#
PORTNAME= x48
-PORTVERSION= 0.4.1e
-PORTREVISION= 1
+PORTVERSION= 0.4.3
CATEGORIES= emulators
-MASTER_SITES= http://www.hpcalc.org/hp48/pc/emulators/
-DISTFILES= ${PORTNAME}-${PORTVERSION:S/.//g}.tgz \
- gxrom-r.zip sxrom-e.zip
-EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION:S/.//g}.tgz
+MASTER_SITES= ${MASTER_SITE_BERLIOS}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+ x48-gxrom-r${EXTRACT_SUFX} x48-sxrom-e${EXTRACT_SUFX}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= danfe@FreeBSD.org
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
@@ -28,6 +24,12 @@ ROMPATH= ${PREFIX}/share/x48
.include <bsd.port.pre.mk>
+post-extract: .SILENT
+ cd ${WRKSRC} && ${TAR} -zxf ${DISTDIR}/x48-gxrom-r${EXTRACT_SUFX}
+ ${MV} ${WRKSRC}/.hp48/rom ${WRKSRC}/gxrom-r
+ cd ${WRKSRC} && ${TAR} -zxf ${DISTDIR}/x48-sxrom-e${EXTRACT_SUFX}
+ ${MV} ${WRKSRC}/.hp48/rom ${WRKSRC}/sxrom-e
+
post-patch:
@${REINPLACE_CMD} -e 's+rom.dump+${ROMPATH}/gxrom-r+' \
${WRKSRC}/src/X48.ad
@@ -35,10 +37,13 @@ post-patch:
@${REINPLACE_CMD} -e 's+cuaa+cuad+' ${WRKSRC}/src/X48.ad
.endif
-post-install:
+do-install:
+.for p in x48 dump2rom checkrom mkcard
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/${p} ${PREFIX}/bin
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/src/X48.ad ${PREFIX}/lib/X11/app-defaults/X48
@${MKDIR} ${ROMPATH}
- ${UNZIP_CMD} ${DISTDIR}/${DISTSUBDIR}/gxrom-r -d ${ROMPATH}
- ${UNZIP_CMD} -p ${DISTDIR}/${DISTSUBDIR}/sxrom-e > ${ROMPATH}/sxrom-e
+ ${INSTALL_DATA} ${WRKSRC}/??rom-? ${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 f425a1603e41..cff4220ec325 100644
--- a/emulators/x48/distinfo
+++ b/emulators/x48/distinfo
@@ -1,9 +1,9 @@
-MD5 (x48-041e.tgz) = 0f03da2cea0ca3fd690dcae00f088faa
-SHA256 (x48-041e.tgz) = 54670340d281701bdb62f6ec6937ebab82add700a007bcb35c7f46cbda1cafa0
-SIZE (x48-041e.tgz) = 470212
-MD5 (gxrom-r.zip) = e4ec80ac325313b006b8c94d9be8db5a
-SHA256 (gxrom-r.zip) = 42bd270bc17548c2f89ffa87b416ef22576303d1e39397d38219a4ba36d6ab7e
-SIZE (gxrom-r.zip) = 330144
-MD5 (sxrom-e.zip) = 2fe83de489d09ed4ab7787ad01092029
-SHA256 (sxrom-e.zip) = 18f074f4ba61859688f6473c96f623d657172fe4df8b16b45ad0a7c16cb4aa38
-SIZE (sxrom-e.zip) = 188027
+MD5 (x48-0.4.3.tar.gz) = b365c8957057bbc60badb412ef6fb44f
+SHA256 (x48-0.4.3.tar.gz) = 5efb6bfdae8b980ec497d7569c19edd01c579640ebb30eb27f727b182a1fb809
+SIZE (x48-0.4.3.tar.gz) = 128263
+MD5 (x48-gxrom-r.tar.gz) = 0a6f39786bc22f9f6118e672b690bd21
+SHA256 (x48-gxrom-r.tar.gz) = 4609111de35ba013fc25f8379f75ef3723a9a72140afe70c00f82d6eda952d8c
+SIZE (x48-gxrom-r.tar.gz) = 332583
+MD5 (x48-sxrom-e.tar.gz) = c8be8e229622702fab25447a9194a374
+SHA256 (x48-sxrom-e.tar.gz) = 5b5585df13b4d41329dc8c9b509e6291786b514cac2915ae935d1f60479dce6b
+SIZE (x48-sxrom-e.tar.gz) = 189906
diff --git a/emulators/x48/files/patch-Imakefile b/emulators/x48/files/patch-Imakefile
deleted file mode 100644
index ed681d40d230..000000000000
--- a/emulators/x48/files/patch-Imakefile
+++ /dev/null
@@ -1,58 +0,0 @@
---- src/Imakefile.orig Sun Jul 4 17:04:21 1999
-+++ src/Imakefile Sat Jun 28 19:01:04 2003
-@@ -26,7 +26,7 @@
- UTILS = $(TOP)/utils
- READLINE = $(TOP)/readline
- READLINELIB = $(READLINE)/libreadline.a
--EXTRA_LIBRARIES =
-+EXTRA_LIBRARIES = -lutil
-
- #ifdef HAVE_XSHM
- # define XSHM_DEF -DHAVE_XSHM
-@@ -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 --git a/emulators/x48/files/patch-config.h b/emulators/x48/files/patch-config.h
deleted file mode 100644
index 540baa943b11..000000000000
--- a/emulators/x48/files/patch-config.h
+++ /dev/null
@@ -1,17 +0,0 @@
---- 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 --git a/emulators/x48/files/patch-src+Imakefile b/emulators/x48/files/patch-src+Imakefile
new file mode 100644
index 000000000000..193fee1b0065
--- /dev/null
+++ b/emulators/x48/files/patch-src+Imakefile
@@ -0,0 +1,13 @@
+--- src/Imakefile.orig Wed Sep 6 00:58:40 2006
++++ src/Imakefile Wed Sep 6 01:00:32 2006
+@@ -25,8 +25,8 @@
+ TOP = ..
+ BIN = .
+ UTILS = $(TOP)/utils
+- READLINELIB = -lreadline TermcapLibrary
+-EXTRA_LIBRARIES =
++ READLINELIB = -lreadline -ltermcap
++EXTRA_LIBRARIES = -lutil
+
+ #ifdef HAVE_XSHM
+ # define XSHM_DEF -DHAVE_XSHM
diff --git a/emulators/x48/files/patch-src+dump2rom.c b/emulators/x48/files/patch-src+dump2rom.c
deleted file mode 100644
index f104d279fe97..000000000000
--- a/emulators/x48/files/patch-src+dump2rom.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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+serial.c b/emulators/x48/files/patch-src+serial.c
index 75ec8a93692c..1982c5b29938 100644
--- a/emulators/x48/files/patch-src+serial.c
+++ b/emulators/x48/files/patch-src+serial.c
@@ -1,28 +1,11 @@
---- 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
-
-@@ -137,6 +139,19 @@
+--- src/serial.c.orig Fri Jun 24 14:48:29 2005
++++ src/serial.c Mon Aug 28 20:04:25 2006
+@@ -134,7 +134,19 @@
ttyp = -1;
if (useTerminal)
{
-+#ifdef FREEBSD
+-#if defined(IRIX)
++#if defined(CSRG_BASED)
+ int tty_m, tty_s;
+ if (openpty(&tty_m, &tty_s, tty_dev_name, NULL, NULL) == 0)
+ {
@@ -34,113 +17,25 @@
+ }
+ else
+ perror("openpty");
-+#else /* FREEBSD */
- #ifdef IRIX
++#elif defined(IRIX)
if ((p = _getpty(&wire_fd, O_RDWR | O_EXCL | O_NDELAY, 0666, 0)) == NULL)
{
-@@ -234,11 +249,12 @@
- #endif /* LINUX */
- #endif /* SOLARIS */
- #endif /* IRIX */
-+#endif /* FREEBSD */
- }
-
- 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 +279,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 +307,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 +331,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 +360,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 +374,10 @@
- }
- }
-
-+#if defined(CSRG_BASED)
-+ cfsetspeed(&ttybuf, baud);
-+#else
-+
- ttybuf.c_cflag &= ~CBAUD;
-
- baud &= 0x7;
-@@ -404,9 +424,11 @@
+ wire_fd = -1;
+@@ -414,6 +426,8 @@
+ fprintf(stderr, "%s: can\'t set baud rate, using 9600\n", progname);
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)
++#elif defined(CSRG_BASED)
++ cfsetspeed(&ttybuf, baud);
#else
- if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
-@@ -422,7 +444,7 @@
+ ttybuf.c_cflag &= ~CBAUD;
- 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 +459,9 @@
- }
+@@ -495,6 +509,8 @@
}
-+#if defined(CSRG_BASED)
+ #if defined(__APPLE__)
++#elif defined(CSRG_BASED)
+ cfsetspeed(&ttybuf, baud);
-+#else
+ #else
ttybuf.c_cflag &= ~CBAUD;
- baud &= 0x7;
-@@ -482,10 +507,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 --git a/emulators/x48/files/patch-src+x48_x11.c b/emulators/x48/files/patch-src+x48_x11.c
deleted file mode 100644
index a094232d7873..000000000000
--- a/emulators/x48/files/patch-src+x48_x11.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- 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;