Ticket #47196: 0003-lparse-Fix-detection-of-Bison-version.patch

File 0003-lparse-Fix-detection-of-Bison-version.patch, 2.7 KB (added by larryv (Lawrence Velázquez), 10 years ago)

Fix detection of Bison version

  • dports/science/lparse/Portfile

    From 99b94b13e941169c82bfbd0a3ab33cba58cf2be0 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Lawrence=20Vel=C3=A1zquez?= <larryv@macports.org>
    Date: Wed, 18 Mar 2015 03:32:25 -0400
    Subject: [PATCH 3/6] lparse: Fix detection of Bison version
    
    ---
     dports/science/lparse/Portfile                          |  2 +-
     .../lparse/files/fix-bison-version-detection.patch      | 17 +++++++++++++++++
     dports/science/lparse/files/patch-configure.diff        | 11 -----------
     3 files changed, 18 insertions(+), 12 deletions(-)
     create mode 100644 dports/science/lparse/files/fix-bison-version-detection.patch
     delete mode 100644 dports/science/lparse/files/patch-configure.diff
    
    diff --git a/dports/science/lparse/Portfile b/dports/science/lparse/Portfile
    index f418c5b..5ed68ed 100644
    a b master_sites ${homepage}/src/ 
    2828checksums           rmd160  131f6ea6235eeb7529d2564bb9ce904e5bc2358a \
    2929                    sha256  886d29723f7188296e48584a4a32b8f111414acb7ca8490af28ef6b7f1717298
    3030
    31 patchfiles          patch-configure.diff \
     31patchfiles          fix-bison-version-detection.patch \
    3232                    fix-recursive-make.patch
    3333
    3434# this configure argument is only used for installing
  • new file dports/science/lparse/files/fix-bison-version-detection.patch

    diff --git a/dports/science/lparse/files/fix-bison-version-detection.patch b/dports/science/lparse/files/fix-bison-version-detection.patch
    new file mode 100644
    index 0000000..8c4a2ef
    - +  
     1The original regex for parsing Bison's version output somehow doesn't
     2work at all with recent Bison. This one works with Bison 2.3 and 3.0.4,
     3which covers our bases pretty well.
     4
     5Index: configure
     6===================================================================
     7--- configure.orig
     8+++ configure
     9@@ -51,7 +51,7 @@ my $bison_version;
     10 my $bison_letter;
     11 my $bison_found = 0;
     12 while (<IN>) {
     13-  if (/[Bb]ison[^0-9]*(([0-9.]+)([a-z]+)?)*\s*$/) {
     14+  if (/^bison[^0-9]+(([0-9.]+)([a-z]*))\s*$/) {
     15     my $whole_version = $1;
     16     $bison_version = $2;
     17     $bison_letter = $3;
  • deleted file dports/science/lparse/files/patch-configure.diff

    diff --git a/dports/science/lparse/files/patch-configure.diff b/dports/science/lparse/files/patch-configure.diff
    deleted file mode 100644
    index ea2f35a..0000000
    + -  
    1 --- configure.orig      2013-10-25 12:31:49.000000000 -0400
    2 +++ configure   2013-10-25 12:32:07.000000000 -0400
    3 @@ -51,7 +51,7 @@
    4  my $bison_letter;
    5  my $bison_found = 0;
    6  while (<IN>) {
    7 -  if (/[Bb]ison[^0-9]*(([0-9.]+)([a-z]+)?)*\s*$/) {
    8 +  if (/[Bb]ison.*[^0-9]*(([0-9.]+)([a-z]+)?)*\s*$/) {
    9      my $whole_version = $1;
    10      $bison_version = $2;
    11      $bison_letter = $3;