emulators/spim: fix incorrect version comparisons, PR 57056 from "VMS" It seems the lexer logic was checking the flex version with #if to perform undocumented/unsupported frobs of the generated scanner's internal state, but it had the version test wrong and so would have been failing since flex's last minor version bump. The consequences are apparently an infinite loop. With the fix it no longer loops, but it still doesn't pass its own very basic tests. It also uses its own builtin assembler (hence flex) with nonstandard syntax (looks like also nonstandard semantics) and who knows what else, so you're probably better off looking for a different emulator.diff -r1.46 -r1.47 pkgsrc/emulators/spim/Makefile
(dholland)
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.46 2020/03/20 11:57:36 nia Exp $ | 1 | # $NetBSD: Makefile,v 1.47 2023/05/09 20:43:22 dholland Exp $ | |
2 | 2 | |||
3 | DISTNAME= spim-8.0 | 3 | DISTNAME= spim-8.0 | |
4 | PKGREVISION= 1 | 4 | PKGREVISION= 2 | |
5 | CATEGORIES= emulators | 5 | CATEGORIES= emulators | |
6 | MASTER_SITES= http://pages.cs.wisc.edu/~larus/SPIM/ | 6 | MASTER_SITES= http://pages.cs.wisc.edu/~larus/SPIM/ | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= http://spimsimulator.sourceforge.net/ | 9 | HOMEPAGE= http://spimsimulator.sourceforge.net/ | |
10 | COMMENT= MIPS R2000 Simulator | 10 | COMMENT= MIPS R2000 Simulator | |
11 | LICENSE= modified-bsd | 11 | LICENSE= modified-bsd | |
12 | 12 | |||
13 | HAS_CONFIGURE= yes | 13 | HAS_CONFIGURE= yes | |
14 | CONFIGURE_DIRS= xspim | 14 | CONFIGURE_DIRS= xspim | |
15 | BUILD_DIRS= spim xspim | 15 | BUILD_DIRS= spim xspim | |
16 | CONFIGURE_SCRIPT= ./Configure | 16 | CONFIGURE_SCRIPT= ./Configure | |
17 | USE_IMAKE= yes | 17 | USE_IMAKE= yes |
@@ -1,7 +1,8 @@ | @@ -1,7 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.16 2021/10/26 10:24:01 nia Exp $ | 1 | $NetBSD: distinfo,v 1.17 2023/05/09 20:43:22 dholland Exp $ | |
2 | 2 | |||
3 | BLAKE2s (spim-8.0.tar.gz) = 9a5373bce04ded172e0e063a9ebbcc870977fee6a6c3121de202777b72ff48c7 | 3 | BLAKE2s (spim-8.0.tar.gz) = 9a5373bce04ded172e0e063a9ebbcc870977fee6a6c3121de202777b72ff48c7 | |
4 | SHA512 (spim-8.0.tar.gz) = c4eb66863a931b74d6c6ecd92860d16fd6369c85caecba1e71a1149e73e708502d1070f17a9beb6d0af1368db1ee5a85c040b596866a1236275cdd410a661adf | 4 | SHA512 (spim-8.0.tar.gz) = c4eb66863a931b74d6c6ecd92860d16fd6369c85caecba1e71a1149e73e708502d1070f17a9beb6d0af1368db1ee5a85c040b596866a1236275cdd410a661adf | |
5 | Size (spim-8.0.tar.gz) = 355204 bytes | 5 | Size (spim-8.0.tar.gz) = 355204 bytes | |
6 | SHA1 (patch-aa) = 8232ff358f1bf2ede3216187faf77aad85b1da87 | 6 | SHA1 (patch-aa) = 8232ff358f1bf2ede3216187faf77aad85b1da87 | |
7 | SHA1 (patch-ad) = 056ef015de5daff3003a834ff4867f97db70c79f | 7 | SHA1 (patch-ad) = 056ef015de5daff3003a834ff4867f97db70c79f | |
8 | SHA1 (patch-scanner.l) = 51e1c1b5e3c0db28d3fa0790729ddfa836631e2d |
$NetBSD: patch-scanner.l,v 1.1 2023/05/09 20:43:22 dholland Exp $
Use correct version comparison logic.
--- CPU/scanner.l~ 2010-01-09 05:22:52.000000000 +0000
+++ CPU/scanner.l
@@ -316,7 +316,7 @@ initialize_scanner (FILE *in_file)
yyin = in_file;
#ifdef FLEX_SCANNER
yyrestart(in_file);
-#if (YY_FLEX_MAJOR_VERSION==2 && YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33)
+#if (YY_FLEX_MAJOR_VERSION==2 && YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33) || (YY_FLEX_MAJOR_VERSION==2 && YY_FLEX_MINOR_VERSION>5)
/* flex 2.5.33 flipped the polarity of this flag (sigh) */
yy_init = 0;
#else