Author: bdubbs
Date: Sat Apr 15 09:12:33 2017
New Revision: 18599

Log:
Fix script for llvm3/4

Modified:
   trunk/scripts/blfs-chapter13.php

Modified: trunk/scripts/blfs-chapter13.php
==============================================================================
--- trunk/scripts/blfs-chapter13.php    Sat Apr 15 08:37:26 2017        (r18598)
+++ trunk/scripts/blfs-chapter13.php    Sat Apr 15 09:12:33 2017        (r18599)
@@ -9,6 +9,8 @@
 $STOP_PACKAGE  = 'junit';
 
 $renames = array();
+$renames[ 'llvm'       ] = 'llvm-3';
+$renames[ 'llvm1'      ] = 'llvm-4';
 $renames[ 'py'         ] = 'pycairo';
 $renames[ 'Python'     ] = 'python2';
 $renames[ 'Python1'    ] = 'python3';
@@ -34,13 +36,13 @@
 $ignores[ 'python'       ] = '';
 $ignores[ 'python1'      ] = '';
 
-//$current="pycrypto";  // For debugging
+//$current="llvm1";  // For debugging
 
 $regex = array();
 $regex[ 'check'   ] = "/^.*Check (\d[\d\.]+\d).*$/";
 $regex[ 'expect'  ] = "/^.*Download expect(\d[\d\.]+\d).tar.*$/";
 $regex[ 'junit4'  ] = "/^\h*(\d[\d\.]+)\h*$/";
-$regex[ 'llvm'    ] = "/^.*Download LLVM (\d[\d\.]+\d).*$/";
+//$regex[ 'llvm'    ] = "/^.*Download LLVM (\d[\d\.]+\d).*$/";
 $regex[ 'scons'   ] = "/^.*Download scons-(\d[\d\.]+\d).*$/";
 $regex[ 'tcl'     ] = "/^.*Download tcl(\d[\d\.]+\d).*$/";
 $regex[ 'Python'  ] = "/^.*Latest Python 2.*Python (2[\d\.]+\d).*$/";
@@ -122,6 +124,10 @@
           'match'   => '^.*$',
           'replace' => "http://llvm.org/releases/download.html"; ),
 
+   array( 'pkg'     => 'llvm1',
+          'match'   => '^.*$',
+          'replace' => "http://llvm.org/releases/download.html"; ),
+
    array( 'pkg'     => 'nasm',
           'match'   => '^.*$',
           'replace' => "http://www.nasm.us/pub/nasm/releasebuilds"; ),
@@ -528,10 +534,10 @@
     return find_max( $lines, '/doxygen/', '/^.*doxygen-([\d\.]+).src.tar.*$/' 
);
 
   if ( $book_index == "llvm" )
-  {
-     return find_max( $lines, "/^.*$book_index-.*.src.*$/",
-                              "/^.*$book_index-([\d\.]+)\.src.*$/" );
-  }
+     return find_max( $lines, "/Download LLVM/",  "/^.*LLVM (3[\d\.]+).*$/" );
+
+  if ( $book_index == "llvm1" )
+     return find_max( $lines, "/Download LLVM/",  "/^.*LLVM (4[\d\.]+).*$/" );
 
   if ( $book_index == "elfutils" )
   {
-- 
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