summaryrefslogtreecommitdiff
path: root/community/python2-caja/use-pkg-config.diff
diff options
context:
space:
mode:
Diffstat (limited to 'community/python2-caja/use-pkg-config.diff')
-rw-r--r--community/python2-caja/use-pkg-config.diff39
1 files changed, 39 insertions, 0 deletions
diff --git a/community/python2-caja/use-pkg-config.diff b/community/python2-caja/use-pkg-config.diff
new file mode 100644
index 000000000..0d32df316
--- /dev/null
+++ b/community/python2-caja/use-pkg-config.diff
@@ -0,0 +1,39 @@
+diff --git a/configure.ac b/configure.ac
+index f4059e3..a8345ae 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,8 +30,12 @@ GTK_DOC_CHECK(1.9)
+ dnl **************************************************
+ dnl * Check for Python
+ dnl **************************************************
+-AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR([could not find Python headers])])
+-AM_CHECK_PYTHON_LIBS(,[AC_MSG_ERROR([could not find Python lib])])
++AM_PATH_PYTHON([2.6])
++PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
++PYTHON_LIB_LOC="`pkg-config python-${PYTHON_VERSION} --variable=libdir`"
++AC_SUBST(PYTHON_LIBS)
++AC_SUBST(PYTHON_CFLAGS)
++AC_SUBST(PYTHON_LIB_LOC)
+
+ if test "`pkg-config --variable=datadir pygobject-3.0`" != "" ; then
+ PYGOBJECT_VERSION=pygobject-3.0
+diff --git a/src/Makefile.am b/src/Makefile.am
+index e3d7c3f..dd37d15 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -16,12 +16,13 @@ libcaja_python_la_CPPFLAGS = \
+ -DLIBDIR=\"$(libdir)\" \
+ -DPYTHON_VERSION=\"$(PYTHON_VERSION)\" \
+ -DPY_LIB_LOC="\"$(PYTHON_LIB_LOC)\"" \
+- $(PYTHON_INCLUDES) \
++ $(CAJA_PYTHON_CFLAGS) \
+ $(AM_CPPFLAGS)
+
+ libcaja_python_la_CFLAGS = \
++ $(PYTHON_CFLAGS)
+ $(CAJA_PYTHON_CFLAGS) \
+ $(AM_CFLAGS)
+
+ libcaja_python_la_LDFLAGS = -module -avoid-version
+-libcaja_python_la_LIBADD = $(CAJA_PYTHON_LIBS) $(PYTHON_LIBS)
++libcaja_python_la_LIBADD = $(PYTHON_LIBS) $(CAJA_PYTHON_LIBS)