Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361029 - app-pda/libimobiledevice: Missing support for swig-2.0.0 and above
Summary: app-pda/libimobiledevice: Missing support for swig-2.0.0 and above
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Olivier Crete (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-29 01:34 UTC by Samuli Suominen (RETIRED)
Modified: 2011-03-31 21:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Autotools update for latest 1.0.6 libimobiledevice (libimobiledevice-1.0.6-update.patch,36.04 KB, patch)
2011-03-29 01:35 UTC, Samuli Suominen (RETIRED)
Details | Diff
Patch enabling python/swig as well as apply the attached patch (libimobiledevice-1.0.6.ebuild.patch,1.24 KB, patch)
2011-03-29 01:41 UTC, Samuli Suominen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuli Suominen (RETIRED) gentoo-dev 2011-03-29 01:34:21 UTC
Issue 1:

--with-swig is same as --without-swig so $(use_with python swig) never worked as intended.

Issue 2:

The .m4 macro files in libimobiledevice-1.0.6/m4/ for SWIG and Python are outdated and don't support SWIG 2.0.0 at all, won't even detect it.

There are new macro's available:

http://www.gnu.org/software/autoconf-archive/

The files: ac_python_devel.m4, ax_pkg_swig.m4, ax_swig_enable_cxx.m4, ax_swig_python.m4, ax_python_devel.m4, ax_swig_multi_module_support.m4

Then, the syntax for invoking them needs to be updated in configure.ac:

--- configure.ac
+++ configure.ac
@@ -59,9 +59,10 @@
            [build_swig=true])
 if test "$build_swig" = "true"; then
             AM_PATH_PYTHON(2.3)
-            AC_PROG_SWIG(1.3.21)
+            AX_PKG_SWIG(1.3.21)
             AX_SWIG_ENABLE_CXX
-            SWIG_PYTHON
+            AX_SWIG_MULTI_MODULE_SUPPORT
+            AX_SWIG_PYTHON
 else
             SWIG=false
 fi

The attached patch does this, and uploads those macros I've mentioned above.

But even after updating the autotools, and workaround broken --with/--without in ebuild, the package fails to build as follows:

/usr/bin/swig -c++ -noruntime  -I../include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include    -I/usr/include -I../src -o imobiledevice_wrap.cxx imobiledevice.i
SWIG:1: Warning 120: -runtime, -noruntime command line options are deprecated.
/usr/include/plist/swig/plist.i:117: Error: Template 'pair' undefined.
/usr/include/plist/Array.h:42: Warning 503: Can't wrap 'operator []' unless renamed to a valid identifier.
/usr/include/plist/Dictionary.h:45: Warning 503: Can't wrap 'operator []' unless renamed to a valid identifier.
make[2]: *** [imobiledevice_wrap.cxx] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-pda/libimobiledevice-1.0.6/work/libimobiledevice-1.0.6/swig'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-pda/libimobiledevice-1.0.6/work/libimobiledevice-1.0.6'
make: *** [all] Error 2
emake failed



Now, I don't know enough SWIG or Python to get this one fixed.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2011-03-29 01:35:24 UTC
Created attachment 267615 [details, diff]
Autotools update for latest 1.0.6 libimobiledevice
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2011-03-29 01:41:15 UTC
Created attachment 267617 [details, diff]
Patch enabling python/swig as well as apply the attached patch
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-03-29 01:47:29 UTC
Removed USE="python" and passing --without-swig in libimobiledevice for now:

http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-pda/libimobiledevice/libimobiledevice-1.0.6.ebuild?r1=1.1&r2=1.2
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2011-03-31 21:31:03 UTC
Fixed in libimobiledevice-1.1.0.  The 1.0.x series is too broken, not worth fixing anymore.