~ubuntu-branches/ubuntu/utopic/nautilus-python/utopic

« back to all changes in this revision

Viewing changes to debian/patches/01-fedora-build-patch.patch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2009-03-18 10:27:08 UTC
  • Revision ID: james.westby@ubuntu.com-20090318102708-t5w4bsikwr1ew538
Tags: 0.5.1-0ubuntu2
* debian/patches/01-fedora-build-patch.patch: apply patch from 
  http://cvs.fedoraproject.org/viewvc/devel/nautilus-python/nautilus-python-0.5.1-gnome-vfs.patch?revision=1.1 
  to fix build.
* Rebuild for Python2.6 transition.
* debian/control.in: 
  - drop python from Build-Depends: python-dev already depends on it.
  - add ${misc:Depends} to Depends.
  - add libgnomevfs2-dev to Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Fedora: http://cvs.fedoraproject.org/viewvc/devel/nautilus-python/nautilus-python-0.5.1-gnome-vfs.patch?revision=1.1
 
3
# Rationale: fix build in Ubuntu
 
4
 
 
5
diff -Nur -x '*.orig' -x '*~' nautilus-python-0.5.1/acinclude.m4 nautilus-python-0.5.1.new/acinclude.m4
 
6
--- nautilus-python-0.5.1/acinclude.m4  1970-01-01 01:00:00.000000000 +0100
 
7
+++ nautilus-python-0.5.1.new/acinclude.m4      2009-03-18 10:26:45.000000000 +0100
 
8
@@ -0,0 +1,87 @@
 
9
+## this one is commonly used with AM_PATH_PYTHONDIR ...
 
10
+dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
 
11
+dnl Check if a module containing a given symbol is visible to python.
 
12
+AC_DEFUN(AM_CHECK_PYMOD,
 
13
+[AC_REQUIRE([AM_PATH_PYTHON])
 
14
+py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
 
15
+AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
 
16
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
 
17
+ifelse([$2],[], [prog="
 
18
+import sys
 
19
+try:
 
20
+        import $1
 
21
+except ImportError:
 
22
+        sys.exit(1)
 
23
+except:
 
24
+        sys.exit(0)
 
25
+sys.exit(0)"], [prog="
 
26
+import $1
 
27
+$1.$2"])
 
28
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
 
29
+  then
 
30
+    eval "py_cv_mod_$py_mod_var=yes"
 
31
+  else
 
32
+    eval "py_cv_mod_$py_mod_var=no"
 
33
+  fi
 
34
+])
 
35
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
 
36
+if test "x$py_val" != xno; then
 
37
+  AC_MSG_RESULT(yes)
 
38
+  ifelse([$3], [],, [$3
 
39
+])dnl
 
40
+else
 
41
+  AC_MSG_RESULT(no)
 
42
+  ifelse([$4], [],, [$4
 
43
+])dnl
 
44
+fi
 
45
+])
 
46
+
 
47
+dnl a macro to check for ability to create python extensions
 
48
+dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
 
49
+dnl function also defines PYTHON_INCLUDES
 
50
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
 
51
+[AC_REQUIRE([AM_PATH_PYTHON])
 
52
+AC_MSG_CHECKING(for headers required to compile python extensions)
 
53
+dnl deduce PYTHON_INCLUDES
 
54
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
 
55
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
 
56
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
 
57
+if test "$py_prefix" != "$py_exec_prefix"; then
 
58
+  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
 
59
+fi
 
60
+AC_SUBST(PYTHON_INCLUDES)
 
61
+dnl check if the headers exist:
 
62
+save_CPPFLAGS="$CPPFLAGS"
 
63
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
 
64
+AC_TRY_CPP([#include <Python.h>],dnl
 
65
+[AC_MSG_RESULT(found)
 
66
+$1],dnl
 
67
+[AC_MSG_RESULT(not found)
 
68
+$2])
 
69
+CPPFLAGS="$save_CPPFLAGS"
 
70
+])
 
71
+
 
72
+dnl a macro to check for ability to embed python
 
73
+dnl  AM_CHECK_PYTHON_LIBS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
 
74
+dnl function also defines PYTHON_LIBS
 
75
+AC_DEFUN([AM_CHECK_PYTHON_LIBS],
 
76
+[AC_REQUIRE([AM_CHECK_PYTHON_HEADERS])
 
77
+AC_MSG_CHECKING(for libraries required to embed python)
 
78
+dnl deduce PYTHON_LIBS
 
79
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
 
80
+if test "x$PYTHON_LIBS" == x; then
 
81
+       PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
 
82
+fi
 
83
+if test "x$PYTHON_LIB_LOC" == x; then
 
84
+       PYTHON_LIB_LOC="${py_prefix}/lib" 
 
85
+fi
 
86
+AC_SUBST(PYTHON_LIBS)
 
87
+AC_SUBST(PYTHON_LIB_LOC)
 
88
+dnl check if the headers exist:
 
89
+save_LIBS="$LIBS"
 
90
+LIBS="$LIBS $PYTHON_LIBS"
 
91
+AC_TRY_LINK_FUNC(Py_Initialize, dnl
 
92
+         [LIBS="$save_LIBS"; AC_MSG_RESULT(yes); $1], dnl
 
93
+         [LIBS="$save_LIBS"; AC_MSG_RESULT(no); $2])
 
94
+
 
95
+])
 
96
diff -Nur -x '*.orig' -x '*~' nautilus-python-0.5.1/configure.in nautilus-python-0.5.1.new/configure.in
 
97
--- nautilus-python-0.5.1/configure.in  2008-09-16 21:16:05.000000000 +0200
 
98
+++ nautilus-python-0.5.1.new/configure.in      2009-03-18 10:26:45.000000000 +0100
 
99
@@ -39,6 +39,7 @@
 
100
 PKG_CHECK_MODULES(NAUTILUS_PYTHON, [pygtk-2.0 >= $PYGTK_REQUIRED
 
101
                                    gnome-python-2.0 >= $GNOME_PYTHON_REQUIRED
 
102
                                    libnautilus-extension >= $NAUTILUS_REQUIRED
 
103
+                                   gnome-vfs-2.0 >= $GNOME_PYTHON_REQUIRED
 
104
                                    eel-2.0 >= $EEL_REQUIRED])
 
105
 
 
106
 AC_MSG_CHECKING(for pygtk defs)