Author: bdubbs
Date: Thu Jan 11 13:11:56 2018
New Revision: 19664

Log:
Script fix for graphviz.  Yes, it is a hack.

Modified:
   trunk/scripts/blfs-chapter11.php
   trunk/scripts/blfs-include.php

Modified: trunk/scripts/blfs-chapter11.php
==============================================================================
--- trunk/scripts/blfs-chapter11.php    Thu Jan 11 12:22:13 2018        (r19663)
+++ trunk/scripts/blfs-chapter11.php    Thu Jan 11 13:11:56 2018        (r19664)
@@ -17,7 +17,6 @@
 $ignores = array();
 
 $regex = array();
-$regex[ 'bogofilter'    ] = "/^.*Download bogofilter-(\d[\d\.]+\d).tar.*$/";
 $regex[ 'intltool'      ] = "/^.*Latest version is (\d[\d\.]+\d).*$/";
 $regex[ 'xscreensaver'  ] = "/^.*xscreensaver-(\d[\d\.]+\d).tar.*$/";
 
@@ -210,9 +209,6 @@
      array( 'pkg'   => 'hd2u', 
             'regex' => "/hd2u-([\d\.]+)/" ),
 
-     array( 'pkg'   => 'qtchooser', 
-            'regex' => "/qtchooser-([\d\.]+)-.*/" ),
-
      array( 'pkg'   => 'tidy-html', 
             'regex' => "/tidy-html5-([\d\.]+).*/" ),
    );
@@ -224,6 +220,15 @@
          return $m[ 'regex' ];
    }
 
+   // Workaround because graphviz does not have version in tarball name
+   if ( preg_match( "/graphviz/", $line) )
+   {
+      $url = 
'http://www.linuxfromscratch.org/blfs/view/svn/general/genutils.html';
+      $f   = http_get_file( $url );
+      $p   = find_max( $f, '/Graphviz/', '/^.*Graphviz-([\d\.]+).*$/' );
+      return "$p";
+   }
+
    return "/\D*(\d.*\d)\D*$/";
 }
 

Modified: trunk/scripts/blfs-include.php
==============================================================================
--- trunk/scripts/blfs-include.php      Thu Jan 11 12:22:13 2018        (r19663)
+++ trunk/scripts/blfs-include.php      Thu Jan 11 13:11:56 2018        (r19664)
@@ -187,6 +187,13 @@
 
       $pattern = get_pattern( $file );
 
+      // Workaround because graphviz does not have version in filename
+      if ( preg_match( "/graphviz/", $file ) )
+      {
+         $file = preg_replace( '/graphviz/', "graphviz-$pattern", $file );
+         $pattern = '/\D*(\d.*\d)\D*$/'; 
+      }
+
       $version = preg_replace( $pattern, "$1", $file );   // Isolate version
       $version = preg_replace( "/^-/", "", $version );    // Remove leading #-
 
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to