mm.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Index: IPC-MMA-0.59005/Makefile.PL
  2. --- IPC-MMA-0.59005/Makefile.PL.orig 2009-11-15 11:31:02 +0100
  3. +++ IPC-MMA-0.59005/Makefile.PL 2009-11-15 11:33:14 +0100
  4. @@ -3,31 +3,8 @@
  5. use Config;
  6. use ExtUtils::MakeMaker;
  7. -my $binpath = 'mm-config';
  8. -if (system "which $binpath>/dev/null") {
  9. -
  10. - # mm-config is not in PATH, but maybe it's installed outside PATH
  11. - print "$binpath not in PATH: trying to find it...\n";
  12. - my $found;
  13. - DIR: for ('/usr', glob("~")) {
  14. - my $result = `find $_ -maxdepth 6 -name "$binpath" 2>/dev/null`;
  15. - while ($result =~ m"^(\S*?/$binpath)$"mg) {
  16. - if ($found = -X $1) {$binpath = $1; last DIR}
  17. - } }
  18. - if (!$found) {
  19. - print "IPC::MMA requires the mm library, including its $binpath utility\n";
  20. - $binpath = prompt("Please enter path to $binpath (or just return to quit):");
  21. - chomp $binpath;
  22. - $binpath =~ s"(.)(/(mm-config)?)?$"$1/mm-config";
  23. -
  24. - if (!$binpath || !-e $binpath || !-X $binpath) {
  25. - if ($binpath) {warn "'$binpath' not found or not executable\n"}
  26. - warn "The mm library is available at http://www.ossp.org/pkg/lib/mm/\n";
  27. - exit 0;
  28. -} } }
  29. -# mm-config provides parameters to link with the mm library
  30. -my $cflags = `$binpath --cflags`;
  31. -my $libs = `$binpath --ldflags --libs`;
  32. +my $cflags = "-I..";
  33. +my $libs = "-L../.libs -lmm";
  34. chomp $cflags, $libs;
  35. # test cc optimize by size (OK in gcc, possibly others)
  36. @@ -54,3 +31,4 @@
  37. 'PREREQ_PM' => {'Test::Warn'=>'0.11', 'ExtUtils::ParseXS'=>'2.200401'},
  38. 'VERSION_FROM' => 'MMA.pm', # finds $VERSION
  39. @moreStuff);
  40. +