[mapserver-commits] r12909 - in trunk/mapserver: . mapscript/perl

svn at osgeo.org svn at osgeo.org
Fri Dec 23 05:03:37 EST 2011


Author: tbonfort
Date: 2011-12-23 02:03:37 -0800 (Fri, 23 Dec 2011)
New Revision: 12909

Added:
   trunk/mapserver/mapscript/perl/Makefile.PL.in
Removed:
   trunk/mapserver/mapscript/perl/Makefile.PL
Modified:
   trunk/mapserver/configure
   trunk/mapserver/configure.in
Log:
first stab at building perl mapscript module


Modified: trunk/mapserver/configure
===================================================================
--- trunk/mapserver/configure	2011-12-23 01:46:37 UTC (rev 12908)
+++ trunk/mapserver/configure	2011-12-23 10:03:37 UTC (rev 12909)
@@ -22466,7 +22466,7 @@
 RPATHS=$RPATHS
 
 
-ac_config_files="$ac_config_files Makefile $PHPMS_MAKEFILE mapscript/python/Makefile mapscript/java/Makefile mapscript/csharp/Makefile"
+ac_config_files="$ac_config_files Makefile $PHPMS_MAKEFILE mapscript/python/Makefile mapscript/java/Makefile mapscript/csharp/Makefile mapscript/perl/Makefile.PL"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -23576,6 +23576,7 @@
     "mapscript/python/Makefile") CONFIG_FILES="$CONFIG_FILES mapscript/python/Makefile" ;;
     "mapscript/java/Makefile") CONFIG_FILES="$CONFIG_FILES mapscript/java/Makefile" ;;
     "mapscript/csharp/Makefile") CONFIG_FILES="$CONFIG_FILES mapscript/csharp/Makefile" ;;
+    "mapscript/perl/Makefile.PL") CONFIG_FILES="$CONFIG_FILES mapscript/perl/Makefile.PL" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac

Modified: trunk/mapserver/configure.in
===================================================================
--- trunk/mapserver/configure.in	2011-12-23 01:46:37 UTC (rev 12908)
+++ trunk/mapserver/configure.in	2011-12-23 10:03:37 UTC (rev 12909)
@@ -2760,7 +2760,7 @@
 AC_SUBST(ALL_STATIC_LIB, $ALL_STATIC_LIB)
 AC_SUBST(RPATHS, [$RPATHS])
 
-AC_OUTPUT(Makefile $PHPMS_MAKEFILE mapscript/python/Makefile mapscript/java/Makefile mapscript/csharp/Makefile)
+AC_OUTPUT(Makefile $PHPMS_MAKEFILE mapscript/python/Makefile mapscript/java/Makefile mapscript/csharp/Makefile mapscript/perl/Makefile.PL)
 
 dnl ---------------------------------------------------------------------------
 dnl Display configuration status

Deleted: trunk/mapserver/mapscript/perl/Makefile.PL
===================================================================
--- trunk/mapserver/mapscript/perl/Makefile.PL	2011-12-23 01:46:37 UTC (rev 12908)
+++ trunk/mapserver/mapscript/perl/Makefile.PL	2011-12-23 10:03:37 UTC (rev 12909)
@@ -1,78 +0,0 @@
-# File : Makefile.PL
-use ExtUtils::MakeMaker;
-
-open(STREAM, '../../mapscriptvars') or die('Unable to open mapscriptvars, have you built the MapServer yet?'); 
-
-$home = <STREAM>;
-chomp $home;
-
-$define = <STREAM>;
-chomp $define;
-
-$inc = <STREAM>;
-chomp $inc;
-$inc =~ s/\-I\./\-I$home/g;
-
-$libs = <STREAM>;
-chomp $libs;
-$libs =~ s/\-L\./\-L$home/g;
-
-$static_libs = <STREAM>;
-chomp $static_libs;
-$static_libs =~ s/\-L\./\-L$home/g;
-
-# Get MapServer version from mapscriptvars
-$ms_version_line = <STREAM>;
-if ($ms_version_line) {
-	$ms_version_line =~ /MS_VERSION "(.+)"/;
-	$ms_version = $1;
-}
-# Default is 4.3
-else { $ms_version = '4.3'; }
-
-print $inc."\n";
-print $libs."\n";
-print $static_libs."\n";
-print $ms_version."\n";
-
-my $swigInterfaceFile = "../mapscript.i";
-my $swigWrapperFile   = "mapscript_wrap.c";
-
-########################################################################
-
-sub runSwigAutogeneration{
-  print "Autogenerating wrappers from SWIG interface " . $swigInterfaceFile . "\n";
-  my $command = "swig -perl5 -shadow -outdir . $define -o $swigWrapperFile $swigInterfaceFile";
-  system($command);
-  if ($?){
-      print "An error occurred when generating the wrappers from the SWIG interface :\n$!\n";
-      print "The command that was run was:\n\n$command\n\n";
-      print "Perl mascript cannot be built.\n";
-      exit;
-  }
-}
-
-########################################################################
-
-sub existsAndUpToDate{
-  my ($sourceFile, $destFile) = @_;
-  if (!(-e $destFile)) { return 0; }
-  my $sourceMtime = (stat $sourceFile)[9];
-  my $destMtime = (stat $destFile)[9];
-  return $destMtime >= $sourceMtime;
-}
-
-########################################################################
-
-runSwigAutogeneration() unless
-  existsAndUpToDate($swigInterfaceFile, $swigWrapperFile);
-
-WriteMakefile(
-	      'NAME' 		=> 'mapscript',
-	      'DEFINE' 		=> $define,
-	      'INC' 		=> $inc,
-	      'LIBS' 		=> [$libs,$static_libs],
-	      'OBJECT' 		=> 'mapscript_wrap.o',
-		  'VERSION' 	=> $ms_version
-	      );
-

Copied: trunk/mapserver/mapscript/perl/Makefile.PL.in (from rev 12906, trunk/mapserver/mapscript/perl/Makefile.PL)
===================================================================
--- trunk/mapserver/mapscript/perl/Makefile.PL.in	                        (rev 0)
+++ trunk/mapserver/mapscript/perl/Makefile.PL.in	2011-12-23 10:03:37 UTC (rev 12909)
@@ -0,0 +1,81 @@
+# File : Makefile.PL
+use ExtUtils::MakeMaker;
+
+open(STREAM, '../../mapscriptvars') or die('Unable to open mapscriptvars, have you built the MapServer yet?'); 
+
+$prefix="@prefix@";
+$exec_prefix="@exec_prefix@";
+$libdir="@libdir@";
+$home = <STREAM>;
+chomp $home;
+
+$define = <STREAM>;
+chomp $define;
+
+$inc = <STREAM>;
+chomp $inc;
+$inc =~ s/\-I\./\-I$home/g;
+
+$libs = <STREAM>;
+chomp $libs;
+$libs = "-L$libdir -lmapserver";
+
+$static_libs = <STREAM>;
+chomp $static_libs;
+$static_libs =~ s/\-L\./\-L$home/g;
+
+# Get MapServer version from mapscriptvars
+$ms_version_line = <STREAM>;
+if ($ms_version_line) {
+	$ms_version_line =~ /MS_VERSION "(.+)"/;
+	$ms_version = $1;
+}
+# Default is 4.3
+else { $ms_version = '4.3'; }
+
+print $inc."\n";
+print $libs."\n";
+print $static_libs."\n";
+print $ms_version."\n";
+
+my $swigInterfaceFile = "../mapscript.i";
+my $swigWrapperFile   = "mapscript_wrap.c";
+
+########################################################################
+
+sub runSwigAutogeneration{
+  print "Autogenerating wrappers from SWIG interface " . $swigInterfaceFile . "\n";
+  my $command = "swig -perl5 -shadow -outdir . $define -o $swigWrapperFile $swigInterfaceFile";
+  system($command);
+  if ($?){
+      print "An error occurred when generating the wrappers from the SWIG interface :\n$!\n";
+      print "The command that was run was:\n\n$command\n\n";
+      print "Perl mascript cannot be built.\n";
+      exit;
+  }
+}
+
+########################################################################
+
+sub existsAndUpToDate{
+  my ($sourceFile, $destFile) = @_;
+  if (!(-e $destFile)) { return 0; }
+  my $sourceMtime = (stat $sourceFile)[9];
+  my $destMtime = (stat $destFile)[9];
+  return $destMtime >= $sourceMtime;
+}
+
+########################################################################
+
+runSwigAutogeneration() unless
+  existsAndUpToDate($swigInterfaceFile, $swigWrapperFile);
+
+WriteMakefile(
+	      'NAME' 		=> 'mapscript',
+	      'DEFINE' 		=> $define,
+	      'INC' 		=> $inc,
+	      'LIBS' 		=> [$libs,$static_libs],
+	      'OBJECT' 		=> 'mapscript_wrap.o',
+		  'VERSION' 	=> $ms_version
+	      );
+



More information about the mapserver-commits mailing list