summaryrefslogtreecommitdiff
path: root/extra/pygobject2/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'extra/pygobject2/PKGBUILD')
-rw-r--r--extra/pygobject2/PKGBUILD75
1 files changed, 33 insertions, 42 deletions
diff --git a/extra/pygobject2/PKGBUILD b/extra/pygobject2/PKGBUILD
index b8521ed97..9e9720264 100644
--- a/extra/pygobject2/PKGBUILD
+++ b/extra/pygobject2/PKGBUILD
@@ -1,80 +1,71 @@
-# $Id: PKGBUILD 169377 2012-10-20 09:01:36Z heftig $
+# $Id: PKGBUILD 189818 2013-07-08 14:49:55Z heftig $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=pygobject2
pkgname=(python-gobject2 python2-gobject2 pygobject2-devel)
pkgver=2.28.6
-pkgrel=8
-arch=('i686' 'x86_64')
+pkgrel=9
+arch=(i686 x86_64)
url="http://www.pygtk.org/"
-license=('LGPL')
-makedepends=('python' 'python2')
-source=(http://ftp.gnome.org/pub/gnome/sources/pygobject/${pkgver%.*}/pygobject-${pkgver}.tar.xz
- python2-fix-type.patch
- python3-fix-build.patch
- python3-fix-maketrans.patch)
+license=(LGPL)
+makedepends=(python python2 git)
options=('!libtool')
-sha256sums=('fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8'
- 'b7b415499ffc0817cf551edf76a3fe47938db2c9f6240046eae681e6ef9b37ea'
- 'feafd4664f8455edf0bf8407ac45e219bb550df806ce0d601baae951e8c188ca'
- '4bff9adcea13a824c45d14ec501c927df47d23c22507a2456d8b5ec885924c0a')
-build() {
- cd pygobject-$pkgver
+# pygobject-2-28 branch: https://git.gnome.org/browse/pygobject/log/?h=pygobject-2-28
+source=('git://git.gnome.org/pygobject#commit=9456ba7')
+sha256sums=('SKIP')
- # patches available in 2.28 branch but unreleased.
- patch -Np1 -i "${srcdir}/python2-fix-type.patch"
- patch -Np1 -i "${srcdir}/python3-fix-build.patch"
- patch -Np1 -i "${srcdir}/python3-fix-maketrans.patch"
+prepare() {
+ cd pygobject
+ autoreconf -fi
cd ..
- cp -a "pygobject-${pkgver}" python2-build
+ cp -a pygobject python2-build
+}
- (
- cd python2-build
- export PYTHON=/usr/bin/python2
- ./configure --prefix=/usr --disable-introspection
- make
- )
+build() {
+ cd python2-build
+ ./configure --prefix=/usr --disable-introspection \
+ PYTHON=/usr/bin/python2
+ make
- (
- cd "pygobject-${pkgver}"
- ./configure --prefix=/usr --disable-introspection
- make
- )
+ cd ../pygobject
+ ./configure --prefix=/usr --disable-introspection
+ make
}
package_python-gobject2() {
pkgdesc="Python 3 bindings for GObject2"
- depends=('glib2' 'pygobject2-devel' 'python')
- replaces=('py3gobject')
+ depends=(glib2 pygobject2-devel python)
+ replaces=(py3gobject)
provides=("py3gobject=$pkgver")
- cd pygobject-${pkgver}
- make DESTDIR="${pkgdir}" install
+ cd pygobject
+ make DESTDIR="$pkgdir" install
# Delete devel stuff
- rm -r "$pkgdir"/usr/{bin,include,lib/pkgconfig,share/{gtk-doc,pygobject/{2.0/codegen,xsl}}}
+ rm -r "$pkgdir"/usr/{include,lib/pkgconfig,share/{gtk-doc,pygobject/xsl}}
}
package_python2-gobject2() {
pkgdesc="Python 2 bindings for GObject2"
- depends=('glib2' 'pygobject2-devel' 'python2')
- replaces=('pygobject')
+ depends=(glib2 pygobject2-devel python2)
+ replaces=(pygobject)
provides=("pygobject=$pkgver")
cd python2-build
- make DESTDIR="${pkgdir}" install
+ make DESTDIR="$pkgdir" install
+
+ find "$pkgdir"/usr/share/pygobject -name '*.py' -exec \
+ sed -i '1s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' {} +
- find "$pkgdir"/usr/share/pygobject -name '*.py' | \
- xargs sed -i "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|"
+ rm -r "$pkgdir"/usr/share/gtk-doc
# Split devel stuff
cd ..
mkdir -p devel/usr/{lib,share/pygobject}
mv {"$pkgdir",devel}/usr/include
mv {"$pkgdir",devel}/usr/lib/pkgconfig
- mv {"$pkgdir",devel}/usr/share/gtk-doc
mv {"$pkgdir",devel}/usr/share/pygobject/xsl
}