Skip to content

Commit

Permalink
#4528 : support for running mapscript tests without having to install…
Browse files Browse the repository at this point in the history
… core mapserver
  • Loading branch information
unicolet committed Feb 14, 2013
1 parent b240378 commit a4ac07d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mapscript/perl/Makefile.PL.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $inc =~ s/\-I\./\-I$home/g;

$libs = <STREAM>;
chomp $libs;
$libs = "-L$libdir -lmapserver";
$libs = "-L$libdir -L$home/.libs -lmapserver";

$static_libs = <STREAM>;
chomp $static_libs;
Expand Down
2 changes: 2 additions & 0 deletions mapscript/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ class ms_ext(build_ext):
])

def initialize_options(self):
print "LD_RUN_PATH set"
os.environ["LD_RUN_PATH"] = os.getcwd()+"/../../.libs"
build_ext.initialize_options(self)
self.gdaldir = None
self.mapserver_config = self.MAPSERVER_CONFIG
Expand Down
9 changes: 7 additions & 2 deletions mapscript/ruby/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env ruby
require 'mkmf'
require 'pathname'

mapscriptvars = File.open("../../mapscriptvars")
make_home = mapscriptvars.gets.chomp
Expand All @@ -9,12 +10,14 @@
make_static_libs = mapscriptvars.gets.chomp
mapscriptvars.close

MAPSERVER_LOCAL_LIBS=Pathname.new(File.dirname(__FILE__) + '/../../.libs').realpath

# $CFLAGS works only with 1.8 ??? -> the -Wall argument is not needed !!!
$CFLAGS = ""
$CPPFLAGS = make_inc + " -idirafter $(rubylibdir)/$(arch) " + make_define
$LDFLAGS += " -fPIC"
$LDFLAGS += " -fPIC -Wl,-rpath,#{MAPSERVER_LOCAL_LIBS}"
#$LOCAL_LIBS += " -L../../.libs/ " + " -lmapserver " + make_static_libs
$LOCAL_LIBS += " -L../../.libs/ " + " -lmapserver "
$LOCAL_LIBS += " -L#{MAPSERVER_LOCAL_LIBS} " + " -lmapserver "

# if the source file 'mapscript_wrap.c' is missing nothing works
# this is a workaround !!
Expand All @@ -23,6 +26,8 @@
$objs.push("mapscript_wrap.o")
end

#CONFIG['LDSHARED'] = "LD_RUN_PATH=#{MAPSERVER_LOCAL_LIBS} " + CONFIG['LDSHARED']

create_makefile("mapscript")

make_file = File.open("Makefile", "a")
Expand Down

0 comments on commit a4ac07d

Please sign in to comment.