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

Modified Files:
      Tag: dist-up-branch
        .cvsignore 
Added Files:
      Tag: dist-up-branch
        ChangeLog Fink.pm.in 
Log Message:
sync w head, dist-up-branch-10

Index: .cvsignore
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.1.10.1
diff -u -d -r1.1 -r1.1.10.1
--- .cvsignore  2 Nov 2004 18:26:24 -0000       1.1
+++ .cvsignore  11 Nov 2005 21:00:41 -0000      1.1.10.1
@@ -1 +1,2 @@
 .DS_Store
+Fink.pm

--- NEW FILE: Fink.pm.in ---
# -*- mode: Perl; tab-width: 4; -*-
#
# Fink package
#
# Fink - a package manager that downloads source and installs it
# Copyright (c) 2001 Christoph Pfisterer
# Copyright (c) 2001-2005 The Fink Package Manager Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA      02111-1307, 
USA.
#

package Fink;

require 5.006;  # perl 5.6.0 or newer required

use strict;
use warnings;

=head1 NAME

Fink - Compile and install UNIX applications for Mac OS X

=head1 SYNOPSIS

  use Fink;

  # Do something with the other Fink modules

=head1 DESCRIPTION

This module allows other scripts to easily initialize Fink.

=cut

# Fink->_safe()
#
# Make sure Fink is safe to use

{
        my $basepath = "@BASEPATH@";
        my $inited = 0;
        
        sub _safe {
                # set useful umask
                umask oct("022");
                
                # set PATH so we find dpkg and *-config scripts
                $ENV{PATH} = 
"$basepath/sbin:$basepath/bin:/usr/sbin:/sbin:/usr/X11R6/bin:"
                        . $ENV{PATH};
                
                # get rid of CDPATH
                delete $ENV{CDPATH};
        }
        
        sub import {
                my $class = shift;
                
                # Only do it once
                return if $inited++;
                
                # Setup the configuration
                my $configpath = "$basepath/etc/fink.conf";
                unless (-f $configpath) {
                        print "ERROR: Configuration file \"$configpath\" not 
found.\n";
                        exit 1;
                }       
                require Fink::Config;
                Fink::Config->new_with_path($configpath, { Basepath => 
$basepath });
                
                # Make sure we're safe
                $class->_safe();
        }
}

1;

--- NEW FILE: ChangeLog ---
2005-09-09  Dave Vasilevsky  <[EMAIL PROTECTED]>

        * Fink.pm.in: New module, so scripts can 'use Fink'.
        * .cvsignore: Ignore Fink.pm (created from Fink.pm.in)




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to