aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpizzamig <pizzamig@FreeBSD.org>2017-10-13 19:38:04 +0800
committerpizzamig <pizzamig@FreeBSD.org>2017-10-13 19:38:04 +0800
commit655b7819f7dba7c7f1da10b8fc57710508a43136 (patch)
tree18266c77a9a92c265c575f922622085f89bf1295
parent0c4b64ba58633d2e825f7cce359de50b354a8f78 (diff)
downloadfreebsd-ports-gnome-655b7819f7dba7c7f1da10b8fc57710508a43136.tar.gz
freebsd-ports-gnome-655b7819f7dba7c7f1da10b8fc57710508a43136.tar.zst
freebsd-ports-gnome-655b7819f7dba7c7f1da10b8fc57710508a43136.zip
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
-rw-r--r--emulators/simh/Makefile8
-rw-r--r--emulators/simh/distinfo2
-rw-r--r--emulators/simh/files/patch-AltairZ80_i86__prim__ops.c20
-rw-r--r--emulators/simh/files/patch-HP2100_hp2100__pif.c11
-rw-r--r--emulators/simh/files/patch-HP2100_hp__disclib.c11
-rw-r--r--emulators/simh/files/pkg-message.in11
-rw-r--r--emulators/simh/pkg-plist4
7 files changed, 59 insertions, 8 deletions
diff --git a/emulators/simh/Makefile b/emulators/simh/Makefile
index 175ee9faf0b7..6f735ad010bc 100644
--- a/emulators/simh/Makefile
+++ b/emulators/simh/Makefile
@@ -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
diff --git a/emulators/simh/distinfo b/emulators/simh/distinfo
index 7cc8aa398390..829c98de54c5 100644
--- a/emulators/simh/distinfo
+++ b/emulators/simh/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1490544722
+TIMESTAMP = 1507755254
SHA256 (simhv39-0.zip) = e49b259b66ad6311ca9066dee3d3693cd915106a6938a52ed685cdbada8eda3b
SIZE (simhv39-0.zip) = 3103657
SHA256 (simh_docpdf.zip) = dff83e9a55f5e8bc2364489d6cc2a6731c60237acf37f4c46f080914896f8a0c
diff --git a/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c b/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c
new file mode 100644
index 000000000000..543f79754637
--- /dev/null
+++ b/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c
@@ -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;
diff --git a/emulators/simh/files/patch-HP2100_hp2100__pif.c b/emulators/simh/files/patch-HP2100_hp2100__pif.c
new file mode 100644
index 000000000000..b5ceeb93340e
--- /dev/null
+++ b/emulators/simh/files/patch-HP2100_hp2100__pif.c
@@ -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))
diff --git a/emulators/simh/files/patch-HP2100_hp__disclib.c b/emulators/simh/files/patch-HP2100_hp__disclib.c
index 770b4b9507e9..fb80eda5ae6b 100644
--- a/emulators/simh/files/patch-HP2100_hp__disclib.c
+++ b/emulators/simh/files/patch-HP2100_hp__disclib.c
@@ -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)
diff --git a/emulators/simh/files/pkg-message.in b/emulators/simh/files/pkg-message.in
index 9ca73c2f4ec4..c801cb10a9b6 100644
--- a/emulators/simh/files/pkg-message.in
+++ b/emulators/simh/files/pkg-message.in
@@ -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:
diff --git a/emulators/simh/pkg-plist b/emulators/simh/pkg-plist
index 7613f8f31ee4..3707f47b6f7e 100644
--- a/emulators/simh/pkg-plist
+++ b/emulators/simh/pkg-plist
@@ -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