Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3105

Modified Files:
        Bootstrap.pm ChangeLog 
Log Message:
Code cleanup in OS X version sanity check.


Index: Bootstrap.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Bootstrap.pm,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- Bootstrap.pm        11 Jan 2006 17:20:44 -0000      1.127
+++ Bootstrap.pm        18 Jan 2006 07:02:54 -0000      1.128
@@ -111,8 +111,8 @@
 =cut
 
 sub check_host {
-       my $host = shift @_;
-       my ($distribution, $gcc, $build);
+       my $host = shift;
+       my ($distribution, $gcc);
 
        # We test for an obsolete version of gcc3.3, and refuse to proceed if
     # it is present.
@@ -121,6 +121,7 @@
        #  had build 1493.)
 
        if (-x '/usr/bin/gcc-3.3') {
+               my $build = 0;
                foreach(`/usr/bin/gcc-3.3 --version 2>&1`) {
                        if (/build (\d+)\)/) {
                                $build = $1;
@@ -156,7 +157,12 @@
                $gcc = "-gcc3.3";
        }
 
-       if ($host =~ /^powerpc-apple-darwin1\.[34]/) {
+       if ($host =~ /^powerpc-apple-darwin1\.[0-2]/) {
+               &print_breaking("This system is outdated and not supported ".
+                       "by this Fink release. Please update to Mac OS X ".
+                       "10.0 or Darwin 1.3.");
+               $distribution = "unknown";
+       elsif ($host =~ /^powerpc-apple-darwin1\.[34]/) {
                &print_breaking("\nThis system is no longer supported " .
 "for current versions of fink.  Please use fink 0.12.1 or earlier.\n");
                $distribution = "10.1";
@@ -194,6 +200,18 @@
                } else {
                        $distribution = "10.4-transitional";
                }
+       } elsif ($host =~ /^i386-apple-darwin6\.[0-9]\./) {
+               &print_breaking("Fink is currently not supported on x86 ".
+                       "Darwin. Various parts of Fink hardcode 'powerpc' ".
+                       "and assume to run on a PowerPC based operating ".
+                       "system. Use Fink on this system at your own risk!");
+               $distribution = "10.2";
+       } elsif ($host =~ /^i386-apple-darwin7\.[0-2]\.[0-1]/) {
+               &print_breaking("Fink is currently not supported on x86 ".
+                       "Darwin. Various parts of Fink hardcode 'powerpc' ".
+                       "and assume to run on a PowerPC based operating ".
+                       "system. Use Fink on this system at your own risk!");
+               $distribution = "10.3";
        } elsif ($host =~ /^i386-apple-darwin8\.[0-3]\.[0-1]/) {
                &print_breaking("Fink is currently not supported on x86 ".
                        "Darwin. Various parts of Fink hardcode 'powerpc' ".
@@ -216,23 +234,6 @@
                } else {
                        $distribution = "10.4-transitional";
                }
-       } elsif ($host =~ /^i386-apple-darwin7\.[0-2]\.[0-1]/) {
-               &print_breaking("Fink is currently not supported on x86 ".
-                       "Darwin. Various parts of Fink hardcode 'powerpc' ".
-                       "and assume to run on a PowerPC based operating ".
-                       "system. Use Fink on this system at your own risk!");
-               $distribution = "10.3";
-       } elsif ($host =~ /^i386-apple-darwin(6\.[0-6]|[7-9]\.)/) {
-               &print_breaking("Fink is currently not supported on x86 ".
-                       "Darwin. Various parts of Fink hardcode 'powerpc' ".
-                       "and assume to run on a PowerPC based operating ".
-                       "system. Use Fink on this system at your own risk!");
-               $distribution = "10.2";
-       } elsif ($host =~ /^powerpc-apple-darwin1\.[0-2]/) {
-               &print_breaking("This system is outdated and not supported ".
-                       "by this Fink release. Please update to Mac OS X ".
-                       "10.0 or Darwin 1.3.");
-               $distribution = "unknown";
        } else {
                &print_breaking("This system is unrecognized and not ".
                        "supported by Fink.");

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1224
retrieving revision 1.1225
diff -u -d -r1.1224 -r1.1225
--- ChangeLog   13 Jan 2006 03:23:30 -0000      1.1224
+++ ChangeLog   18 Jan 2006 07:02:54 -0000      1.1225
@@ -1,9 +1,13 @@
-2006-01-1  Daniel Macks  <[EMAIL PROTECTED]>
+2006-01-18  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * Bootstrap.pm: clean up OS detection if/elsif/elsif a bit.
+
+2006-01-13  Daniel Macks  <[EMAIL PROTECTED]>
 
        * PkgVersion.pm: Fields are officially PatchFile and
        PatchFile-MD5, so the %-exp is %{PatchFile}.
 
-2006-01-1  Daniel Macks  <[EMAIL PROTECTED]>
+2006-01-12  Daniel Macks  <[EMAIL PROTECTED]>
 
        * Validation.pm: Allow SetPATH also, not just NoSetPATH
 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to