makepp-1.18-install.patch 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --- install.pl.orig 2003-02-18 13:15:15.000000000 -0800
  2. +++ install.pl 2003-02-18 13:49:10.000000000 -0800
  3. @@ -31,9 +31,24 @@
  4. #
  5. # Now figure out where everything goes:
  6. #
  7. -$prefix = "/usr/local";
  8. +$prefix = shift(@ARGV) ||
  9. + read_with_prompt( "
  10. +You can specify a prefix directory that will simplify defaults for
  11. +further questions.
  12. +
  13. +What should be the prefix directory [$prefix]? ") ||
  14. + "/usr/local";
  15. +
  16. +$inst_prefix = shift(@ARGV) ||
  17. + read_with_prompt( "
  18. +You can specify an install prefix that is prefixed to the runtime
  19. +prefix for the install phase only. This is useful when installing
  20. +into staging directories for packaging systems.
  21. -$bindir = shift(@_) ||
  22. +What should the install prefix be []? ") ||
  23. + "";
  24. +
  25. +$bindir = shift(@ARGV) ||
  26. read_with_prompt("
  27. Makepp needs to know where you want to install it and its data files.
  28. makepp is written in perl, but there is no particular reason to install
  29. @@ -43,10 +58,7 @@
  30. Where should the makepp executable be installed [$prefix/bin]? ") ||
  31. "$prefix/bin";
  32. -$bindir =~ m@(.*)/bin@ and $prefix = $1;
  33. - # See if a prefix was specified.
  34. -
  35. -$datadir = shift @_ || read_with_prompt("
  36. +$datadir = shift @ARGV || read_with_prompt("
  37. Makepp has a number of library files that it needs to install somewhere. Some
  38. of these are perl modules, but they can't be used by other perl programs, so
  39. there's no point in installing them in the perl modules hierarchy; they are
  40. @@ -55,14 +67,24 @@
  41. Where should the library files be installed [$prefix/share/makepp]? ") ||
  42. "$prefix/share/makepp";
  43. -$htmldir = shift @_ || read_with_prompt("
  44. +$htmldir = shift @ARGV || read_with_prompt("
  45. Where should the HTML documentation be installed?
  46. Enter \"none\" if you do not want any documentation installed.
  47. HTML documentation directory [$prefix/share/makepp/html]: ") ||
  48. "$prefix/share/makepp/html";
  49. -substitute_file("makepp", $bindir, 0755);
  50. -substitute_file("recursive_makepp", $datadir, 0644);
  51. +substitute_file("makepp", "$inst_prefix/$bindir", 0755);
  52. +substitute_file("recursive_makepp", "$inst_prefix/$datadir", 0644);
  53. +
  54. +if( $inst_prefix ) {
  55. + $bindir = join( '/', $inst_prefix, $bindir );
  56. + $datadir = join( '/', $inst_prefix, $datadir );
  57. + $htmldir = join( '/', $inst_prefix, $htmldir );
  58. +}
  59. +
  60. +print STDERR "bindir now $bindir\n";
  61. +print STDERR "datadir now $datadir\n";
  62. +print STDERR "htmldir now $htmldir\n";
  63. make_dir("$datadir/Signature");
  64. foreach $module (qw(FileInfo FileInfo_makepp MakeEvent Glob Makefile Makesubs Rule