aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2018-10-24 20:21:48 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2018-10-25 18:01:07 +0200
commite0faa716b40daed3ab56f2da3493d17e8d000cc4 (patch)
treeb1e9a6f45a7fc5536fd8f85dcb705be90df7c05d
parent5bbf258d928ed4e36e02f83526ae831ed4d8a409 (diff)
downloadaports-e0faa716b40daed3ab56f2da3493d17e8d000cc4.tar.bz2
aports-e0faa716b40daed3ab56f2da3493d17e8d000cc4.tar.xz
community/spim: fix parsing with flex >= 2.6
Taken from Debian.
-rw-r--r--community/spim/APKBUILD6
-rw-r--r--community/spim/flex-2.6-compat.patch20
2 files changed, 22 insertions, 4 deletions
diff --git a/community/spim/APKBUILD b/community/spim/APKBUILD
index 138b6b39d8..4e585c6c6a 100644
--- a/community/spim/APKBUILD
+++ b/community/spim/APKBUILD
@@ -13,6 +13,7 @@ makedepends="bash flex bison"
install=""
subpackages="$pkgname-doc"
source="http://pages.cs.wisc.edu/~larus/SPIM/${pkgname}-${pkgver}.tar.gz
+ flex-2.6-compat.patch
respect-env.patch"
patch_args="-p0"
@@ -35,9 +36,6 @@ package() {
done
}
-md5sums="146558e8256f2b7577fb825fdc76a04f spim-8.0.tar.gz
-dac9099d3ac158d09caeee6e7eaa5b09 respect-env.patch"
-sha256sums="6f205776cb9fa112729507008843b289012190ed3131cbd426c610a58387ee4b spim-8.0.tar.gz
-d2c7a9662312d5075e08c93fb9037895b633776a1413130674397c1432f612cf respect-env.patch"
sha512sums="c4eb66863a931b74d6c6ecd92860d16fd6369c85caecba1e71a1149e73e708502d1070f17a9beb6d0af1368db1ee5a85c040b596866a1236275cdd410a661adf spim-8.0.tar.gz
+787df8e61cb4dd11a6dfdd217d1c990a8335d2790cd6327faf09811094821c8485bd44990c934e699a877938f81777302fdd60845ac27afbd5dc5b9b59db0132 flex-2.6-compat.patch
68e9f39bbcee4524557389fac2a617b1b588f2df7a1a807ce8a646053345b6a5f7aba6dda23d4821283783b654baa01763923cb70501a03467c5302f173383ef respect-env.patch"
diff --git a/community/spim/flex-2.6-compat.patch b/community/spim/flex-2.6-compat.patch
new file mode 100644
index 0000000000..596e76bb3f
--- /dev/null
+++ b/community/spim/flex-2.6-compat.patch
@@ -0,0 +1,20 @@
+Description: Fix parsing when built with flex 2.6
+Origin: https://sourceforge.net/p/spimsimulator/code/679/
+Bug: https://sourceforge.net/p/spimsimulator/bugs/66/
+Bug-Debian: https://bugs.debian.org/860011
+Last-Update: 2017-04-20
+
+Index: CPU/scanner.l
+===================================================================
+--- CPU/scanner.l
++++ CPU/scanner.l
+@@ -316,7 +316,8 @@ 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)
++#define YY_FLEX_VERSION (YY_FLEX_MAJOR_VERSION * 1000 + YY_FLEX_MINOR_VERSION * 100 + YY_FLEX_SUBMINOR_VERSION)
++#if YY_FLEX_VERSION >= 2533
+ /* flex 2.5.33 flipped the polarity of this flag (sigh) */
+ yy_init = 0;
+ #else