summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emulators/hercules/Makefile21
-rw-r--r--emulators/hercules/files/md53
-rw-r--r--emulators/hercules/files/patch-sum7
-rw-r--r--emulators/hercules/patches/patch-aa19
-rw-r--r--emulators/hercules/patches/patch-ab30
-rw-r--r--emulators/hercules/patches/patch-ac63
-rw-r--r--emulators/hercules/patches/patch-ad18
-rw-r--r--emulators/hercules/patches/patch-ae58
-rw-r--r--emulators/hercules/pkg/DESCR8
-rw-r--r--emulators/hercules/pkg/PLIST24
10 files changed, 251 insertions, 0 deletions
diff --git a/emulators/hercules/Makefile b/emulators/hercules/Makefile
new file mode 100644
index 00000000000..19ad99772f9
--- /dev/null
+++ b/emulators/hercules/Makefile
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+
+DISTNAME= hercules-2.11
+CATEGORIES= emulators
+MASTER_SITES= http://www.conmicro.cx/hercules/
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://www.snes9x.com/
+COMMENT= s370 emulator
+
+DEPENDS= pth-*:../../devel/pth
+
+USE_GMAKE= yes
+MAKEFILE= makefile
+
+pre-install:
+ ${MKDIR} ${PREFIX}/share/examples/hercules
+ ${BSD_INSTALL_DATA} ${WRKSRC}/hercules.cnf ${PREFIX}/share/examples/hercules/
+ ${BSD_INSTALL_DATA} ${WRKSRC}/zzsa.cnf ${PREFIX}/share/examples/hercules/
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/hercules/files/md5 b/emulators/hercules/files/md5
new file mode 100644
index 00000000000..af4aef01721
--- /dev/null
+++ b/emulators/hercules/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+
+MD5 (hercules-2.11.tar.gz) = 7d48daa69267f70fd1a77601fc07e802
diff --git a/emulators/hercules/files/patch-sum b/emulators/hercules/files/patch-sum
new file mode 100644
index 00000000000..ce4e03c492c
--- /dev/null
+++ b/emulators/hercules/files/patch-sum
@@ -0,0 +1,7 @@
+$NetBSD: patch-sum,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+
+MD5 (patch-aa) = 31a8b138c0104d09bceb96b4e5d8dc20
+MD5 (patch-ab) = 988467f26ca940d05be7d0255e88777c
+MD5 (patch-ac) = 421c7f3a40af82630c6bd3bdebd3c23c
+MD5 (patch-ad) = 89b5ae924983465348273dd59ee38435
+MD5 (patch-ae) = 34a1f9c2e71ef45de7728e9babbd0a57
diff --git a/emulators/hercules/patches/patch-aa b/emulators/hercules/patches/patch-aa
new file mode 100644
index 00000000000..a677a1a69fe
--- /dev/null
+++ b/emulators/hercules/patches/patch-aa
@@ -0,0 +1,19 @@
+$NetBSD: patch-aa,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+
+Set up compilation flags for NetBSD
+
+--- makefile 2001/02/19 09:39:42 1.1
++++ makefile 2001/02/19 09:40:37
+@@ -38,9 +38,9 @@
+
+ # Uncomment these lines for NetBSD, with either the unproven-pthreads
+ # or pth packages
+-#CFLAGS += -I/usr/pkg/pthreads/include -I/usr/pkg/include
+-#LFLAGS += -L/usr/pkg/pthreads/lib -R/usr/pkg/pthreads
+-#LFLAGS += -L/usr/pkg/lib -R/usr/pkg/pthreads/lib
++CFLAGS += -I${PREFIX}/pthreads/include -I${PREFIX}/include
++LFLAGS += -L${PREFIX}/pthreads/lib -R${PREFIX}/pthreads
++LFLAGS += -L${PREFIX}/lib -R${PREFIX}/pthreads/lib
+
+ # Reverse the comments below to disable Compressed CKD Dasd support
+ #CFLAGS += -DNO_CCKD
diff --git a/emulators/hercules/patches/patch-ab b/emulators/hercules/patches/patch-ab
new file mode 100644
index 00000000000..9619d8ed0e7
--- /dev/null
+++ b/emulators/hercules/patches/patch-ab
@@ -0,0 +1,30 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+
+Linux tape handling.
+
+--- tapedev.c 2001/02/19 11:50:37 1.1
++++ tapedev.c 2001/02/19 11:57:16
+@@ -1149,7 +1149,11 @@
+ dev->filename, strerror(errno));
+ return 0;
+ }
++#if (defined(BSD) && BSD >= 199306)
++ stat = (stblk.mt_dsreg << 16) | stblk.mt_erreg;
++#else
+ stat = stblk.mt_gstat;
++#endif
+
+ /* Display tape status */
+ if (dev->ccwtrace || dev->ccwstep)
+@@ -1240,7 +1244,11 @@
+ }
+
+ /* Intervention required if no tape is mounted */
++#if (defined(BSD) && BSD >= 199306)
++ if (GMT_DR_OPEN(((stblk.mt_dsreg << 16) | stblk.mt_erreg)))
++#else
+ if (GMT_DR_OPEN(stblk.mt_gstat))
++#endif
+ {
+ dev->sense[0] = SENSE_IR;
+ dev->sense[1] = SENSE1_TAPE_TUB;
diff --git a/emulators/hercules/patches/patch-ac b/emulators/hercules/patches/patch-ac
new file mode 100644
index 00000000000..ba36a14ef90
--- /dev/null
+++ b/emulators/hercules/patches/patch-ac
@@ -0,0 +1,63 @@
+$NetBSD: patch-ac,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+
+Linux tape handling.
+
+--- hercules.h 2001/02/19 11:13:51 1.1
++++ hercules.h 2001/02/19 11:52:42
+@@ -935,6 +935,56 @@
+ #define CCKD_OPEN_RD 2
+ #define CCKD_OPEN_RW 3
+
++#if defined(BSD) && BSD >= 199306
++struct mt_tape_info {
++ BYTE t_type;
++ const char *t_name;
++};
++
++#define MT_TAPE_INFO \
++{ \
++ {MT_ISUNKNOWN, "Unknown type of tape device"}, \
++ {MT_ISQIC02, "Generic QIC-02 tape streamer"} \
++}
++
++/* Generic Mag Tape (device independent) status macros for examining
++ * mt_gstat -- HP-UX compatible.
++ * There is room for more generic status bits here, but I don't
++ * know which of them are reserved. At least three or so should
++ * be added to make this really useful.
++ */
++#define GMT_EOF(x) ((x) & 0x80000000)
++#define GMT_BOT(x) ((x) & 0x40000000)
++#define GMT_EOT(x) ((x) & 0x20000000)
++#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
++#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
++#define GMT_WR_PROT(x) ((x) & 0x04000000)
++/* #define GMT_ ? ((x) & 0x02000000) */
++#define GMT_ONLINE(x) ((x) & 0x01000000)
++#define GMT_D_6250(x) ((x) & 0x00800000)
++#define GMT_D_1600(x) ((x) & 0x00400000)
++#define GMT_D_800(x) ((x) & 0x00200000)
++/* #define GMT_ ? ((x) & 0x00100000) */
++/* #define GMT_ ? ((x) & 0x00080000) */
++#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */
++/* #define GMT_ ? ((x) & 0x00020000) */
++#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */
++/* 16 generic status bits unused */
++/* SCSI-tape specific definitions */
++
++/* Bitfield shifts in the status */
++#define MT_ST_BLKSIZE_SHIFT 0
++#define MT_ST_BLKSIZE_MASK 0xffffff
++#define MT_ST_DENSITY_SHIFT 24
++#define MT_ST_DENSITY_MASK 0xff000000
++
++#define MTSETBLK 20 /* set block length (SCSI) */
++
++#define MT_ISUNKNOWN 0x01
++#define MT_ISQIC02 0x02
++
++#endif
++
+ /*-------------------------------------------------------------------*/
+ /* Global data areas in module config.c */
+ /*-------------------------------------------------------------------*/
diff --git a/emulators/hercules/patches/patch-ad b/emulators/hercules/patches/patch-ad
new file mode 100644
index 00000000000..f2ecc9ddd9b
--- /dev/null
+++ b/emulators/hercules/patches/patch-ad
@@ -0,0 +1,18 @@
+$NetBSD: patch-ad,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+
+Linux tape handling.
+
+--- hercifc.c 2001/02/19 12:08:31 1.1
++++ hercifc.c 2001/02/19 12:08:42
+@@ -64,7 +64,11 @@
+ sin = (struct sockaddr_in*)
+ (oper == SIOCSIFADDR ? &ifreq.ifr_addr
+ :oper == SIOCSIFDSTADDR ? &ifreq.ifr_dstaddr
++#ifdef __NetBSD__
++ :oper == SIOCSIFNETMASK ? &ifreq.ifr_broadaddr
++#else
+ :oper == SIOCSIFNETMASK ? &ifreq.ifr_netmask
++#endif
+ :NULL);
+
+ /* Store the IP address into the structure */
diff --git a/emulators/hercules/patches/patch-ae b/emulators/hercules/patches/patch-ae
new file mode 100644
index 00000000000..d1b98f85d49
--- /dev/null
+++ b/emulators/hercules/patches/patch-ae
@@ -0,0 +1,58 @@
+$NetBSD: patch-ae,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+
+Linux tape handling.
+
+--- tapecopy.c 2001/02/19 12:10:13 1.1
++++ tapecopy.c 2001/02/19 12:14:00
+@@ -113,6 +113,7 @@
+ {
+ int rc; /* Return code */
+ struct mtget stblk; /* Area for MTIOCGET ioctl */
++long gstat;
+
+ rc = ioctl (devfd, MTIOCGET, (char*)&stblk);
+ if (rc < 0)
+@@ -122,10 +123,15 @@
+ return -1;
+ }
+
+- print_status (devname, stblk.mt_gstat);
++#if (defined(BSD) && BSD >= 199306)
++ gstat = (stblk.mt_dsreg << 16) | stblk.mt_erreg;
++#else
++ gstat = stblk.mt_gstat;
++#endif
++ print_status (devname, gstat);
+
+- if (GMT_EOD(stblk.mt_gstat)) return 1;
+- if (GMT_EOT(stblk.mt_gstat)) return 1;
++ if (GMT_EOD(gstat)) return 1;
++ if (GMT_EOT(gstat)) return 1;
+
+ return 0;
+ } /* end function print_status */
+@@ -152,6 +158,7 @@
+ long density; /* Tape density code */
+ BYTE labelrec[81]; /* Standard label (ASCIIZ) */
+ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */
++long gstat;
+
+ /* The first argument is the tape device name */
+ if (argc > 1 && argv[1] != NULL && strlen(argv[1]) > 5
+@@ -209,9 +216,14 @@
+ else
+ printf ("%s tape density code: 0x%lX\n", devname, density);
+
+- if (stblk.mt_gstat != 0)
++#if (defined(BSD) && BSD >= 199306)
++ gstat = (stblk.mt_dsreg << 16) | stblk.mt_erreg;
++#else
++ gstat = stblk.mt_gstat;
++#endif
++ if (gstat != 0)
+ {
+- print_status (devname, stblk.mt_gstat);
++ print_status (devname, gstat);
+ }
+
+ /* Set the tape device to process variable length blocks */
diff --git a/emulators/hercules/pkg/DESCR b/emulators/hercules/pkg/DESCR
new file mode 100644
index 00000000000..f1c4ad5a983
--- /dev/null
+++ b/emulators/hercules/pkg/DESCR
@@ -0,0 +1,8 @@
+Hercules is an open source software implementation of the mainframe
+System/370 and ESA/390 architectures, in addition to the new 64-bit
+z/Architecure. Hercules runs under Linux, Windows 98, Windows NT,
+Windows 2000, and NetBSD. Hercules was created by Roger Bowler and is
+maintained by Jay Maynard. Jan Jaeger designed and implemented many
+of the advanced features of Hercules, including dynamic
+reconfiguration, integrated console, interpretive execution, and
+z/Architecture support.
diff --git a/emulators/hercules/pkg/PLIST b/emulators/hercules/pkg/PLIST
new file mode 100644
index 00000000000..aa91b09e4f5
--- /dev/null
+++ b/emulators/hercules/pkg/PLIST
@@ -0,0 +1,24 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+bin/hercules
+bin/hercifc
+bin/dasdinit
+bin/dasdisup
+bin/dasdload
+bin/dasdls
+bin/dasdpdsu
+bin/tapecopy
+bin/tapelist
+bin/tapemap
+bin/tapesplit
+bin/cckd2ckd
+bin/cckdcdsk
+bin/ckd2cckd
+bin/cckdcomp
+bin/hetget
+bin/hetinit
+bin/hetmap
+bin/hetupd
+bin/dasdlist
+share/examples/hercules/hercules.cnf
+share/examples/hercules/zzsa.cnf
+@dirrm share/examples/hercules