[DebianGIS-dev] [SCM] ruby-netcdf branch, master, updated. 5089c3258c81d3229bbddbf3fa3e8f9f6c0e7578
Youhei SASAKI
uwabami at gfd-dennou.org
Mon Dec 13 19:15:38 UTC 2010
The following commit has been merged in the master branch:
commit 7c829ac6d8fff9f24480f1b77d36a74d3860ebf3
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date: Mon Dec 13 21:53:41 2010 +0900
Update for Ruby1.9.2
* Bump Standard Version: 3.9.1
* Add Support Ruby1.9.2
* Add testsuite in extconf.rb
* Change Maintainer: Debian GIS Project
* Add me to Uploaders
* Add DM-Upload-Allowed: I became Debian Maintainer
* Add Vcs-* field
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 784b825..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,8 +0,0 @@
-netcdf-ruby for Debian
-=======================
-
-This package build without opendap support, beacuse of netcdf 4.1
-package is in experimental.
-
- -- Youhei SASAKI <uwabami at gfd-dennou.org>, Thu, 18 Mar 2010 23:41:22 +0900
-
diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644
index 5ebc7a1..0000000
--- a/debian/README.source
+++ /dev/null
@@ -1,10 +0,0 @@
-README.source
------------------
-
-The source package uses quilt to manage all modifications to the upstream
-source. Changes are stored in the source package as diffs in debian/patches
-and applied during the build.
-
-See /usr/share/doc/quilt/README.source for a detailed explanation.
-
- -- Youhei SASAKI <uwabami at gfd-dennou.org>, Fri, 4 Sep 2009 11:47:50 +0900
diff --git a/debian/changelog b/debian/changelog
index b30f3a7..a0ccfc0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,5 @@
ruby-netcdf (0.6.4-1) unstable; urgency=low
* Initial Release (Closes: #542144)
-<<<<<<< HEAD
- -- Youhei SASAKI <uwabami at gfd-dennou.org> Sun, 22 Aug 2010 10:27:54 +0900
-=======
- * Build without opendap(nc-dap) support.
-
- -- Youhei SASAKI <uwabami at gfd-dennou.org> Sun, 24 Jan 2010 04:35:48 +0900
->>>>>>> 6617e11... Imported Debian patch 0.6.4-1
+ -- Youhei SASAKI <uwabami at gfd-dennou.org> Mon, 13 Dec 2010 17:35:12 +0900
diff --git a/debian/compat b/debian/compat
index 2f48f0f..7f8f011 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1,9 +1 @@
-<<<<<<< HEAD
-<<<<<<< HEAD
7
-=======
-5
->>>>>>> 6617e11... Imported Debian patch 0.6.4-1
-=======
-7
->>>>>>> b7ae99f... Update debhelper version: 5 -> 7
diff --git a/debian/control b/debian/control
index c9858a8..dd44566 100644
--- a/debian/control
+++ b/debian/control
@@ -1,22 +1,16 @@
Source: ruby-netcdf
Section: ruby
Priority: optional
-Maintainer: Youhei SASAKI <uwabami at gfd-dennou.org>
-<<<<<<< HEAD
-<<<<<<< HEAD
+Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
+Uploaders: Youhei SASAKI <uwabami at gfd-dennou.org>
Build-Depends: cdbs, debhelper (>= 7.0.50~ ), ruby-pkg-tools, quilt,
- libnetcdf-dev (>= 4.1.1-5 ), libdap-dev, libcurl4-gnutls-dev,
- libnarray-ruby1.8, ruby1.8-dev, libnarray-ruby1.9.1, ruby1.9.1-dev
-Standards-Version: 3.9.1
-=======
-Build-Depends: cdbs, debhelper (>> 7), ruby-pkg-tools, quilt,
-=======
-Build-Depends: cdbs, debhelper (>= 7.0.50~ ), ruby-pkg-tools, quilt,
->>>>>>> b7ae99f... Update debhelper version: 5 -> 7
libnetcdf-dev,
- libnarray-ruby1.8, ruby1.8-dev, libnarray-ruby1.9.1, ruby1.9.1-dev
-Standards-Version: 3.8.3
->>>>>>> 6617e11... Imported Debian patch 0.6.4-1
+ libnarray-ruby1.8, libnarray-miss-ruby1.8, ruby1.8-dev,
+ libnarray-ruby1.9.1, libnarray-miss-ruby1.9.1, ruby1.9.1-dev
+Standards-Version: 3.9.1
+DM-Upload-Allowed: yes
+Vcs-Git: git://git.debian.org/pkg-grass/ruby-netcdf.git
+Vcs-Browser: http://git.debian.org/?p=pkg-grass/ruby-netcdf.git
Homepage: http://ruby.gfd-dennou.org/products/ruby-netcdf
Package: netcdf-ruby
@@ -26,12 +20,8 @@ Description: Ruby interface of netCDF library
RubyNetCDF is a Ruby interface of netCDF library built on the NArray library,
which is an efficient multi-dimensional numeric array class for Ruby.
.
-<<<<<<< HEAD
This package is dependency package, which depends on Debian's default
Ruby version(currently 1.8.x).
-=======
- This package is build for Ruby 1.8.
->>>>>>> 6617e11... Imported Debian patch 0.6.4-1
Package: netcdf-ruby1.8
Architecture: any
@@ -84,8 +74,6 @@ Description: Ruby interface of netCDF library
in a debugger, this makes it somewhat easier to interpret core
dumps. Most people will not need this package.
-<<<<<<< HEAD
-
Package: netcdf-ruby-doc
Section: doc
Architecture: all
@@ -95,5 +83,3 @@ Description: Documents and example scripts of netcdf-ruby
which is an efficient multi-dimensional numeric array class for Ruby.
.
This package provides all API documents and example scripts
-=======
->>>>>>> 6617e11... Imported Debian patch 0.6.4-1
diff --git a/debian/copyright b/debian/copyright
index 5ef6352..dd83b96 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,7 +1,7 @@
This package was debianized by Youhei SASAKI <uwabami at gfd-dennou.org> on
Thu, 27 Nov 2003 04:12:34 +0900.
-It was downloaded from http://ruby.gfd-dennou.org/products/ruby-dcl
+It was downloaded from http://ruby.gfd-dennou.org/products/ruby-netcdf
Upstream Authors:
Takeshi Horinouchi <horinout at gfd-dennou.org>, T. Sakakima
@@ -11,7 +11,7 @@ Copyright: Ruby/NetCDF is copyrighted free software by
License:
You can redistribute it and/or modify it under either the terms of
- the GPL(/usr/share/common-licenses/GPL), or the conditions below,
+ the GPL-2(/usr/share/common-licenses/GPL-2), or the conditions below,
which is idential to Ruby's license
(http://www.ruby-lang.org/en/LICENSE.txt):
diff --git a/debian/patches/ChangeExtconf b/debian/patches/ChangeNArrayDir
similarity index 91%
copy from debian/patches/ChangeExtconf
copy to debian/patches/ChangeNArrayDir
index 16168f9..e2be0f8 100644
--- a/debian/patches/ChangeExtconf
+++ b/debian/patches/ChangeNArrayDir
@@ -6,7 +6,7 @@
-dir_config('narray',$sitearchdir,$sitearchdir)
-dir_config('netcdf','/usr/local')
+dir_config('narray',$archdir,$archdir)
-+dir_config('netcdf','/usr')
++dir_config('netcdf','/usr/')
if ( ! ( have_header("narray.h") && have_header("narray_config.h") ) ) then
print <<EOS
diff --git a/debian/patches/ChangeTestPath b/debian/patches/ChangeTestPath
new file mode 100644
index 0000000..169eb9b
--- /dev/null
+++ b/debian/patches/ChangeTestPath
@@ -0,0 +1,15 @@
+--- ruby-netcdf.orig/extconf.rb
++++ ruby-netcdf/extconf.rb
+@@ -111,9 +111,9 @@
+ newmkfl.puts("\t\t@$(RM) *.nc demo/*.nc demo/*~ lib/*~ doc/*~ test/*.nc test/*~ Makefile.orig")
+ when /^all:/
+ newmkfl.puts(line)
+- newmkfl.puts("")
+- newmkfl.puts("test: all") # insert the "test" target
+- newmkfl.puts("\t\t at cd test && ruby test.rb && echo 'test did not fail :-p (please ignore the warnings)' && cd ..")
++ newmkfl.puts("\t\t -@( [ ! -d lib/numru ] && (mkdir -p lib/numru && cd lib/numru && ln -s ../../netcdfraw.so )) ")
++ newmkfl.puts("\t\t @(cd test && /usr/bin/ruby$(CDBS_RUBY_VER) -I../lib test.rb 1>/dev/null )")
++ newmkfl.puts("\t\t -@( rm -rf lib/numru )")
+ when /lib\/netcdf/
+ line = line.chomp! + "/"
+ newmkfl.puts(line)
diff --git a/debian/patches/SupportRuby1.9.2 b/debian/patches/SupportRuby1.9.2
new file mode 100644
index 0000000..59a884f
--- /dev/null
+++ b/debian/patches/SupportRuby1.9.2
@@ -0,0 +1,213 @@
+--- ruby-netcdf.orig/ChangeLog
++++ ruby-netcdf/ChangeLog
+@@ -1,3 +1,8 @@
++Mon Dec 13 2010 T Koshiro
++ * netcdfraw.c : patch for Ruby 1.9.2
++ - by S Kouketsu (dennou-ruby:003191)
++ - by T Koshiro (dennou-ruby:003226)
++
+ Mon Mar 15 2010 T Horinouchi
+ * ruby-netcdf-0.6.4 released (relase tag: ruby-netcdf-0_6_4)
+
+--- ruby-netcdf.orig/netcdfraw.c
++++ ruby-netcdf/netcdfraw.c
+@@ -6,16 +6,22 @@
+
+ /* for compatibility with ruby 1.6 */
+ #ifndef RSTRING_PTR
+-#define RSTRING_PTR(a) (RSTRING(a)->ptr)
++#define RSTRING_PTR(s) (RSTRING(s)->ptr)
+ #endif
+ #ifndef RSTRING_LEN
+-#define RSTRING_LEN(a) (RSTRING(a)->len)
++#define RSTRING_LEN(s) (RSTRING(s)->len)
+ #endif
+ #ifndef RARRAY_PTR
+-#define RARRAY_PTR(s) (RARRAY(s)->ptr)
++#define RARRAY_PTR(a) (RARRAY(a)->ptr)
+ #endif
+ #ifndef RARRAY_LEN
+-#define RARRAY_LEN(s) (RARRAY(s)->len)
++#define RARRAY_LEN(a) (RARRAY(a)->len)
++#endif
++#ifndef StringValueCStr
++#define StringValueCStr(s) STR2CSTR(s)
++#endif
++#ifndef SafeStringValue
++#define SafeStringValue(s) Check_SafeStr(s)
+ #endif
+
+ /* Data to NArray */
+@@ -345,7 +351,7 @@
+ }
+
+ static VALUE
+-err_status2class(status)
++err_status2class(int status)
+ {
+ if(NC_ISSYSERR(status)){
+ return(rb_eNetcdfSyserr);
+@@ -425,17 +431,17 @@
+ nctype2natype(int nctype){
+ switch(nctype){
+ case NC_CHAR:
+- return("char");
++ return((char *)"char");
+ case NC_BYTE:
+- return("byte");
++ return((char *)"byte");
+ case NC_SHORT:
+- return("sint");
++ return((char *)"sint");
+ case NC_INT:
+- return("int");
++ return((char *)"int");
+ case NC_FLOAT:
+- return("sfloat");
++ return((char *)"sfloat");
+ case NC_DOUBLE:
+- return("float");
++ return((char *)"float");
+ default:
+ rb_raise(rb_eNetcdfError, "No such netcdf type number %d\n",nctype);
+ }
+@@ -677,7 +683,7 @@
+ ptr = na_val->ptr;
+ switch(na_typecode){
+ case NA_BYTE:
+- status = nc_put_att_uchar(ncid,varid,name,NC_BYTE,len,ptr);
++ status = nc_put_att_uchar(ncid,varid,name,NC_BYTE,len,(unsigned char *)ptr);
+ break;
+ case NA_SINT:
+ status = nc_put_att_short(ncid,varid,name,NC_SHORT,len,(short *)ptr);
+@@ -794,7 +800,7 @@
+ switch(TYPE(RARRAY_PTR(dimensions)[c_ndims-1-i])){
+ case T_STRING:
+ Check_Type(RARRAY_PTR(dimensions)[c_ndims-1-i],T_STRING);
+- c_dim_name=STR2CSTR(RARRAY_PTR(dimensions)[c_ndims-1-i]);
++ c_dim_name=StringValueCStr(RARRAY_PTR(dimensions)[c_ndims-1-i]);
+ status=nc_inq_dimid(ncid,c_dim_name,&dimidp);
+ if(status != NC_NOERR) NC_RAISE(status);
+ c_dimids[i]=dimidp;
+@@ -1021,7 +1027,7 @@
+ VALUE retval;
+
+ Check_Type(filename,T_STRING);
+- Check_SafeStr(filename);
++ SafeStringValue(filename);
+ c_filename=RSTRING_PTR(filename);
+ Check_Type(omode,T_FIXNUM);
+ c_omode=NUM2INT(omode);
+@@ -1044,7 +1050,7 @@
+ struct Netcdf *ncfile;
+
+ Check_Type(filename,T_STRING);
+- Check_SafeStr(filename);
++ SafeStringValue(filename);
+ c_filename=RSTRING_PTR(filename);
+ Check_Type(cmode,T_FIXNUM);
+ c_cmode=NUM2INT(cmode);
+@@ -1194,7 +1200,7 @@
+ ncid=Netcdf_dim->ncid;
+ dimid=Netcdf_dim->dimid;
+ Check_Type(dimension_newname,T_STRING);
+- c_dim_name = STR2CSTR(dimension_newname);
++ c_dim_name = StringValueCStr(dimension_newname);
+
+ status = nc_rename_dim(ncid,dimid,c_dim_name);
+ if(status !=NC_NOERR) NC_RAISE(status);
+@@ -1268,19 +1274,17 @@
+ Data_Get_Struct(Att,struct NetCDFAtt,Netcdf_att);
+ ncid=Netcdf_att->ncid;
+ varid=Netcdf_att->varid;
+- c_att_name=ALLOCA_N(char,NC_MAX_NAME);
+- c_new_att_name=ALLOC_N(char,NC_MAX_NAME);
+
+ c_att_name=Netcdf_att->name;
+
+ Check_Type(new_att_name,T_STRING);
+- Check_SafeStr(new_att_name);
+- c_new_att_name=STR2CSTR(new_att_name);
++ SafeStringValue(new_att_name);
++ c_new_att_name=StringValueCStr(new_att_name);
+
+ status = nc_rename_att(ncid,varid,c_att_name,c_new_att_name);
+ if(status != NC_NOERR) NC_RAISE(status);
+
+- Netcdf_att->name=c_new_att_name;
++ strcpy(Netcdf_att->name,c_new_att_name);
+ return Qnil;
+ }
+
+@@ -1789,7 +1793,7 @@
+ varid=Netcdf_var->varid;
+
+ Check_Type(var_new_name,T_STRING);
+- c_var_new_name=STR2CSTR(var_new_name);
++ c_var_new_name=StringValueCStr(var_new_name);
+
+ status = nc_rename_var(ncid,varid,c_var_new_name);
+ if(status !=NC_NOERR) NC_RAISE(status);
+@@ -1815,7 +1819,7 @@
+ varid=Netcdf_var->varid;
+
+ Check_Type(att_name,T_STRING);
+- c_att_name=STR2CSTR(att_name);
++ c_att_name=StringValueCStr(att_name);
+
+ status = nc_inq_attid(ncid,varid,c_att_name,&c_attnump);
+ if(status == NC_NOERR){
+@@ -1957,7 +1961,7 @@
+
+ Cbyte_to_NArray(NArray,ndimsp,shape,ptr);
+
+- status = nc_get_var_text(ncid,varid,ptr);
++ status = nc_get_var_text(ncid,varid,(char *)ptr);
+ if(status != NC_NOERR) NC_RAISE(status);
+
+ OBJ_TAINT(NArray);
+@@ -2238,7 +2242,7 @@
+
+
+ Cbyte_to_NArray(NArray,ndims,c_count,ptr);
+- status = nc_get_var1_text(ncid,varid,c_start,ptr);
++ status = nc_get_var1_text(ncid,varid,c_start,(char *)ptr);
+ if(status != NC_NOERR) NC_RAISE(status);
+
+ OBJ_TAINT(NArray);
+@@ -2645,7 +2649,7 @@
+
+ Cbyte_to_NArray(NArray,ndims,shape,ptr);
+
+- status = nc_get_vars_text(ncid,varid,c_start,c_count,c_stride,ptr);
++ status = nc_get_vars_text(ncid,varid,c_start,c_count,c_stride,(char *)ptr);
+ if(status != NC_NOERR) NC_RAISE(status);
+
+ OBJ_TAINT(NArray);
+@@ -3256,7 +3260,7 @@
+ if(status != NC_NOERR) NC_RAISE(status );
+ rb_raise(rb_eNetcdfError,"Length of NArray don't equal to length of total array in the '%s'\n",var_name);
+ }
+- status = nc_put_var_text(ncid,varid,ptr);
++ status = nc_put_var_text(ncid,varid,(char *)ptr);
+ if(status !=NC_NOERR) NC_RAISE(status);
+ return Qnil;
+ }
+@@ -3539,7 +3543,7 @@
+ }
+ Array_to_Cbyte(NArray,ptr);
+
+- status = nc_put_var1_text(ncid,varid,c_start,ptr);
++ status = nc_put_var1_text(ncid,varid,c_start,(char *)ptr);
+ if(status != NC_NOERR) NC_RAISE(status);
+ return Qnil;
+ }
+@@ -3900,7 +3904,7 @@
+ }
+ }
+
+- status = nc_put_vars_text(ncid,varid,c_start,c_count,c_stride,ptr);
++ status = nc_put_vars_text(ncid,varid,c_start,c_count,c_stride,(char *)ptr);
+ if(status != NC_NOERR) NC_RAISE(status);
+ return Qnil;
+ }
diff --git a/debian/patches/modified-extconf-rb.patch b/debian/patches/modified-extconf-rb.patch
deleted file mode 100644
index 354a4d9..0000000
--- a/debian/patches/modified-extconf-rb.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- ruby-netcdf-0.6.4.orig/extconf.rb
-+++ ruby-netcdf-0.6.4/extconf.rb
-@@ -1,7 +1,7 @@
- require "mkmf"
-
--dir_config('narray',$sitearchdir,$sitearchdir)
--dir_config('netcdf','/usr/local')
-+dir_config('narray',$archdir,$archdir)
-+dir_config('netcdf','/usr')
-
- if ( ! ( have_header("narray.h") && have_header("narray_config.h") ) ) then
- print <<EOS
-@@ -15,7 +15,12 @@
- exit(-1)
- end
-
--if xsystem("ncdap-config --libs")
-+if xsystem("pkg-config libnc-dap --libs")
-+ libncdods = "nc-dap"
-+ cflags = `pkg-config libnc-dap --cflags`.gsub(/\n/, " ")
-+ libs = `pkg-config libnc-dap --libs`.gsub(/\n/," ")
-+ prefix_dods = `pkg-config libnc-dap --variable=prefix`.gsub(/\n/," ")
-+elsif xsystem("ncdap-config --libs")
- libncdods = "nc-dap"
- cflags = `ncdap-config --cflags`.gsub(/\n/, " ")
- libs = `ncdap-config --libs`.gsub(/\n/, " ")
-@@ -27,8 +32,9 @@
- prefix_dods = `opendap-config --prefix`.gsub(/\n/, "")
- end
-
--if (enable_config('opendap',true) && ( xsystem("opendap-config --libs")) ||
-- xsystem("ncdap-config --libs") )
-+if (enable_config('opendap',true) && ( xsystem("pkg-config libnc-dap --libs") ||
-+ xsystem("opendap-config --libs") ||
-+ xsystem("ncdap-config --libs") ))
-
- dir_config(libncdods,prefix_dods)
-
diff --git a/debian/patches/series b/debian/patches/series
index 47850ad..859d4b6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,3 @@
-<<<<<<< HEAD
-ChangeExtconf
-=======
-modified-extconf-rb.patch
->>>>>>> 6617e11... Imported Debian patch 0.6.4-1
+SupportRuby1.9.2
+ChangeNArrayDir
+ChangeTestPath
diff --git a/debian/rules b/debian/rules
index 39891a4..4eca934 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,18 +1,35 @@
#!/usr/bin/make -f
-NETCDF_RUBY_VERSIONS= 1.8 1.9.1
-LIB_PACKAGE_FILTER = %-ruby $(patsubst %,\%-ruby%,$(NETCDF_RUBY_VERSIONS))
-
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
-include /usr/share/ruby-pkg-tools/1/class/ruby-extconf-rb.mk
+include /usr/share/ruby-pkg-tools/1/class/ruby-common.mk
+
+NETCDF_RUBY_VERSIONS= 1.8 1.9.1
+LIB_PACKAGE_FILTER = %-ruby $(patsubst %,\%-ruby%,$(NETCDF_RUBY_VERSIONS))
+DEB_AUTO_CLEANUP_RCS := yes
+DEB_RUBY_SETUP_CMD = extconf.rb
DEB_INSTALL_CHANGELOGS_ALL := ChangeLog
-DEB_COMPRESS_EXCLUDE := .rd .html
-<<<<<<< HEAD
-DEB_INSTALL_DOCS_netcdf-ruby-doc := doc/*.rd doc/*.html
-=======
-DEB_RUBY_SETUP_ARGS := --disable-opendap
install_docs := doc/*.rd doc/*.html
DEB_INSTALL_DOCS_netcdf-ruby1.8:= $(install_docs)
->>>>>>> 6617e11... Imported Debian patch 0.6.4-1
+DEB_INSTALL_DOCS_netcdf-ruby1.9.1:= $(install_docs)
+cdbs_pkgdir = $(CURDIR)/debian/$(cdbs_curpkg)
+cdbs_ruby_libdir_ver = $(cdbs_pkgdir)$(DEB_RUBY_LIBDIR)
+cdbs_ruby_archdir_ver = $(cdbs_pkgdir)$(DEB_RUBY_ARCHDIR)
+DEB_RUBY_INSTALL_ARGS = DESTDIR=$(cdbs_pkgdir) \
+ sitelibdir=$(cdbs_ruby_libdir_ver) \
+ sitearchdir=$(cdbs_ruby_archdir_ver)
+
+$(patsubst %,install/%,$(DEB_RUBY_REAL_LIB_PACKAGES)) :: install/% :
+ cd $(DEB_SRCDIR)
+ [ ! -f Makefile ] || $(MAKE) distclean
+ /usr/bin/ruby$(cdbs_ruby_ver) $(DEB_RUBY_SETUP_RUBY_ARGS) $(DEB_RUBY_SETUP_CMD) $(DEB_RUBY_SETUP_ARGS)
+ CDBS_RUBY_VER=$(cdbs_ruby_ver) $(MAKE)
+ $(MAKE) install $(DEB_RUBY_INSTALL_ARGS)
+
+
+clean::
+ -[ ! -f Makefile ] || $(MAKE) distclean
+ -[ ! -f test/test.nc ] || rm -f test/test.nc
+ -[ ! -d lib/numru ] || rm -rf lib/numru
+ -rm -f debian/*.log
--
Ruby interface of NetCDF library
More information about the Pkg-grass-devel
mailing list