emulators/simh: fix name clash with other ports and tidy compilations

Fix name clash with gri and nova, that caused conflicts
Fix compilation warnings

PR:		222968
Submitted by:	bob@eager.cx (maintainer)
Approved by:	olivier (mentor)
Differential Revision:	https://reviews.freebsd.org/D12651
This commit is contained in:
Luca Pizzamiglio 2017-10-13 11:38:04 +00:00
parent ed29133234
commit b020e1344e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=451983
7 changed files with 59 additions and 8 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= simh
PORTVERSION= 3.9.0
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= emulators
MASTER_SITES= http://simh.trailing-edge.com/sources/:src \
http://www.ml1.org.uk/distfiles/:pdf \
@ -23,7 +23,7 @@ NO_WRKSUBDIR= yes
USES= gmake dos2unix zip
DOS2UNIX_GLOB= *.c *.h *.txt *.mak *.ini makefile
CFLAGS+= -Wno-format-extra-args -Wno-comment -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses
CFLAGS+= -Wno-format-extra-args -Wno-comment -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses -Wno-shift-negative-value
MAKE_ENV= GCC="${CC}" CFLAGS_O="${CFLAGS}" USE_NETWORK=1
MAKEFILE= makefile
@ -45,8 +45,10 @@ post-patch:
's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/VAX/vax_sysdev.c
post-build:
# eclipse conflicts with java/eclipse, install it as simh-eclipse
# eclipse, gri and nova conflict with other ports, prefix with simh-
@${MV} ${WRKSRC}/BIN/eclipse ${WRKSRC}/BIN/simh-eclipse
@${MV} ${WRKSRC}/BIN/gri ${WRKSRC}/BIN/simh-gri
@${MV} ${WRKSRC}/BIN/nova ${WRKSRC}/BIN/simh-nova
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/BIN/* ${STAGEDIR}${PREFIX}/bin

View File

@ -1,4 +1,4 @@
TIMESTAMP = 1490544722
TIMESTAMP = 1507755254
SHA256 (simhv39-0.zip) = e49b259b66ad6311ca9066dee3d3693cd915106a6938a52ed685cdbada8eda3b
SIZE (simhv39-0.zip) = 3103657
SHA256 (simh_docpdf.zip) = dff83e9a55f5e8bc2364489d6cc2a6731c60237acf37f4c46f080914896f8a0c

View File

@ -0,0 +1,20 @@
--- AltairZ80/i86_prim_ops.c.orig 2017-10-12 22:55:55 UTC
+++ AltairZ80/i86_prim_ops.c
@@ -1488,7 +1488,7 @@ void div_byte(PC_ENV *m, uint8 s)
}
div = dvd / dvs;
mod = dvd % dvs;
- if (abs(div) > 0xff)
+ if (div > 0xff)
{
i86_intr_raise(m,0);
return;
@@ -1514,7 +1514,7 @@ void div_word(PC_ENV *m, uint16 s)
div = dvd / dvs;
mod = dvd % dvs;
/* printf("dvd=%x dvs=%x -> div=%x mod=%x\n",dvd, dvs,div, mod);*/
- if (abs(div) > 0xffff)
+ if (div > 0xffff)
{
i86_intr_raise(m,0);
return;

View File

@ -0,0 +1,11 @@
--- HP2100/hp2100_pif.c.orig 2017-10-12 22:55:55 UTC
+++ HP2100/hp2100_pif.c
@@ -306,7 +306,7 @@ while (working_set) {
else { /* DOS PIF */
setPRL (dibptr->select_code, !(pif.control | pif.flag));
- setIRQ (dibptr->select_code, !pif.control & pif.flag & pif.flagbuf);
+ setIRQ (dibptr->select_code, (!pif.control) & pif.flag & pif.flagbuf);
}
if (DEBUG_PRS (pif_dev))

View File

@ -1,4 +1,4 @@
--- HP2100/hp_disclib.c.orig 2016-12-01 22:43:42 UTC
--- HP2100/hp_disclib.c.orig 2017-10-12 22:55:55 UTC
+++ HP2100/hp_disclib.c
@@ -761,8 +761,8 @@ else {
uptr = units + unit_limit; /* and we use the indicated unit */
@ -52,6 +52,15 @@
}
else /* the file mask does not permit an auto-seek */
@@ -2195,7 +2196,7 @@ if (target_cylinder >= drive_props [mode
}
else { /* the cylinder value is OK */
- delta = abs (uptr->CYL - target_cylinder); /* calculate the relative movement */
+ delta = abs (uptr->CYL - (int32) target_cylinder); /* calculate the relative movement */
uptr->CYL = target_cylinder; /* and move the positioner */
if ((cvptr->head >= drive_props [model].heads) /* if the head */
@@ -2291,12 +2292,13 @@ return;
static void set_timer (CVPTR cvptr, FLIP_FLOP action)

View File

@ -1,6 +1,15 @@
*********************************************************************
The 'eclipse' emulator has been renamed to 'simh-eclipse'.
Note that the executable files for some simulators have been renamed
to remove conflicts with other ports. In such cases, the name is now
prefixed with 'simh'. Affected simulators are:
eclipse becomes simh-eclipse
gri becomes simh-gri
nova becomes simh-nova
Users may wish to create a symbolic link to these, or an alias,
if they want to use the old names.
The file needed by the VAX emulator is located in:

View File

@ -1,6 +1,5 @@
bin/altair
bin/altairz80
bin/gri
bin/h316
bin/hp2100
bin/i1401
@ -10,7 +9,6 @@ bin/ibm1130
bin/id16
bin/id32
bin/lgp
bin/nova
bin/pdp1
bin/pdp10
bin/pdp11
@ -22,6 +20,8 @@ bin/pdp9
bin/s3
bin/sds
bin/simh-eclipse
bin/simh-gri
bin/simh-nova
bin/swtp6800mp-a
bin/swtp6800mp-a2
bin/vax