Author: bdubbs
Date: Fri Aug 26 21:46:24 2016
New Revision: 17654

Log:
Script update for sourceforge changes

Modified:
   trunk/scripts/blfs-chapter05.php
   trunk/scripts/blfs-chapter09.php
   trunk/scripts/blfs-chapter10.php
   trunk/scripts/blfs-chapter12.php
   trunk/scripts/blfs-chapter13.php
   trunk/scripts/blfs-chapter17.php
   trunk/scripts/blfs-chapter37.php
   trunk/scripts/blfs-chapter39.php
   trunk/scripts/blfs-chapter43.php
   trunk/scripts/blfs-chapter46.php
   trunk/scripts/blfs-chapter47.php
   trunk/scripts/blfs-chapter50.php
   trunk/scripts/blfs-include.php

Modified: trunk/scripts/blfs-chapter05.php
==============================================================================
--- trunk/scripts/blfs-chapter05.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter05.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -1,4 +1,4 @@
-[B#! /usr/bin/php
+#! /usr/bin/php
 <?php
 
 include 'blfs-include.php';
@@ -13,10 +13,9 @@
 $renames[ 'LVM2.'         ] = 'LVM2';
 $ignores = array();
 
-//$current="btrfs-progs-v";   // For debugging
+//$current="jfsutils";   // For debugging
 
 $regex = array();
-$regex[ 'jfsutils' ] = "/^.*jfsutils release ([\d\.]+) is available.*$/";
 $regex[ 'ntfs-3g_ntfsprogs' ] = "/^.*Stable Source Release ([\d\.]+).*$/";
 
 $sf = 'sourceforge.net';
@@ -29,7 +28,7 @@
 
  array( 'pkg'     => 'jfsutils',
         'match'   => '^.*$', 
-        'replace' => "http://jfs.$sf/jfs_lr.html"; ),
+        'replace' => "http://jfs.sourceforge.net/jfs_lr.html"; ),
 
  array( 'pkg'     => 'ntfs-3g_ntfsprogs',
         'match'   => '^.*$', 
@@ -109,7 +108,7 @@
 
   if ( $book_index == "gptfdisk" )
   {
-    $dir = find_max( $lines, '/\d\./', '/^\s*([\d\.]+)\s*$/' );
+    $dir = find_max( $lines, '/\d\./', '/^.*gptfdisk\/([\d\.]+)\/.*$/' );
     $lines = http_get_file( "$dirpath/$dir" );
   }
 
@@ -119,6 +118,13 @@
     return $max;
   }
 
+  if ( $book_index == "jfsutils" )
+  {
+//print_r($lines);
+    $max = find_max( $lines, '/release/', '/^.*release ([\d\.]+).*$/' );
+    return $max;
+  }
+
   if ( $book_index == "reiserfsprogs" )
   {
     $max = find_max( $lines, '/^v[\d\.]+.*$/', '/^v([\d\.]+).*$/' );

Modified: trunk/scripts/blfs-chapter09.php
==============================================================================
--- trunk/scripts/blfs-chapter09.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter09.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -12,7 +12,7 @@
 $renames[ 'v' ] = 'liblinear';
 $ignores = array();
 
-//$current="libwacom"; // For debugging
+//$current="openobex"; // For debugging
 
 $regex = array();
 $regex[ 'clucene-core'  ] = "/^.*Download clucene-core-([\d\.]+).tar.*$/";
@@ -326,7 +326,7 @@
     return find_max( $lines, '/tar/', '/.*ops-([\d\.]+).tar.*$/' );
 
   if ( $book_index == "openobex" )
-    return find_max( $lines, '/\d\./', '/^\s*([\d\.]+)\s*$/' );
+    return find_max( $lines, '/openobex/', '/^.*openobex\/([\d\.]+)\/.*$/' );
 
   if ( $book_index == "qjson" )
     return find_max( $lines, '/\d\./', '/^\s*([\d\.]+)\s*$/' );

Modified: trunk/scripts/blfs-chapter10.php
==============================================================================
--- trunk/scripts/blfs-chapter10.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter10.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -11,7 +11,7 @@
 $renames = array();
 $ignores = array();
 
-//$current="gegl";   // For debugging
+//$current="libjpeg-turbo";   // For debugging
 
 $regex = array();
 $regex[ 'aalib'         ] = "/^.*Download aalib-([\d\.]+rc\d).tar.*$/";
@@ -20,7 +20,7 @@
 $regex[ 'libmng'        ] = "/^.*Download libmng-(\d[\d\.]+\d).tar.*$/";
 $regex[ 'libpng'        ] = "/^.*Download libpng-(\d[\d\.]+\d).tar.*$/";
 $regex[ 'LibRaw'        ] = "/^.*LibRaw-(\d[\d\.]+\d).tar.*$/";
-$regex[ 'openjpeg1'     ] = "/^.*Download openjpeg-([\d\.]+\d).*$/";
+//$regex[ 'openjpeg1'     ] = "/^.*Download openjpeg-([\d\.]+\d).*$/";
 $regex[ 'poppler'       ] = "/^.*poppler-([\d\.]+\d).tar.*$/";
 $regex[ 'popplerdata'   ] = "/^.*poppler-data([\d\.]+\d).tar.*$/";
 $regex[ 'qpdf'          ] = "/^.*Download qpdf-([\d\.]+\d).tar.*$/";
@@ -217,32 +217,33 @@
      return 0;  // This is an error
   }
 
-  if ( $book_index == "freetype"     ||
-       $book_index == "freetype-doc" )
+//echo "url=$dirpath\n";
+//print_r($lines);
+
+  if ( $book_index == "freetype" )
   {
     $dir   = find_max( $lines, '/\d\./', '/^\s*([\d\.]+)\s*$/' );
     $lines = http_get_file( "$dirpath/$dir" );
   }
 
+  if ( $book_index == "freetype-doc" )
+    return find_max( $lines, '/docs\//', '/^.*docs\/([\d\.]+)\/.*$/' );
+
+
   if ( $book_index == "graphite2" )
-  {
     return find_max( $lines, '/graphite2-/', 
'/^.*graphite2-(\d\.[\d\.]+)\.tgz.*$/' );
-  }
 
   if ( $book_index == "libjpeg-turbo" )
-  {
-    return find_max( $lines, '/\d\./', '/^\s*([\d\.]+)\s*$/' );
-  }
+    return find_max( $lines, '/files\//', '/^.*files\/([\d\.]+)\/.*$/' );
 
   if ( $book_index == "jasper" )
-  {
     return find_max( $lines, '/jasper-/', '/^.*jasper-(\d\.[\d\.]+)\.zip.*$/' 
);
-  }
 
   if ( $book_index == "openjpeg" )
-  {
-    return find_max( $lines, '/^\s*1[\d\.]/', '/^.*(1\.[\d\.]+).*$/' );
-  }
+    return find_max( $lines, '/files/', '/^.*files\/(1\.[\d\.]+)\/.*$/' );
+
+  if ( $book_index == "openjpeg1" )
+    return find_max( $lines, '/files/', '/^.*files\/(2\.[\d\.]+)\/.*$/' );
 
   // imlib
   if ( $book_index == "imlib2" )
@@ -254,20 +255,14 @@
 
   // lcms (actually lcms 1.xx)
   if ( $book_index == "lcms" )
-  {
-    return find_max( $lines, '/1\.[\d\.]+/', '/^\s*(1[\d\.]+)\s*$/' );
-  }
+    return find_max( $lines, '/lcms\/1/', '/^.*\/(1[\d\.]+)\/.*$/' );
 
   if ( $book_index == "opencv" )
-  {
-    return find_max( $lines, '/\d\.[\d\.]+/', '/^\s*(\d\.[\d\.]+)\s*$/' );
-  }
+    return find_max( $lines, '/unix/', '/^.*unix\/(\d\.[\d\.]+)\/.*$/' );
 
   // lcms2
   if ( $book_index == "lcms2" )
-  {
-    return find_max( $lines, '/2\.[\d\.]+/', '/^\s*(2[\d\.]+)\s*$/' );
-  }
+    return find_max( $lines, '/lcms/', '/^.*\/([\d\.]+)\/.*$/' );
 
   if ( $package == "graphite2" ) $package = "graphite";
 

Modified: trunk/scripts/blfs-chapter12.php
==============================================================================
--- trunk/scripts/blfs-chapter12.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter12.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -18,7 +18,7 @@
 
 $ignores = array();
 
-//$current="colord1";
+//$current="p7zip";
 
 $regex = array();
 $regex[ 'acpid'   ] = "/^.*Download acpid-(\d[\d\.]+\d).tar.*$/";
@@ -191,11 +191,10 @@
   if ( $book_index == "udisks1" )
     return find_max( $lines, '/udisks/', '/^.*udisks-(\d[\d\.]*\d).tar.*$/' );
 
-  # Needs a space in [\d\. ]+ becasue of an upstream typo
   if ( $book_index == "p7zip" )
   {
-    $max = find_max( $lines, '/\d\./', '/^\s*([\d\. ]+)\s*$/' );
-    return str_replace( " ", "", $max );
+    $max = find_max( $lines, '/p7zip\//', '/^.*p7zip\/([\d\.]+)\/.*$/' );
+    return $max;
   }
 
   if ( $book_index == "unzip" ||

Modified: trunk/scripts/blfs-chapter13.php
==============================================================================
--- trunk/scripts/blfs-chapter13.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter13.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -9,15 +9,11 @@
 $STOP_PACKAGE  = 'junit';
 
 $renames = array();
-//$renames[ 'librep_'    ] = 'librep';
 $renames[ 'py'         ] = 'pycairo';
 $renames[ 'Python'     ] = 'python2';
-#$renames[ 'python'     ] = 'python2 docs';
 $renames[ 'Python1'    ] = 'python3';
-#$renames[ 'python1'    ] = 'python3 docs';
 $renames[ 'pygobject'  ] = 'pygobject2';
 $renames[ 'pygobject1' ] = 'pygobject3';
-//$renames[ 'junit4_'    ] = 'junit';
 
 $ignores = array();
 $ignores[ 'cfe'          ] = '';
@@ -37,7 +33,7 @@
 $ignores[ 'python'       ] = '';
 $ignores[ 'python1'      ] = '';
 
-//$current="swig";  // For debugging
+//$current="tk";  // For debugging
 
 $regex = array();
 $regex[ 'check'   ] = "/^.*Download check-(\d[\d\.]+\d).tar.*$/";
@@ -46,7 +42,6 @@
 $regex[ 'llvm'    ] = "/^.*Download LLVM (\d[\d\.]+\d).*$/";
 $regex[ 'scons'   ] = "/^.*Download scons-(\d[\d\.]+\d).*$/";
 $regex[ 'tcl'     ] = "/^.*Download tcl(\d[\d\.]+\d).*$/";
-//$regex[ 'swig'    ] = "/^.*Download swig-(\d[\d\.]+\d).*$/";
 $regex[ 'Python'  ] = "/^.*Latest Python 2.*Python (2[\d\.]+\d).*$/";
 $regex[ 'Python1' ] = "/^.*Latest Python 3.*Python (3[\d\.]+\d).*$/";
 $regex[ 'Mako'    ] = "/^.*version is (\d[\d\.]+\d).*$/";
@@ -119,14 +114,6 @@
           'match'   => '^.*$',
           'replace' => "http://www.nasm.us/pub/nasm/releasebuilds"; ),
 
-#   array( 'pkg'     => 'python',
-#          'match'   => '^.*$',
-#          'replace' => "https://docs.python.org/2/archives"; ),
-
-#   #array( 'pkg'     => 'python1',
-#          'match'   => '^.*$',
-#          'replace' => "https://docs.python.org/3/archives"; ),
-
    array( 'pkg'     => 'scons',
           'match'   => '^.*$',
           'replace' => "http://sourceforge.net/projects/scons/files"; ),
@@ -476,7 +463,7 @@
     $lines = http_get_file( $dirpath, $strip );
     if ( ! is_array( $lines ) ) return $lines;
   } // End fetch
-
+//print_r($lines);
   if ( isset( $regex[ $package ] ) )
   {
      // Custom search for latest package name
@@ -542,7 +529,7 @@
 
   if ( $book_index == "tk" )
   {
-    $dir = find_max( $lines, '/\d\.[\d\.]+\d/', '/^\s+(\d\.[\d\.]+\d).*$/' );
+    $dir = find_max( $lines, '/tcl/', '/^.*Tcl\/(\d\.[\d\.]+\d)\/.*$/' );
     $lines = http_get_file( "$dirpath/$dir" );
     return find_max( $lines, "/$package/", 
"/^.*$package([\d\.]*\d)-src.tar.*$/" );
   }

Modified: trunk/scripts/blfs-chapter17.php
==============================================================================
--- trunk/scripts/blfs-chapter17.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter17.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -14,7 +14,7 @@
 $ignores = array();
 $ignores[ 'rpcnis-headers' ] = '';
 
-//$current="geoclue1";
+//$current="libtirpc";
 
 $regex = array();
 $regex[ 're-alpine' ] = "/^.*Download re-alpine-(\d[\d\.]+\d).tar.*$/";
@@ -162,7 +162,7 @@
     $lines = http_get_file( $dirpath );
     if ( ! is_array( $lines ) ) return $lines;
   } // End fetch
-
+//print_r($lines);
   if ( isset( $regex[ $package ] ) )
   {
      // Custom search for latest package name
@@ -197,7 +197,7 @@
 
   // libtirpc  (sourceforge is inconsistent here)
   if ( $book_index == "libtirpc" )
-    return find_max( $lines, '/^\s*1\.[\d\.]+\s*$/', '/^\s*(1\.[\d\.]+)\s*$/' 
);
+    return find_max( $lines, '/libtirpc\//', '/^.*libtirpc\/([\d\.]+)\/.*$/' );
 
   // Most packages are in the form $package-n.n.n
   // Occasionally there are dashes (e.g. 201-1)

Modified: trunk/scripts/blfs-chapter37.php
==============================================================================
--- trunk/scripts/blfs-chapter37.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter37.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -6,7 +6,7 @@
 $CHAPTER       = '37';
 $CHAPTERS      = 'Chapters 37-38';
 $START_PACKAGE = 'libxfce4util';
-$STOP_PACKAGE  = 'qupzilla';
+$STOP_PACKAGE  = 'lxterminal';
 
 $renames = array();
 $renames[ 'libfm'  ] = 'libfm-extra';
@@ -16,11 +16,11 @@
 
 $regex = array();
 $regex[ 'midori'      ] = "/^.*midori_(\d[\d\.]*\d)_all.*$/";
-$regex[ 'libfm'       ] = "/^.* Download libfm-([\d\.]+).tar.*$/";
-$regex[ 'libfm1'      ] = "/^.* Download libfm-([\d\.]+).tar.*$/";
-$regex[ 'lxde-common' ] = "/^.* Download lxde-common-([\d\.]+).tar.*$/";
+$regex[ 'libfm'       ] = "/^.*Download libfm-([\d\.]+).tar.*$/";
+$regex[ 'libfm1'      ] = "/^.*Download libfm-([\d\.]+).tar.*$/";
+$regex[ 'lxde-common' ] = "/^.*Download lxde-common-([\d\.]+).tar.*$/";
 
-//$current="QupZilla";
+//$current="obconf-qt";
 
 $url_fix = array (
 
@@ -69,7 +69,7 @@
           'replace' =>
              
"https://sourceforge.net/projects/lxde/files/lxmenu-data%20%28desktop%20menu%29";),
 
-  array( 'pkg'     => 'libfm',
+   array( 'pkg'     => 'libfm',
           'match'   => '^.*$', 
           'replace' => "https://sourceforge.net/projects/pcmanfm/files"; ),
 
@@ -179,98 +179,98 @@
   else if ( $book_index == "menu-cache" )
   {
     $dirs = http_get_file( "$dirpath/" );    
-    $dir = find_max ( $dirs, "/^\s*\d/", "/^\s*(\d\.[\d\.x]+).*$/" );
+    $dir = find_max ( $dirs, "/menu-cache\//", 
"/^.*menu-cache\/(\d\.[\d\.x]+)\/.*$/" );
     $dirpath .= "/$dir";
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/menu-cache/", 
"/^\s+menu-cache-([\d\.]+).tar.*/" );
+    $ver = find_max( $lines, "/menu-cache/", "/^.*menu-cache-([\d\.]+).tar.*/" 
);
     return $ver;
   }
   else if ( $book_index == "pcmanfm" )
   {
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/pcmanfm/", "/^\s+pcmanfm-([\d\.]+).tar.*/" );
+    $ver = find_max( $lines, "/pcmanfm/", "/^.*pcmanfm-([\d\.]+).tar.*/" );
     return $ver;
   }
   else if ( $book_index == "lxappearance" )
   {
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/lxappearance/", 
"/^\s+lxappearance-([\d\.]+).tar.*$/" );
+    $ver = find_max( $lines, "/lxappearance/", 
"/^.*lxappearance-([\d\.]+).tar.*$/" );
     return $ver;
   }
   else if ( $book_index == "lxappearance-obconf" )
   {
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/lxappearance/", 
"/^\s+lxappearance-obconf-([\d\.]+).tar.*$/" );
+    $ver = find_max( $lines, "/lxappearance/", 
"/^.*lxappearance-obconf-([\d\.]+).tar.*$/" );
     return $ver;
   }
   else if ( $book_index == "lxpanel" )
   {
     $dirs = http_get_file( "$dirpath/" );    
-    $dir = find_max ( $dirs, "/^\s*LXPanel/", "/^\s*(LXPanel 
[0123]\.[\d\.x]+).*$/" );
+    $dir = find_max ( $dirs, "/\/LXPanel/", "/^.*(LXPanel.+[\d\.x]+)\/.*$/" );
     $dir = preg_replace( "/ /", '%20', $dir );
     $dirpath .= "/$dir";
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/lxpanel/", "/^\s+lxpanel-([\d\.]+).tar.*$/" );
+    $ver = find_max( $lines, "/lxpanel/", "/^.*lxpanel-([\d\.]+).tar.*$/" );
     return $ver;
   }
   else if ( $book_index == "lxinput" )
   {
     $dirs = http_get_file( "$dirpath/" );    
-    $dir = find_max ( $dirs, "/^\s*LXInput/", "/^\s*(LXInput 
[0123]\.[\d\.x]+).*$/" );
-    $dir = preg_replace( "/ /", '%20', $dir );
+    $dir = find_max ( $dirs, "/LXInput/", "/^.*(LXInput.*[\d\.x]+)\/.*$/" );
+    //$dir = preg_replace( "/ /", '%20', $dir );
     $dirpath .= "/$dir";
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/lxinput/", "/^\s+lxinput-([\d\.]+).tar.*$/" );
+    $ver = find_max( $lines, "/lxinput/", "/^.*lxinput-([\d\.]+).tar.*$/" );
     return $ver;
   }
   else if ( $book_index == "lxrandr" )
   {
     $dirs = http_get_file( "$dirpath/" );    
-    $dir = find_max ( $dirs, "/^\s*LXRandR/", "/^\s*(LXRandR 
[0123]\.[\d\.x]+).*$/" );
-    $dir = preg_replace( "/ /", '%20', $dir );
+    $dir = find_max ( $dirs, "/LXRandR/", "/^.*(LXRandR.*[\d\.x]+)\/.*$/" );
+    //$dir = preg_replace( "/ /", '%20', $dir );
     $dirpath .= "/$dir";
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/lxrandr/", "/^\s+lxrandr-([\d\.]+).tar.*$/" );
+    $ver = find_max( $lines, "/lxrandr/", "/^.*lxrandr-([\d\.]+).tar.*$/" );
     return $ver;
   }
   else if ( $book_index == "lxtask" )
   {
     $dirs = http_get_file( "$dirpath/" );    
-    $dir = find_max ( $dirs, "/^\s*LXTask/", "/^\s*(LXTask 
[0123]\.[\d\.x]+).*$/" );
-    $dir = preg_replace( "/ /", '%20', $dir );
+    $dir = find_max ( $dirs, "/LXTask/", "/^.*(LXTask.*[\d\.x]+)\/.*$/" );
+    //$dir = preg_replace( "/ /", '%20', $dir );
     $dirpath .= "/$dir";
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/lxtask/", "/^\s+lxtask-([\d\.]+).tar.*$/" );
+    $ver = find_max( $lines, "/lxtask/", "/^.*lxtask-([\d\.]+).tar.*$/" );
     return $ver;
   }
   else if ( $book_index == "lxterminal" )
   {
     $dirs = http_get_file( "$dirpath/" );    
-    $dir = find_max ( $dirs, "/^\s*LXTerminal/", "/^\s*(LXTerminal 
[0123]\.[\d\.x]+).*$/" );
+    $dir = find_max ( $dirs, "/LXTerminal/", 
"/^.*(LXTerminal.*[\d\.x]+)\/.*$/" );
     $dir = preg_replace( "/ /", '%20', $dir );
     $dirpath .= "/$dir";
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/lxterminal/", 
"/^\s+lxterminal-([\d\.]+).tar.*$/" );
+    $ver = find_max( $lines, "/lxterminal/", 
"/^.*lxterminal-([\d\.]+).tar.*$/" );
     return $ver;
   }
   else if ( $book_index == "lxsession" )
   {
     $dirs = http_get_file( "$dirpath/" );    
-    $dir = find_max ( $dirs, "/^\s*LXSession/", "/^\s*(LXSession 
[0123]\.[\d\.x]+).*$/" );
+    $dir = find_max ( $dirs, "/LXSession/", "/^.*(LXSession.*[\d\.x]+)\/.*$/" 
);
     $dir = preg_replace( "/ /", '%20', $dir );
     $dirpath .= "/$dir";
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/lxsession/", "/^\s+lxsession-([\d\.]+).tar.*$/" 
);
+    $ver = find_max( $lines, "/lxsession/", "/^.*lxsession-([\d\.]+).tar.*$/" 
);
     return $ver;
   }
   else if ( $book_index == "gpicview" )
   {
     $dirs = http_get_file( "$dirpath/" );    
-    $dir = find_max ( $dirs, "/^\s*\d/", "/^\s*([0123]\.[\d\.x]+).*$/" );
-    $dir = preg_replace( "/ /", '%20', $dir );
+    $dir = find_max ( $dirs, "/GPicView/", "/^.*\/([\d\.x]+)\/.*$/" );
+    //$dir = preg_replace( "/ /", '%20', $dir );
     $dirpath .= "/$dir";
     $lines    = http_get_file( "$dirpath/" );
-    $ver = find_max( $lines, "/gpicview/", "/^\s+gpicview-([\d\.]+).tar.*$/" );
+    $ver = find_max( $lines, "/gpicview/", "/^.*gpicview-([\d\.]+).tar.*$/" );
     return $ver;
   }
   else if ( $book_index == "qtermwidget" )
@@ -312,6 +312,7 @@
      $position = strrpos( $dirpath, "/" );
      $dirpath  = substr ( $dirpath, 0, $position );  // Up 1
      $dirs     = http_get_file( "$dirpath/" );
+
      if ( preg_match( "/xf/", $package )  &&
           $book_index != "xfburn" )
        $dir = find_even_max( $dirs, "/^\d/", "/^([\d\.]+)\/.*$/" );
@@ -328,13 +329,9 @@
   else 
   {
      if ( $book_index == "midori" )
-     {
        exec( "curl -L -s -m30 $dirpath", $lines );
-     }
      else
-     {
        $lines = http_get_file( "$dirpath/" );
-     }
   }
 
   if ( isset( $regex[ $package ] ) )
@@ -353,12 +350,6 @@
      return 0;  // This is an error
   }
 
-  //if ( $book_index == "lxmenu-data" )
-  //{
-  //  $ver = find_max( $lines, "/$package/", "/^.*$package-([\d\.]*\d).*$/" );
-  //  return $ver;
-  //}
-
   if ( $book_index == "lxpanel" )
   {
     $ver = find_max( $lines, "/LXPanel/", "/^.*LXPanel ([\d\.]+\d).*$/" );

Modified: trunk/scripts/blfs-chapter39.php
==============================================================================
--- trunk/scripts/blfs-chapter39.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter39.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -5,7 +5,7 @@
 
 $CHAPTER       = '39';
 $CHAPTERS      = 'Chapters 39-43';
-$START_PACKAGE = 'lxmenu-data';
+$START_PACKAGE = 'libsysstat';
 $STOP_PACKAGE  = 'QupZilla';
 
 $renames = array();

Modified: trunk/scripts/blfs-chapter43.php
==============================================================================
--- trunk/scripts/blfs-chapter43.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter43.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -14,7 +14,7 @@
 
 $libreoffice = array();
 
-//$current="icedtea-web";
+//$current="rox-filer";
 
 $regex = array();
 $regex[ 'inkscape'     ] = "/^.*Latest.*(\d[\d\.]+\d).*$/";
@@ -247,7 +247,7 @@
       return find_max( $lines, "/$package/", "/^.*$package-([\d\.]+).*$/" );
 
   if ( $package == "rox-filer" )
-      return find_max( $lines, "/^\s*\d/", "/^\s*(\d\.[\d\.]+).*$/" );
+      return find_max( $lines, "/rox\/files/", "/^.*rox\/(\d\.[\d\.]+)\/.*$/" 
);
 
   if ( $package == "tigervnc" )
       return find_max( $lines, "/^\s*\d\./", "/^\s*(\d\.[\d\.]+).*$/" );

Modified: trunk/scripts/blfs-chapter46.php
==============================================================================
--- trunk/scripts/blfs-chapter46.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter46.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -18,7 +18,7 @@
 
 $ignores = array();
 
-//$current="audiofile";
+//$current="libmpeg2";
 
 $regex = array();
 $regex[ 'faac'             ] = "/^.*Download faac-(\d[\d\.]+\d).tar.*$/";
@@ -224,7 +224,7 @@
      }
 
      $lines = http_get_file( $dirpath );
-
+print_r($lines);
      if ( ! is_array( $lines ) ) return $lines;
   } // End fetch
 

Modified: trunk/scripts/blfs-chapter47.php
==============================================================================
--- trunk/scripts/blfs-chapter47.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter47.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -8,7 +8,7 @@
 $START_PACKAGE = 'mpg123';
 $STOP_PACKAGE  = 'simpleburn';
 
-//$current="simpleburn";  // For debugging
+//$current="xine-ui";  // For debugging
 
 $renames = array();
 
@@ -154,7 +154,7 @@
       return find_max( $lines, "/\d\./", "/^.*;([\d\.]+)\/.*$/", TRUE );
 
   if ( $package == "xine-ui" )
-      return find_max( $lines, "/\d\./", "/^\s*([\d\.]+)$/" );
+      return find_max( $lines, "/xine-ui\//", "/^.*xine-ui\/([\d\.]+)\/.*$/" );
 
   if ( $package == "dvd+rw-tools" )
       return find_max( $lines, "/dvd\+/", 
"/^.*dvd\+rw-tools-([\d\.]+).tar.*$/" );

Modified: trunk/scripts/blfs-chapter50.php
==============================================================================
--- trunk/scripts/blfs-chapter50.php    Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-chapter50.php    Fri Aug 26 21:46:24 2016        (r17654)
@@ -13,7 +13,7 @@
 $ignores[ 'install-tl-unx' ] = '';
 $ignores[ 'texlive1'       ] = '';
 
-//$current="biblatex";  // For debugging
+//$current="docbook-xsl";  // For debugging
 
 $regex = array();
 $regex[ 'gutenprint'      ] = "/^.*Download gutenprint-(\d[\d\.]+\d).*$/";
@@ -23,7 +23,7 @@
 $regex[ 'paps'            ] = "/^.*Download paps-(\d[\d\.]+\d).tar.*$/";
 $regex[ 'asymptote'       ] = "/^.*Download asymptote-(\d[\d\.]+\d).*$/";
 $regex[ 'ghostscript-fonts-std' ] =
-    "/^.*Download ghostscript-fonts-std-(\d[\d\.]+\d).tar.*$/";
+    "/^.*ghostscript-fonts-std-(\d[\d\.]+\d).tar.*$/";
 
 $url_fix = array (
 
@@ -155,14 +155,15 @@
      if ( $book_index == "gnu-gs-fonts-other" )
      {
         $dirs = http_get_file( $dirpath );
-        $dir  = find_max( $dirs, "/misc.*GPL/", "/^\s*([\d\.]+.*)$/" );
-        $dir  = preg_replace( "/ /",  '%20', $dir );
-        $dir  = preg_replace( "/\(/", '%28', $dir );
-        $dir  = preg_replace( "/\)/", '%29', $dir );
+        $dir  = find_max( $dirs, "/misc.*GPL/", 
"/^.*files\/gs-fonts\/([\d\.]+.*)\/$/" );
+        //$dir  = preg_replace( "/ /",  '%20', $dir );
+        //$dir  = preg_replace( "/\(/", '%28', $dir );
+        //$dir  = preg_replace( "/\)/", '%29', $dir );
         $dirpath .= "/$dir";
      }
 
      $lines = http_get_file( $dirpath );
+
      if ( ! is_array( $lines ) ) return $lines;
   } // End fetch
 
@@ -191,7 +192,7 @@
       return find_max( $lines, "/4\.\d/", "/^.*(4\.\d),.*$/" );
 
   if ( $package == "docbook-xsl" )
-      return find_max( $lines, "/\.\d+/", "/^\s*([\d\.]+)$/" );
+      return find_max( $lines, "/xsl\//", "/^.*xsl\/([\d\.]+)\/$/" );
 
   if ( $package == "psutils" )
       return find_max( $lines, "/$package/", "/^.*$package-(p[\d\.]+).tar.*$/" 
);

Modified: trunk/scripts/blfs-include.php
==============================================================================
--- trunk/scripts/blfs-include.php      Fri Aug 26 18:43:52 2016        (r17653)
+++ trunk/scripts/blfs-include.php      Fri Aug 26 21:46:24 2016        (r17654)
@@ -94,10 +94,24 @@
 
 function http_get_file( $url )
 {
-  exec( "curl -L -s -m40 -A Firefox/41.0 $url", $dir );
-  $s   = implode( "\n", $dir );
-  $dir = strip_tags( $s );
-  return explode( "\n", $dir );
+  if ( ! preg_match( "/sourceforge/", $url ) ||
+         preg_match( "/jfs/", $url         ) ||
+         preg_match( "/liba52/", $url      ) ||
+         preg_match( "/libmpeg2/", $url    ) )
+  {
+//echo "url=$url\n";
+     exec( "curl -L -s -m40 -A Firefox/41.0 $url", $dir );
+     $s   = implode( "\n", $dir );
+     $dir = strip_tags( $s );
+     return explode( "\n", $dir );
+  }
+  else
+  {
+//echo "url=$url\n";
+     exec( "elinks -dump $url", $lines );
+//print_r($lines);
+     return $lines;
+  }
 }
 
 function max_parent( $dirpath, $prefix )
@@ -145,7 +159,7 @@
       $file = preg_replace( "/\.tgz$/",       "", $file ); // Remove .tgz$
 
       $pattern = get_pattern( $file );
-      
+
       $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