Right now, this port doesn't even work for me due to some display bug, and since the version is quite old anyway, I decided to update it. It now works fine, with some code borrowed from the FreeBSD port.
Already sent to maintainer a while ago ... And btw, the firmware files required are on the BerliOS webpage, so it seems it is legal to distribute them. It might be worthwhile to download and install (some of) them in the port if that's the case. Index: Makefile =================================================================== RCS file: /cvs/ports/emulators/x48/Makefile,v retrieving revision 1.21 diff -u -p -r1.21 Makefile --- Makefile 24 Oct 2010 21:17:49 -0000 1.21 +++ Makefile 9 Nov 2011 16:10:12 -0000 @@ -3,29 +3,31 @@ COMMENT= HP48sx emulator -DISTNAME= x48-0.4.0 -REVISION= 1 +DISTNAME= x48-0.6.3 CATEGORIES= emulators MAINTAINER= Todd T. Fries <t...@openbsd.org> +# GPLv2+ PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= X11 Xau Xdmcp Xext c pthread-stubs xcb +WANTLIB= X11 Xext c ncurses readline util -MASTER_SITES= ${MASTER_SITE_SUNSITE:=system/emulators/} +MASTER_SITES= ${MASTER_SITE_BERLIOS:=x48/} -CONFIGURE_STYLE= imake noman +CONFIGURE_STYLE= gnu +CONFIGURE_ENV+= LIBS="-lncurses -lutil" +CONFIGURE_ARGS+= --with-appdefaultdir="${LOCALBASE}/lib/X11/app-defaults" + +USE_GMAKE= Yes NO_REGRESS= Yes post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/x48 ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/x48/README-x48 - ${INSTALL_DATA} ${WRKSRC}/doc/CARDS.doc ${WRKSRC}/doc/ROMDump.doc \ - ${PREFIX}/share/x48 .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/emulators/x48/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- distinfo 5 Apr 2007 15:38:09 -0000 1.3 +++ distinfo 9 Nov 2011 16:10:12 -0000 @@ -1,5 +1,5 @@ -MD5 (x48-0.4.0.tar.gz) = 3aW8pBfrDc0Suep8N0L0Yg== -RMD160 (x48-0.4.0.tar.gz) = C7O7dpZQ8XbuV9lJBvWg70priMI= -SHA1 (x48-0.4.0.tar.gz) = rxSBXQTEiC4WcYoeEKWjNgFP4qI= -SHA256 (x48-0.4.0.tar.gz) = 8G35oVpY4gTFWO8/ZPYS8PaYA4EA7So1OOXTi6m4SJs= -SIZE (x48-0.4.0.tar.gz) = 134814 +MD5 (x48-0.6.3.tar.gz) = G5yBVZjDrXO4ohpCE4iguA== +RMD160 (x48-0.6.3.tar.gz) = 5fgPjEnNoOnWPaY/vmQfy8EdEho= +SHA1 (x48-0.6.3.tar.gz) = z3dxaCzoiUUC0jo7fGefXau55rY= +SHA256 (x48-0.6.3.tar.gz) = x2W/o7BZ4x7ZA0p8fxvuECoij9Fk38VVyNLmrjQsdjg= +SIZE (x48-0.6.3.tar.gz) = 319892 Index: patches/patch-config_h =================================================================== RCS file: patches/patch-config_h diff -N patches/patch-config_h --- patches/patch-config_h 21 Feb 2002 01:04:22 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,18 +0,0 @@ -$OpenBSD: patch-config_h,v 1.1 2002/02/21 01:04:22 naddy Exp $ ---- config.h.orig Thu Feb 21 01:58:46 2002 -+++ config.h Thu Feb 21 01:59:08 2002 -@@ -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: Index: patches/patch-src_Imakefile =================================================================== RCS file: patches/patch-src_Imakefile diff -N patches/patch-src_Imakefile --- patches/patch-src_Imakefile 21 Feb 2002 01:04:22 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,65 +0,0 @@ -$OpenBSD: patch-src_Imakefile,v 1.1 2002/02/21 01:04:22 naddy Exp $ ---- src/Imakefile.orig Thu Jan 12 12:17:01 1995 -+++ src/Imakefile Thu Feb 21 01:32:51 2002 -@@ -22,7 +22,6 @@ - - #include "../config.h" - -- BIN = $(TOP)/bin - UTILS = $(TOP)/utils - READLINE = $(TOP)/readline - READLINELIB = $(READLINE)/libreadline.a -@@ -86,31 +85,35 @@ EXTRA_LIBRARIES = - CO = co -l - TARFILES = Imakefile X48.ad $(TARS1) $(SRCS2) $(SRCS3) $(SRCS4) $(HDRS) - --all:: $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard - -- PROGRAMS = $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard -+ PROGRAMS = x48 dump2rom checkrom mkcard -+ -+all:: $(PROGRAMS) - - depend:: version.c X48.ad.h - - echo_tarfiles: - @echo $(TARFILES) - --#ifndef ComplexProgramTarget_4 --#define ComplexProgramTarget_4(program,locallib,syslib) @@\ --program: $(OBJS4) $(DEPLIBS4) @@\ -- 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,,) -+#ifdef ProgramTargetHelper -+#undef ProgramTargetHelper -+#endif -+#define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\ -+ProgramTargetName(program): $(objs) $(deplib) @@\ -+ RemoveTargetProgram($@) @@\ -+ LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\ -+ @@\ -+CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\ -+SentinelProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ -+PurifyProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ -+ProofProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ -+ @@\ -+InstallProgram(program,$(BINDIR)) -+ -+ComplexProgramTarget_1(x48, $(X48LIBS),) -+ComplexProgramTarget_2(dump2rom,,) -+ComplexProgramTarget_3(checkrom,,) -+ComplexProgramTarget_4(mkcard,,) - - InstallAppDefaults(X48) - Index: patches/patch-src_dump2rom_c =================================================================== RCS file: patches/patch-src_dump2rom_c diff -N patches/patch-src_dump2rom_c --- patches/patch-src_dump2rom_c 21 Feb 2002 01:04:22 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -$OpenBSD: patch-src_dump2rom_c,v 1.1 2002/02/21 01:04:22 naddy Exp $ ---- src/dump2rom.c.orig Thu Feb 21 01:53:30 2002 -+++ src/dump2rom.c Thu Feb 21 01:53:51 2002 -@@ -130,8 +130,7 @@ char **argv; - { - 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]); Index: patches/patch-src_hp48_h =================================================================== RCS file: /cvs/ports/emulators/x48/patches/patch-src_hp48_h,v retrieving revision 1.1 diff -u -p -r1.1 patch-src_hp48_h --- patches/patch-src_hp48_h 21 Feb 2002 01:04:23 -0000 1.1 +++ patches/patch-src_hp48_h 9 Nov 2011 16:10:12 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-src_hp48_h,v 1.1 2002/02/21 01:04:23 naddy Exp $ ---- src/hp48.h.orig Thu Feb 21 01:38:49 2002 -+++ src/hp48.h Thu Feb 21 01:39:02 2002 -@@ -218,7 +218,7 @@ typedef struct saturn_t { +--- src/hp48.h.orig Thu Oct 6 19:54:57 2011 ++++ src/hp48.h Thu Oct 6 19:55:20 2011 +@@ -227,7 +227,7 @@ typedef struct saturn_t { word_8 unknown2; Index: patches/patch-src_serial_c =================================================================== RCS file: /cvs/ports/emulators/x48/patches/patch-src_serial_c,v retrieving revision 1.1 diff -u -p -r1.1 patch-src_serial_c --- patches/patch-src_serial_c 21 Feb 2002 01:04:23 -0000 1.1 +++ patches/patch-src_serial_c 9 Nov 2011 16:10:12 -0000 @@ -1,113 +1,46 @@ -$OpenBSD: patch-src_serial_c,v 1.1 2002/02/21 01:04:23 naddy Exp $ ---- src/serial.c.orig Wed Jan 11 19:24:04 1995 -+++ src/serial.c Thu Feb 21 01:32:51 2002 -@@ -77,6 +77,8 @@ - #ifdef SOLARIS - #include <sys/stream.h> - #include <sys/stropts.h> -+#endif -+#if defined(SOLARIS) || defined(__FreeBSD__) || defined (__bsdi__) || defined(__OpenBSD__) - #include <sys/termios.h> - #endif - -@@ -238,7 +240,7 @@ serial_init() - - if (ttyp >= 0) - { --#if defined(SUNOS) || defined(HPUX) -+#if defined(SUNOS) || defined(HPUX) || defined(__FreeBSD__) || defined (__bsdi__) || defined(__OpenBSD__) - if (tcgetattr(ttyp, &ttybuf) < 0) - #else - if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0) -@@ -263,7 +265,7 @@ serial_init() - - if (ttyp >= 0) - { --#if defined(SUNOS) || defined (HPUX) -+#if defined(SUNOS) || defined (HPUX) || defined(__FreeBSD__) || defined (__bsdi__) || defined(__OpenBSD__) - if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0) - #else - if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0) -@@ -291,7 +293,7 @@ serial_init() - - if (ir_fd >= 0) - { --#if defined(SUNOS) || defined (HPUX) -+#if defined(SUNOS) || defined (HPUX) || defined (__FreeBSD__) || defined (__bsdi__) || defined(__OpenBSD__) - if (tcgetattr(ir_fd, &ttybuf) < 0) - #else - if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0) -@@ -315,7 +317,7 @@ serial_init() - - if (ir_fd >= 0) - { --#if defined(SUNOS) || defined(HPUX) -+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined (__bsdi__) || defined(__OpenBSD__) - if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0) - #else - if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0) -@@ -344,7 +346,7 @@ int baud; - - if (ir_fd >= 0) - { --#if defined(SUNOS) || defined (HPUX) -+#if defined(SUNOS) || defined (HPUX) || defined (__FreeBSD__) || defined (__bsdi__) || defined(__OpenBSD__) - if (tcgetattr(ir_fd, &ttybuf) < 0) - #else - if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0) -@@ -358,6 +360,10 @@ int baud; - } - } - -+#if defined(__FreeBSD__) || defined(__bsdi__) || defined(__OpenBSD__) -+ cfsetspeed(&ttybuf, baud); -+#else -+ - ttybuf.c_cflag &= ~CBAUD; - - baud &= 0x7; -@@ -404,9 +410,11 @@ int baud; +$OpenBSD$ + +adjust this code for *BSD, taken from FreeBSD. + +--- src/serial.c.orig Thu Oct 6 20:14:23 2011 ++++ src/serial.c Thu Oct 6 20:14:29 2011 +@@ -134,7 +134,20 @@ serial_init() + ttyp = -1; + if (useTerminal) + { +-#if defined(IRIX) ++#if defined(CSRG_BASED) ++ int tty_m, tty_s; ++ if (openpty(&tty_m, &tty_s, tty_dev_name, NULL, NULL) == 0) ++ { ++ if (verbose) ++ printf("%s: wire connection on %s\n", progname, ++tty_dev_name); ++ wire_fd = tty_m; ++ ttyp = tty_s; ++ wire_name = strdup(tty_dev_name); ++ } ++ else ++ perror("openpty"); ++#elif defined(IRIX) + if ((p = _getpty(&wire_fd, O_RDWR | O_EXCL | O_NDELAY, 0666, 0)) == NULL) + { + wire_fd = -1; +@@ -416,6 +429,8 @@ int baud; + fprintf(stderr, "%s: can\'t set baud rate, using 9600\n", progname); ttybuf.c_cflag |= B9600; } - -+#endif /* FreeBSD */ -+ - if (ir_fd >= 0) - { --#if defined(SUNOS) || defined(HPUX) -+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined(__bsdi__) || defined(__OpenBSD__) - 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 +430,7 @@ int baud; + ttybuf.c_cflag &= ~CBAUD; - if (ttyp >= 0) - { --#if defined(SUNOS) || defined(HPUX) -+#if defined(SUNOS) || defined(HPUX) || defined (__FreeBSD__) || defined(__bsdi__) || defined(__OpenBSD__) - if (tcgetattr(ttyp, &ttybuf) < 0) - #else - if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0) -@@ -437,6 +445,9 @@ int baud; - } +@@ -497,6 +512,8 @@ int baud; } -+#if defined(__FreeBSD__) || defined(__bsdi__) || defined(__OpenBSD__) + #if defined(__APPLE__) ++#elif defined(CSRG_BASED) + cfsetspeed(&ttybuf, baud); -+#else + #else ttybuf.c_cflag &= ~CBAUD; - baud &= 0x7; -@@ -482,10 +493,11 @@ int baud; - 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__) || defined(__OpenBSD__) - if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0) - #else - if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0) Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/emulators/x48/pkg/PLIST,v retrieving revision 1.4 diff -u -p -r1.4 PLIST --- pkg/PLIST 15 Sep 2004 00:42:04 -0000 1.4 +++ pkg/PLIST 9 Nov 2011 16:10:12 -0000 @@ -1,10 +1,9 @@ -@comment $OpenBSD: PLIST,v 1.4 2004/09/15 00:42:04 espie Exp $ -bin/checkrom -bin/dump2rom -bin/mkcard -bin/x48 +@comment $OpenBSD$ +@bin bin/checkrom +@bin bin/dump2rom +@bin bin/mkcard +@bin bin/x48 lib/X11/app-defaults/X48 +@man man/man1/x48.1 share/x48/ -share/x48/CARDS.doc share/x48/README-x48 -share/x48/ROMDump.doc