Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2017 11:38:04 +0000 (UTC)
From:      Luca Pizzamiglio <pizzamig@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r451983 - in head/emulators/simh: . files
Message-ID:  <201710131138.v9DBc4w5061075@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pizzamig
Date: Fri Oct 13 11:38:04 2017
New Revision: 451983
URL: https://svnweb.freebsd.org/changeset/ports/451983

Log:
  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

Added:
  head/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c   (contents, props changed)
  head/emulators/simh/files/patch-HP2100_hp2100__pif.c   (contents, props changed)
Modified:
  head/emulators/simh/Makefile
  head/emulators/simh/distinfo
  head/emulators/simh/files/patch-HP2100_hp__disclib.c
  head/emulators/simh/files/pkg-message.in
  head/emulators/simh/pkg-plist

Modified: head/emulators/simh/Makefile
==============================================================================
--- head/emulators/simh/Makefile	Fri Oct 13 11:14:53 2017	(r451982)
+++ head/emulators/simh/Makefile	Fri Oct 13 11:38:04 2017	(r451983)
@@ -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

Modified: head/emulators/simh/distinfo
==============================================================================
--- head/emulators/simh/distinfo	Fri Oct 13 11:14:53 2017	(r451982)
+++ head/emulators/simh/distinfo	Fri Oct 13 11:38:04 2017	(r451983)
@@ -1,4 +1,4 @@
-TIMESTAMP = 1490544722
+TIMESTAMP = 1507755254
 SHA256 (simhv39-0.zip) = e49b259b66ad6311ca9066dee3d3693cd915106a6938a52ed685cdbada8eda3b
 SIZE (simhv39-0.zip) = 3103657
 SHA256 (simh_docpdf.zip) = dff83e9a55f5e8bc2364489d6cc2a6731c60237acf37f4c46f080914896f8a0c

Added: head/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c	Fri Oct 13 11:38:04 2017	(r451983)
@@ -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;

Added: head/emulators/simh/files/patch-HP2100_hp2100__pif.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__pif.c	Fri Oct 13 11:38:04 2017	(r451983)
@@ -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))

Modified: head/emulators/simh/files/patch-HP2100_hp__disclib.c
==============================================================================
--- head/emulators/simh/files/patch-HP2100_hp__disclib.c	Fri Oct 13 11:14:53 2017	(r451982)
+++ head/emulators/simh/files/patch-HP2100_hp__disclib.c	Fri Oct 13 11:38:04 2017	(r451983)
@@ -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)

Modified: head/emulators/simh/files/pkg-message.in
==============================================================================
--- head/emulators/simh/files/pkg-message.in	Fri Oct 13 11:14:53 2017	(r451982)
+++ head/emulators/simh/files/pkg-message.in	Fri Oct 13 11:38:04 2017	(r451983)
@@ -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:
 

Modified: head/emulators/simh/pkg-plist
==============================================================================
--- head/emulators/simh/pkg-plist	Fri Oct 13 11:14:53 2017	(r451982)
+++ head/emulators/simh/pkg-plist	Fri Oct 13 11:38:04 2017	(r451983)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710131138.v9DBc4w5061075>