[arch-commits] Commit in python2-caja/trunk (PKGBUILD use-pkg-config.diff)

Martin Wimpress flexiondotorg at nymeria.archlinux.org
Fri Jul 11 11:54:30 UTC 2014


    Date: Friday, July 11, 2014 @ 13:54:30
  Author: flexiondotorg
Revision: 115448

upgpkg: python2-caja 1.8.0-2 - Fixes Caja modules.

Added:
  python2-caja/trunk/use-pkg-config.diff
Modified:
  python2-caja/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   13 +++++++++----
 use-pkg-config.diff |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-07-11 11:25:06 UTC (rev 115447)
+++ PKGBUILD	2014-07-11 11:54:30 UTC (rev 115448)
@@ -3,7 +3,7 @@
 pkgname=python2-caja
 _pkgname=python-caja
 pkgver=1.8.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Python binding for Caja, to allow Caja property page and menu item extensions to be written in Python."
 url="http://mate-desktop.org"
 arch=('i686' 'x86_64')
@@ -12,12 +12,17 @@
 makedepends=('mate-common')
 replaces=('python-caja')
 provides=('python-caja')
-source=("http://pub.mate-desktop.org/releases/1.8/${_pkgname}-${pkgver}.tar.xz")
-sha1sums=('63cf08e3f711be8eb44c423322962a18f822031e')
+source=("http://pub.mate-desktop.org/releases/1.8/${_pkgname}-${pkgver}.tar.xz"
+        "use-pkg-config.diff")
+sha1sums=('63cf08e3f711be8eb44c423322962a18f822031e'
+          '32c348669868414d98c3a4be0a083b419256200d')
 
 prepare() {
     cd "${srcdir}/${_pkgname}-${pkgver}"
-    sed -i 's/python-config/python2-config/' configure
+    # Use pkg-config for python detection and variables
+    #  - https://github.com/mate-desktop/python-caja/issues/17
+    patch -Np1 -i "${srcdir}/use-pkg-config.diff"
+    autoreconf -fi
 }
 
 build() {

Added: use-pkg-config.diff
===================================================================
--- use-pkg-config.diff	                        (rev 0)
+++ use-pkg-config.diff	2014-07-11 11:54:30 UTC (rev 115448)
@@ -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)




More information about the arch-commits mailing list