Tweaked build script for older Emscripten versions

After the update for 1.38.28, the build script didn't recognize 1.38.1*
if the patch had already been applied.
master
Hauke D 7 years ago
parent 6f2173d29a
commit ac50d81bc2

@ -95,9 +95,9 @@ my $needs_reconfig = !!$opts{reconfig};
# first, we need to take a guess which version of the patch to apply. # first, we need to take a guess which version of the patch to apply.
my $libraryjs = file($ENV{EMSCRIPTEN}, 'src', 'library.js')->slurp; my $libraryjs = file($ENV{EMSCRIPTEN}, 'src', 'library.js')->slurp;
my $patchf; my $patchf;
if ( $libraryjs=~/\b\QERRNO_CODES.EAGAIN\E\b/ ) if ( $libraryjs=~/\b\Q___setErrNo(ERRNO_CODES.\E(EAGAIN|ENOTSUP)\b/ )
{ $patchf = 'emscripten_1.38.10_eagain.patch' } { $patchf = 'emscripten_1.38.10_eagain.patch' }
elsif ( $libraryjs=~/\b\QcDefine('EAGAIN')\E/ ) elsif ( $libraryjs=~/\b\QcDefine('EAGAIN')\E/ ) # note that this appears in 1.38.1* versions too
{ $patchf = 'emscripten_1.38.28_eagain.patch' } { $patchf = 'emscripten_1.38.28_eagain.patch' }
else { die "Could not figure out which library.js patch to use" } else { die "Could not figure out which library.js patch to use" }
#TODO Later: we should probably verify the Emscripten version too, and in the future we may need different patches for different versions #TODO Later: we should probably verify the Emscripten version too, and in the future we may need different patches for different versions

Loading…
Cancel
Save