[SCM] mapserver branch, master, updated. upstream/6.2.1-97-g257f52a

Bas Couwenberg sebastic at xs4all.nl
Wed Jul 17 20:30:24 UTC 2013


The following commit has been merged in the master branch:
commit 5d4a2bb57448de3a48acd229e7e08f35dd7c602f
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Tue Jul 16 19:21:23 2013 +0200

    Enable hardening build flags for Ruby mapscript.

diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
index a4549df..c5ffdf6 100644
--- a/debian/patches/hardening.patch
+++ b/debian/patches/hardening.patch
@@ -88,3 +88,14 @@ Last-Update: 2013-06-30
  MS_LIB =   $(top_builddir)/libmapserver.la
  
  
+--- a/mapscript/ruby/extconf.rb
++++ b/mapscript/ruby/extconf.rb
+@@ -14,7 +14,7 @@ MAPSERVER_LOCAL_LIBS=Pathname.new(File.d
+ 
+ # $CFLAGS works only with 1.8 ??? -> the -Wall argument is not needed !!!
+ $CFLAGS = ""
+-$CPPFLAGS = make_inc + " -idirafter $(rubylibdir)/$(arch) " + make_define
++$CPPFLAGS += make_inc + " -idirafter $(rubylibdir)/$(arch) " + make_define
+ $LDFLAGS += " -fPIC -Wl,-rpath,#{MAPSERVER_LOCAL_LIBS}"
+ #$LOCAL_LIBS += " -L../../.libs/ " + " -lmapserver " + make_static_libs
+ $LOCAL_LIBS += " -L#{MAPSERVER_LOCAL_LIBS} " + " -lmapserver "
diff --git a/debian/rules b/debian/rules
index a501885..bf1fa1e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,9 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
 CFLAGS+=$(CPPFLAGS)
 CFLAGS+=$(LDFLAGS)
+
+# mapscript.so for ruby1.9.1 fails to build with -Werror=format-security
+RUBY_CPPFLAGS=$(subst -Werror=format-security,,$(CFLAGS))
  
 package=mapserver
 
@@ -105,7 +108,7 @@ build-arch-stamp: configure-stamp
 	# Build ruby
 	cd $(CURDIR)/mapscript/ruby && set -e ; \
 	  for v in $(RUBYVERS) ; do \
-	    ruby$$v extconf.rb && $(MAKE) && \
+	    ruby$$v extconf.rb --with-cppflags="$(RUBY_CPPFLAGS) " && $(MAKE) && \
 	      mv mapscript.so ruby$$v-mapscript.so ; \
 	  done
 
@@ -182,7 +185,7 @@ install-arch-stamp: build-arch
 	# Ruby mapscript
 	cd $(CURDIR)/mapscript/ruby && set -e ; \
 	  for v in $(RUBYVERS) ; do \
-	    ruby$$v extconf.rb ; \
+	    ruby$$v extconf.rb --with-cppflags="$(RUBY_CPPFLAGS) " ; \
 	      $(MAKE) install sitedir=$(CURDIR)/debian/libmapscript-ruby$$v/usr/lib/ruby ; \
 	      $(MAKE) distclean ; \
 	  done

-- 
Mapserver



More information about the Pkg-grass-devel mailing list