Graphics-Framebuffer

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

		$l = colored(['bold cyan'],$l);
	}
	print "$l\n";
}
print colored(['black on_blue'],'-' x $COLS),"\n";

unless (defined($ENV{'DISPLAY'})) {
	print colored(['bright_white on_magenta'],' Building    -> '),colored(['bright_green'],'      make'),"\n";
	print colored(['bright_white on_magenta'],' Testing     -> '),colored(['bright_green'],'      make')," test\n";
	print colored(['bright_white on_magenta'],' Installing  -> '),colored(['red'],' sudo '),colored(['bright_green'],'make')," install\n";
	print colored(['bright_white on_magenta'],' Cleaning Up -> '),colored(['bright_green'],'      make')," veryclean\n";
} else {
	print colored(['bright_white on_magenta'],' Building    -> '),colored(['bright_green'],'               make'),"\n";
	print colored(['bright_white on_magenta'],' Testing     -> '),colored(['red'],'GFB_IGNORE_X=1 '),colored(['bright_green'],'make')," test\n";
	print colored(['bright_white on_magenta'],' Installing  -> '),colored(['red'],'          sudo '),colored(['bright_green'],'make')," install\n";
	print colored(['bright_white on_magenta'],' Cleaning Up -> '),colored(['bright_green'],'               make')," veryclean\n";
}
print colored(['black on_blue'],'-' x $COLS),"\n";
print $blink, colored(['yellow on_blue'],sprintf('%-67s',' PLEASE PAY ATTENTION TO THE MESSAGE BELOW FOR ANY MISSING MODULES BEFORE CONTINUING ')), "\n";

my $mm = WriteMakefile(
    NAME               => 'Graphics::Framebuffer',
    AUTHOR             => $Eml,
    VERSION_FROM       => 'lib/Graphics/Framebuffer.pm',
    ABSTRACT_FROM      => 'lib/Graphics/Framebuffer.pm',
    PL_FILES           => {},
    MIN_PERL_VERSION   => 5.020, # 5.6 (5.006) is considered slow and unstable.  Upgrade
    CONFIGURE_REQUIRES => {
        'Inline::MakeMaker'   => '0.45',
        'ExtUtils::MakeMaker' => '6.52',
        'Term::ANSIColor'     => '0',
        'Term::ReadKey'       => '0',
    },
    BUILD_REQUIRES => {
        'Test::More'      => '1.00',
        'List::Util'      => '1.20',
		'Term::ANSIColor' => '0',
    },
    PREREQ_PRINT   => TRUE,
    PREREQ_FATAL   => FALSE,
    PREREQ_PM      => {
		'IO::Handle'     => '0',
        'Math::Bezier'   => '0.01',
        'Math::Gradient' => '0.03',
        'List::Util'     => '1.20',
        'File::Map'      => '0.64',
        'Term::ReadKey'  => '0',
        'Imager'         => '0.80',
        'Inline'         => '0.53',
        'Inline::C'      => '0.53',
    },
    dist  => {COMPRESS => 'gzip -9f', SUFFIX => 'gz',},
    clean => {FILES    => 'Graphics-Framebuffer* _Inline* examples/_Inline* *.inl *log *bak *old'},
);
print $blink, colored(['yellow on_blue'],sprintf('%-67s',' PLEASE PAY ATTENTION TO THE MESSAGE ABOVE FOR ANY MISSING MODULES BEFORE CONTINUING ')), "\n";

exit(0);

sub slurp_file {
    my $file = shift;
    return( do { local (@ARGV, $/) = $file; <> } );
}

sub no_framebuffer {
    my $fb_absent = TRUE;
	my $os = `uname`;
	chomp($os);
	if ($os eq 'Linux') {
		foreach my $device (0 .. 31) {
			foreach my $prefix (qw( /dev/fb /dev/fb/ /dev/graphics/fb/ )) {
				if (-e "$prefix$device") {
					$fb_absent = FALSE;
					print colored(['bright_yellow'],'                FRAMEBUFFER'), ' ... ', colored(['bright_green'],'FOUND'), ' - ', colored(['cyan'],"$prefix$device"),"\n";
				}
			}
		}
	}
    if ($fb_absent) {
        print colored(['bright_yellow'],'                FRAMEBUFFER'), ' ... ', colored(['bright_red'],'NOT FOUND'),"\n";
    }
    return($fb_absent);
}

sub _username_for_tests {
	# Prefer SUDO_USER when running under sudo so we check the human account
	# that will be logging in/out and being added to groups.
	return $ENV{SUDO_USER} if defined $ENV{SUDO_USER} && length $ENV{SUDO_USER};
	return $ENV{USER}      if defined $ENV{USER}      && length $ENV{USER};
	chomp(my $u = `id -un 2>/dev/null`);
	return $u || 'YOUR_USERNAME';
}

sub _user_in_group {
	my ($user, $group) = @_;
	my $cmd = qq{/usr/bin/id -nG "$user" 2>/dev/null};
	my $groups = `$cmd` || '';
	if ($groups =~ /video/) {
		return(1);
	} else {
		return(0);
	}
}

__DATA__
---------------------------- Graphics::Framebuffer ----------------------------
                      ____                 _     _                             
                     / ___|_ __ __ _ _ __ | |__ (_) ___ ___                    
                    | |  _| '__/ _` | '_ \| '_ \| |/ __/ __                    
                    | |_| | | | (_| | |_) | | | | | (__\__ \                   
                     \____|_|  \__,_| .__/|_| |_|_|\___|___/                   
                                    |_|                                        
          _____                         _            __  __                    
         |  ___| __ __ _ _ __ ___   ___| |__  _   _ / _|/ _| ___ _ __          
         | |_ | '__/ _` | '_ ` _ \ / _ \ '_ \| | | | |_| |_ / _ \ '__|         
         |  _|| | | (_| | | | | | |  __/ |_) | |_| |  _|  _|  __/ |            
         |_|  |_|  \__,_|_| |_| |_|\___|_.__/ \__,_|_| |_|  \___|_|            
                                                                               
                                                                               



( run in 0.528 second using v1.01-cache-2.11-cpan-39bf76dae61 )