[geos] 02/03: Add patch to support Ruby 2.x.

Bas Couwenberg sebastic at xs4all.nl
Fri Apr 25 22:45:48 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository geos.

commit 6b73a781f1462b6134a4fca770219969e3e508ae
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Apr 25 22:34:56 2014 +0200

    Add patch to support Ruby 2.x.
---
 debian/changelog                    |   1 +
 debian/patches/automake-am-cppflags |   8 +--
 debian/patches/ruby2                | 103 ++++++++++++++++++++++++++++++++++++
 debian/patches/series               |   1 +
 4 files changed, 109 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3dd3f07..73a2209 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ geos (3.4.2-5) UNRELEASED; urgency=low
 
   * Do run tests, but don't fail build on troublesome architectures.
     (closes: #743822)
+  * Add patch to support Ruby 2.x.
 
  -- Bas Couwenberg <sebastic at xs4all.nl>  Tue, 22 Apr 2014 20:48:42 +0200
 
diff --git a/debian/patches/automake-am-cppflags b/debian/patches/automake-am-cppflags
index ac13d79..9dc49c5 100644
--- a/debian/patches/automake-am-cppflags
+++ b/debian/patches/automake-am-cppflags
@@ -434,20 +434,20 @@ Applied-Upstream: http://trac.osgeo.org/geos/changeset/3973, http://trac.osgeo.o
  rubyextensiondirdir = $(RUBY_EXTENSION_DIR)
  
  # Setup includes
--INCLUDES = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH)
-+AM_CPPFLAGS = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH)
+-INCLUDES = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH) -I$(RUBY_ARCH_INCLUDE_DIR)
++AM_CPPFLAGS = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH) -I$(RUBY_ARCH_INCLUDE_DIR)
  
  # Build Ruby module as shared library
  rubyextensiondir_LTLIBRARIES = geos.la
 @@ -25,7 +25,7 @@ geos_la_SOURCES = geos_wrap.cxx
- geos_la_LIBADD =  $(top_builddir)/capi/libgeos_c.la /usr/lib/$(RUBY_SO_NAME)
+ geos_la_LIBADD =  $(top_builddir)/capi/libgeos_c.la $(RUBY_ARCH_LIB_DIR)/$(RUBY_SO_NAME)
  
  # Only need to grab the capi header files
 -geos_la_CPPFLAGS = -I$(top_builddir)/capi
 +geos_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/capi
  
  # Specify -module and -avoid-version so we can create a file called geos.dll/so which is what Ruby wants
- geos_la_LDFLAGS = -no-undefined  -module -avoid-version -L$(RUBY_LIB_DIR)
+ geos_la_LDFLAGS = -no-undefined  -module -avoid-version -L$(RUBY_LIB_DIR) -L$(RUBY_ARCH_LIB_DIR)
 --- a/tests/bigtest/Makefile.am
 +++ b/tests/bigtest/Makefile.am
 @@ -17,8 +17,8 @@ TestSweepLineSpeed_LDADD = $(LIBS)
diff --git a/debian/patches/ruby2 b/debian/patches/ruby2
new file mode 100644
index 0000000..a799683
--- /dev/null
+++ b/debian/patches/ruby2
@@ -0,0 +1,103 @@
+Description: Update include and libraries paths for Ruby 2.x
+Author: Bas Couwenberg <sebastic at xs4all.nl>
+--- a/configure
++++ b/configure
+@@ -17095,8 +17095,12 @@ fi
+ 
+ 				RUBY_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"]'`
+ 
++				RUBY_ARCH_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["rubyarchhdrdir"] || Config::CONFIG["archdir"]'`
++
+ 				RUBY_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["libdir"] || Config::CONFIG["libdir"]'`
+ 
++				RUBY_ARCH_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["archlibdir"] || Config::CONFIG["archlibdir"]'`
++
+ 				RUBY_EXTENSION_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["vendorarchdir"] || Config::CONFIG["vendorarchdir"]'`
+ 
+ 				RUBY_SO_NAME=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["LIBRUBY_SO"] || Config::CONFIG["RUBY_SO_NAME"]'`
+--- a/macros/ruby.m4
++++ b/macros/ruby.m4
+@@ -31,9 +31,15 @@ AC_DEFUN([AC_RUBY_DEVEL],
+ 		dnl Get Ruby include directory
+ 		RUBY_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]]'`
+ 	
++		dnl Get Ruby config.h include directory
++		RUBY_ARCH_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["rubyarchhdrdir"]] || Config::CONFIG[["archdir"]]'`
++	
+ 		dnl Get Ruby lib directory
+ 		RUBY_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["libdir"]] || Config::CONFIG[["libdir"]]'`
+ 
++		dnl Get Ruby arch lib directory
++		RUBY_ARCH_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["archlibdir"]] || Config::CONFIG[["archlibdir"]]'`
++
+ 		dnl Get Ruby extensions directory
+ 		RUBY_EXTENSION_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["vendorarchdir"]] || Config::CONFIG[["vendorarchdir"]]'`
+ 
+@@ -48,7 +54,9 @@ AC_DEFUN([AC_RUBY_DEVEL],
+     AC_MSG_NOTICE([Ruby bin directory is '$RUBY_BIN_DIR'])
+     AC_MSG_NOTICE([Ruby site arch is '$RUBY_SITE_ARCH'])
+     AC_MSG_NOTICE([Ruby include directory is '$RUBY_INCLUDE_DIR'])
++    AC_MSG_NOTICE([Ruby config.h include directory is '$RUBY_ARCH_INCLUDE_DIR'])
+     AC_MSG_NOTICE([Ruby library directory is '$RUBY_LIB_DIR'])
++    AC_MSG_NOTICE([Ruby architecture library directory is '$RUBY_ARCH_LIB_DIR'])
+     AC_MSG_NOTICE([Ruby extension directory is '$RUBY_EXTENSION_DIR'])
+     AC_MSG_NOTICE([Ruby library is '$RUBY_SO_NAME'])
+     AC_MSG_NOTICE([Ruby import library is '$RUBY_SHARED_LIB'])
+@@ -57,7 +65,9 @@ AC_DEFUN([AC_RUBY_DEVEL],
+     AC_SUBST([RUBY_BIN_DIR])
+     AC_SUBST([RUBY_SITE_ARCH])
+     AC_SUBST([RUBY_INCLUDE_DIR])
++    AC_SUBST([RUBY_ARCH_INCLUDE_DIR])
+     AC_SUBST([RUBY_LIB_DIR])
++    AC_SUBST([RUBY_ARCH_LIB_DIR])
+     AC_SUBST([RUBY_EXTENSION_DIR])
+     AC_SUBST([RUBY_SO_NAME])
+     AC_SUBST([RUBY_SHARED_LIB])
+--- a/swig/ruby/Makefile.am
++++ b/swig/ruby/Makefile.am
+@@ -17,18 +17,18 @@ BUILT_SOURCES = geos_wrap.cxx
+ rubyextensiondirdir = $(RUBY_EXTENSION_DIR)
+ 
+ # Setup includes
+-INCLUDES = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH)
++INCLUDES = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH) -I$(RUBY_ARCH_INCLUDE_DIR)
+ 
+ # Build Ruby module as shared library
+ rubyextensiondir_LTLIBRARIES = geos.la
+ geos_la_SOURCES = geos_wrap.cxx
+-geos_la_LIBADD =  $(top_builddir)/capi/libgeos_c.la /usr/lib/$(RUBY_SO_NAME)
++geos_la_LIBADD =  $(top_builddir)/capi/libgeos_c.la $(RUBY_ARCH_LIB_DIR)/$(RUBY_SO_NAME)
+ 
+ # Only need to grab the capi header files
+ geos_la_CPPFLAGS = -I$(top_builddir)/capi
+ 
+ # Specify -module and -avoid-version so we can create a file called geos.dll/so which is what Ruby wants
+-geos_la_LDFLAGS = -no-undefined  -module -avoid-version -L$(RUBY_LIB_DIR)
++geos_la_LDFLAGS = -no-undefined  -module -avoid-version -L$(RUBY_LIB_DIR) -L$(RUBY_ARCH_LIB_DIR)
+ 
+ if ENABLE_SWIG
+ 
+--- a/swig/ruby/Makefile.in
++++ b/swig/ruby/Makefile.in
+@@ -329,18 +329,18 @@ MAINTAINERCLEANFILES = geos_wrap.cxx
+ @ENABLE_RUBY_TRUE at rubyextensiondirdir = $(RUBY_EXTENSION_DIR)
+ 
+ # Setup includes
+- at ENABLE_RUBY_TRUE@INCLUDES = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH)
++ at ENABLE_RUBY_TRUE@INCLUDES = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH) -I$(RUBY_ARCH_INCLUDE_DIR)
+ 
+ # Build Ruby module as shared library
+ @ENABLE_RUBY_TRUE at rubyextensiondir_LTLIBRARIES = geos.la
+ @ENABLE_RUBY_TRUE at geos_la_SOURCES = geos_wrap.cxx
+- at ENABLE_RUBY_TRUE@geos_la_LIBADD = $(top_builddir)/capi/libgeos_c.la /usr/lib/$(RUBY_SO_NAME)
++ at ENABLE_RUBY_TRUE@geos_la_LIBADD = $(top_builddir)/capi/libgeos_c.la $(RUBY_ARCH_LIB_DIR)/$(RUBY_SO_NAME)
+ 
+ # Only need to grab the capi header files
+ @ENABLE_RUBY_TRUE at geos_la_CPPFLAGS = -I$(top_builddir)/capi
+ 
+ # Specify -module and -avoid-version so we can create a file called geos.dll/so which is what Ruby wants
+- at ENABLE_RUBY_TRUE@geos_la_LDFLAGS = -no-undefined  -module -avoid-version -L$(RUBY_LIB_DIR)
++ at ENABLE_RUBY_TRUE@geos_la_LDFLAGS = -no-undefined  -module -avoid-version -L$(RUBY_LIB_DIR) -L$(RUBY_ARCH_LIB_DIR)
+ all: $(BUILT_SOURCES)
+ 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 7cba5de..b1a1585 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,6 +9,7 @@ TaggedLineString.h
 TaggedLineStringSimplifier.h
 geos-config
 libruby
+ruby2
 automake-subdir-objects
 automake-am-cppflags
 configure.ac

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/geos.git



More information about the Pkg-grass-devel mailing list