Hi,

Attached is the diff for my libdb4.3-ruby 0.5.8-1.1 NMU.
diff -u libdb4.3-ruby-0.5.8/src/common.c libdb4.3-ruby-0.5.8/src/common.c
--- libdb4.3-ruby-0.5.8/src/common.c
+++ libdb4.3-ruby-0.5.8/src/common.c
@@ -124,7 +124,7 @@
     }
     key->data = StringValuePtr(tmp);
     key->flags &= ~DB_DBT_MALLOC;
-    key->size = RSTRING(tmp)->len + is_nil;
+    key->size = RSTRING_LEN(tmp) + is_nil;
     return tmp;
 }
 
@@ -3791,7 +3791,11 @@
     char *file, *database;
     VALUE flagv = Qnil, iov = Qnil;
     int flags = 0;
-    OpenFile *fptr;
+#if RUBY_VERSION_CODE >= 190
+    rb_io_t *fptr;
+#else
+       OpenFile *fptr;
+#endif
     FILE *io = NULL;
 
     rb_secure(4);
diff -u libdb4.3-ruby-0.5.8/debian/changelog 
libdb4.3-ruby-0.5.8/debian/changelog
--- libdb4.3-ruby-0.5.8/debian/changelog
+++ libdb4.3-ruby-0.5.8/debian/changelog
@@ -1,3 +1,11 @@
+libdb4.3-ruby (0.5.8-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTBFS, patch courtesy of Michael Ablassmeier (Closes: 427352).
+  * Fix bashisms in debian/rules (Closes: 384028, 376814).
+
+ -- Pierre Habouzit <[EMAIL PROTECTED]>  Wed, 18 Jul 2007 15:26:38 +0200
+
 libdb4.3-ruby (0.5.8-1) unstable; urgency=low
 
   * New upstream release
diff -u libdb4.3-ruby-0.5.8/debian/rules libdb4.3-ruby-0.5.8/debian/rules
--- libdb4.3-ruby-0.5.8/debian/rules
+++ libdb4.3-ruby-0.5.8/debian/rules
@@ -23,10 +23,10 @@
 configure-stamp:
        dh_testdir
 
-       -rm -rf build-tree-{1.8,1.9}
+       -rm -rf build-tree-1.8 build-tree-1.9
        tar -zcf debian/src.tgz $(filter-out debian,$(wildcard *))
 
-       mkdir build-tree-{1.8,1.9}
+       mkdir build-tree-1.8 build-tree-1.9
 
        tar -C build-tree-1.8 -zxf debian/src.tgz
        tar -C build-tree-1.9 -zxf debian/src.tgz
@@ -51,9 +51,9 @@
        dh_testroot
        rm -f build-stamp configure-stamp
 
-       -rm -rf build-tree-{1.8,1.9}
+       -rm -rf build-tree-1.8 build-tree-1.9
        -rm -f debian/bdb.html debian/bdb.rd
-       -rm -f 
debian/libdb$(bdb_version)-ruby*.{postinst,prerm,doc-base,README.Debian}
+       -for ext in postinst prerm doc-base README.Debian; do rm -f 
debian/libdb$(bdb_version)-ruby*.$$ext; done
        -rm -f debian/src.tgz
 
        dh_clean
only in patch2:
unchanged:
--- libdb4.3-ruby-0.5.8.orig/src/env.c
+++ libdb4.3-ruby-0.5.8/src/env.c
@@ -119,9 +119,9 @@
     bv = rb_str_to_str(bv);
     MEMZERO(&control, DBT, 1);
     MEMZERO(&rec, DBT, 1);
-    control.size = RSTRING(av)->len;
+    control.size = RSTRING_LEN(av);
     control.data = StringValuePtr(av);
-    rec.size = RSTRING(bv)->len;
+    rec.size = RSTRING_LEN(bv);
     rec.data = StringValuePtr(bv);
     envid = NUM2INT(ev);
 #if BDB_VERSION >= 40200
@@ -159,7 +159,7 @@
     if (!NIL_P(ident)) {
        ident = rb_str_to_str(ident);
        MEMZERO(&cdata, DBT, 1);
-       cdata.size = RSTRING(ident)->len;
+       cdata.size = RSTRING_LEN(ident);
        cdata.data = StringValuePtr(ident);
     }
     bdb_test_error(envst->envp->rep_start(envst->envp, 
@@ -523,7 +523,7 @@
        {
            char *tmp;
 
-           tmp = ALLOCA_N(char, strlen("DB_DATA_DIR") + RSTRING(value)->len + 
2);
+           tmp = ALLOCA_N(char, strlen("DB_DATA_DIR") + RSTRING_LEN(value) + 
2);
            sprintf(tmp, "DB_DATA_DIR %s", StringValuePtr(value));
            rb_ary_push(db_st->config, rb_str_new2(tmp));
        }
@@ -537,7 +537,7 @@
        {
            char *tmp;
 
-           tmp = ALLOCA_N(char, strlen("DB_LOG_DIR") + RSTRING(value)->len + 
2);
+           tmp = ALLOCA_N(char, strlen("DB_LOG_DIR") + RSTRING_LEN(value) + 2);
            sprintf(tmp, "DB_LOG_DIR %s", StringValuePtr(value));
            rb_ary_push(db_st->config, rb_str_new2(tmp));
        }
@@ -551,7 +551,7 @@
        {
            char *tmp;
 
-           tmp = ALLOCA_N(char, strlen("DB_TMP_DIR") + RSTRING(value)->len + 
2);
+           tmp = ALLOCA_N(char, strlen("DB_TMP_DIR") + RSTRING_LEN(value) + 2);
            sprintf(tmp, "DB_TMP_DIR %s", StringValuePtr(value));
            rb_ary_push(db_st->config, rb_str_new2(tmp));
        }
only in patch2:
unchanged:
--- libdb4.3-ruby-0.5.8.orig/src/log.c
+++ libdb4.3-ruby-0.5.8/src/log.c
@@ -55,7 +55,7 @@
     ret = bdb_makelsn(obj);
     Data_Get_Struct(ret, struct dblsnst, lsnst);
     data.data = StringValuePtr(a);
-    data.size = RSTRING(a)->len;
+    data.size = RSTRING_LEN(a);
 #if BDB_VERSION < 30000
     if (!envst->envp->lg_info) {
        rb_raise(bdb_eFatal, "log region not open");
only in patch2:
unchanged:
--- libdb4.3-ruby-0.5.8.orig/src/lock.c
+++ libdb4.3-ruby-0.5.8/src/lock.c
@@ -266,7 +266,7 @@
     SafeStringValue(a);
     MEMZERO(&objet, DBT, 1);
     objet.data = StringValuePtr(a);
-    objet.size = RSTRING(a)->len;
+    objet.size = RSTRING_LEN(a);
     lock_mode = NUM2INT(b);
     GetLockid(obj, lockid, envst);
 #if BDB_VERSION < 30000
@@ -340,7 +340,7 @@
        list->obj = ALLOC(DBT);
        MEMZERO(list->obj, DBT, 1);
        list->obj->data = StringValuePtr(value);
-       list->obj->size = RSTRING(value)->len;
+       list->obj->size = RSTRING_LEN(value);
     }
     else if (strcmp(options, "mode") == 0) {
        list->mode = NUM2INT(value);

Attachment: pgpO1sFe9c6kn.pgp
Description: PGP signature



Reply via email to