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.
Created attachment 267615 [details, diff] Autotools update for latest 1.0.6 libimobiledevice
Created attachment 267617 [details, diff] Patch enabling python/swig as well as apply the attached patch
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
Fixed in libimobiledevice-1.1.0. The 1.0.x series is too broken, not worth fixing anymore.