diff options
author | rhialto <rhialto@pkgsrc.org> | 2021-11-06 16:43:23 +0000 |
---|---|---|
committer | rhialto <rhialto@pkgsrc.org> | 2021-11-06 16:43:23 +0000 |
commit | d1f6277f7cb6a5b7f5cffaf3dcb70e02bad7b7fe (patch) | |
tree | 1077cd786b4c5a84923533999a3e64edfadd3765 /emulators | |
parent | 88488a8e406aff37c93f3623e9c381ccfecfb7da (diff) | |
download | pkgsrc-d1f6277f7cb6a5b7f5cffaf3dcb70e02bad7b7fe.tar.gz |
emulators/hercules4sdl: new package
The SoftDevLabs version of Hercules 4.x (Hyperion).
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/Makefile | 3 | ||||
-rw-r--r-- | emulators/hercules4sdl/DESCR | 15 | ||||
-rw-r--r-- | emulators/hercules4sdl/Makefile | 56 | ||||
-rw-r--r-- | emulators/hercules4sdl/PLIST | 198 | ||||
-rw-r--r-- | emulators/hercules4sdl/distinfo | 10 | ||||
-rw-r--r-- | emulators/hercules4sdl/patches/patch-Makefile.am | 44 | ||||
-rw-r--r-- | emulators/hercules4sdl/patches/patch-configure.ac | 45 | ||||
-rw-r--r-- | emulators/hercules4sdl/patches/patch-hifr.h | 15 | ||||
-rw-r--r-- | emulators/hercules4sdl/patches/patch-msgenu.h | 17 | ||||
-rw-r--r-- | emulators/hercules4sdl/patches/patch-tuntap.c | 61 |
10 files changed, 463 insertions, 1 deletions
diff --git a/emulators/Makefile b/emulators/Makefile index 4a8c61c85f5..898e02c2995 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.341 2021/04/08 15:43:17 nia Exp $ +# $NetBSD: Makefile,v 1.342 2021/11/06 16:43:23 rhialto Exp $ # COMMENT= Emulators for other machines and systems @@ -87,6 +87,7 @@ SUBDIR+= hatari SUBDIR+= haxm SUBDIR+= hercules SUBDIR+= hercules-images +SUBDIR+= hercules4sdl SUBDIR+= ia64sim SUBDIR+= kegs SUBDIR+= keystone diff --git a/emulators/hercules4sdl/DESCR b/emulators/hercules4sdl/DESCR new file mode 100644 index 00000000000..c9b3c425cab --- /dev/null +++ b/emulators/hercules4sdl/DESCR @@ -0,0 +1,15 @@ +This is an activiely developed version of emulators/hercules. + +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 +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. + +Relevant mailing lists include https://groups.io/g/h390-vm and +https://hercules-390.groups.io/g/group. + +This version is developed by SoftDevLabs. diff --git a/emulators/hercules4sdl/Makefile b/emulators/hercules4sdl/Makefile new file mode 100644 index 00000000000..a52bc98c366 --- /dev/null +++ b/emulators/hercules4sdl/Makefile @@ -0,0 +1,56 @@ +# $NetBSD: Makefile,v 1.1 2021/11/06 16:43:23 rhialto Exp $ + +PKGNAME= hercules4sdl-4.3 +DISTNAME= Release_${PKGVERSION_NOREV} +CATEGORIES= emulators +MASTER_SITES= ${MASTER_SITE_GITHUB:=SDL-Hercules-390/} +EXTRACT_USING= bsdtar +DIST_SUBDIR= hercules4sdl + +MAINTAINER= rhialto@NetBSD.org +HOMEPAGE= https://github.com/SDL-Hercules-390/hyperion +COMMENT= The SoftDevLabs version of Hercules 4.x (Hyperion) +LICENSE= qpl-v1.0 + +GITHUB_PROJECT= hyperion +GITHUB_TAG= Release_${PKGVERSION_NOREV} + +GNU_CONFIGURE= yes +USE_TOOLS+= autoconf automake flex gawk grep gm4 gmake perl gsed +USE_TOOLS+= bash +USE_LIBTOOL= YES +USE_LANGUAGES+= c +PTHREAD_OPTS+= require +REPLACE_BASH= _dynamic_version +.if ${MACHINE_ARCH} == i386 +CFLAGS+= -march=i586 +.endif + +SUBST_CLASSES+= prefix +SUBST_STAGE.prefix= pre-configure +SUBST_MESSAGE.prefix= Correcting configuration path +SUBST_FILES.prefix= hercules.cnf +SUBST_SED.prefix= -e 's,/usr/local,${PREFIX},g' + +CONFIGURE_ARGS+= --enable-extpkgs=${PREFIX}/lib/hercules4sdl + +INSTALLATION_DIRS+= share/examples/hercules + +pre-configure: + ${RM} ${WRKSRC}/ltdl.h ${WRKSRC}/ltdl.c + cd ${WRKSRC} && ./autogen.sh + +post-install: + ${INSTALL_DATA} ${WRKSRC}/hercules.cnf ${DESTDIR}${PREFIX}/share/examples/hercules/ + +.include "../../archivers/bzip2/buildlink3.mk" +.include "../../converters/libiconv/buildlink3.mk" +.include "../../devel/libltdl/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.include "../../math/hercules4sdl-decnumber/buildlink3.mk" +.include "../../math/hercules4sdl-softfloat/buildlink3.mk" +.include "../../net/hercules4sdl-telnet/buildlink3.mk" +.include "../../security/hercules4sdl-crypto/buildlink3.mk" + +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/emulators/hercules4sdl/PLIST b/emulators/hercules4sdl/PLIST new file mode 100644 index 00000000000..8740c243b4d --- /dev/null +++ b/emulators/hercules4sdl/PLIST @@ -0,0 +1,198 @@ +@comment $NetBSD: PLIST,v 1.1 2021/11/06 16:43:23 rhialto Exp $ +bin/cckd2ckd +bin/cckd642ckd +bin/cckdcdsk +bin/cckdcdsk64 +bin/cckdcomp +bin/cckdcomp64 +bin/cckddiag +bin/cckddiag64 +bin/cckdmap +bin/cckdswap +bin/cckdswap64 +bin/cfba2fba +bin/cfba642fba +bin/ckd2cckd +bin/ckd2cckd64 +bin/convto64 +bin/dasdcat +bin/dasdconv +bin/dasdconv64 +bin/dasdcopy +bin/dasdcopy64 +bin/dasdinit +bin/dasdinit64 +bin/dasdisup +bin/dasdlist +bin/dasdload +bin/dasdload64 +bin/dasdls +bin/dasdpdsu +bin/dasdseq +bin/dasdser +bin/dmap2hrc +bin/fba2cfba +bin/fba2cfba64 +bin/hercifc +bin/herclin +bin/hercules +bin/hetget +bin/hetinit +bin/hetmap +bin/hetupd +bin/maketape +bin/tapecopy +bin/tapemap +bin/tapesplt +bin/vmfplc2 +bin/voldsext.cmd +lib/hercules/dyncrypt.la +lib/hercules/dyngui.la +lib/hercules/hdt1052c.la +lib/hercules/hdt1403.la +lib/hercules/hdt2703.la +lib/hercules/hdt2880.la +lib/hercules/hdt3088.la +lib/hercules/hdt3270.la +lib/hercules/hdt3420.la +lib/hercules/hdt3505.la +lib/hercules/hdt3525.la +lib/hercules/hdt3705.la +lib/hercules/hdtdummy.la +lib/hercules/hdteq.la +lib/hercules/hdtptp.la +lib/hercules/hdtqeth.la +lib/hercules/hdttcpnje.la +lib/hercules/hdtzfcp.la +lib/libhdt3420_not_mod.la +lib/libherc.la +lib/libhercd.la +lib/libhercs.la +lib/libherct.la +lib/libhercu.la +man/man1/cckddiag.1 +man/man1/dasdseq.1 +man/man1/vmfplc2.1 +man/man4/cckd.4 +share/examples/hercules/hercules.cnf +share/hercules/TMOUNT.txt +share/hercules/awssl-v19g +share/hercules/awswrite.jcl +share/hercules/cckddasd.html +share/hercules/cckddu64.hla +share/hercules/cckddump.hla +share/hercules/cckdload.hla +share/hercules/fishgui.html +share/hercules/hercconf.html +share/hercules/hercfaq.html +share/hercules/hercinst.html +share/hercules/herclic.html +share/hercules/hercload.html +share/hercules/hercmsca.html +share/hercules/hercmscf.html +share/hercules/hercmscp.html +share/hercules/hercmsct.html +share/hercules/hercmscu.html +share/hercules/hercmsda.html +share/hercules/hercmsdc.html +share/hercules/hercmsdg.html +share/hercules/hercmsdi.html +share/hercules/hercmsdl.html +share/hercules/hercmsdn.html +share/hercules/hercmsds.html +share/hercules/hercmsdt.html +share/hercules/hercmsdu.html +share/hercules/hercmsg.html +share/hercules/hercmshd.html +share/hercules/hercmshe.html +share/hercules/hercmshg.html +share/hercules/hercmshm.html +share/hercules/hercmsht.html +share/hercules/hercmshu.html +share/hercules/hercmsif.html +share/hercules/hercmsin.html +share/hercules/hercmslc.html +share/hercules/hercmslg.html +share/hercules/hercmspn.html +share/hercules/hercmspr.html +share/hercules/hercmspu.html +share/hercules/hercmsrd.html +share/hercules/hercmssd.html +share/hercules/hercmsta.html +share/hercules/hercmstc.html +share/hercules/hercmste.html +share/hercules/hercmstm.html +share/hercules/hercmsts.html +share/hercules/hercmstt.html +share/hercules/hercmstu.html +share/hercules/hercmsvm.html +share/hercules/hercnew.html +share/hercules/hercrdr.html +share/hercules/hercrnot.html +share/hercules/hercsupp.html +share/hercules/herctcp.html +share/hercules/hercules.css +share/hercules/hercules.html +share/hercules/images/back.gif +share/hercules/images/bkued.gif +share/hercules/images/blueu.gif +share/hercules/images/dial1.gif +share/hercules/images/dial2.gif +share/hercules/images/dial3.gif +share/hercules/images/dial4.gif +share/hercules/images/favicon.ico +share/hercules/images/greend.gif +share/hercules/images/greenu.gif +share/hercules/images/hercpic-rblk-256.gif +share/hercules/images/hercpic-rblk-80.gif +share/hercules/images/interruptd.gif +share/hercules/images/interruptu.gif +share/hercules/images/loadd.gif +share/hercules/images/loadoffu.gif +share/hercules/images/loadonu.gif +share/hercules/images/loadu.gif +share/hercules/images/manoffu.gif +share/hercules/images/manonu.gif +share/hercules/images/note.gif +share/hercules/images/osi-certified-60x50.jpg +share/hercules/images/poweroffd.gif +share/hercules/images/poweroffu.gif +share/hercules/images/poweronoffd.gif +share/hercules/images/poweronoffu.gif +share/hercules/images/poweronond.gif +share/hercules/images/powerononu.gif +share/hercules/images/redd.gif +share/hercules/images/redu.gif +share/hercules/images/restartd.gif +share/hercules/images/restartu.gif +share/hercules/images/startd.gif +share/hercules/images/startu.gif +share/hercules/images/stopd.gif +share/hercules/images/stopu.gif +share/hercules/images/stored.gif +share/hercules/images/storeu.gif +share/hercules/images/sysoffu.gif +share/hercules/images/sysonu.gif +share/hercules/images/telnetputtyconndata.png +share/hercules/images/telnetputtysession.png +share/hercules/images/telnetputtyterminal.png +share/hercules/images/telnetwin.png +share/hercules/images/telnetwinntconnect.png +share/hercules/images/telnetwinnttermpref.png +share/hercules/images/translucentoffd.gif +share/hercules/images/translucentoffu.gif +share/hercules/images/translucentond.gif +share/hercules/images/translucentonu.gif +share/hercules/images/waitoffu.gif +share/hercules/images/waitonu.gif +share/hercules/include/footer.htmlpart +share/hercules/include/header.htmlpart +share/hercules/index.html +share/hercules/rawstape.jcl +share/hercules/rexx.html +share/hercules/scsiboot +share/hercules/shared.html +share/hercules/tapeconv.jcl +share/hercules/tasks.html +share/hercules/telnet.html +share/hercules/zzsacard.bin diff --git a/emulators/hercules4sdl/distinfo b/emulators/hercules4sdl/distinfo new file mode 100644 index 00000000000..14a8f6637ef --- /dev/null +++ b/emulators/hercules4sdl/distinfo @@ -0,0 +1,10 @@ +$NetBSD: distinfo,v 1.1 2021/11/06 16:43:23 rhialto Exp $ + +BLAKE2s (hercules4sdl/Release_4.3.tar.gz) = 5931c6762e5e6585c44052732628a1aec6d156422dd7aaf8b3b1a335aa8218a0 +SHA512 (hercules4sdl/Release_4.3.tar.gz) = e2591b16ecc08f952f16c013764a1d6bfd88aafe9620130dca9619a8af47f2cc04af7d7552c08f75ff6000854fe8e698350b344dbb573551701a610df68fd00a +Size (hercules4sdl/Release_4.3.tar.gz) = 11609664 bytes +SHA1 (patch-Makefile.am) = 85b65386cfde0d7c180abaeaab67e05ad7d07385 +SHA1 (patch-configure.ac) = b7f79b0a12cfe20eab389b59ace08bea427d2b63 +SHA1 (patch-hifr.h) = 6b878b957d1847296882316067281b05872a760c +SHA1 (patch-msgenu.h) = 947d7ddf4395c6c91d2f6640c9d06e8880c8fdf9 +SHA1 (patch-tuntap.c) = 6067b1be32d2cd3aa4ad57e63a7483aa823fbcf1 diff --git a/emulators/hercules4sdl/patches/patch-Makefile.am b/emulators/hercules4sdl/patches/patch-Makefile.am new file mode 100644 index 00000000000..9973c2eae76 --- /dev/null +++ b/emulators/hercules4sdl/patches/patch-Makefile.am @@ -0,0 +1,44 @@ +$NetBSD: patch-Makefile.am,v 1.1 2021/11/06 16:43:23 rhialto Exp $ + +* Fix build. Use devel/libltdl instead of internal libltdl. +- Build dynamic modules only dynamic (-shared), not also static. + +--- Makefile.am.orig 2020-11-27 18:45:12.000000000 +0000 ++++ Makefile.am +@@ -11,7 +11,7 @@ extpkg_headers = @EXTPKG_HEADERS@ + extpkg_ldadd = @EXTPKG_LDADD@ + hqa_inc = @HQA_INC@ + lns = @LN_S@ +-ldadd = @LIBS@ ++ldadd = @LIBS@ -lltdl + + #------------------------------------------------------------------------------ + +@@ -142,9 +142,9 @@ dyndev_SRC = \ + # to Windows DLLs + #----------------------------------------------------------------- + +-XSTATIC = ++XSTATIC = -shared + DYNSRC = +-LTDL = ltdl.c ++LTDL = + + DYNMOD_LD_FLAGS = \ + -module \ +@@ -512,7 +512,6 @@ libherc_la_SOURCES = \ + $(DYNSRC) + + EXTRA_libherc_la_SOURCES = \ +- ltdl.c \ + memrchr.c \ + $(dynamic_SRC) \ + $(dyndev_SRC) \ +@@ -956,7 +955,6 @@ noinst_HEADERS = \ + instfmts.h \ + linklist.h \ + logger.h \ +- ltdl.h \ + machdep.h \ + memrchr.h \ + mpc.h \ diff --git a/emulators/hercules4sdl/patches/patch-configure.ac b/emulators/hercules4sdl/patches/patch-configure.ac new file mode 100644 index 00000000000..4da7a6f54b8 --- /dev/null +++ b/emulators/hercules4sdl/patches/patch-configure.ac @@ -0,0 +1,45 @@ +$NetBSD: patch-configure.ac,v 1.1 2021/11/06 16:43:23 rhialto Exp $ + +- Avoid -march=xxx because it makes binaries nonportable. +- Fix suffix of helper libraries. + +--- configure.ac.orig 2020-11-27 18:45:12.000000000 +0000 ++++ configure.ac +@@ -2826,7 +2826,8 @@ if test "$hc_cv_auto_optimize" = "yes"; + if test "$hc_cv_is_intel_x86_arch" = "yes"; then + + # Set CPU type +- hc_cv_optimization_flags="$hc_cv_optimization_flags -march=$hc_cv_intel_cpu_type" ++ # Don't do this: it makes binaries unportable. ++ #hc_cv_optimization_flags="$hc_cv_optimization_flags -march=$hc_cv_intel_cpu_type" + + # Dynamically inline small block string operations + # (subroutine calls still made for large area calls) +@@ -3031,9 +3032,9 @@ test "$hc_cv_is_mingw" = "yes" && + #------------------------------------------------------# + + if test "$hc_cv_opt_debug" = "yes"; then +- hc_cv_pkg_lib_suffix=${hc_cv_cpu_bits}d ++ hc_cv_pkg_lib_suffix=d_pic + else +- hc_cv_pkg_lib_suffix=${hc_cv_cpu_bits} ++ hc_cv_pkg_lib_suffix=_pic + fi + + AC_CACHE_SAVE() +@@ -3229,10 +3230,11 @@ extpkg_ldadd="${crypto_libdir}/${crypto_ + ##---------------------------------------------------------------- + ## DEBUGGING + ##---------------------------------------------------------------- +-## AC_MSG_NOTICE( [Using crypto_libdir = ${crypto_libdir}] ) +-## AC_MSG_NOTICE( [Using decnumber_libdir = ${decnumber_libdir}] ) +-## AC_MSG_NOTICE( [Using softfloat_libdir = ${softfloat_libdir}] ) +-## AC_MSG_NOTICE( [Using telnet_libdir = ${telnet_libdir}] ) ++AC_MSG_NOTICE( [Using crypto_libdir = ${crypto_libdir}] ) ++AC_MSG_NOTICE( [Using decnumber_libdir = ${decnumber_libdir}] ) ++AC_MSG_NOTICE( [Using softfloat_libdir = ${softfloat_libdir}] ) ++AC_MSG_NOTICE( [Using telnet_libdir = ${telnet_libdir}] ) ++AC_MSG_NOTICE( [Using extpkg_ldadd = ${extpkg_ldadd}] ) + + EXTPKG_INCDIRS="${extpkg_incdirs}" + AC_SUBST(EXTPKG_INCDIRS) diff --git a/emulators/hercules4sdl/patches/patch-hifr.h b/emulators/hercules4sdl/patches/patch-hifr.h new file mode 100644 index 00000000000..f9c12c95b52 --- /dev/null +++ b/emulators/hercules4sdl/patches/patch-hifr.h @@ -0,0 +1,15 @@ +$NetBSD: patch-hifr.h,v 1.1 2021/11/06 16:43:23 rhialto Exp $ + +Correct back over-done "or NetBSD" condition. + +--- hifr.h.orig 2020-11-30 19:36:38.734299287 +0000 ++++ hifr.h +@@ -119,7 +119,7 @@ typedef struct hifr hifr; + #define hifr_netmask ifreq.ifr_ifru.ifru_netmask + #define hifr_broadaddr ifreq.ifr_ifru.ifru_broadaddr + #define hifr_hwaddr ifreq.ifr_ifru.ifru_hwaddr +-#if defined( FREEBSD_OR_NETBSD ) ++#if defined( __FreeBSD__ ) + /* short ifru_flags[2]; */ + #define hifr_flags ifreq.ifr_ifru.ifru_flags[0] + #else diff --git a/emulators/hercules4sdl/patches/patch-msgenu.h b/emulators/hercules4sdl/patches/patch-msgenu.h new file mode 100644 index 00000000000..883e4305e00 --- /dev/null +++ b/emulators/hercules4sdl/patches/patch-msgenu.h @@ -0,0 +1,17 @@ +$NetBSD: patch-msgenu.h,v 1.1 2021/11/06 16:43:23 rhialto Exp $ + +Introduce 2 message texts as added to tuntap.c. + +--- msgenu.h.orig 2019-09-10 18:06:20.000000000 +0000 ++++ msgenu.h +@@ -322,8 +322,8 @@ LOGM_DLL_IMPORT int panel_command_captu + #define HHC00153 "Net device %s: Invalid prefix length %s" + #define HHC00154 "Preconfigured interface %s does not exist or is not accessible by Hercules (EPERM)" + #define HHC00155 "Net device %s: Invalid broadcast address %s" +-//efine HHC00156 (available) +-//efine HHC00157 (available) ++#define HHC00156 "IFF_TUN requested but not a tun device: %s" ++#define HHC00157 "IFF_TAP requested but not a tap device: %s" + //efine HHC00158 (available) + //efine HHC00159 (available) + #define HHC00160 "SCP %scommand: %s" diff --git a/emulators/hercules4sdl/patches/patch-tuntap.c b/emulators/hercules4sdl/patches/patch-tuntap.c new file mode 100644 index 00000000000..e0e8b78f261 --- /dev/null +++ b/emulators/hercules4sdl/patches/patch-tuntap.c @@ -0,0 +1,61 @@ +$NetBSD: patch-tuntap.c,v 1.1 2021/11/06 16:43:23 rhialto Exp $ + +NetBSD is not Linux. Conditionalize the compilation of Linux stuff. + +--- tuntap.c.orig 2019-09-10 18:06:20.000000000 +0000 ++++ tuntap.c +@@ -26,6 +26,11 @@ + /* Thus for preconfigured FreeBSD interfaces we need to modify the */ + /* name of the character file being opened. */ + ++/* On NetBSD you open /dev/tun<n> which must be given by the user, */ ++/* who has pre-configured that tunnel for use. */ ++/* If you want a L2 (ethernet) interface, open /dev/tap or */ ++/* /dev/tap<n>. You cannot switch from one mode to the other. */ ++ + + #include "hstdinc.h" + +@@ -71,6 +76,7 @@ static void tuntap_term( void* arg ) + // + // TUNTAP_SetMode (TUNTAP_CreateInterface helper) + // ++#if defined(__linux__) || defined(OPTION_W32_CTCI) + static int TUNTAP_SetMode (int fd, struct hifr *hifr, int iFlags) + { + int rc; +@@ -157,6 +163,7 @@ static int TUNTAP_SetMode (int fd, struc + + return rc; + } // End of function TUNTAP_SetMode() ++#endif /* __linux__ || OPTION_W32_CTCI */ + + + // +@@ -248,6 +255,7 @@ int TUNTAP_CreateInterface( + if ( strncasecmp( utsbuf.sysname, "linux", 5 ) == 0 ) + #endif + { ++#if defined (__linux__) || defined(OPTION_W32_CTCI) + // Linux kernel (builtin tun device) or Windows + struct hifr hifr; + +@@ -271,10 +279,18 @@ int TUNTAP_CreateInterface( + } + + strcpy( pszNetDevName, hifr.hifr_name ); ++#endif /* __linux__ || OPTION_W32_CTCI */ + } + #if !defined( OPTION_W32_CTCI ) + else + { ++ if ((iFlags & IFF_TUN) && !strstr(pszTUNDevice, "tun")) { ++ WRMSG( HHC00156, "W", pszTUNDevice ); ++ } ++ if ((iFlags & IFF_TAP) && !strstr(pszTUNDevice, "tap")) { ++ WRMSG( HHC00157, "W", pszTUNDevice ); ++ } ++ + // Other OS: Simply use basename of the device + // Notes: (JAP) This is problematic at best. Until we have a + // clean FreeBSD compile from the base tree I can't |