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