aboutsummaryrefslogtreecommitdiff
path: root/emulators/hercules
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2006-02-04 22:19:02 +0000
committerErwin Lansing <erwin@FreeBSD.org>2006-02-04 22:19:02 +0000
commitbc93e674cc39861229779e42f511322d66226934 (patch)
treef3c15c64755c67ca22b05977be783896f071f09d /emulators/hercules
parenta53d2db43a2325ce95139a676881b95aebf1b1d7 (diff)
downloadports-bc93e674cc39861229779e42f511322d66226934.tar.gz
ports-bc93e674cc39861229779e42f511322d66226934.zip
- Update to 3.03.1 [1]
- Hand maintainership to bz [1][2] - Convert to OPTIONS [1] - Clean Makefile a bit [3] - Mark IGNORE on 4.x [3] This also fixes the crash reported in: PR: 88535 Submitted by: trasz <trasz@pin.if.uz.zgora.pl>, bz [1], erwin [3] Approved by: phk (previous maintainer) [2]
Notes
Notes: svn path=/head/; revision=155222
Diffstat (limited to 'emulators/hercules')
-rw-r--r--emulators/hercules/Makefile56
-rw-r--r--emulators/hercules/distinfo5
-rw-r--r--emulators/hercules/files/patch-compile.h151
-rw-r--r--emulators/hercules/files/patch-feature.h12
-rw-r--r--emulators/hercules/files/patch-hc-hack96
-rw-r--r--emulators/hercules/files/patch-hc.c54
-rw-r--r--emulators/hercules/files/patch-hercules.h12
-rw-r--r--emulators/hercules/files/patch-tapecopy.c63
-rw-r--r--emulators/hercules/files/patch-tapedev.c275
-rw-r--r--emulators/hercules/files/patch-version.c17
-rw-r--r--emulators/hercules/pkg-plist72
11 files changed, 100 insertions, 713 deletions
diff --git a/emulators/hercules/Makefile b/emulators/hercules/Makefile
index d63a418586d6..f435ce46277e 100644
--- a/emulators/hercules/Makefile
+++ b/emulators/hercules/Makefile
@@ -6,36 +6,54 @@
#
PORTNAME= hercules
-PORTVERSION= 2.17.1
-PORTREVISION= 2
+PORTVERSION= 3.03.1
CATEGORIES= emulators
MASTER_SITES= http://www.conmicro.cx/hercules/
-MAINTAINER= phk@FreeBSD.org
+MAINTAINER= bzeeb+freebsdports@zabbadoz.net
COMMENT= The Hercules System/370, ESA/390, and z/Architecture Emulator
-GNU_CONFIGURE= yes
-USE_GETTEXT= yes
-USE_REINPLACE= yes
+OPTIONS= PTHREADS "Build with pthreads instead of fthreads." on \
+ NLS "Build with native language support." on \
+ DEBUG "Enable for debugging hercules itself." off
+
+GNU_CONFIGURE= yes
+INSTALLS_SHLIB= yes
post-patch:
@${REINPLACE_CMD} -e 's@-lpthread@${PTHREAD_LIBS}@g' ${WRKSRC}/configure
+.if defined(NOPORTDOCS)
+ @${REINPLACE_CMD} -e 's,intl m4 po util html man,intl m4 po util man,g' ${WRKSRC}/Makefile.in
+.else
+ @${REINPLACE_CMD} -e 's,^datadir = @datadir@,datadir = ${PREFIX}/share/doc/,' ${WRKSRC}/html/Makefile.in
+.endif
-do-install:
-.for i in hercules dasdinit dasdisup dasdload dasdls dasdpdsu \
- tapecopy tapemap tapesplt cckd2ckd cckdcdsk ckd2cckd \
- cckdcomp cckdswap hetget hetinit hetmap hetupd dmap2hrc
- ${INSTALL_PROGRAM} ${WRKSRC}/$i ${PREFIX}/bin
-.endfor
+MAN1= cckddiag.1 dasdseq.1
+MAN4= cckd.4
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
-.for i in ../hercules.cnf cckddasd.html hercconf.html hercfaq.html \
- hercinst.html herclic.html hercload.html hercnew.html herctcp.html \
- hercules.css index.html
- ${INSTALL_DATA} ${WRKSRC}/html/$i ${DOCSDIR}
-.endfor
+PORTDOCS= *
.endif
+
+post-install:
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+IGNORE= does not compile on FreeBSD 4.x
+.endif
+
+.if defined(WITH_DEBUG)
+CONFIGURE_ENV+= CFLAGS=-g
+.endif
+.if defined(WITH_PTHREADS)
+CONFIGURE_ARGS+= --disable-fthreads
+.endif
+.if defined(WITHOUT_NLS)
+CONFIGURE_ARGS+= --disable-nls
+.else
+USE_GETTEXT= yes
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/emulators/hercules/distinfo b/emulators/hercules/distinfo
index dddb7f798781..a5ed9fb4e0ee 100644
--- a/emulators/hercules/distinfo
+++ b/emulators/hercules/distinfo
@@ -1,3 +1,4 @@
-MD5 (hercules-2.17.1.tar.gz) = e98138eb45d114f2c4a805db91fe308c
-SHA256 (hercules-2.17.1.tar.gz) = 700c668f5ea66232c0b15cf2f79b6667a2ea60a0449a412c12e047e8cfe579c6
+MD5 (hercules-3.03.1.tar.gz) = 8576461fff6ed642fc69350826cf3c1d
+SHA256 (hercules-3.03.1.tar.gz) = f654785f1a12a39707ed66bc54b202dc70b90ecf3102660182d7f1ddddb7eba9
+SIZE (hercules-3.03.1.tar.gz) = 2071850
SIZE (hercules-2.17.1.tar.gz) = 1172656
diff --git a/emulators/hercules/files/patch-compile.h b/emulators/hercules/files/patch-compile.h
deleted file mode 100644
index eb6811ab7f26..000000000000
--- a/emulators/hercules/files/patch-compile.h
+++ /dev/null
@@ -1,151 +0,0 @@
-diff -ur ./cckddasd.c ../../work/hercules-2.17.1/cckddasd.c
---- ./cckddasd.c Fri Jan 24 16:53:54 2003
-+++ ../../work/hercules-2.17.1/cckddasd.c Mon Apr 28 20:41:10 2003
-@@ -2987,7 +2987,11 @@
- if (rc < hrc) hrc = rc;
-
- if (cckdblk.fsync)
-+#if defined(__linux__)
- rc = fdatasync (cckd->fd[cckd->sfn]);
-+#else
-+ rc = fsync(cckd->fd[cckd->sfn]);
-+#endif
-
- return hrc;
- } /* cckd_harden */
-@@ -4268,7 +4272,11 @@
- {
- obtain_lock (&cckd->filelock);
- if (cckdblk.fsync)
-+#if defined(__linux__)
- rc = fdatasync (cckd->fd[cckd->sfn]);
-+#else
-+ rc = fsync (cckd->fd[cckd->sfn]);
-+#endif
- cckd_flush_space (dev);
- cckd_truncate (dev, 0);
- release_lock (&cckd->filelock);
-diff -ur ./ctc_ctci.c ../../work/hercules-2.17.1/ctc_ctci.c
---- ./ctc_ctci.c Sat Feb 1 20:34:57 2003
-+++ ../../work/hercules-2.17.1/ctc_ctci.c Mon Apr 28 20:38:32 2003
-@@ -9,7 +9,7 @@
- // linux 2.4 modifications (c) Copyright Fritz Elfert, 2001-2003
- //
-
--#if !defined(__APPLE__)
-+#if !defined(__APPLE__) && !defined(__FreeBSD__)
-
- #include "hercules.h"
- #include "devtype.h"
-@@ -1302,4 +1302,4 @@
-
- return 0;
- }
--#endif /* !defined(__APPLE__) */
-+#endif /* !defined(__APPLE__) && !defined(__FreeBSD__) */
-diff -ur ./ctc_lcs.c ../../work/hercules-2.17.1/ctc_lcs.c
---- ./ctc_lcs.c Sat Feb 1 20:34:57 2003
-+++ ../../work/hercules-2.17.1/ctc_lcs.c Mon Apr 28 20:38:00 2003
-@@ -5,7 +5,7 @@
- // Copyright (C) 2002-2003 by James A. Pierson
- //
-
--#if !defined(__APPLE__)
-+#if !defined(__APPLE__) && !defined(__FreeBSD__)
-
- #include "hercules.h"
- #include "devtype.h"
-@@ -1976,4 +1983,4 @@
-
- return pszBuff;
- }
--#endif /* !defined(__APPLE__) */
-+#endif /* !defined(__APPLE__) && !defined(__FreeBSD__) */
-diff -ur ./ctcadpt.c ../../work/hercules-2.17.1/ctcadpt.c
---- ./ctcadpt.c Sat Feb 1 20:34:57 2003
-+++ ../../work/hercules-2.17.1/ctcadpt.c Mon Apr 28 20:39:09 2003
-@@ -17,7 +17,7 @@
- //
- // Please read README.NETWORKING for more info.
- //
--#if !defined(__APPLE__)
-+#if !defined(__APPLE__) && !defined(__FreeBSD__)
-
- #include "hercules.h"
- #include "devtype.h"
-@@ -1561,4 +1561,4 @@
- logmsg( " %s\n", print_chars );
- }
- }
--#endif /* !defined(__APPLE__) */
-+#endif /* !defined(__APPLE__) && !defined(__FreeBSD__) */
-diff -ur ./ctcadpt.h ../../work/hercules-2.17.1/ctcadpt.h
---- ./ctcadpt.h Mon Jan 20 04:23:51 2003
-+++ ../../work/hercules-2.17.1/ctcadpt.h Mon Apr 28 20:24:47 2003
-@@ -93,7 +93,9 @@
- #define FRAME_TYPE_IP 0x0800
- #define FRAME_TYPE_ARP 0x0806
- #define FRAME_TYPE_SNA 0x80D5
--
-+#ifndef IFHWADDRLEN
-+#define IFHWADDRLEN 6
-+#endif
- typedef uint8_t MAC[IFHWADDRLEN]; // Data Type for MAC Addresses
-
- // ---------------------------------------------------------------------
-diff -ur ./devtype.c ../../work/hercules-2.17.1/devtype.c
---- ./devtype.c Sat Feb 1 20:34:57 2003
-+++ ../../work/hercules-2.17.1/devtype.c Mon Apr 28 20:39:35 2003
-@@ -51,13 +51,13 @@
- { "3270", 0x3270, &loc3270_device_hndinfo },
- { "3287", 0x3287, &loc3270_device_hndinfo },
-
--# if !defined(__APPLE__)
-+# if !defined(__APPLE__) && !defined(__FreeBSD__)
- /* Communications devices */
- { "3088", 0x3088, &ctcadpt_device_hndinfo },
- { "CTCI", 0x3088, &ctcadpt_device_hndinfo },
- { "CTCT", 0x3088, &ctcadpt_device_hndinfo },
- { "LCS", 0x3088, &ctcadpt_device_hndinfo },
- { "VMNET", 0x3088, &ctcadpt_device_hndinfo },
--# endif /* !defined(__APPLE__) */
-+# endif /* !defined(__APPLE__) && !defined(__FreeBSD__) */
-
- { NULL, 0, NULL } };
-diff -ur ./tapedev.c ../../work/hercules-2.17.1/tapedev.c
---- ./tapedev.c Sat Feb 1 20:34:57 2003
-+++ ../../work/hercules-2.17.1/tapedev.c Mon Apr 28 20:37:20 2003
-@@ -2,6 +2,9 @@
- /* JCS - minor changes by John Summerfield */
- /* ESA/390 Tape Device Handler */
-
-+#if defined(__FreeBSD__)
-+#define __APPLE__
-+#endif
- /*-------------------------------------------------------------------*/
- /* This module contains device handling functions for emulated */
- /* 3420 magnetic tape devices for the Hercules ESA/390 emulator. */
-diff -ur ./tuntap.c ../../work/hercules-2.17.1/tuntap.c
---- ./tuntap.c Sat Feb 1 20:34:57 2003
-+++ ../../work/hercules-2.17.1/tuntap.c Mon Apr 28 20:35:31 2003
-@@ -14,13 +14,13 @@
- // This abstraction layer is an attempt to create a common API set
- // that works on all platforms with (hopefully) equal results.
-
--#if !defined(__APPLE__)
-+#if !defined(__APPLE__) && !defined(__FreeBSD__)
- #include "hercules.h"
- #include "tuntap.h"
- #include "devtype.h"
- #include "ctcadpt.h"
- #include "hercifc.h"
-
- #if defined( WIN32 )
- #include "w32ctca.h"
- #endif
-@@ -609,4 +610,4 @@
- }
-
- #endif // !defined( WIN32 )
--#endif /* !defined(__APPLE__) */
-+#endif /* !defined(__APPLE__) && !defined(__FreeBSD__) */
diff --git a/emulators/hercules/files/patch-feature.h b/emulators/hercules/files/patch-feature.h
deleted file mode 100644
index 17885d5ad6c0..000000000000
--- a/emulators/hercules/files/patch-feature.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- feature.h.orig Mon Sep 2 11:36:09 2002
-+++ feature.h Mon Sep 2 11:36:55 2002
-@@ -479,4 +479,9 @@
- #define XSTORE_PAGEMASK 0x7FFFF000
- #endif
-
-+#if defined(__FreeBSD__)
-+ #define HAVE_MTIO_H
-+#else
-+ #define GNU_MTIO_SUPPORT
-+#endif
- /* end of FEATURES.H */
diff --git a/emulators/hercules/files/patch-hc-hack b/emulators/hercules/files/patch-hc-hack
deleted file mode 100644
index 2795112da6d7..000000000000
--- a/emulators/hercules/files/patch-hc-hack
+++ /dev/null
@@ -1,96 +0,0 @@
-diff -ur ./Makefile.in ../../work/hercules-2.16.5/Makefile.in
---- ./Makefile.in Mon Jul 8 14:55:57 2002
-+++ ../../work/hercules-2.16.5/Makefile.in Mon Dec 16 17:17:45 2002
-@@ -116,7 +116,7 @@
- ipl.c assist.c dat.c \
- stack.c cpu.c vstore.c \
- general1.c general2.c plo.c \
-- control.c io.c \
-+ control.c io.c hc.c \
- decimal.c service.c opcode.c \
- diagnose.c diagmssf.c vm.c \
- channel.c ckddasd.c fbadasd.c \
-@@ -327,7 +327,7 @@
- version.$(OBJEXT) ipl.$(OBJEXT) assist.$(OBJEXT) dat.$(OBJEXT) \
- stack.$(OBJEXT) cpu.$(OBJEXT) vstore.$(OBJEXT) \
- general1.$(OBJEXT) general2.$(OBJEXT) plo.$(OBJEXT) \
-- control.$(OBJEXT) io.$(OBJEXT) decimal.$(OBJEXT) \
-+ control.$(OBJEXT) io.$(OBJEXT) hc.$(OBJEXT) decimal.$(OBJEXT) \
- service.$(OBJEXT) opcode.$(OBJEXT) diagnose.$(OBJEXT) \
- diagmssf.$(OBJEXT) vm.$(OBJEXT) channel.$(OBJEXT) \
- ckddasd.$(OBJEXT) fbadasd.$(OBJEXT) tapedev.$(OBJEXT) \
-@@ -402,6 +402,7 @@
- @AMDEP_TRUE@ ./$(DEPDIR)/ckddasd.Po ./$(DEPDIR)/cmpsc.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/codepage.Po ./$(DEPDIR)/config.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/console.Po ./$(DEPDIR)/control.Po \
-+@AMDEP_TRUE@ ./$(DEPDIR)/hc.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/cpu.Po ./$(DEPDIR)/ctc_ctci.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/ctc_lcs.Po ./$(DEPDIR)/ctcadpt.Po \
- @AMDEP_TRUE@ ./$(DEPDIR)/dasdcat.Po ./$(DEPDIR)/dasdcopy.Po \
-@@ -608,6 +609,7 @@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hc.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctcadpt.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdcat.Po@am__quote@
-diff -ur ./configure.ac ../../work/hercules-2.16.5/configure.ac
---- ./configure.ac Mon Jul 8 14:55:42 2002
-+++ ../../work/hercules-2.16.5/configure.ac Mon Dec 16 17:17:45 2002
-@@ -153,6 +153,16 @@
- [AC_DEFINE([HAVE_U_INT])],
- [AC_MSG_ERROR([Unable to find fixed-size data types])] )] )
-
-+dnl AC_MSG_NOTICE([Checking for SCSI tape support and what type])
-+AC_CHECK_HEADER(sys/mtio.h,
-+ [AC_DEFINE([HAVE_MTIO_H])])
-+
-+AC_TRY_COMPILE([#include mtio.h],
-+ [mtget test;
-+ int result;
-+ result = test.mt_gstat; ],
-+ [AC_DEFINE([GNU_MTIO_SUPPORT])])
-+
- # Compiler characteristics
-
- AC_C_BIGENDIAN
-@@ -375,5 +385,9 @@
- [Define to debug correct fthreads LOCK handling (requires fthreads)])
- AH_TEMPLATE([PKGDATADIR],
- [Directory where the HTTP server will find documents])
-+AH_TEMPLATE([HAVE_MTIO_H],
-+ Define if your system has sys/mtio.h])
-+AH_TEMPLATE([GNU_MTIO_SUPPORT],
-+ [Define if you have the GNU version of mtio.h (Linux)])
-
- AC_OUTPUT(Makefile util/Makefile html/Makefile)
-diff -ur ./opcode.c ../../work/hercules-2.16.5/opcode.c
---- ./opcode.c Wed Jul 3 04:04:41 2002
-+++ ../../work/hercules-2.16.5/opcode.c Mon Dec 16 17:17:45 2002
-@@ -1276,8 +1276,8 @@
- /*0100*/ GENx___x___x___ ,
- /*0101*/ GENx___x390x900 (program_return,E,"PR"),
- /*0102*/ GENx___x390x900 (update_tree,E,"UPT"),
-- /*0103*/ GENx___x___x___ ,
-- /*0104*/ GENx___x___x___ ,
-+ /*0103*/ GENx370x390x900 (hconsole_get_char,E,"HCGC"),
-+ /*0104*/ GENx370x390x900 (hconsole_put_char,E,"HCPC"),
- /*0105*/ GENx___x___x___ , /* CMSG */
- /*0106*/ GENx___x___x___ , /* TMSG */
- /*0107*/ GENx___x390x900 (set_clock_programmable_field,E,"SCKPF"),
-diff -ur ./opcode.h ../../work/hercules-2.16.5/opcode.h
---- ./opcode.h Mon Mar 11 18:40:40 2002
-+++ ../../work/hercules-2.16.5/opcode.h Mon Dec 16 17:17:45 2002
-@@ -1599,6 +1599,11 @@
- DEF_INST(dummy_instruction);
-
-
-+/* Instructions in hc.c */
-+DEF_INST(hconsole_get_char);
-+DEF_INST(hconsole_put_char);
-+
-+
- /* Instructions in assist.c */
- DEF_INST(svc_assist);
- DEF_INST(obtain_local_lock);
diff --git a/emulators/hercules/files/patch-hc.c b/emulators/hercules/files/patch-hc.c
deleted file mode 100644
index 23359f5ced93..000000000000
--- a/emulators/hercules/files/patch-hc.c
+++ /dev/null
@@ -1,54 +0,0 @@
---- /dev/null Mon Dec 16 17:18:27 2002
-+++ hc.c Mon Dec 16 17:21:15 2002
-@@ -0,0 +1,51 @@
-+#include "hercules.h"
-+
-+#include "opcode.h"
-+
-+#include "inline.h"
-+
-+static int hcd;
-+
-+DEF_INST(hconsole_get_char)
-+{
-+ char ch;
-+
-+ E(inst, execflag, regs);
-+
-+ if (hcd == 0)
-+ hcd = open("/home/tzukanov/hercules/hc",
-+ O_RDWR | O_NONBLOCK | O_CREAT, 0);
-+ if (read(hcd, &ch, 1) == 1)
-+ regs->GR_LHLCL(1) = ch;
-+ else
-+ regs->GR_L(1) = -1;
-+}
-+
-+DEF_INST(hconsole_put_char)
-+{
-+ char ch;
-+
-+ E(inst, execflag, regs);
-+
-+
-+ if (hcd == 0)
-+ hcd = open("/home/tzukanov/hercules/hc",
-+ O_RDWR | O_NONBLOCK | O_CREAT, 0);
-+ ch = regs->GR_LHLCL(1);
-+ write(hcd, &ch, 1);
-+}
-+
-+#if !defined(_GEN_ARCH)
-+
-+#if defined(_ARCHMODE2)
-+ #define _GEN_ARCH _ARCHMODE2
-+ #include "hc.c"
-+#endif
-+
-+#if defined(_ARCHMODE3)
-+ #undef _GEN_ARCH
-+ #define _GEN_ARCH _ARCHMODE3
-+ #include "hc.c"
-+#endif
-+
-+#endif /*!defined(_GEN_ARCH)*/
diff --git a/emulators/hercules/files/patch-hercules.h b/emulators/hercules/files/patch-hercules.h
deleted file mode 100644
index 25525c4a17a9..000000000000
--- a/emulators/hercules/files/patch-hercules.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- hercules.h.orig Mon Sep 2 11:43:46 2002
-+++ hercules.h Mon Sep 2 11:44:56 2002
-@@ -333,6 +333,9 @@
- BYTE *iobuf, BYTE *more, BYTE *unitstat, U16 *residual);
- typedef int DEVCF (struct _DEVBLK *dev);
-
-+#if defined(HAVE_MTIO_H)
-+ #include <sys/mtio.h>
-+#endif
-
- /*-------------------------------------------------------------------*/
- /* Structure definition for the Vector Facility */
diff --git a/emulators/hercules/files/patch-tapecopy.c b/emulators/hercules/files/patch-tapecopy.c
deleted file mode 100644
index 15eb57e1451a..000000000000
--- a/emulators/hercules/files/patch-tapecopy.c
+++ /dev/null
@@ -1,63 +0,0 @@
---- tapecopy.c Sat Feb 1 20:34:57 2003
-+++ ../work/hercules-2.17.1/tapecopy.c Mon Apr 28 21:21:15 2003
-@@ -42,6 +42,7 @@
- static BYTE hdrlbl[] = "\xC8\xC4\xD9"; /* EBCDIC characters "HDR" */
- static BYTE eoflbl[] = "\xC5\xD6\xC6"; /* EBCDIC characters "EOF" */
- static BYTE eovlbl[] = "\xC5\xD6\xE5"; /* EBCDIC characters "EOV" */
-+#ifdef GNU_MTIO_SUPPORT
- static struct mt_tape_info tapeinfo[] = MT_TAPE_INFO;
- static struct mt_tape_info densinfo[] = {
- {0x01, "NRZI (800 bpi)"},
-@@ -69,6 +70,7 @@
- {0x8C, "EXB-8505 compressed"},
- {0x90, "EXB-8205 compressed"},
- {0, NULL}};
-+#endif
- static BYTE buf[65500];
-
- /*-------------------------------------------------------------------*/
-@@ -76,6 +78,7 @@
- /*-------------------------------------------------------------------*/
- static void print_status (BYTE *devname, long stat)
- {
-+#ifdef GNU_MTIO_SUPPORT
- printf ("HHCTC015I %s status: %8.8lX", devname, stat);
- if (GMT_EOF(stat)) printf (" EOF");
- if (GMT_BOT(stat)) printf (" BOT");
-@@ -89,6 +92,7 @@
- if (GMT_D_800(stat)) printf (" 800");
- if (GMT_DR_OPEN(stat)) printf (" NOTAPE");
- printf ("\n");
-+#endif
-
- } /* end function print_status */
-
-@@ -109,10 +113,12 @@
- return -1;
- }
-
-+#ifdef GNU_MTIO_SUPPORT
- print_status (devname, stblk.mt_gstat);
-
- if (GMT_EOD(stblk.mt_gstat)) return 1;
- if (GMT_EOT(stblk.mt_gstat)) return 1;
-+#endif
-
- return 0;
- } /* end function print_status */
-@@ -205,6 +211,7 @@
- exit (7);
- }
-
-+#ifdef GNU_MTIO_SUPPORT
- /* Display tape status information */
- for (i = 0; tapeinfo[i].t_type != 0
- && tapeinfo[i].t_type != stblk.mt_type; i++);
-@@ -233,6 +240,7 @@
-
- /* Set the tape device to process variable length blocks */
- opblk.mt_op = MTSETBLK;
-+#endif
- opblk.mt_count = 0;
- rc = ioctl (devfd, MTIOCTOP, (char*)&opblk);
- if (rc < 0)
diff --git a/emulators/hercules/files/patch-tapedev.c b/emulators/hercules/files/patch-tapedev.c
deleted file mode 100644
index 1eb7d444e5b7..000000000000
--- a/emulators/hercules/files/patch-tapedev.c
+++ /dev/null
@@ -1,275 +0,0 @@
---- tapedev.c.orig Wed Jul 3 13:21:52 2002
-+++ tapedev.c Mon Sep 2 11:43:24 2002
-@@ -195,6 +195,7 @@
- /*-------------------------------------------------------------------*/
- /* Static data areas */
- /*-------------------------------------------------------------------*/
-+#ifdef GNU_MTIO_SUPPORT
- static struct mt_tape_info tapeinfo[] = MT_TAPE_INFO;
- static struct mt_tape_info densinfo[] = {
- {0x01, "NRZI (800 bpi)"},
-@@ -222,6 +223,7 @@
- {0x8C, "EXB-8505 compressed"},
- {0x90, "EXB-8205 compressed"},
- {0, NULL}};
-+#endif
-
- static PARSER ptab[] =
- {
-@@ -1143,6 +1145,7 @@
- /*-------------------------------------------------------------------*/
- static U32 status_scsitape (DEVBLK *dev)
- {
-+#ifdef HAVE_MTIO_H
- U32 stat; /* Tape status bits */
- int rc; /* Return code */
- struct mtget stblk; /* Area for MTIOCGET ioctl */
-@@ -1159,6 +1162,7 @@
- dev->filename, strerror(errno));
- return 0;
- }
-+#ifdef GNU_MTIO_SUPPORT
- stat = stblk.mt_gstat;
-
- /* Display tape status */
-@@ -1191,10 +1195,14 @@
- dev->prvblkpos = -1;
- dev->blockid = 0;
- }
-+#else
-+ stat = 0;
-+#endif
-
- /* Return tape status */
- return stat;
-
-+#endif
- } /* end function status_scsitape */
-
- /*-------------------------------------------------------------------*/
-@@ -1205,6 +1213,7 @@
- /*-------------------------------------------------------------------*/
- static int open_scsitape (DEVBLK *dev, BYTE *unitstat)
- {
-+#ifdef HAVE_MTIO_H
- int rc; /* Return code */
- int i; /* Array subscript */
- struct mtop opblk; /* Area for MTIOCTOP ioctl */
-@@ -1249,6 +1258,7 @@
- return -1;
- }
-
-+#ifdef GNU_MTIO_SUPPORT
- /* Intervention required if no tape is mounted */
- if (GMT_DR_OPEN(stblk.mt_gstat))
- {
-@@ -1284,6 +1294,7 @@
-
- /* Set the tape device to process variable length blocks */
- opblk.mt_op = MTSETBLK;
-+#endif
- opblk.mt_count = 0;
- rc = ioctl (dev->fd, MTIOCTOP, (char*)&opblk);
- if (rc < 0)
-@@ -1312,6 +1323,12 @@
-
- return 0;
-
-+#else
-+
-+ logmsg ("HHC286I SCSI Support is disabled\n");
-+ return -1
-+
-+#endif
- } /* end function open_scsitape */
-
- /*-------------------------------------------------------------------*/
-@@ -1324,6 +1341,7 @@
- /*-------------------------------------------------------------------*/
- static int read_scsitape (DEVBLK *dev, BYTE *buf, BYTE *unitstat)
- {
-+#ifdef HAVE_MTIO_H
- int rc; /* Return code */
-
- /* Read data block from SCSI tape device */
-@@ -1347,6 +1365,12 @@
- /* Return block length or zero if tapemark */
- return rc;
-
-+#else
-+
-+ logmsg ("HHC286I SCSI Support is disabled\n");
-+ return -1;
-+
-+#endif
- } /* end function read_scsitape */
-
- /*-------------------------------------------------------------------*/
-@@ -1358,6 +1382,7 @@
- static int write_scsitape (DEVBLK *dev, BYTE *buf, U16 len,
- BYTE *unitstat)
- {
-+#ifdef HAVE_MTIO_H
- int rc; /* Return code */
-
- /* Write data block to SCSI tape device */
-@@ -1377,6 +1402,12 @@
- /* Return normal status */
- return 0;
-
-+#else
-+
-+ logmsg ("HHC286I SCSI Support is disabled\n");
-+ return -1;
-+
-+#endif
- } /* end function write_scsitape */
-
- /*-------------------------------------------------------------------*/
-@@ -1387,6 +1418,7 @@
- /*-------------------------------------------------------------------*/
- static int write_scsimark (DEVBLK *dev, BYTE *unitstat)
- {
-+#ifdef HAVE_MTIO_H
- int rc; /* Return code */
- struct mtop opblk; /* Area for MTIOCTOP ioctl */
-
-@@ -1409,6 +1441,12 @@
- /* Return normal status */
- return 0;
-
-+#else
-+
-+ logmsg ("HHC286I SCSI Support is disabled\n");
-+ return -1;
-+
-+#endif
- } /* end function write_scsimark */
-
- /*-------------------------------------------------------------------*/
-@@ -1421,6 +1459,7 @@
- /*-------------------------------------------------------------------*/
- static int fsb_scsitape (DEVBLK *dev, BYTE *unitstat)
- {
-+#ifdef HAVE_MTIO_H
- int rc; /* Return code */
- int fsrerrno; /* Value of errno after MTFSR*/
- U32 stat; /* Tape status bits */
-@@ -1435,6 +1474,7 @@
- /* Obtain tape status after forward space */
- stat = status_scsitape (dev);
-
-+#ifdef GNU_MTIO_SUPPORT
- /* If I/O error and status indicates EOF, then a tapemark
- was detected, so increment the file number and return 0 */
- if (rc < 0 && fsrerrno == EIO && GMT_EOF(stat))
-@@ -1443,6 +1483,7 @@
- dev->blockid++;
- return 0;
- }
-+#endif
-
- /* Handle MTFSR error condition */
- if (rc < 0)
-@@ -1461,6 +1502,12 @@
- /* Return +1 to indicate forward space successful */
- return +1;
-
-+#else
-+
-+ logmsg ("HHC286I SCSI Support is disabled\n");
-+ return -1;
-+
-+#endif
- } /* end function fsb_scsitape */
-
- /*-------------------------------------------------------------------*/
-@@ -1473,6 +1520,7 @@
- /*-------------------------------------------------------------------*/
- static int bsb_scsitape (DEVBLK *dev, BYTE *unitstat)
- {
-+#ifdef HAVE_MTIO_H
- int rc; /* Return code */
- int bsrerrno; /* Value of errno after MTBSR*/
- U32 stat; /* Tape status bits */
-@@ -1481,6 +1529,7 @@
- /* Obtain tape status before backward space */
- stat = status_scsitape (dev);
-
-+#ifdef GNU_MTIO_SUPPORT
- /* Unit check if already at start of tape */
- if (GMT_BOT(stat))
- {
-@@ -1489,6 +1538,7 @@
- *unitstat = CSW_CE | CSW_DE | CSW_UC;
- return -1;
- }
-+#endif
-
- /* Backspace block on SCSI tape */
- opblk.mt_op = MTBSR;
-@@ -1527,6 +1577,12 @@
- /* Return +1 to indicate backspace successful */
- return +1;
-
-+#else
-+
-+ logmsg ("HHC286I SCSI Support is disabled\n");
-+ return -1;
-+
-+#endif
- } /* end function bsb_scsitape */
-
- /*-------------------------------------------------------------------*/
-@@ -1538,6 +1594,7 @@
- /*-------------------------------------------------------------------*/
- static int fsf_scsitape (DEVBLK *dev, BYTE *unitstat)
- {
-+#ifdef HAVE_MTIO_H
- int rc; /* Return code */
- struct mtop opblk; /* Area for MTIOCTOP ioctl */
-
-@@ -1563,6 +1620,12 @@
- /* Return normal status */
- return 0;
-
-+#else
-+
-+ logmsg ("HHC286I SCSI Support is disabled\n");
-+ return -1;
-+
-+#endif
- } /* end function fsf_scsitape */
-
- /*-------------------------------------------------------------------*/
-@@ -1574,6 +1637,7 @@
- /*-------------------------------------------------------------------*/
- static int bsf_scsitape (DEVBLK *dev, BYTE *unitstat)
- {
-+#ifdef HAVE_MTIO_H
- int rc; /* Return code */
- struct mtop opblk; /* Area for MTIOCTOP ioctl */
-
-@@ -1600,6 +1664,12 @@
- /* Return normal status */
- return 0;
-
-+#else
-+
-+ logmsg("HHC286I SCSI Support is disabled\n");
-+ return -1;
-+
-+#endif
- } /* end function bsf_scsitape */
-
- /*-------------------------------------------------------------------*/
-@@ -2726,7 +2796,9 @@
-
- case TAPEDEVT_SCSITAPE:
- stat = status_scsitape (dev);
-+#ifdef GNU_MTIO_SUPPORT
- if (GMT_BOT(stat)) dev->sense[1] |= SENSE1_TAPE_LOADPT;
-+#endif
- break;
-
- case TAPEDEVT_OMATAPE:
diff --git a/emulators/hercules/files/patch-version.c b/emulators/hercules/files/patch-version.c
deleted file mode 100644
index df908e14c311..000000000000
--- a/emulators/hercules/files/patch-version.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- version.c.orig Mon Sep 2 11:15:53 2002
-+++ version.c Mon Sep 2 11:17:51 2002
-@@ -106,6 +106,14 @@
- "No HET BZIP2 support",
- #endif
-
-+#if defined(GNU_MTIO_SUPPORT)
-+ "Using GNU tape handling",
-+#elif defined(HAVE_MTIO_H)
-+ "Using generic Unix tape handling",
-+#else
-+ "No SCSI tape support",
-+#endif
-+
- " "
-
- };
diff --git a/emulators/hercules/pkg-plist b/emulators/hercules/pkg-plist
index ff8323e5673d..4a6ef99e71c4 100644
--- a/emulators/hercules/pkg-plist
+++ b/emulators/hercules/pkg-plist
@@ -1,14 +1,25 @@
bin/cckd2ckd
bin/cckdcdsk
bin/cckdcomp
+bin/cckddiag
bin/cckdswap
+bin/cfba2fba
bin/ckd2cckd
+bin/cvslvlck
+bin/dasdcat
+bin/dasdconv
+bin/dasdcopy
bin/dasdinit
bin/dasdisup
+bin/dasdlist
bin/dasdload
bin/dasdls
bin/dasdpdsu
+bin/dasdseq
bin/dmap2hrc
+bin/fba2cfba
+bin/hercifc
+bin/herclin
bin/hercules
bin/hetget
bin/hetinit
@@ -17,15 +28,52 @@ bin/hetupd
bin/tapecopy
bin/tapemap
bin/tapesplt
-%%PORTDOCS%%share/doc/hercules/cckddasd.html
-%%PORTDOCS%%share/doc/hercules/hercconf.html
-%%PORTDOCS%%share/doc/hercules/hercfaq.html
-%%PORTDOCS%%share/doc/hercules/hercinst.html
-%%PORTDOCS%%share/doc/hercules/herclic.html
-%%PORTDOCS%%share/doc/hercules/hercload.html
-%%PORTDOCS%%share/doc/hercules/hercnew.html
-%%PORTDOCS%%share/doc/hercules/herctcp.html
-%%PORTDOCS%%share/doc/hercules/hercules.cnf
-%%PORTDOCS%%share/doc/hercules/hercules.css
-%%PORTDOCS%%share/doc/hercules/index.html
-%%PORTDOCS%%@dirrm share/doc/hercules
+lib/libherc.la
+lib/libherc.so
+lib/libhercd.la
+lib/libhercd.so
+lib/libhercs.la
+lib/libhercs.so
+lib/libherct.la
+lib/libherct.so
+lib/libhercu.la
+lib/libhercu.so
+lib/hercules/dyncrypt.la
+lib/hercules/dyncrypt.so
+lib/hercules/dyngui.la
+lib/hercules/dyngui.so
+lib/hercules/dyninst.la
+lib/hercules/dyninst.so
+lib/hercules/hdt1052c.la
+lib/hercules/hdt1052c.so
+lib/hercules/hdt1403.la
+lib/hercules/hdt1403.so
+lib/hercules/hdt2703.la
+lib/hercules/hdt2703.so
+lib/hercules/hdt2880.la
+lib/hercules/hdt2880.so
+lib/hercules/hdt3088.la
+lib/hercules/hdt3088.so
+lib/hercules/hdt3270.la
+lib/hercules/hdt3270.so
+lib/hercules/hdt3420.la
+lib/hercules/hdt3420.so
+lib/hercules/hdt3505.la
+lib/hercules/hdt3505.so
+lib/hercules/hdt3525.la
+lib/hercules/hdt3525.so
+lib/hercules/hdteq.la
+lib/hercules/hdteq.so
+lib/hercules/hdtqeth.la
+lib/hercules/hdtqeth.so
+@dirrm lib/hercules
+%%DATADIR%%/awssl-v19g
+%%DATADIR%%/awswrite.jcl
+%%DATADIR%%/cckddump.hla
+%%DATADIR%%/cckdload.hla
+%%DATADIR%%/rawstape.jcl
+%%DATADIR%%/tapeconv.jcl
+%%DATADIR%%/zzsacard.bin
+@dirrm share/hercules
+share/locale/de/LC_MESSAGES/hercules.mo
+share/locale/nl/LC_MESSAGES/hercules.mo