diff -u obexftp-0.23/debian/rules obexftp-0.23/debian/rules --- obexftp-0.23/debian/rules +++ obexftp-0.23/debian/rules @@ -66,6 +66,7 @@ config.status: configure $(QUILT_STAMPFN) dh_testdir + autoreconf -ivf CFLAGS="$(CFLAGS)" ./configure $(CROSS) \ --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \ $(bindings_configure_flags) \ diff -u obexftp-0.23/debian/control obexftp-0.23/debian/control --- obexftp-0.23/debian/control +++ obexftp-0.23/debian/control @@ -2,7 +2,7 @@ Section: comm Priority: optional Maintainer: Hendrik Sattler -Build-Depends: debhelper (>= 7.0.0), libopenobex1-dev (>= 1.3-3), libbluetooth-dev, quilt (>= 0.45), pkg-config, python-central, swig, doxygen, python-dev, ruby-dev, ruby, chrpath +Build-Depends: debhelper (>= 7.0.0), libopenobex1-dev (>= 1.3-3), libbluetooth-dev, quilt (>= 0.45), pkg-config, python-central, swig, doxygen, python-dev, ruby-dev, ruby, chrpath, autoconf-archive, automake, libtool Standards-Version: 3.8.3 XS-Python-Version: current Homepage: http://triq.net/obex diff -u obexftp-0.23/debian/changelog obexftp-0.23/debian/changelog --- obexftp-0.23/debian/changelog +++ obexftp-0.23/debian/changelog @@ -1,3 +1,16 @@ +obexftp (0.23-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix FTBFS latest swig. (Closes: #676084) + - Add autoconf-archive, automake and libtool to Build-Depends. + - Add 'autoreconf -ifv' to configure target in debian/rules. + - Add patches: + 0001-Fix-swig-detection.patch + 0002-Fix-swig-ruby-code-for-ruby-1.9.patch + 0003-Add-another-ruby-fix-from-ALT-linux.patch + + -- Nobuhiro Iwamatsu Fri, 13 Jul 2012 06:32:06 +0900 + obexftp (0.23-1) unstable; urgency=low * New upstream release diff -u obexftp-0.23/debian/patches/series obexftp-0.23/debian/patches/series --- obexftp-0.23/debian/patches/series +++ obexftp-0.23/debian/patches/series @@ -1 +1,3 @@ - +0001-Fix-swig-detection.patch +0002-Fix-swig-ruby-code-for-ruby-1.9.patch +0003-Add-another-ruby-fix-from-ALT-linux.patch only in patch2: unchanged: --- obexftp-0.23.orig/debian/patches/0001-Fix-swig-detection.patch +++ obexftp-0.23/debian/patches/0001-Fix-swig-detection.patch @@ -0,0 +1,118 @@ +From b6386cc5d12b88b99e90e959f45f6e00b3b4e921 Mon Sep 17 00:00:00 2001 +From: Hendrik Sattler +Date: Sun, 25 Mar 2012 19:31:06 +0200 +Subject: [PATCH 1/3] Fix swig detection + +Swig >= 2.0 needs a newer module from autotools-archive. This removes the old +macro, uses the new macro name in configure.in and requires autotools-archive +to be present on bootstrap. +--- + acinclude.m4 | 73 ---------------------------------------------------------- + configure.in | 3 ++- + 2 files changed, 2 insertions(+), 74 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 9326885..c1e8d8d 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -161,76 +161,3 @@ AC_DEFUN([USB_CHECK],[ + + AC_MSG_RESULT($am_cv_usb_found) + ]) +- +-dnl +-dnl From autoconf-archive, should be in macros dir +-dnl +-AC_DEFUN([AC_PROG_SWIG],[ +- AC_PATH_PROG([SWIG],[swig]) +- if test -z "$SWIG" ; then +- AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org]) +- SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false' +- elif test -n "$1" ; then +- AC_MSG_CHECKING([for SWIG version]) +- [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] +- AC_MSG_RESULT([$swig_version]) +- if test -n "$swig_version" ; then +- # Calculate the required version number components +- [required=$1] +- [required_major=`echo $required | sed 's/[^0-9].*//'`] +- if test -z "$required_major" ; then +- [required_major=0] +- fi +- [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] +- [required_minor=`echo $required | sed 's/[^0-9].*//'`] +- if test -z "$required_minor" ; then +- [required_minor=0] +- fi +- [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] +- [required_patch=`echo $required | sed 's/[^0-9].*//'`] +- if test -z "$required_patch" ; then +- [required_patch=0] +- fi +- # Calculate the available version number components +- [available=$swig_version] +- [available_major=`echo $available | sed 's/[^0-9].*//'`] +- if test -z "$available_major" ; then +- [available_major=0] +- fi +- [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] +- [available_minor=`echo $available | sed 's/[^0-9].*//'`] +- if test -z "$available_minor" ; then +- [available_minor=0] +- fi +- [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] +- [available_patch=`echo $available | sed 's/[^0-9].*//'`] +- if test -z "$available_patch" ; then +- [available_patch=0] +- fi +- if test $available_major -ne $required_major \ +- -o $available_minor -ne $required_minor \ +- -o $available_patch -lt $required_patch ; then +- AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]) +- SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' +- else +- AC_MSG_NOTICE([SWIG executable is '$SWIG']) +- SWIG_LIB=`$SWIG -swiglib` +- AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB']) +- fi +- else +- AC_MSG_WARN([cannot determine SWIG version]) +- SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' +- fi +- fi +- AC_SUBST([SWIG_LIB]) +-]) +- +-# SWIG_ENABLE_CXX() +-# +-# Enable SWIG C++ support. This affects all invocations of $(SWIG). +-AC_DEFUN([SWIG_ENABLE_CXX],[ +- AC_REQUIRE([AC_PROG_SWIG]) +- AC_REQUIRE([AC_PROG_CXX]) +- SWIG="$SWIG -c++" +-]) +- +diff --git a/configure.in b/configure.in +index 49fe53b..5985d9d 100644 +--- a/configure.in ++++ b/configure.in +@@ -54,7 +54,7 @@ AC_ARG_ENABLE([swig], + esac],[want_swig_rebuild=false]) + AM_CONDITIONAL(ENABLE_SWIG, test x$want_swig_rebuild = xtrue) + if test x$want_swig_rebuild = xtrue; then +- AC_PROG_SWIG(1.3.7) dnl how low can we go? ++ AX_PKG_SWIG(1.3.7) dnl how low can we go? + fi + + # check for language bindings +@@ -77,6 +77,7 @@ AC_ARG_ENABLE([python], + + if test "$ac_python_enabled" = yes; then + AM_PATH_PYTHON ++ AX_SWIG_PYTHON([no]) + fi + AM_CONDITIONAL([ENABLE_PYTHON], [test x"$PYTHON" != x""]) + +-- +1.7.10.4 + only in patch2: unchanged: --- obexftp-0.23.orig/debian/patches/0002-Fix-swig-ruby-code-for-ruby-1.9.patch +++ obexftp-0.23/debian/patches/0002-Fix-swig-ruby-code-for-ruby-1.9.patch @@ -0,0 +1,25 @@ +From d6d5fdea31abbadbfdd90b878770731ae08b66a0 Mon Sep 17 00:00:00 2001 +From: Hendrik Sattler +Date: Fri, 15 Jun 2012 06:46:16 +0200 +Subject: [PATCH 2/3] Fix swig ruby code for ruby-1.9 + +--- + swig/charmap.i | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/swig/charmap.i b/swig/charmap.i +index e1f1fc1..878f203 100644 +--- a/swig/charmap.i ++++ b/swig/charmap.i +@@ -90,7 +90,7 @@ + #elif defined SWIGRUBY + /* VALUE str = StringValue($input); // perhaps better? */ + $1 = STR2CSTR($input); +- $2 = (int) RSTRING($input)->len; ++ $2 = (int) RSTRING_LEN($input); + #elif defined SWIGTCL + $1 = Tcl_GetStringFromObj($input,&$2); + #else +-- +1.7.10.4 + only in patch2: unchanged: --- obexftp-0.23.orig/debian/patches/0003-Add-another-ruby-fix-from-ALT-linux.patch +++ obexftp-0.23/debian/patches/0003-Add-another-ruby-fix-from-ALT-linux.patch @@ -0,0 +1,26 @@ +From 3cbe13601521a9d45faf474e192193476966470d Mon Sep 17 00:00:00 2001 +From: Hendrik Sattler +Date: Sat, 7 Jul 2012 23:33:15 +0200 +Subject: [PATCH 3/3] Add another ruby fix (from ALT linux) + +--- + swig/charmap.i | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/swig/charmap.i b/swig/charmap.i +index 878f203..24af65e 100644 +--- a/swig/charmap.i ++++ b/swig/charmap.i +@@ -88,8 +88,7 @@ + $1 = PyString_AsString($input); + $2 = PyString_Size($input); + #elif defined SWIGRUBY +-/* VALUE str = StringValue($input); // perhaps better? */ +- $1 = STR2CSTR($input); ++ $1 = RSTRING_PTR($input); + $2 = (int) RSTRING_LEN($input); + #elif defined SWIGTCL + $1 = Tcl_GetStringFromObj($input,&$2); +-- +1.7.10.4 +