1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
|
From: Dima Kogan <dima@secretsauce.net>
Date: Wed, 27 Aug 2014 22:52:36 -0700
Subject: declawed Makefile.PL
Forwarded: not-needed
Makefile.PL no longer tries to install gnuplot. Debian can do that for us
---
Makefile.PL | 208 ------------------------------------------------------------
1 file changed, 208 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index 9e7846f..b3eefd3 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -26,213 +26,6 @@ sub MY::libscan
}
-########################################
-########################################
-# reroute the main POD into a separate README.pod if requested. This is here
-# purely to generate a README.pod for the github front page
-my $POD_header = <<EOF;
-=head1 OVERVIEW
-
-Alien::Gnuplot is intended for distribution via CPAN. This repository
-stores the history for the Alien::Gnuplot module on CPAN. Install the
-module via CPAN.
-
-=cut
-EOF
-if(exists $ARGV[0] && $ARGV[0] eq 'README.pod')
-{
- open MOD, 'lib/Alien/Gnuplot.pm' or die "Couldn't open main module";
- open README, '>README.pod' or die "Couldn't open README.pod";
-
- print README $POD_header;
-
- while (<MOD>)
- {
- if (/^=/../^=cut/)
- { print README; }
- }
-}
-
-
-################################################################################
-################################################################################
-## Here we check for a working gnuplot. What better way to do that than by
-## executing our own library?
-
-{
- my $get_msg = '';
-
- eval q{ do q{./lib/Alien/Gnuplot.pm}; $get_msg = $@;};
-
- unless($get_msg) {
- if($Alien::Gnuplot::GNUPLOT_RECOMMENDED_VERSION > $Alien::Gnuplot::version) {
- $get_msg = qq{
-Gnuplot seems to exist on your system, but it is version $Alien::Gnuplot::version.
-The minimum recommended version is $Alien::Gnuplot::GNUPLOT_RECOMMENDED_VERSION.
-
-}
- }
-
- }
-
- if($get_msg) {
- print $get_msg ;
-
- my $install_flag;
-
- if( (-t STDIN or $^O =~ m/MSWin/) and
- ! ( $ENV{AUTOMATED_TESTING} or $ENV{PERL_MM_USE_DEFAULT} )
- ) {
-
- print "\nGnuplot seems to not exist on your system. Shall I try to install it? [Y/n]> ";
- $a = <STDIN>;
- $install_flag = !($a =~ m/^\s*n/i);
-
- unless($install_flag) {
- print qq{
-
-Okay, I won't install gnuplot. You can still install the Alien::Gnuplot module,
-but it will fail on load until you install the gnuplot executable yourself.
-
-};
- }
-
- } else {
-
- if($ENV{PERL_MM_USE_DEFAULT}) {
- $install_flag = 1;
- print qq{
-
-Gnuplot seems to not exist oon your system, and you set PERL_MM_USE_DEFAULT --
-so I'll try to install it for you.
-
-};
- } else {
- print qq{
-
-Gnuplot seems to not exist on your system, and this is not an interactive
-session, so I can't ask if you want to install it. I'll install the module,
-but it'll fail on load until you install the gnuplot executable yourself.
-
-};
- }
- }
-
- if($install_flag) {
-
- print "Attempting to install/upgrade gnuplot on your system....\n\n";
-
- if( install_gnuplot_binary() ) {
- print "\nGnuplot installation was successful!\n";
- } else {
- die qq{
-
-Couldn't find gnuplot, and couldn't get it from the standard package managers.
-I'd try to download the packages from sourceforge, but there are roadblocks that
-make it hard to automate.
-
-You can get gnuplot from the DOWNLOAD link here: "http://gnuplot.info".
-
-};
- } # end of binary conditional
- } # end of prompt conditional
- } # end of get_msg condition
-} # end of convenience block
-
-##############################
-##############################
-##
-## install_gnuplot_binary routine -- called
-## from deep in the install conditional above.
-##
-## The strategy is to try to get a late-model
-## binary from the Usual Suspects, and fall back
-## to compiling it.
-##
-## On success, return 1; on failure return 0.
-## Try not to crash.
-
-sub install_gnuplot_binary {
- local($|) = 1;
-
- ##############################
- #
- if($^O eq 'darwin') {
- ##############################
- # Binary distros on mac - try macports, fink, homebrew
- for my $manager( ['macports','port','http://macports.org'],
- ['fink','fink','http://www.finkproject.org'],
- ['homebrew','brew','http://mxcl.github.com/homebrew/']
- ) {
- print "Trying $manager->[0] (you can get it at $manager->[2])...";
- my $l = `which $manager->[1]`;
- if($l) {
- print "\n";
- print STDERR `$manager->[1] install gnuplot`;
- my $msg;
- eval q{ do q{lib/Alien/Gnuplot.pm}; $msg = $@; } ;
-
- if( (!$msg) and ($Alien::Gnuplot::version >= $Alien::Gnuplot::GNUPLOT_RECOMMENDED_VERSION)) {
- print "Success!\n";
- return 1; # Success - return 1
- } else {
- return 0; # Failure - give up (once you find one package manager don't use any other)
- }
-
- } else {
- print "no $manager->[0]\n";
- }
- } # end of manager loop
-
- return 0;
- } # end of macos case
-
- elsif($^O eq 'linux') {
- # The linux package managers generally ask for keyboard feedback (e.g. yum),
- # so we have to spawn, exec, and wait to make sure the manager gets that feedback.
-
- for my $manager( 'yum','apt-get' ) {
- print "Trying $manager...";
- my $l = `which $manager`;
-
- if($l) {
-
- my $pid = fork();
- die "Couldn't fork!" unless(defined($pid));
-
- unless($pid) {
- ## daughter
- exec "$manager install gnuplot";
-
- exit(-1); # never get here
- }
-
- waitpid($pid,0); # wait for the install to finish
-
- my $msg;
- eval q{ do q{lib/Alien/Gnuplot.pm}; $msg = $@ };
-
- if( (!$msg) and ($Alien::Gnuplot::version >= $Alien::Gnuplot::GNUPLOT_RECOMMENDED_VERSION) ) {
- print "Success!\n";
- return 1; # Success - return 1
- } else {
- print "Hmmm, that didn't seem to work.\n";
- return 0; # Failure - give up (once you find one package manager don't use any other)
- }
- } # end of found-this-manager conditional
- } # end of manager loop
-
- return 0;
- } # end of linux case
-
- else {
- return 0; ## We're not a system where we know how to do binary installs
- }
-
-}
-
-
-
##############################
##############################
## Write a generic Makefile that puts the module in place. Include a postamble
@@ -248,7 +41,6 @@ WriteMakefile(
: ()),
PREREQ_PM => { 'Time::HiRes' => 0,
'File::Temp' => 0,
- 'HTTP::Tiny' => 0,
'POSIX' => 0,
'File::Spec' => 0
|