tags 676094 +patch
thanks

Thia package failed to build after being imported to raspbian and I needed to get it building so I took a look.


I managed to fix the include file not found issue with some makefile hackery

Unfortunately after I fixed that I got

/bin/bash ../../libtool --tag=CXX --mode=compile g++ -fpermissive -DHAVE_CONFIG_H -I. -I../../include -I../../include/geos -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/x86_64-linux/.. -I../../capi -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -MT geos_la-geos_wrap.lo -MD -MP -MF .deps/geos_la-geos_wrap.Tpo -c -o geos_la-geos_wrap.lo `test -f 'geos_wrap.cxx' || echo './'`geos_wrap.cxx libtool: compile: g++ -fpermissive -DHAVE_CONFIG_H -I. -I../../include -I../../include/geos -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/x86_64-linux/.. -I../../capi -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -MT geos_la-geos_wrap.lo -MD -MP -MF .deps/geos_la-geos_wrap.Tpo -c geos_wrap.cxx -fPIC -DPIC -o .libs/geos_la-geos_wrap.o
geos_wrap.cxx: In function 'void SWIG_Ruby_define_class(swig_type_info*)':
geos_wrap.cxx:1517:9: warning: variable 'klass' set but not used [-Wunused-but-set-variable]
geos_wrap.cxx: In function 'VALUE SWIG_AUX_NUM2DBL(VALUE*)':
geos_wrap.cxx:2658:9: warning: unused variable 'type' [-Wunused-variable]
geos_wrap.cxx: In function 'VALUE _wrap_create_polygon(int, VALUE*, VALUE)':
geos_wrap.cxx:7878:33: error: 'struct RArray' has no member named 'len'

I was able to hack arround this with a bit of sed magic on the generated code.

However even after the build completed the package generation was unsuccesful as the packaging was all setup for ruby 1.8 . At this point I decided to give up on the ruby 1.9 approach. Patch for the final attempt of that approach is attatched as geos-ruby1.9.1-attempt.patch

At this point I decided to take a different approach, rather than try and make the package work with ruby 1.9.1 I instead decided to simply adjust the build-depends and build-conflicts so that the package was built against 1.8,

That gave me a succesful build. Patch for that adjustment is in geos-force-ruby1.8.patch . I have uploaded that patched version to raspbian, I have not uploaded it to debian as I have no idea how to test the package actually works. I also noticed that at the end of the build my changes to debian/control were getting obliterated. Looks like the changes in the patch should really be applied to control.in as well as to control if you go down this route.

diff -urN geos-3.3.3/debian/changelog geos-3.3.3.ruby1.9.1-attempt/debian/changelog
--- geos-3.3.3/debian/changelog	2012-05-23 13:39:19.000000000 +0000
+++ geos-3.3.3.ruby1.9.1-attempt/debian/changelog	2012-06-25 01:56:04.000000000 +0000
@@ -1,3 +1,11 @@
+geos (3.3.3-2+rpi1) wheezy; urgency=low
+
+  * fixes to make package build with current ruby (Closes: 676094)
+    + add makefile hack to fix ruby include path 
+    + hack swig output to fix compile error
+
+ -- Peter Michael Green <plugw...@p10link.net>  Sun, 24 Jun 2012 23:34:34 +0000
+
 geos (3.3.3-1) unstable; urgency=low
 
   * New upstream bugfixing version. This is useful because correctly
diff -urN geos-3.3.3/debian/patches/fix_ruby_includes geos-3.3.3.ruby1.9.1-attempt/debian/patches/fix_ruby_includes
--- geos-3.3.3/debian/patches/fix_ruby_includes	1970-01-01 00:00:00.000000000 +0000
+++ geos-3.3.3.ruby1.9.1-attempt/debian/patches/fix_ruby_includes	2012-06-25 01:07:44.000000000 +0000
@@ -0,0 +1,51 @@
+Description: check parent directory of "ruby include dir" for ruby includes
+ The ruby includes are now split between /usr/include/ruby-1.9.1/
+ and /usr/include/ruby-<version>/<architecture reference>/
+
+ The check for ruby include path in the configure script returns
+ /usr/lib/ruby/<version>/<architecture reference>/
+
+ This patch modifies the makefile to fix this up
+
+Author: Peter Michael Green <plugw...@p10link.net>
+Bug-Debian: http://bugs.debian.org/676094
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+Index: geos-3.3.3/swig/ruby/Makefile.in
+===================================================================
+--- geos-3.3.3.orig/swig/ruby/Makefile.in	2012-06-25 00:02:59.000000000 +0000
++++ geos-3.3.3/swig/ruby/Makefile.in	2012-06-25 01:07:41.000000000 +0000
+@@ -336,7 +336,7 @@
+ @ENABLE_RUBY_TRUE@rubyextensiondirdir = $(RUBY_EXTENSION_DIR)
+ 
+ # Setup includes
+-@ENABLE_RUBY_TRUE@INCLUDES = -I$(RUBY_INCLUDE_DIR)
++@ENABLE_RUBY_TRUE@INCLUDES = $(subst lib/ruby/,include/ruby-,-I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/..)
+ 
+ # Build Ruby module as shared library
+ @ENABLE_RUBY_TRUE@rubyextensiondir_LTLIBRARIES = geos.la
+Index: geos-3.3.3/swig/ruby/Makefile.am
+===================================================================
+--- geos-3.3.3.orig/swig/ruby/Makefile.am	2012-06-25 00:02:59.000000000 +0000
++++ geos-3.3.3/swig/ruby/Makefile.am	2012-06-25 01:07:29.000000000 +0000
+@@ -18,7 +18,7 @@
+ rubyextensiondirdir = $(RUBY_EXTENSION_DIR)
+ 
+ # Setup includes
+-INCLUDES = -I$(RUBY_INCLUDE_DIR)
++INCLUDES = $(subst lib/ruby/,include/ruby-,-I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/..)
+ 
+ # Build Ruby module as shared library
+ rubyextensiondir_LTLIBRARIES = geos.la
diff -urN geos-3.3.3/debian/patches/hack-swig-output-for-ruby geos-3.3.3.ruby1.9.1-attempt/debian/patches/hack-swig-output-for-ruby
--- geos-3.3.3/debian/patches/hack-swig-output-for-ruby	1970-01-01 00:00:00.000000000 +0000
+++ geos-3.3.3.ruby1.9.1-attempt/debian/patches/hack-swig-output-for-ruby	2012-06-25 01:54:43.000000000 +0000
@@ -0,0 +1,40 @@
+Description: hack swig output for ruby
+ The code generated by swig is incompatible with the current ruby,
+ this patch uses sed to hack the code into something that will
+ compile.
+Author: Peter Michael Green <plugw...@p10link.net>
+Bug-Debian: http://bugs.debian.org/676094
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- geos-3.3.3.orig/swig/ruby/Makefile.in
++++ geos-3.3.3/swig/ruby/Makefile.in
+@@ -788,6 +788,7 @@ uninstall-am: uninstall-rubyextensiondir
+ 
+ @ENABLE_RUBY_TRUE@@ENABLE_SWIG_TRUE@geos_wrap.cxx: ../geos.i ruby.i
+ @ENABLE_RUBY_TRUE@@ENABLE_SWIG_TRUE@	$(SWIG) -c++ -ruby -autorename -o $@ $<
++@ENABLE_RUBY_TRUE@@ENABLE_SWIG_TRUE@	sed -i 's/RARRAY(argv\[1\])->len/RARRAY_LEN(argv[1])/' $@
+ 
+ @ENABLE_RUBY_TRUE@@ENABLE_SWIG_FALSE@geos_wrap.cxx: ../geos.i ruby.i
+ @ENABLE_RUBY_TRUE@@ENABLE_SWIG_FALSE@	@echo "SWIG is disabled, can't build geos_wrap.cxx"
+--- geos-3.3.3.orig/swig/ruby/Makefile.am
++++ geos-3.3.3/swig/ruby/Makefile.am
+@@ -35,6 +35,7 @@ if ENABLE_SWIG
+ 
+ geos_wrap.cxx: ../geos.i ruby.i
+ 	$(SWIG) -c++ -ruby -autorename -o $@ $<
++	sed -i 's/RARRAY(argv\[1\])->len/RARRAY_LEN(argv[1])/' $@
+ 
+ else # !ENABLE_SWIG
+ 
diff -urN geos-3.3.3/debian/patches/series geos-3.3.3.ruby1.9.1-attempt/debian/patches/series
--- geos-3.3.3/debian/patches/series	2012-05-23 13:39:19.000000000 +0000
+++ geos-3.3.3.ruby1.9.1-attempt/debian/patches/series	2012-06-25 01:53:38.000000000 +0000
@@ -8,3 +8,5 @@
 TaggedLineString.h
 TaggedLineStringSimplifier.h
 geos-config
+fix_ruby_includes
+hack-swig-output-for-ruby
--- geos-3.3.3/debian/control	2012-05-23 14:39:19.000000000 +0100
+++ geos-3.3.3.forceruby1.8/debian/control	2012-06-25 03:21:21.000000000 +0100
@@ -3,7 +3,8 @@
 Priority: optional
 Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
 Uploaders: Francesco Paolo Lovergine <fran...@debian.org>
-Build-Depends: debhelper (>= 9), doxygen, swig, ruby, ruby-dev
+Build-Depends: debhelper (>= 9), doxygen, swig, ruby1.8, ruby1.8-dev
+Build-Conflicts: ruby1.9.1, ruby1.9.1-dev
 Standards-Version: 3.9.3
 Homepage: http://trac.osgeo.org/geos/
 Vcs-Browser: http://git.debian.org/?p=pkg-grass/geos.git
_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to